Discussion:
[Bug gdb/23693] New: gdb suspends itself on "run"
tromey at sourceware dot org
2018-09-20 17:20:32 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23693

Bug ID: 23693
Summary: gdb suspends itself on "run"
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: tromey at sourceware dot org
Target Milestone: ---

I'm using git master gdb on x86-64 Fedora 28.

Sometimes, when I "run", gdb suspends:

(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program:
/home/tromey/Rust/rust/build-ish/build/x86_64-unknown-linux-gnu/stage2/bin/rustc
/home/tromey/Rust/rust/src/test/ui/run-pass/sepcomp/sepcomp-lib-lto.rs
--target=i586-unknown-linux-musl --error-format json -Zui-testing -o
/home/tromey/Rust/rust/build-ish/build/x86_64-unknown-linux-gnu/test/ui/run-pass/sepcomp/sepcomp-lib-lto/a
-Crpath -O -Zunstable-options
-Lnative=/home/tromey/Rust/rust/build-ish/build/i586-unknown-linux-musl/native/rust-test-helpers
-Clinker=/home/tromey/Rust/rust/build-ish/musl-build/musl-install/bin/musl-gcc
-C lto -g -L
/home/tromey/Rust/rust/build-ish/build/x86_64-unknown-linux-gnu/test/ui/run-pass/sepcomp/sepcomp-lib-lto/auxiliary
-A unused

[1]+ Stopped ~/gdb/gdb-master/install/bin/gdb --args
"/home/tromey/Rust/rust/build-ish/build/x86_64-unknown-linux-gnu/stage2/bin/rustc"
"/home/tromey/Rust/rust/src/test/ui/run-pass/sepcomp/sepcomp-lib-lto.rs"
"--target=i586-unknown-linux-musl" "--error-format" "json" "-Zui-testing" "-o"
"/home/tromey/Rust/rust/build-ish/build/x86_64-unknown-linux-gnu/test/ui/run-pass/sepcomp/sepcomp-lib-lto/a"
"-Crpath" "-O" "-Zunstable-options"
"-Lnative=/home/tromey/Rust/rust/build-ish/build/i586-unknown-linux-musl/native/rust-test-helpers"
"-Clinker=/home/tromey/Rust/rust/build-ish/musl-build/musl-install/bin/musl-gcc"
"-C" "lto" "-g" "-L"
"/home/tromey/Rust/rust/build-ish/build/x86_64-unknown-linux-gnu/test/ui/run-pass/sepcomp/sepcomp-lib-lto/auxiliary"
"-A" "unused"


I will try to attach to the stopped gdb next time to see if I can find
out what's gone wrong.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-20 17:51:44 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23693

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
Thread 1 "gdb" received signal SIGTTOU, Stopped (tty output).
0x00007f75960257da in tcdrain () from /lib64/libpthread.so.0
(gdb) bt
#0 0x00007f75960257da in tcdrain () at /lib64/libpthread.so.0
#1 0x000000000054f237 in print_flush() () at ../../master/gdb/exceptions.c:69
#2 0x000000000054f391 in exception_fprintf(ui_file*, gdb_exception, char
const*, ...) (file=0x228b270, e=..., prefix=0x8d9100 "Error in testing
breakpoint condition:\n") at ../../master/gdb/exceptions.c:130
#3 0x0000000000410781 in bpstat_check_breakpoint_conditions
(thread=0x1865d140, bs=0x1a454cc0) at ../../master/gdb/breakpoint.c:5273
#4 0x0000000000410781 in bpstat_stop_status(address_space const*, unsigned
long, thread_info*, target_waitstatus const*, bpstats*) (aspace=<optimized
out>, bp_addr=<optimized out>, thread=0x1865d140, ws=<optimized out>,
stop_chain=<optimized out>) at ../../master/gdb/breakpoint.c:5443
#5 0x00000000005babda in handle_signal_stop(execution_control_state*)
(ecs=0x7fffc3a9f540) at ../../master/gdb/regcache.h:314
#6 0x00000000005be4b0 in handle_inferior_event_1 (ecs=0x7fffc3a9f540) at
../../master/gdb/infrun.c:5352
#7 0x00000000005be4b0 in handle_inferior_event(execution_control_state*)
(ecs=0x7fffc3a9f540) at ../../master/gdb/infrun.c:5387
#8 0x00000000005bf672 in fetch_inferior_event(void*) (client_data=<optimized
out>) at ../../master/gdb/infrun.c:3914
#9 0x000000000054d245 in gdb_wait_for_event(int) (block=<optimized out>) at
../../master/gdb/event-loop.c:859
#10 0x000000000054d3a7 in gdb_do_one_event() () at
../../master/gdb/event-loop.c:322
#11 0x000000000054d4de in gdb_do_one_event() () at
../../master/gdb/event-loop.c:371
#12 0x000000000054d4de in start_event_loop() () at
../../master/gdb/event-loop.c:371
#13 0x00000000005f86db in captured_command_loop() () at
../../master/gdb/main.c:330
#14 0x00000000005f96bd in captured_main (data=<optimized out>) at
../../master/gdb/main.c:1173
#15 0x00000000005f96bd in gdb_main(captured_main_args*) (args=<optimized out>)
at ../../master/gdb/main.c:1189
#16 0x000000000042fc05 in main(int, char**) (argc=<optimized out>,
argv=<optimized out>) at ../../master/gdb/gdb.c:32
(gdb)
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-20 17:52:17 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23693

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
gdb then prints:

Error in testing breakpoint condition:
No frame is currently executing in specified block
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...