exit() / GDB problem in B20.1?

Philippe Gerum rpm@axlog.fr
Tue Feb 16 11:29:00 GMT 1999


Hi,

I'am currently having some troubles with an application which randomly 
hangs into exit() when traced by GDB. The winsup traces show correct
epilog until ExitProcess() is called, then a 1-minute delay occurs.
This problem only happens when GDB is involved. While the application
is waiting, starting other cygwin-dependent tools make them hang too
during initialization, then resume execution after the 1-minute
timeout has elapsed.

After some investigation, i've managed to change this behavior by
patching the winsup sources in the do_exit() routine from
winsup/dcrt0.cc. I've added an explicit "pinfo" mutex release by
calling unlock_pinfo() after the process table is updated
(record_death()). This patch seems to solve the problem.

Is there any chance for a deadlock to occur with the process table
mutex between the application and the debugger due to GDB's control
over the debuggee? I'm not sure of my ground on this... Thanks for any 
help!

Cheers


More information about the Cygwin mailing list