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

* Re: random-sig randomly failing with gdbserver
  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
  0 siblings, 2 replies; 4+ messages in thread
From: Jan Kratochvil @ 2013-08-30 11:36 UTC (permalink / raw)
  To: Philippe Waroquiers; +Cc: gdb

On Fri, 30 Aug 2013 13:20:28 +0200, Philippe Waroquiers wrote:
> gdb.base/random-sig.exp (frequently) randomly fails when running with gdbserver,

This is a known issue, I see it daily from my nightly runs:
	CTRL-C with set debug remote often crashes GDB
	https://sourceware.org/bugzilla/show_bug.cgi?id=15297#c2
->
	[patchv2 2/2] Fix CTRL-C for remote.c (PR remote/15297)
	http://sourceware.org/ml/gdb-patches/2013-06/msg00943.html

Still it is not 100% reliable, it was discussed with Pedro off-list, planning
to send some update.


Jan


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

* Re: random-sig randomly failing with gdbserver
  2013-08-30 11:36 ` Jan Kratochvil
@ 2013-08-30 11:55   ` Pedro Alves
  2013-08-30 11:55   ` Pedro Alves
  1 sibling, 0 replies; 4+ messages in thread
From: Pedro Alves @ 2013-08-30 11:55 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: Philippe Waroquiers, gdb

On 08/30/2013 12:36 PM, Jan Kratochvil wrote:

> Still it is not 100% reliable, it was discussed with Pedro off-list, planning
> to send some update.

Yeah, I'm working on it, but I don't have the update ready yet.

-- 
Pedro Alves


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

* Re: random-sig randomly failing with gdbserver
  2013-08-30 11:36 ` Jan Kratochvil
  2013-08-30 11:55   ` Pedro Alves
@ 2013-08-30 11:55   ` Pedro Alves
  1 sibling, 0 replies; 4+ messages in thread
From: Pedro Alves @ 2013-08-30 11:55 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: Philippe Waroquiers, gdb

On 08/30/2013 12:36 PM, Jan Kratochvil wrote:

> Still it is not 100% reliable, it was discussed with Pedro off-list, planning
> to send some update.

Yeah, I've working on it, but I don't have the update ready yet.

-- 
Pedro Alves


^ 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