Hi
We run our containers on AWS EKS, and the platform has forbidden calls to "ptrace".
The image we use is based on the newest version of mcr.microsoft.com/dotnet/aspnet:7.0-alpine.
We made minor adjustments, like installing dotnet-dump beside the application to perform memory dumps in production.
When we run dotnet-dump we get an error.
/tmp $ /diag/dotnet-dump ps
1 xyxyxy
/tmp $ /diag/dotnet-dump collect --process-id 1
Writing full to /tmp/core_20230120_095245
[createdump] Problem suspending threads: ptrace(ATTACH, 1) FAILED Operation not permitted (1)
[createdump] Failure took 0ms
/tmp $
As mentioned in dotnet/docs#20573 (comment) from @shirhatti this should work because the tool should send a signal to the process to dump itself.
sh-4.2$ sysctl kernel.yama.ptrace_scope
kernel.yama.ptrace_scope = 0
However, we see that the collect tries to do a ptrace ATTACH.
Hi
We run our containers on AWS EKS, and the platform has forbidden calls to "ptrace".
The image we use is based on the newest version of
mcr.microsoft.com/dotnet/aspnet:7.0-alpine.We made minor adjustments, like installing dotnet-dump beside the application to perform memory dumps in production.
When we run dotnet-dump we get an error.
As mentioned in dotnet/docs#20573 (comment) from @shirhatti this should work because the tool should send a signal to the process to dump itself.
However, we see that the collect tries to do a
ptrace ATTACH.