Problem
Rider backend thread dumps are necessary for investigating many issues.
When trying to export a log bundle for troubleshooting by clicking Help | Diagnostic Tools | Collect Backend Thread Dumps, Rider could not finish the task.
Backend threads info is also missing in the log bundle. With the following exception:
Cannot capture stack trace from process[12275]. Error: Attempted to perform an unauthorized operation.
If you have been asked to collect backend dumps by support engineers, the dotnet dump tool will fail as well.
Cause
This is due to kernel hardening in Linux. Many distros are using yama, a Linux security module.
Per explanation in this kernel doc, the default security option blocks debugger attaching. That causes the problem.
https://www.kernel.org/doc/Documentation/security/Yama.txt
Resolution
You can disable this behavior by executing the following command.
echo 0 > /proc/sys/kernel/yama/ptrace_scope
or by modifying it in /etc/sysctl.d/10-ptrace.conf
Comments
0 comments
Please sign in to leave a comment.