Comment 5 for bug 78875

Revision history for this message
In , Bernie Innocenti (codewiz) wrote :

[Converted from Gnats 2238]

When Xorg hangs inside a signal handler,
gdb is unable to attach to it:

bender:~# gdb /usr/local/fdo/bin/Xorg 29958
GNU gdb Red Hat Linux (6.6-4.fc7rh)
[...]
Attaching to program: /usr/local/fdo/bin/Xorg, process 29958
../../gdb/linux-nat.c:1085: internal-error: linux_nat_attach: Assertion `pid == GET_PID (inferior_ptid) && WIFSTOPPED (status) && (WSTOPSIG (status) == SIGSTOP || WSTOPSIG (status) == 0)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.

Maybe Xorg also does something weird with signal masks. This is the stack backtrace I get if I rebuild gdb
without the assertion:

0x0000003d3dad9ca8 in __lll_mutex_lock_wait () from /lib64/libc.so.6
(gdb) bt
#0 0x0000003d3dad9ca8 in __lll_mutex_lock_wait () from /lib64/libc.so.6
#1 0x0000003d3da73382 in _L_lock_14395 () from /lib64/libc.so.6
#2 0x0000003d3da72411 in free () from /lib64/libc.so.6
#3 0x00000000004457aa in CloseDevice ()
#4 0x0000000000445b1a in CloseDownDevices ()
#5 0x000000000057ba67 in AbortServer ()
#6 0x000000000057bffe in FatalError ()
#7 0x0000000000483be7 in xf86SigHandler ()
#8 <signal handler called>
#9 0x0000003d3da6f3f9 in _int_malloc () from /lib64/libc.so.6
#10 0x0000003d3da70b3d in malloc () from /lib64/libc.so.6
#11 0x0000000000576007 in Xalloc ()
#12 0x0000000000548ef2 in XkbCopyKeymap ()
#13 0x000000000045c990 in SwitchCoreKeyboard ()
#14 0x00000000004d8d0f in mieqProcessInputEvents ()
#15 0x00000000004842d1 in ProcessInputEvents ()
#16 0x000000000044c8a8 in Dispatch ()
#17 0x000000000043429a in main ()

Release:
6.4, HEAD

Environment:
x86_64-redhat-linux-gnu