Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* random-sig randomly failing with gdbserver
@ 2013-08-30 11:20 Philippe Waroquiers
  2013-08-30 11:36 ` Jan Kratochvil
  0 siblings, 1 reply; 4+ messages in thread
From: Philippe Waroquiers @ 2013-08-30 11:20 UTC (permalink / raw)
  To: gdb

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-30 11:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-30 11:20 random-sig randomly failing with gdbserver Philippe Waroquiers
2013-08-30 11:36 ` Jan Kratochvil
2013-08-30 11:55   ` Pedro Alves
2013-08-30 11:55   ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox