Launchpad has imported 7 comments from the remote bug at
http://sourceware.org/bugzilla/show_bug.cgi?id=9343.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2007-03-07T16:38:01+00:00 Bernie Innocenti 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

Reply at: https://bugs.launchpad.net/gdb/+bug/78875/comments/2

------------------------------------------------------------------------
On 2007-03-07T16:42:11+00:00 Daniel Jacobowitz wrote:

From: Daniel Jacobowitz <d...@false.org>
To: ber...@codewiz.org
Cc: gdb-gn...@sources.redhat.com
Subject: Re: gdb/2238: assertion failure in linux_nat_attach() when attaching 
to a hung Xorg instance
Date: Wed, 7 Mar 2007 11:42:11 -0500

 On Wed, Mar 07, 2007 at 04:30:32PM -0000, ber...@codewiz.org wrote:
 > GNU gdb Red Hat Linux (6.6-4.fc7rh)
 
 Do you get the same results if you use an FSF GDB?  I don't know if
 any of the patches Red Hat applies affect this.
 
 > [...]
 > 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:
 
 Could you check which bit of the assertion failed, and how so?
 Probably the wait status is something unusual.
 
 
 -- 
 Daniel Jacobowitz
 CodeSourcery


Reply at: https://bugs.launchpad.net/gdb/+bug/78875/comments/3

------------------------------------------------------------------------
On 2007-03-07T17:29:21+00:00 Bernie Innocenti wrote:

From: Bernardo Innocenti <ber...@codewiz.org>
To: Daniel Jacobowitz <d...@false.org>
Cc: gdb-gn...@sources.redhat.com
Subject: Re: gdb/2238: assertion failure in linux_nat_attach() when attaching
 to a hung Xorg instance
Date: Wed, 07 Mar 2007 18:29:21 +0100

 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
 Daniel Jacobowitz wrote:
 
 > Do you get the same results if you use an FSF GDB?  I don't know if
 > any of the patches Red Hat applies affect this.
 
 Yes, I've rebuilt from gdb's CVS HEAD, hit the same assertion
 failure, then removed the assertion to see if gdb could run
 anyway (and it did).
 
 
 >> Maybe Xorg also does something weird with signal masks.  This is the stack 
 >> backtrace I get if I rebuild gdb
 >> without the assertion:
 > 
 > Could you check which bit of the assertion failed, and how so?
 > Probably the wait status is something unusual.
 
 I can't restart the debug session now because the X server
 is now running fine, but I did some tests and I remember
 these facts:
 
   pid == GET_PID (inferior_ptid)
 
 This bit was definitely true
 
   && WIFSTOPPED (status)
 
 This was also true
 
 
   && (WSTOPSIG (status) == SIGSTOP
 
 I think this wasn't true, but I don't know what the signal
 number was in the debug session for which I provided the
 stack trace.
 
 In a different debug session, its value was 29 (SIGIO),
 which the X server actually uses to handle protocol
 requests.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.6 (GNU/Linux)
 
 iD8DBQFF7vZxxFEDB3H/S6wRApXGAJoCJGewaZJ9384d5Iv9xW8pJDj6pQCfWynK
 YLg+l7FPpSrD3+3cQNsqZDA=
 =45sh
 -----END PGP SIGNATURE-----


Reply at: https://bugs.launchpad.net/gdb/+bug/78875/comments/4

------------------------------------------------------------------------
On 2007-04-26T14:11:10+00:00 Greenrd-presidium wrote:

From: Robin Green <gree...@presidium.org>
To: gdb-gn...@sources.redhat.com
Cc: gdb-...@sources.redhat.com
Subject: Re: gdb/2238: assertion failure in linux_nat_attach() when attaching
 to a hung Xorg instance
Date: Thu, 26 Apr 2007 10:11:10 -0400 (EDT)

 I have also encountered this bug with gdb 6.6. I have a core dump, and gdb 
 tells me the pids match, and the value of status is 7551.
 
 Daniel Jacobowitz wrote:
 > Could you check which bit of the assertion failed, and how so?
 > Probably the wait status is something unusual.


Reply at: https://bugs.launchpad.net/gdb/+bug/78875/comments/5

------------------------------------------------------------------------
On 2007-09-24T08:00:24+00:00 Marcus Better wrote:

From: Marcus Better <mar...@better.se>
To: gdb-gn...@sources.redhat.com
Cc:  
Subject: Re: gdb/2238: assertion failure in linux_nat_attach() when attaching 
to a hung Xorg instance
Date: Mon, 24 Sep 2007 10:00:24 +0200

 I and others have hit this problem with gdb 6.6 on Debian x86_64 and powerpc 
 as well when trying to debug X:
 
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=422007
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=423775
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=443794
 
 Marcus

Reply at: https://bugs.launchpad.net/gdb/+bug/78875/comments/7

------------------------------------------------------------------------
On 2009-07-13T19:57:08+00:00 Drow-sources wrote:

The assertion failing in this bug was removed on May 1, 2008.  The new code is
more accepting of unusual wait statuses.  I believe this is fixed.

2008-05-01  Daniel Jacobowitz  <d...@codesourcery.com>
            Pedro Alves  <pe...@codesourcery.com>

        Based on work by Jan Kratochvil <jan.kratoch...@redhat.com> and Jeff
        Johnston <jjohn...@redhat.com>.

        * NEWS: Mention attach to stopped process fix.
        * infcmd.c (detach_command, disconnect_command): Discard the thread
        list.
        * infrun.c (handle_inferior_event): Do not ignore non-SIGSTOP while
        attaching.  Use signal_stop_state.
        (signal_stop_state): Check stop_soon.
        * linux-nat.c (kill_lwp): Declare earlier.
        (pid_is_stopped, linux_nat_post_attach_wait): New.
        (lin_lwp_attach_lwp): Use linux_nat_post_attach_wait.  Update
        comments.
        (linux_nat_attach): Use linux_nat_post_attach_wait.
        (detach_callback, linux_nat_detach): Improve handling for signalled
        processes.
        (linux_nat_pid_to_str): Always print out the LWP ID if it differs
        from the process ID.
        * Makefile.in (infcmd.o): Update.


Reply at: https://bugs.launchpad.net/gdb/+bug/78875/comments/8

------------------------------------------------------------------------
On 2009-08-07T21:19:42+00:00 Tromey-redhat wrote:

*** Bug 9367 has been marked as a duplicate of this bug. ***

Reply at: https://bugs.launchpad.net/gdb/+bug/78875/comments/10


** Changed in: gdb
   Importance: Unknown => Medium

** Bug watch added: Debian Bug tracker #423775
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=423775

** Bug watch added: Debian Bug tracker #443794
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=443794

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/78875

Title:
  assertion error in linux-nat.c

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to