public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/10256] New: gdb hangs when attaching to a suspended process
@ 2009-06-10 5:05 dnikdel at red5studios dot com
2009-06-10 5:11 ` [Bug gdb/10256] " dnikdel at red5studios dot com
2009-06-10 10:35 ` pedro at codesourcery dot com
0 siblings, 2 replies; 3+ messages in thread
From: dnikdel at red5studios dot com @ 2009-06-10 5:05 UTC (permalink / raw)
To: gdb-prs
This is happening completely consistently for me. At first I thought it was a
problem with the process i was trying to trace, but it doesn't seem to matter
what process.
Simple repro steps:
dnikdel@s-us-prog-1:~$ pico blah
^Z (suspend process)
[1]+ Stopped pico blah
dnikdel@s-us-prog-1:~$ ps a
PID TTY STAT TIME COMMAND
1728 pts/0 Ss+ 0:00 -bash
2693 tty1 Ss+ 0:00 /sbin/getty 38400 tty1
18745 pts/4 T 0:00 pico blah
18747 pts/4 R+ 0:00 ps a
dnikdel@s-us-prog-1:~$ gdb --pid=18745
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Attaching to process 18745
gdb just hangs here. If I start gdb up in the background and then manually
unsuspend the original process 'kill -CONT <pid>' I get the following bailout
from gdb:
/build/buildd/gdb-6.8/gdb/linux-nat.c:988: internal-error: linux_nat_attach:
Assertion `pid == GET_PID (inferior_ptid) && WIFSTOPPED (status) && WSTOPSIG
(status) == SIGSTOP' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)
Here is the system info:
$ uname -a
Linux <servername> 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:45:36 UTC 2009
x86_64 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.04
DISTRIB_CODENAME=jaunty
DISTRIB_DESCRIPTION="Ubuntu 9.04"
I was under the impression that stopping a process with SIGSTOP and then
attaching to it with the debugger is supposed to be supported, but I'm not
entirely familiar with the idiosyncrasies so please let me know if I'm doing
something horribly wrong here.
--
Summary: gdb hangs when attaching to a suspended process
Product: gdb
Version: 6.8
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
AssignedTo: unassigned at sourceware dot org
ReportedBy: dnikdel at red5studios dot com
CC: gdb-prs at sourceware dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=10256
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug gdb/10256] gdb hangs when attaching to a suspended process
2009-06-10 5:05 [Bug gdb/10256] New: gdb hangs when attaching to a suspended process dnikdel at red5studios dot com
@ 2009-06-10 5:11 ` dnikdel at red5studios dot com
2009-06-10 10:35 ` pedro at codesourcery dot com
1 sibling, 0 replies; 3+ messages in thread
From: dnikdel at red5studios dot com @ 2009-06-10 5:11 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From dnikdel at red5studios dot com 2009-06-10 05:11 -------
Created an attachment (id=3989)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=3989&action=view)
Core dump of gdb after failing to attach to a suspended process.
managed to get a core dump
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10256
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug gdb/10256] gdb hangs when attaching to a suspended process
2009-06-10 5:05 [Bug gdb/10256] New: gdb hangs when attaching to a suspended process dnikdel at red5studios dot com
2009-06-10 5:11 ` [Bug gdb/10256] " dnikdel at red5studios dot com
@ 2009-06-10 10:35 ` pedro at codesourcery dot com
1 sibling, 0 replies; 3+ messages in thread
From: pedro at codesourcery dot com @ 2009-06-10 10:35 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From pedro at codesourcery dot com 2009-06-10 10:35 -------
This was a known limitation in all gdb versions up to 6.8. It has been
fixed since (around 2008/May).
* On GNU/Linux, GDB can now attach to stopped processes. Several race
conditions handling signals delivered during attach or thread creation
have also been fixed.
Please try a recent snapshot or cvs checkout.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |WORKSFORME
Target Milestone|6.8 |6.9
http://sourceware.org/bugzilla/show_bug.cgi?id=10256
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-06-10 10:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-10 5:05 [Bug gdb/10256] New: gdb hangs when attaching to a suspended process dnikdel at red5studios dot com
2009-06-10 5:11 ` [Bug gdb/10256] " dnikdel at red5studios dot com
2009-06-10 10:35 ` pedro at codesourcery dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).