Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] testsuite: pthread_cond_wait.exp: Avoid a race
Date: Tue, 12 Feb 2013 17:30:00 -0000	[thread overview]
Message-ID: <20130212172950.GA6877@host2.jankratochvil.net> (raw)
In-Reply-To: <20130212172301.GH17107@adacore.com>

On Tue, 12 Feb 2013 18:23:01 +0100, Joel Brobecker wrote:
> > It is just too racy.  I will check in the easy workaround below, it is
> > sure not a real fix.
> 
> 2 seconds feels much much much too long, however.

2 seconds is a general delay standard in the testsuite so I do not find it
would hurt so much:
	$ grep 'sleep 2' */*.exp|wc -l
	20


> I try to avoid
> these types of delays, because collectively they make a significant
> dent on the overall amount of time it takes to run the testsuite.

The testsuite is already directory-parallelized and soon Tom should introduce
even a file-parallelization, so sleep should not hurt much.


> I am trying to think of a way to rewrite the program to avoid
> the delay entirely,

Yes, I understand the sleep is terribly but as it is so widespread in the
testsuite I just found it a "good enough" fix.  Sure I can keep it only among
my local non-upstreamed testsuite races fixes so that I can continue running
the daily regression testing:
	gdbserverasyncnonstop.patch
	watchpointfork2.patch
	gccpr4.patch
	valgrind-kill.patch


> but I don't think it's possible,

IMO there should be retrying.  If it does not find the symbol then resume it
for another 0.1 sec or even 1 sec as such case does not commonly happen.


> Can we try a smaller value?

No.  IMO even those 2 seconds is too long.  The machine has load about 20-30
when running the parallelized testsuites (I always run 3 at once) and I would
like to parallelize it even more if the testsuite already was not so fragily
gainst even higher loads.


Thanks,
Jan


  reply	other threads:[~2013-02-12 17:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-12 17:04 Jan Kratochvil
2013-02-12 17:23 ` Joel Brobecker
2013-02-12 17:30   ` Jan Kratochvil [this message]
2013-02-12 17:39     ` Joel Brobecker
2013-02-12 20:13       ` Tom Tromey
2013-02-14 15:25       ` [commit] " Jan Kratochvil
2013-02-12 17:41     ` Jan Kratochvil

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=20130212172950.GA6877@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@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