This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
random-sig randomly failing with gdbserver
- From: Philippe Waroquiers <philippe dot waroquiers at skynet dot be>
- To: "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Fri, 30 Aug 2013 13:20:28 +0200
- Subject: random-sig randomly failing with gdbserver
- Authentication-results: sourceware.org; auth=none
gdb.base/random-sig.exp (frequently) randomly fails when running with gdbserver,
when running multiple times
make check RUNTESTFLAGS="--target_board native-gdbserver random-signal.exp"
It looks like it can fail for at least three reasons
A successful run gives:
(gdb) PASS: gdb.base/random-signal.exp: watch v
continue
Continuing.
PASS: gdb.base/random-signal.exp: continue
^C
Program received signal SIGINT, Interrupt.
main () at ./gdb.base/random-signal.c:28
28 ;
(gdb) PASS: gdb.base/random-signal.exp: stop with control-c
A failing run gives:
(gdb) PASS: gdb.base/random-signal.exp: watch v
continue
Continuing.
PASS: gdb.base/random-signal.exp: continue
^Cmain () at ./gdb.base/random-signal.c:28
28 ;
Quit
(gdb) FAIL: gdb.base/random-signal.exp: stop with control-c
testcase ./gdb.base/random-signal.exp completed in 1 seconds
It can also fail with:
(gdb) PASS: gdb.base/random-signal.exp: watch v
continue
Continuing.
PASS: gdb.base/random-signal.exp: continue
^CFAIL: gdb.base/random-signal.exp: stop with control-c (timeout)
testcase ./gdb.base/random-signal.exp completed in 11 seconds
Or fail with
(gdb) PASS: gdb.base/random-signal.exp: watch v
continue
Continuing.
PASS: gdb.base/random-signal.exp: continue
^CError evaluating expression for watchpoint 2
Quit
Watchpoint 2 deleted.
main () at ./gdb.base/random-signal.c:28
28 ;
(gdb) FAIL: gdb.base/random-signal.exp: stop with control-c
testcase ./gdb.base/random-signal.exp completed in 1 seconds
Unclear what exactly happens. I suspect a race condition between
gdbserver reporting that the inferior stopped (to examine the
software watchpoint) and gdb sending at the same time
the interrupt, and expecting a SIGINT, but instead receiving
the stopped condition from gdbserver.
Philippe