fabioz / PyDev.Debugger

Sources for the debugger used in PyDev, PyCharm and VSCode Python
Eclipse Public License 1.0
434 stars 122 forks source link

Testsuite fails with ptrace_scope > 0 #218

Open PromyLOPh opened 2 years ago

PromyLOPh commented 2 years ago

Similar to #122 the testsuite fails to complete all test_attach_to_pid* tests on systems, which have a YAMA ptrace_scope higher than zero (unlimited ptrace access). Most distributions set it to one (limits ptrace to children) nowaways. Here is a log file of a failed run. Notice how gdb outputs ptrace: Operation not permitted..

Two possible solutions include skipping these tests on systems with >0 or calling prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY) in the debuggee, although Python’s standard library does not include prctl.

Downstream bug report at https://issues.guix.gnu.org/issue/55866