summaryrefslogtreecommitdiff
path: root/src/pal
diff options
context:
space:
mode:
authorMike McLaughlin <mikem@microsoft.com>2019-07-04 07:07:51 -0700
committerJan Kotas <jkotas@microsoft.com>2019-07-04 07:07:51 -0700
commit036e426e7fffa6b10c2347c61a030d3ed8eb428e (patch)
treea77563520dd3ef31e4f5306c97ddcce3ba68a34e /src/pal
parenta985dda162403ec995c4752e194bc5a062f444a5 (diff)
downloadcoreclr-036e426e7fffa6b10c2347c61a030d3ed8eb428e.tar.gz
coreclr-036e426e7fffa6b10c2347c61a030d3ed8eb428e.tar.bz2
coreclr-036e426e7fffa6b10c2347c61a030d3ed8eb428e.zip
Fix dotnet-dump/createdump launch failure (#25562)
On CentOS or OpenSUSE dotnet-dump collect fails but a valid coredump is generated. The "prctl()" call is failing that gives the child createdump process permission to ptrace to the runtime process. On CentOS/OpenSUSE the PR_SET_PTRACER option isn't supported and not needed. Issue: https://github.com/dotnet/diagnostics/issues/334
Diffstat (limited to 'src/pal')
-rw-r--r--src/pal/src/thread/process.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pal/src/thread/process.cpp b/src/pal/src/thread/process.cpp
index 428cc2af9b..1ce2cda59f 100644
--- a/src/pal/src/thread/process.cpp
+++ b/src/pal/src/thread/process.cpp
@@ -3337,8 +3337,9 @@ PROCCreateCrashDump(char** argv)
// Gives the child process permission to use /proc/<pid>/mem and ptrace
if (prctl(PR_SET_PTRACER, childpid, 0, 0, 0) == -1)
{
+ // Ignore any error because on some CentOS and OpenSUSE distros, it isn't
+ // supported but createdump works just fine.
ERROR("PPROCCreateCrashDump: prctl() FAILED %d (%s)\n", errno, strerror(errno));
- return false;
}
// Parent waits until the child process is done
int wstatus = 0;