* Can't attach to child using gdb-5.1.1 on Linux @ 2002-03-22 7:32 Jesse Marlin 2002-04-04 6:26 ` Andrew Cagney 0 siblings, 1 reply; 7+ messages in thread From: Jesse Marlin @ 2002-03-22 7:32 UTC (permalink / raw) To: gdb I have a process that forks a child. If I try to attach to the child it reads the symbols and shows an accurate stack trace, but when I set a breakpoint and try to continue I get the following: (gdb) c Continuing. lin-lwp.c:1003: gdb-internal-error: lin_lwp_wait: Assertion `WIFSTOPPED (status) && WSTOPSIG (status) == SIGSTOP' failed. An internal GDB error was detected. This may make further debugging unreliable. Continue this debugging session? (y or n) n Create a core file containing the current state of GDB? (y or n) n Inferior GDB exited abnormally with code 1 I answered yes to the above also, but it did not improve the situation. Has anybody seen this behvior before. I am using gcc-2.95.3 for compilation. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Can't attach to child using gdb-5.1.1 on Linux 2002-03-22 7:32 Can't attach to child using gdb-5.1.1 on Linux Jesse Marlin @ 2002-04-04 6:26 ` Andrew Cagney 2002-04-04 6:54 ` Jesse Marlin 2002-04-04 8:18 ` Jesse Marlin 0 siblings, 2 replies; 7+ messages in thread From: Andrew Cagney @ 2002-04-04 6:26 UTC (permalink / raw) To: jlm; +Cc: gdb > I have a process that forks a child. If I try to attach to the > child it reads the symbols and shows an accurate stack trace, but when > I set a breakpoint and try to continue I get the following: > > (gdb) c > Continuing. > lin-lwp.c:1003: gdb-internal-error: lin_lwp_wait: Assertion `WIFSTOPPED (status) && WSTOPSIG (status) == SIGSTOP' failed. > An internal GDB error was detected. This may make further > debugging unreliable. Continue this debugging session? (y or n) n > > Create a core file containing the current state of GDB? (y or n) n > > Inferior GDB exited abnormally with code 1 > > > I answered yes to the above also, but it did not improve the situation. Has > anybody seen this behvior before. I am using gcc-2.95.3 for compilation. (not sure if someone has responded to this) The first thing to do is get a more recent GDB from: http://sources.redhat.com/gdb/current/ many problems have been fixed and if this problem still occures things have been narrowed down a bit. Andrew ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Can't attach to child using gdb-5.1.1 on Linux 2002-04-04 6:26 ` Andrew Cagney @ 2002-04-04 6:54 ` Jesse Marlin 2002-04-04 7:44 ` Andrew Cagney 2002-04-04 8:18 ` Jesse Marlin 1 sibling, 1 reply; 7+ messages in thread From: Jesse Marlin @ 2002-04-04 6:54 UTC (permalink / raw) To: Andrew Cagney; +Cc: jlm, gdb Andrew Cagney writes: > > I have a process that forks a child. If I try to attach to the > > child it reads the symbols and shows an accurate stack trace, but when > > I set a breakpoint and try to continue I get the following: > > > > (gdb) c > > Continuing. > > lin-lwp.c:1003: gdb-internal-error: lin_lwp_wait: Assertion `WIFSTOPPED (status) && WSTOPSIG (status) == SIGSTOP' failed. > > An internal GDB error was detected. This may make further > > debugging unreliable. Continue this debugging session? (y or n) n > > > > Create a core file containing the current state of GDB? (y or n) n > > > > Inferior GDB exited abnormally with code 1 > > > > > > I answered yes to the above also, but it did not improve the situation. Has > > anybody seen this behvior before. I am using gcc-2.95.3 for compilation. > > (not sure if someone has responded to this) No this is first. > > The first thing to do is get a more recent GDB from: I have been using gdb-5.1.1. More recent as in the current CVS? Thanks for the response. > > http://sources.redhat.com/gdb/current/ > > many problems have been fixed and if this problem still occures things > have been narrowed down a bit. > > Andrew > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Can't attach to child using gdb-5.1.1 on Linux 2002-04-04 6:54 ` Jesse Marlin @ 2002-04-04 7:44 ` Andrew Cagney 0 siblings, 0 replies; 7+ messages in thread From: Andrew Cagney @ 2002-04-04 7:44 UTC (permalink / raw) To: jlm; +Cc: gdb >> The first thing to do is get a more recent GDB from: > > I have been using gdb-5.1.1. More recent as in the current CVS? > Thanks for the response. CVS or a snap taken from the 5.2 branch or the mainline. You should be able to find all of them via that page - if you can't it is a bug. Andrew ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Can't attach to child using gdb-5.1.1 on Linux 2002-04-04 6:26 ` Andrew Cagney 2002-04-04 6:54 ` Jesse Marlin @ 2002-04-04 8:18 ` Jesse Marlin 2002-04-07 9:06 ` Andrew Cagney 1 sibling, 1 reply; 7+ messages in thread From: Jesse Marlin @ 2002-04-04 8:18 UTC (permalink / raw) To: Andrew Cagney; +Cc: jlm, gdb Andrew Cagney writes: > > I have a process that forks a child. If I try to attach to the > > child it reads the symbols and shows an accurate stack trace, but when > > I set a breakpoint and try to continue I get the following: > > > > (gdb) c > > Continuing. > > lin-lwp.c:1003: gdb-internal-error: lin_lwp_wait: Assertion `WIFSTOPPED (status) && WSTOPSIG (status) == SIGSTOP' failed. > > An internal GDB error was detected. This may make further > > debugging unreliable. Continue this debugging session? (y or n) n > > > > Create a core file containing the current state of GDB? (y or n) n > > > > Inferior GDB exited abnormally with code 1 > > > > > > I answered yes to the above also, but it did not improve the situation. Has > > anybody seen this behvior before. I am using gcc-2.95.3 for compilation. > > (not sure if someone has responded to this) > > The first thing to do is get a more recent GDB from: > > http://sources.redhat.com/gdb/current/ > > many problems have been fixed and if this problem still occures things > have been narrowed down a bit. > > Andrew > Okay I downloaded the 20020404 daily snapshot, compiled, installed, and used it. Here is what I am getting now. The child is sleeping for 2 minutes. Here is what I see when I initially attach to the child. (gdb) where #0 0x40a35621 in nanosleep () from /lib/libc.so.6 #1 0x40a355b8 in sleep () from /lib/libc.so.6 #2 0x0804d3fa in start_archive_client (dev_ptr=0x809e580) at dcs_archive_mgr.c:2258 #3 0x0804ab8c in ping_child (timer_id=0x809e410, context=0x0, now=1017936110) at dcs_archive_mgr.c:798 #4 0x4051de96 in evn_dispatch_event (event=0xbfffcd24, current_time=0x40524af0) at event_manager.c:803 #5 0x4051dfef in evn_process_event (wait=1) at event_manager.c:879 #6 0x4051e04b in evn_process_all_events () at event_manager.c:932 #7 0x0804ae3c in proc () at dcs_archive_mgr.c:892 #8 0x0804a510 in main (argc=7, argv=0xbfffce64) at dcs_archive_mgr.c:606 #9 0x409a8c5f in __libc_start_main () from /lib/libc.so.6 (gdb) br child_init Breakpoint 1 at 0x804de64: file dcs_archive_mgr.c, line 2810. (gdb) break dcs_archive_mgr.c:2262 Breakpoint 2 at 0x804d3fd: file dcs_archive_mgr.c, line 2262. After setting a few breakpoints I continue and see this: (gdb) c Continuing. lin-lwp.c:1105: gdb-internal-error: lin_lwp_wait: Assertion `WIFSTOPPED (status) && WSTOPSIG (status) == SIGSTOP' failed. An internal GDB error was detected. This may make further debugging unreliable. Quit this debugging session? (y or n) n Create a core file containing the current state of GDB? (y or n) y (gdb) where #0 0x40a35621 in nanosleep () from /lib/libc.so.6 #1 0x40a355b8 in sleep () from /lib/libc.so.6 #2 0x0804d3fa in start_archive_client (dev_ptr=0x809e580) at dcs_archive_mgr.c:2258 #3 0x0804ab8c in ping_child (timer_id=0x809e410, context=0x0, now=1017936110) at dcs_archive_mgr.c:798 #4 0x4051de96 in evn_dispatch_event (event=0xbfffcd24, current_time=0x40524af0) at event_manager.c:803 #5 0x4051dfef in evn_process_event (wait=1) at event_manager.c:879 #6 0x4051e04b in evn_process_all_events () at event_manager.c:932 #7 0x0804ae3c in proc () at dcs_archive_mgr.c:892 #8 0x0804a510 in main (argc=7, argv=0xbfffce64) at dcs_archive_mgr.c:606 #9 0x409a8c5f in __libc_start_main () from /lib/libc.so.6 The stack traces look good before and after, but I can't debug anything. I did create a core file of gdb this time, and will submit if you want me to. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Can't attach to child using gdb-5.1.1 on Linux 2002-04-04 8:18 ` Jesse Marlin @ 2002-04-07 9:06 ` Andrew Cagney 2002-04-11 14:43 ` Jesse Marlin 0 siblings, 1 reply; 7+ messages in thread From: Andrew Cagney @ 2002-04-07 9:06 UTC (permalink / raw) To: jlm; +Cc: gdb > The stack traces look good before and after, but I can't debug anything. > I did create a core file of gdb this time, and will submit if you want me > to. I don't know that the core fill will be of much use. However, a test case and the backtrace from the GDB core file would be. enjoy, Andrew ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Can't attach to child using gdb-5.1.1 on Linux 2002-04-07 9:06 ` Andrew Cagney @ 2002-04-11 14:43 ` Jesse Marlin 0 siblings, 0 replies; 7+ messages in thread From: Jesse Marlin @ 2002-04-11 14:43 UTC (permalink / raw) To: Andrew Cagney; +Cc: jlm, gdb Andrew Cagney writes: > > The stack traces look good before and after, but I can't debug anything. > > I did create a core file of gdb this time, and will submit if you want me > > to. > > I don't know that the core fill will be of much use. However, a test > case and the backtrace from the GDB core file would be. In the general case this seems to work (ie. fork and try to attach to a sleeping child). My program seems to be doing something that causes gdb to behave differently. I am still trying to generate a test case for it. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2002-04-11 21:43 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2002-03-22 7:32 Can't attach to child using gdb-5.1.1 on Linux Jesse Marlin 2002-04-04 6:26 ` Andrew Cagney 2002-04-04 6:54 ` Jesse Marlin 2002-04-04 7:44 ` Andrew Cagney 2002-04-04 8:18 ` Jesse Marlin 2002-04-07 9:06 ` Andrew Cagney 2002-04-11 14:43 ` Jesse Marlin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox