From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Marek Polacek <mpolacek@redhat.com>
Cc: Tom Tromey <tromey@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [patch] testsuite: MI: racy results in async mode #2
Date: Sat, 29 Oct 2011 15:09:00 -0000 [thread overview]
Message-ID: <20111029140057.GA31363@host1.jankratochvil.net> (raw)
In-Reply-To: <4EABED10.2060600@redhat.com>
On Sat, 29 Oct 2011 14:09:52 +0200, Marek Polacek wrote:
> Well I've run $ runtest -a gdb.mi/*.exp with read1 10+ times and didn't find
> any race failures.
Unfortunately this problem is unrelated to "read1".
The problem is GDB will:
write: *stopped,reason...
write: =breakpoint-deleted,...
read: <waits for input>
while expect will:
read: *stopped,reason... + everything available incl. =breakpoint-deleted
write: 222-break-insert break_at_me
read: ... now either =breakpoint-deleted is read or local 222-break-insert pty echo
In normal cases the first expect's read will read even =breakpoint-deleted.
With the read1 hack =breakpoint-deleted is not read in, it is kept in some
internal pty buffer. But it is already in that pty buffer so when expect
sends 222-break-insert the pty echoes 222-break-insert already _after_ the
=breakpoint-deleted string so no reproducibility changes with read1.
One can reproduce it by delaying all the writes from GDB. This way everything
gets processed on the expect side (incl. pty write + read of its echo) and
only afterwars =breakpoint-deleted finally arrives.
I have attached this different kind of reproducer to the Bug:
http://sourceware.org/bugzilla/show_bug.cgi?id=12649#c6
Thanks,
Jan
next prev parent reply other threads:[~2011-10-29 14:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-27 10:16 [patch] testsuite: MI: racy results in async mode (PR testsuite/12649) Jan Kratochvil
2011-10-27 16:49 ` Tom Tromey
2011-10-28 8:51 ` [commit] " Jan Kratochvil
2011-10-29 10:36 ` [patch] testsuite: MI: racy results in async mode #2 Jan Kratochvil
2011-10-29 12:10 ` Marek Polacek
2011-10-29 12:15 ` Marek Polacek
2011-10-29 15:09 ` Jan Kratochvil [this message]
2011-10-29 16:01 ` Marek Polacek
2011-11-01 16:20 ` Tom Tromey
2011-11-01 20:01 ` [commit] " Jan Kratochvil
2011-11-01 16:26 ` Marek Polacek
2011-11-01 15:40 ` [patch] testsuite: MI: racy results in async mode (PR testsuite/12649) Doug Evans
2011-11-01 16:26 ` Jan Kratochvil
2011-11-01 18:55 ` Tom Tromey
2011-11-01 22:46 ` Doug Evans
2011-11-02 17:31 ` Tom Tromey
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=20111029140057.GA31363@host1.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=mpolacek@redhat.com \
--cc=tromey@redhat.com \
/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