Description of problem:
in Fedora 22, YAMA disallows ptrace, gdb attach fails and the CDT UI does not report that to user.
Version-Release number of selected component (if applicable):
by default in Fedora 22, YAMA disallows ptrace:
> cat /proc/sys/kernel/yama/ptrace_scope
Steps to Reproduce:
1. run "cdtdebug"
2. hit F11 to debug
3. select some process running under your UID to attach
attaching to process silently fails.
only if you switch to the "GDB traces" console you can see this:
384,219 18-target-attach --thread-group i1 6638
384,220 18^error,msg="ptrace: Operation not permitted."
Qt Creator handles this failure better, it pops up a dialog that says:
ptrace: Operation not permitted.
Could not attach to the process. Make sure no other debugger traces this process.
If your uid matches the uid
of the target process, check the settings of
For more details, see /etc/sysctl.d/10-ptrace.conf
there is a bug about the YAMA default setting:
This was also reported as Bug 1245759 , which depends on the top-level bug for this. The fact that this fails silently is a bug, and a nice error message would go a long way.
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.