This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug python/14382] gdb hangs after plotting with matplotlib


https://sourceware.org/bugzilla/show_bug.cgi?id=14382

--- Comment #21 from Pedro Alves <palves at redhat dot com> ---
Hmm, I guess I'm confused on how blocking the signal on a thread can help. 
AFAICS, the main issue is with libraries changing the SIGCHLD sigaction, which
is process-wide, not per-thread.  So if something sets SA_NOCLDSTOP or SIG_IGN
on SIGCHLD, that applies to the whole process.

I just confirmed now that with SIGCHLD set to SA_NOCLDSTOP or SIG_IGN, nothing
comes out of the signalfd either.

So the workarounds seem to me to be:

 - move ptrace handling to a separate process (either always using gdbserver, 
   or a thinner ptrace wrapper/helper)

 - or perhaps, an evil hack that reimplements sigaction+signal and 
   ignores requests to ignore SIGCHLD.  References to those functions in   
   libraries would resolve to gdb's versions, assuming gdb is not itself 
   a library...

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]