Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: random-sig randomly failing with gdbserver
Date: Fri, 30 Aug 2013 11:20:00 -0000	[thread overview]
Message-ID: <1377861628.2127.28.camel@soleil> (raw)

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



             reply	other threads:[~2013-08-30 11:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-30 11:20 Philippe Waroquiers [this message]
2013-08-30 11:36 ` Jan Kratochvil
2013-08-30 11:55   ` Pedro Alves
2013-08-30 11:55   ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1377861628.2127.28.camel@soleil \
    --to=philippe.waroquiers@skynet.be \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox