Bug 1246467 - cdtdebug: in F22, YAMA disallows ptrace, gdb attach fails and the CDT UI does not report that to user
Summary: cdtdebug: in F22, YAMA disallows ptrace, gdb attach fails and the CDT UI does...
Alias: None
Product: Fedora
Classification: Fedora
Component: eclipse-cdt
Version: 22
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Jeff Johnston
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2015-07-24 12:05 UTC by Michael Stahl
Modified: 2016-07-19 17:09 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-07-19 17:09:38 UTC

Attachments (Terms of Use)

Description Michael Stahl 2015-07-24 12:05:14 UTC
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):


How reproducible:

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

Actual results:

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."

Expected results:

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

Additional info:

there is a bug about the YAMA default setting:


Comment 1 Roland Grunberg 2015-07-24 14:18:26 UTC
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.

Comment 2 Fedora End Of Life 2016-07-19 17:09:38 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.