spencerbaugh at gmail dot com
2017-02-22 16:27:53 UTC
https://sourceware.org/bugzilla/show_bug.cgi?id=21195
Bug ID: 21195
Summary: Record immediately crashes with multiple inferiors
Product: gdb
Version: HEAD
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: record
Assignee: unassigned at sourceware dot org
Reporter: spencerbaugh at gmail dot com
Target Milestone: ---
While recording a program, if you add another inferior, GDB will crash:
Current directory is /home/sbaugh/
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 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".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) file hello
Reading symbols from /home/sbaugh/hello...(no debugging symbols found)...done.
(gdb) start
Temporary breakpoint 1 at 0x4007ba
Starting program: /home/sbaugh/hello
warning: no loadable sections found in added symbol-file system-supplied DSO at
0x7ffff7ffa000
Temporary breakpoint 1, 0x00000000004007ba in main ()
(gdb) record
(gdb) add-inferior -exec hello
Added inferior 2
Reading symbols from /home/sbaugh/hello...(no debugging symbols found)...done.
(gdb) infe 2
[Switching to inferior 2 [process 0] (/home/sbaugh/hello)]
(gdb) start
Temporary breakpoint 2 at 0x4007ba (2 locations)
Starting program: /home/sbaugh/hello
/tmp/buildd/gdb-7.4.1+dfsg/gdb/record.c:1176: internal-error: record_wait_1:
Assertion `(options & TARGET_WNOHANG) != 0' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)
I've confirmed this on HEAD as well. (I presume this bug is present in all
versions of gdb with record)
Snippet of backtrace:
#3 0x000000000065a8c9 in internal_vproblem(internal_problem *, const char *,
int, const char *, typedef __va_list_tag __va_list_tag *)
(problem=***@entry=0xc3b740 <internal_error_problem>, file=<optimized out>,
line=<optimized out>, fmt=<optimized out>, ap=***@entry=0x7ffcd0fbf1c8) at
utils.c:772
#4 0x000000000065aa39 in internal_verror (file=<optimized out>,
line=<optimized out>, fmt=<optimized out>, ap=***@entry=0x7ffcd0fbf1c8) at
utils.c:798
#5 0x0000000000695822 in internal_error (file=***@entry=0x861739
"record-full.c", line=***@entry=1066, fmt=<optimized out>) at
./common/errors.c:55
#6 0x0000000000683a3b in record_full_wait_1 (options=<optimized out>,
status=0x7ffcd0fbf4a0, ptid=..., ops=0xc64620 <record_full_ops>) at
record-full.c:1066
#7 record_full_wait (ops=0xc64620 <record_full_ops>, ptid=...,
status=0x7ffcd0fbf4a0, options=<optimized out>) at record-full.c:1346
#8 0x00000000005aa20e in delegate_wait (self=<optimized out>, arg1=...,
arg2=<optimized out>, arg3=<optimized out>) at target-delegates.c:116
#9 0x00000000005b9815 in target_wait (ptid=...,
status=***@entry=0x7ffcd0fbf4a0, options=***@entry=0) at target.c:2289
#10 0x000000000044feca in startup_inferior (ntraps=***@entry=1) at
fork-child.c:465
The culprit seems to be that startup_inferior passes options=0 to wait, while
record_full_wait_1 asserts (options & TARGET_WNOHANG) != 0.
Bug ID: 21195
Summary: Record immediately crashes with multiple inferiors
Product: gdb
Version: HEAD
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: record
Assignee: unassigned at sourceware dot org
Reporter: spencerbaugh at gmail dot com
Target Milestone: ---
While recording a program, if you add another inferior, GDB will crash:
Current directory is /home/sbaugh/
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 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".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) file hello
Reading symbols from /home/sbaugh/hello...(no debugging symbols found)...done.
(gdb) start
Temporary breakpoint 1 at 0x4007ba
Starting program: /home/sbaugh/hello
warning: no loadable sections found in added symbol-file system-supplied DSO at
0x7ffff7ffa000
Temporary breakpoint 1, 0x00000000004007ba in main ()
(gdb) record
(gdb) add-inferior -exec hello
Added inferior 2
Reading symbols from /home/sbaugh/hello...(no debugging symbols found)...done.
(gdb) infe 2
[Switching to inferior 2 [process 0] (/home/sbaugh/hello)]
(gdb) start
Temporary breakpoint 2 at 0x4007ba (2 locations)
Starting program: /home/sbaugh/hello
/tmp/buildd/gdb-7.4.1+dfsg/gdb/record.c:1176: internal-error: record_wait_1:
Assertion `(options & TARGET_WNOHANG) != 0' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)
I've confirmed this on HEAD as well. (I presume this bug is present in all
versions of gdb with record)
Snippet of backtrace:
#3 0x000000000065a8c9 in internal_vproblem(internal_problem *, const char *,
int, const char *, typedef __va_list_tag __va_list_tag *)
(problem=***@entry=0xc3b740 <internal_error_problem>, file=<optimized out>,
line=<optimized out>, fmt=<optimized out>, ap=***@entry=0x7ffcd0fbf1c8) at
utils.c:772
#4 0x000000000065aa39 in internal_verror (file=<optimized out>,
line=<optimized out>, fmt=<optimized out>, ap=***@entry=0x7ffcd0fbf1c8) at
utils.c:798
#5 0x0000000000695822 in internal_error (file=***@entry=0x861739
"record-full.c", line=***@entry=1066, fmt=<optimized out>) at
./common/errors.c:55
#6 0x0000000000683a3b in record_full_wait_1 (options=<optimized out>,
status=0x7ffcd0fbf4a0, ptid=..., ops=0xc64620 <record_full_ops>) at
record-full.c:1066
#7 record_full_wait (ops=0xc64620 <record_full_ops>, ptid=...,
status=0x7ffcd0fbf4a0, options=<optimized out>) at record-full.c:1346
#8 0x00000000005aa20e in delegate_wait (self=<optimized out>, arg1=...,
arg2=<optimized out>, arg3=<optimized out>) at target-delegates.c:116
#9 0x00000000005b9815 in target_wait (ptid=...,
status=***@entry=0x7ffcd0fbf4a0, options=***@entry=0) at target.c:2289
#10 0x000000000044feca in startup_inferior (ntraps=***@entry=1) at
fork-child.c:465
The culprit seems to be that startup_inferior passes options=0 to wait, while
record_full_wait_1 asserts (options & TARGET_WNOHANG) != 0.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are receiving this mail because:
You are on the CC list for the bug.