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]

gdb/2238: assertion failure in linux_nat_attach() when attaching to a hung Xorg instance


>Number:         2238
>Category:       gdb
>Synopsis:       assertion failure in linux_nat_attach() when attaching to a hung Xorg instance
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 07 16:38:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     bernie@codewiz.org
>Release:        6.4, HEAD
>Organization:
>Environment:
x86_64-redhat-linux-gnu
>Description:
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 ()
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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