Bug 25503 - FAIL: gdb.threads/signal-while-stepping-over-bp-other-thread.exp: step (pattern 3)
Summary: FAIL: gdb.threads/signal-while-stepping-over-bp-other-thread.exp: step (patte...
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: testsuite (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-04 16:45 UTC by Tom de Vries
Modified: 2022-12-01 09:38 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
gdb.1.log (3.02 KB, text/x-log)
2020-02-04 16:52 UTC, Tom de Vries
Details
gdb.12.log (2.98 KB, text/x-log)
2020-02-04 16:52 UTC, Tom de Vries
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom de Vries 2020-02-04 16:45:05 UTC
With test.sh setup to run test-case gdb.threads/signal-while-stepping-over-bp-other-thread.exp, and when run in conjunction with "stress -c 5", I get:
...
$ for n in $(seq 1 50); do ./test.sh 2>&1 | tee TESTLOG.$n; cp gdb.log gdb.$n.log; cp gdb.sum gdb.$n.sum; done |  grep "expected passes"
# of expected passes            22
# of expected passes            22
# of expected passes            22
# of expected passes            22
# of expected passes            22
# of expected passes            22
# of expected passes            22
# of expected passes            22
# of expected passes            22
# of expected passes            22
# of expected passes            22
# of expected passes            21
# of expected passes            22
# of expected passes            21
# of expected passes            22
# of expected passes            22
# of expected passes            22
# of expected passes            22
^C^C
...

And in gdb.12.sum (as well as gdb.14.sum) we find:
...
FAIL: gdb.threads/signal-while-stepping-over-bp-other-thread.exp: step (pattern 3)
...
Comment 1 Tom de Vries 2020-02-04 16:46:13 UTC
In more detail:
...
(gdb) PASS: gdb.threads/signal-while-stepping-over-bp-other-thread.exp: set debug infrun 1
gdb_expect_list pattern: /need to step-over/
step
infrun: clear_proceed_status_thread (Thread 0x7ffff7fa6740 (LWP 22256))
infrun: clear_proceed_status_thread (Thread 0x7ffff74c6700 (LWP 22260))
infrun: clear_proceed_status_thread (Thread 0x7ffff6cc5700 (LWP 22261))
infrun: proceed (addr=0xffffffffffffffff, signal=GDB_SIGNAL_DEFAULT)
infrun: need to step-over [Thread 0x7ffff74c6700 (LWP 22260)] first
infrun: step-over queue now empty
infrun: resuming [Thread 0x7ffff74c6700 (LWP 22260)] for step-over
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=1, current thread [Thread 0x7ffff74c6700 (LWP 22260)] at 0x400891
infrun: infrun_async(1)
infrun: prepare_to_wait
infrun: proceed: resuming Thread 0x7ffff7fa6740 (LWP 22256)
infrun: resume (step=0, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fa6740 (LWP 22256)] at 0x4009c3
infrun: prepare_to_wait
infrun: proceed: [Thread 0x7ffff74c6700 (LWP 22260)] resumed
infrun: proceed: resuming Thread 0x7ffff6cc5700 (LWP 22261)
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff6cc5700 (LWP 22261)] at 0x400828
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun:   22256.22261.0 [Thread 0x7ffff6cc5700 (LWP 22261)],
infrun:   status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: handle_inferior_event status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: stop_pc = 0x40082c
infrun: stepping inside range [0x400828-0x400837]
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff6cc5700 (LWP 22261)] at 0x40082c
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun:   22256.22261.0 [Thread 0x7ffff6cc5700 (LWP 22261)],
infrun:   status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: handle_inferior_event status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: stop_pc = 0x40082e
infrun: stepping inside range [0x400828-0x400837]
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff6cc5700 (LWP 22261)] at 0x40082e
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun:   22256.22261.0 [Thread 0x7ffff6cc5700 (LWP 22261)],
infrun:   status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: handle_inferior_event status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: stop_pc = 0x400831
infrun: stepping inside range [0x400828-0x400837]
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff6cc5700 (LWP 22261)] at 0x400831
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun:   22256.22261.0 [Thread 0x7ffff6cc5700 (LWP 22261)],
infrun:   status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: handle_inferior_event status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: stop_pc = 0x400835
infrun: stepping inside range [0x400828-0x400837]
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff6cc5700 (LWP 22261)] at 0x400835
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun:   22256.22261.0 [Thread 0x7ffff6cc5700 (LWP 22261)],
infrun:   status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: handle_inferior_event status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: stop_pc = 0x400837
infrun: stepped to a different line
infrun: stop_waiting
infrun: stop_all_threads
infrun: stop_all_threads, pass=0, iterations=0
infrun:   Thread 0x7ffff7fa6740 (LWP 22256) executing, need stop
infrun:   Thread 0x7ffff74c6700 (LWP 22260) executing, need stop
infrun:   Thread 0x7ffff6cc5700 (LWP 22261) not executing
infrun: target_wait (-1.0.0, status) =
infrun:   22256.22256.0 [Thread 0x7ffff7fa6740 (LWP 22256)],
infrun:   status->kind = stopped, signal = GDB_SIGNAL_0
infrun: stop_all_threads status->kind = stopped, signal = GDB_SIGNAL_0 Thread 0x7ffff7fa6740 (LWP 22256)
infrun:   Thread 0x7ffff7fa6740 (LWP 22256) not executing
infrun:   Thread 0x7ffff74c6700 (LWP 22260) executing, already stopping
infrun:   Thread 0x7ffff6cc5700 (LWP 22261) not executing
infrun: target_wait (gdb_expect_list pattern: /resume \(step=1/
gdb_expect_list pattern: /signal arrived while stepping over breakpoint/
-1.0.0, status) =
infrun:   -1.0.0 [process -1],
infrun:   status->kind = ignore
infrun: target_wait (-1.0.0, status) =
infrun:   22256.22260.0 [Thread 0x7ffff74c6700 (LWP 22260)],
infrun:   status->kind = stopped, signal = GDB_SIGNAL_USR1
infrun: stop_all_threads status->kind = stopped, signal = GDB_SIGNAL_USR1 Thread 0x7ffff74c6700 (LWP 22260)
infrun: target_wait status->kind = stopped, signal = GDB_SIGNAL_USR1, saving status for 22256.22260.0
infrun: saving status status->kind = stopped, signal = GDB_SIGNAL_USR1 for 22256.22260.0
infrun: saved stop_pc=0x400891 for Thread 0x7ffff74c6700 (LWP 22260) (currently_stepping=0)
infrun:   Thread 0x7ffff7fa6740 (LWP 22256) not executing
infrun:   Thread 0x7ffff74c6700 (LWP 22260) not executing
infrun:   Thread 0x7ffff6cc5700 (LWP 22261) not executing
infrun: stop_all_threads, pass=1, iterations=1
infrun:   Thread 0x7ffff7fa6740 (LWP 22256) not executing
infrun:   Thread 0x7ffff74c6700 (LWP 22260) not executing
infrun:   Thread 0x7ffff6cc5700 (LWP 22261) not executing
infrun: stop_all_threads done
51            callme ();
infrun: infrun_async(0)
(gdb) FAIL: gdb.threads/signal-while-stepping-over-bp-other-thread.exp: step (pattern 3)
gdb_expect_list pattern: /stepped to a different line/
gdb_expect_list pattern: /callme/
gdb_expect_list pattern: //
...
Comment 2 Tom de Vries 2020-02-04 16:52:39 UTC
Created attachment 12252 [details]
gdb.1.log
Comment 3 Tom de Vries 2020-02-04 16:52:56 UTC
Created attachment 12253 [details]
gdb.12.log
Comment 4 Tom de Vries 2022-12-01 09:38:28 UTC
Reproduced in OBS with gdb-12.1 based package, on s390x-linux.