Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Nathanael Nerode <neroden@twcny.rr.com>,
	gcc-patches@gcc.gnu.org, gdb-patches@sources.redhat.com,
	binutils@sources.redhat.com, dj@redhat.com, autoconf@gnu.org
Subject: Re: (toplevel) introduce host subdir configuration in Makefile
Date: Mon, 02 Dec 2002 08:40:00 -0000	[thread overview]
Message-ID: <oru1hwml2i.fsf@free.redhat.lsd.ic.unicamp.br> (raw)
In-Reply-To: <20021202161822.GA11078@nevyn.them.org>

On Dec  2, 2002, Daniel Jacobowitz <drow@mvista.com> wrote:

> You may already know this, but just to be careful I'll mention it
> anyway... it is not necessarily safe to configure more than one
> subdirectory at a time.  One possibly gotcha is the updating of
> $cache_file.  It isn't done atomically and so if you happen to have two
> subdirectories with the same (essentially) configure.in, and they
> happen to get started on an SMP system by make -j2 at (essentially) the
> same time, you can blow out the cache file.

> This isn't entirely hypothetical.  A similar thing happened in
> libiberty with two invocations of config.status.

This was a bug in autoconf 2.13, that's fixed in autoconf 2.5x.

As for config.cache, the update isn't atomic but, in general, you'll
probably just lose part of the cache.  Unfortunately, this is not
guaranteed by the latest version of autoconf, but it shouldn't be too
hard to fix in the common case by replacing `cat confcache
>$cache_file´ with say `cat confcache >$cache_file.$$ && mv
$cache_file.$$ $cache_file || cat confcache >$cache_file´ in
_AC_CACHE_DUMP.  Unless we want to preserve the semantics that
$cache_file retains the same inode, so that, if there are hard-links
to it, they're also updated, which might be a reasonable thing to do
in case a global cache-file is maintained.

Without atomic updates, it's not safe to run multiple configures in
parallel, indeed.  But I believe you'll most often just lose some
updates to the cache.  You can't really help that, anyway, unless you
serialized configure runs or acquire a lock on it and read it back in
just in case it was updated before writing it out and releasing the
lock; I don't think we want to do that.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


  reply	other threads:[~2002-12-02 16:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-28 14:13 Nathanael Nerode
2002-11-29  8:44 ` Andrew Cagney
2002-12-02  8:18 ` Daniel Jacobowitz
2002-12-02  8:40   ` Alexandre Oliva [this message]
2002-12-02  8:52     ` Daniel Jacobowitz
2002-12-02  9:44       ` Alexandre Oliva
2002-12-02 10:23         ` Daniel Jacobowitz
2002-12-02 12:48           ` Alexandre Oliva
2002-12-02 13:43             ` DJ Delorie
2002-12-02 14:03     ` Thomas Dickey
2002-12-04  0:42       ` Samuel Tardieu
2002-12-04  3:14         ` Thomas E. Dickey
2002-12-02 10:17   ` DJ Delorie
2002-11-29 13:51 Nathanael Nerode
2002-11-29 14:23 ` Andrew Cagney
2002-11-29 14:40 Nathanael Nerode
2002-11-29 15:16 ` Andrew Cagney

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=oru1hwml2i.fsf@free.redhat.lsd.ic.unicamp.br \
    --to=aoliva@redhat.com \
    --cc=autoconf@gnu.org \
    --cc=binutils@sources.redhat.com \
    --cc=dj@redhat.com \
    --cc=drow@mvista.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=neroden@twcny.rr.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