Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: "Burton, Ross" <ross.burton@intel.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: util-macros.do_package failed Re: Build failure
Date: Fri, 04 Apr 2014 23:44:21 +0100	[thread overview]
Message-ID: <1396651461.13862.30.camel@ted> (raw)
In-Reply-To: <CAJTo0LYdmV9bTdttrO_kkjXRGuH3xC9c_h_EnGEo6=dcbxuBdg@mail.gmail.com>

On Fri, 2014-04-04 at 21:01 +0100, Burton, Ross wrote:
> On 4 April 2014 18:18, Robert Yang <liezhi.yang@windriver.com> wrote:
> > Maybe we can let the do_package depend on base-passwd:do_populate_sysroot
> > to fix the problem.
> 
> I keep on thinking that we need to effectively have a readers/writer
> lock on the sysroot, so that e.g. do_compile() takes a read lock and
> do_populate_sysroot() takes a write lock.  This way very slim races
> such as this (and aclocal disappearing, and binaries being re-written
> whilst being executed, etc) just can't happen.  By having a
> readers/writer lock the stalls for the actual populate of the sysroot
> shouldn't have too great an impact, and would let us remove other
> workarounds we've added (such as the baroque aclocal-copy).

We've tried this before and "shouldn't" doesn't work out too well in
practice.

The aclocal-copy business is actually now an improvement since it only
accesses things it depends upon which is a good thing as far as I'm
concerned. Other ways we could possibly improve:

a) Atomically moves files into the sysroot (and I guess move and delete
for atomic removal). This means they can't "half" be there.

b) Move libs in before binaries. This way a binary can't get run before
its dependencies are there.

This all continues to hack around the fact its a shared area though and
I'd imagine regardless of what tricks you play and even if you add in
locks, there will still be determinism issues.

The conclusion you then reach is that the only way you can ultimately
solve things is a sysroot per build item. You could do something that
would perform moderately well with a directory per sysroot item, then
hardlink these into individual sysroots per workdir.

In many ways, the aclocal-copy change is an experiment for that, we
should now have the pieces where we could implement such a thing...

Cheers,

Richard



  reply	other threads:[~2014-04-04 22:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-14  9:15 Build failure Andreas Müller
2012-11-14  9:30 ` Andreas Müller
2014-04-04 17:18   ` util-macros.do_package failed " Robert Yang
2014-04-04 20:01     ` Burton, Ross
2014-04-04 22:44       ` Richard Purdie [this message]
2014-04-05  8:29     ` Robert Yang
2014-04-05  9:33       ` Richard Purdie

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=1396651461.13862.30.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=ross.burton@intel.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