public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Laurent GUERBY <laurent@guerby.net>
To: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Cc: gcc <gcc@gcc.gnu.org>, Paolo Bonzini <bonzini@gnu.org>,
	Arnaud Charlet <charlet@adacore.com>,
	Eric Botcazou <ebotcazou@adacore.com>,
	Dave Korn <dave.korn.cygwin@googlemail.com>
Subject: Re: Need some Unix and /bin/sh expertise for GCC testsuite
Date: Sat, 15 Aug 2009 14:12:00 -0000	[thread overview]
Message-ID: <1250321492.20287.157.camel@localhost> (raw)
In-Reply-To: <20090815055330.GA30643@gmx.de>

On Sat, 2009-08-15 at 07:53 +0200, Ralf Wildenhues wrote:
> > > * Laurent GUERBY wrote on Fri, Aug 14, 2009 at 10:52:35PM CEST:
> > > > => gcc/testsuite/ada/acats/run_all.sh
> > > 
> > > > 3/ Here is the point I find surprising: the "ps fauxww" run in the
> > > > second "if" show that even if the script is fully sequential
> > > > at least one gnatmake subprocess (collect-ld) is still marked as running 
> > > > *in parallel* with the ps command in the subsequent "if" of the script!
> 
> Sounds like http://thread.gmane.org/gmane.comp.shells.bash.bugs/11990
> and the NEWS for bash-3.2 contains this entry:
> 
> l.  Several fixes to the code that manages the list of terminated jobs and
>     their exit statuses, and the list of active and recently-terminated jobs
>     to avoid pid aliasing/wraparound and allocation errors.
> 
> I'd try out a newer bash version.

Good catch! The script shown in the discussion is just like mine and the
order of magnitude of occurrence is the same.

Since upgrading bash will not be an option for everyone, I will propose
a patch that "sleep" a bit if gnatmake succeeds and the executable is
still not present or empty, I'm testing:

      # workaround bash process management bug
      trycount=0
      while [ $trycount -le 30 ]; do
          trycount=$(expr $trycount + 1)
          if [ -s $dir/tests/$chapter/$i/$binmain -a -x $dir/tests/$chapter/$i/$binmain ]; then
             break
          else
             sleep 1
          fi
      done

Thanks again for your help,

Laurent



  reply	other threads:[~2009-08-15  7:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-14 21:17 Laurent GUERBY
2009-08-14 21:32 ` Dave Korn
2009-08-14 21:37   ` Laurent GUERBY
2009-08-15  7:06     ` Dave Korn
2009-08-15 14:00       ` Laurent GUERBY
2009-08-14 21:43 ` Ralf Wildenhues
2009-08-14 22:57   ` Laurent GUERBY
2009-08-15  9:57     ` Ralf Wildenhues
2009-08-15 14:12       ` Laurent GUERBY [this message]
2009-08-15  0:24 ` Andreas Schwab
2009-08-15  4:11   ` Laurent GUERBY

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=1250321492.20287.157.camel@localhost \
    --to=laurent@guerby.net \
    --cc=Ralf.Wildenhues@gmx.de \
    --cc=bonzini@gnu.org \
    --cc=charlet@adacore.com \
    --cc=dave.korn.cygwin@googlemail.com \
    --cc=ebotcazou@adacore.com \
    --cc=gcc@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).