From: Dmitry Smirnov <divis1969@mail.ru>
To: gdb@sourceware.org
Subject: Re: How to catch GDB crash
Date: Tue, 24 Jun 2008 12:39:00 -0000 [thread overview]
Message-ID: <E1KB7nM-000Cg0-00.divis1969-mail-ru@f94.mail.ru> (raw)
Hi!
I have to say that your advices were useful. I was able to catch the crash.
Maybe it will be interesting for you.
First, after I attached to the process, I've set 3 breakpoints: exit, _exit, abort (which is cygwin1!abort in fact).
Next, I've noticed that program is stopped in that weird state Brian wrote about:
(gdb) bt
#0 0x7c901231 in ntdll!DbgUiConnectToDbg () from /c/WINDOWS/system32/ntdll.dll
#1 0x7c9507a8 in ntdll!KiIntSystemCall () from /c/WINDOWS/system32/ntdll.dll
#2 0x00000005 in ?? ()
I've tried to step through the code: three or four 'ni' commands and, oops.. it looks the program has been resumed.
After that, I performed actions that lead to the crash (it is just issuing 'ni' for arm-elf-gdb from Eclipse) and I was brought to the following situation:
Breakpoint 2, 0x61084819 in cygwin1!abort () from /usr/bin/cygwin1.dll
(gdb)
0x6108481e in cygwin1!abort () from /usr/bin/cygwin1.dll
(gdb) info th
3 thread 5424.0x114c 0x7c90eb94 in ntdll!LdrAccessResource ()
from /c/WINDOWS/system32/ntdll.dll
2 thread 5424.0x1108 0x7c90eb94 in ntdll!LdrAccessResource ()
from /c/WINDOWS/system32/ntdll.dll
* 1 thread 5424.0x1bc 0x6108481e in cygwin1!abort ()
from /usr/bin/cygwin1.dll
(gdb) bt
#0 0x6108481e in cygwin1!abort () from /usr/bin/cygwin1.dll
#1 0x61086e60 in sigfillset () from /usr/bin/cygwin1.dll
#2 0x0040b6b7 in internal_verror (file=0x62380b ".././gdb/mi/mi-interp.c",
line=340, fmt=0x6237ed "%s: Assertion `%s' failed.", ap=0x22e64c "-7b")
at utils.c:809
#3 0x0040b6f6 in internal_error (file=0x62380b ".././gdb/mi/mi-interp.c",
line=340, string=0x6237ed "%s: Assertion `%s' failed.") at utils.c:818
#4 0x0048cfec in mi_on_resume (ptid={pid = 42000, lwp = 0, tid = 0})
at .././gdb/mi/mi-interp.c:340
#5 0x0046377f in observer_target_resumed_notification_stub (data=0x48cf40,
args_data=0x22e6b0) at observer.inc:378
#6 0x00463052 in generic_observer_notify (subject=0x1, args=0x5e74ac)
at observer.c:166
#7 0x004637fe in observer_notify_target_resumed (ptid=
{pid = 42000, lwp = 0, tid = 0}) at observer.inc:402
#8 0x0047bd22 in set_running (ptid={pid = 42000, lwp = 0, tid = 0},
running=1) at thread.c:435
#9 0x004265a0 in resume (step=1, sig=TARGET_SIGNAL_HUP) at infrun.c:1063
#10 0x004294c0 in proceed (addr=4294967295, siggnal=TARGET_SIGNAL_DEFAULT,
step=1) at infrun.c:1265
#11 0x00412564 in step_1 (skip_subroutines=1, single_inst=1, count_string=0x0)
at infcmd.c:789
#12 0x00402433 in execute_command (p=0x22e872 "", from_tty=1) at top.c:466
#13 0x004116e2 in catch_exception (uiout=0x100f0c80,
func=0x48e040 <do_captured_execute_command>, func_args=0x22e898, mask=6)
at exceptions.c:463
#14 0x0048e0e6 in cli_interpreter_exec (data=0x0, command_str=0x103230b0 "ni")
at .././gdb/cli/cli-interp.c:130
#15 0x0041acfb in interp_exec (interp=0x100f0ce8, command_str=0x103230b0 "ni")
at interps.c:325
#16 0x0048cc49 in mi_cmd_interpreter_exec (
command=0x64d54e "-interpreter-exec", argv=0x22e998, argc=2)
at .././gdb/mi/mi-interp.c:209
#17 0x00505a45 in captured_mi_execute_command (uiout=0x100f1660,
data=0x22ea40) at .././gdb/mi/mi-main.c:1104
#18 0x004116e2 in catch_exception (uiout=0x100f1660,
func=0x5057a0 <captured_mi_execute_command>, func_args=0x22ea40, mask=6)
at exceptions.c:463
#19 0x0050558a in mi_execute_command (cmd=0x10ef9ea0 "229 ni", from_tty=1)
at .././gdb/mi/mi-main.c:1159
#20 0x0048cd49 in mi_execute_command_wrapper (cmd=0x10ef9ea0 "229 ni")
at .././gdb/mi/mi-interp.c:265
#21 0x00436e5a in handle_file_event (event_file_desc=0) at event-loop.c:732
#22 0x004368c2 in process_event () at event-loop.c:341
#23 0x004371a5 in gdb_do_one_event (data=0x0) at event-loop.c:378
#24 0x0041192b in catch_errors (func=0x437020 <gdb_do_one_event>,
func_args=0x0, errstring=0x607b20 "", mask=6) at exceptions.c:509
#25 0x00436914 in start_event_loop () at event-loop.c:404
#26 0x004010ab in captured_command_loop (data=0x0) at .././gdb/main.c:99
#27 0x0041192b in catch_errors (func=0x4010a0 <captured_command_loop>,
func_args=0x0, errstring=0x5f7139 "", mask=6) at exceptions.c:509
#28 0x00401914 in captured_main (data=0x22ee10) at .././gdb/main.c:882
#29 0x0041192b in catch_errors (func=0x4010f0 <captured_main>,
func_args=0x22ee10, errstring=0x5f7139 "", mask=6) at exceptions.c:509
#30 0x00402113 in gdb_main (args=0x22ee10) at .././gdb/main.c:891
#31 0x0040109b in main (argc=8, argv=0x100301a0) at gdb.c:33
(gdb)
Now I can start investigations.
Dmitry
next reply other threads:[~2008-06-24 12:39 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-24 12:39 Dmitry Smirnov [this message]
2008-06-24 12:58 ` Pedro Alves
-- strict thread matches above, loose matches on Subject: below --
2008-06-24 17:03 Dmitry Smirnov
2008-06-24 17:29 ` Pedro Alves
2008-06-25 8:03 ` Dmitry Smirnov
2008-06-25 23:28 ` Pedro Alves
2008-06-26 13:56 ` Dmitry Smirnov
2008-06-26 14:21 ` Pedro Alves
2008-06-26 14:33 ` Dmitry Smirnov
2008-06-30 15:58 ` Dmitry Smirnov
2008-07-02 11:05 ` Dmitry Smirnov
2008-07-02 11:52 ` Pedro Alves
2008-07-02 12:51 ` Re[2]: " Dmitry Smirnov
2008-07-05 3:15 ` Pedro Alves
2008-07-07 8:36 ` Dmitry Smirnov
2008-07-07 14:29 ` Pedro Alves
2008-07-07 15:47 ` Dmitry Smirnov
2008-07-07 16:01 ` Pedro Alves
2008-07-08 8:27 ` Dmitry Smirnov
2008-07-01 11:38 ` Vladimir Prus
2008-07-01 11:41 ` Pedro Alves
2008-06-24 8:52 Dmitry Smirnov
2008-06-23 16:32 Dmitry Smirnov
2008-06-23 16:57 ` Aleksandar Ristovski
2008-06-23 17:12 ` Michael Snyder
2008-06-23 18:23 ` Eli Zaretskii
2008-06-23 18:32 ` Michael Snyder
2008-06-23 18:36 ` Pedro Alves
2008-06-23 19:37 ` Brian Dessent
2008-06-23 20:50 ` Dr. Rolf Jansen
2008-06-23 20:59 ` Dr. Rolf Jansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1KB7nM-000Cg0-00.divis1969-mail-ru@f94.mail.ru \
--to=divis1969@mail.ru \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox