public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Brian Harring <ferringb@gmail.com>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Multiple emerges in parallel (was: [RFC] RESTRICT=parallel for builds that can't be executed in parallel)
Date: Wed, 14 Apr 2010 11:10:29 -0700	[thread overview]
Message-ID: <20100414181029.GC30025@hrair> (raw)
In-Reply-To: <20100414162018.26e0524c@pomiot.lan>

[-- Attachment #1: Type: text/plain, Size: 1862 bytes --]

On Wed, Apr 14, 2010 at 04:20:18PM +0200, Michaaa GGGrny wrote:
> On Tue, 13 Apr 2010 23:10:16 -0700
> Brian Harring <ferringb@gmail.com> wrote:
> 
> > Running multiple emerges in parallel is already a bad idea.  The 
> > solution for that case is for the new/second emerge to feed the 
> > request into the original emerge (or a daemon).
> 
> Although such solution will be useful in many cases indeed, there are
> still many advantages of having few separate emerge calls running
> in parallel.

The examples you give are fine and dandy, but if done via parallel 
emerge you can run into situations where PM 1 just added pkg A as a 
dep for PKG B, and PM 2 is removing pkg A due to a blocker for pkg C.

Running multiple emerge's in parallel is unsafe due to the fact 
they've got two potentially very different plans as to what is being 
done, and that there is no possibility to ensure that pkg D that PM-2 
is building isn't affected by PM-1 building something (upgrading a 
dependency of pkg D for example).

Yes you can get away with it occasionally, that doesn't mean it's 
safe however.

> The next thing is aborting merges. When running multiple emerges,
> aborting one of them is as simple as pressing ^c. With daemon, we would
> have to implement an ability of aborting/removing packages in runtime
> -- and that would be another example of dependency tree mangling.

Aborting merges is a very, very bad idea.  Consider a pkg that has 
dlopen'd plugins, and just went through an ABI change for that 
interface.  If you interupt that merge it's entirely possible you'll 
get just the lib merged (meaning a segfault on loadup of the plugins), 
or vice versa (old lib is still in place, but new plugins are there).

Don't abort merges- that really should be effectively an atomic OP, 
not interuptible.

~harring

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2010-04-14 18:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-14  2:12 [gentoo-dev] [RFC] RESTRICT=parallel for builds that can't be executed in parallel Zac Medico
2010-04-14  5:45 ` Michał Górny
2010-04-14  6:10   ` Brian Harring
2010-04-14  7:06     ` [gentoo-dev] " Duncan
2010-04-14  9:02       ` Brian Harring
2010-04-14 14:20     ` [gentoo-dev] Multiple emerges in parallel (was: [RFC] RESTRICT=parallel for builds that can't be executed in parallel) Michał Górny
2010-04-14 18:10       ` Brian Harring [this message]
2010-04-14 18:35         ` Michał Górny
2010-04-14 18:47         ` [gentoo-dev] " Duncan
2010-04-14  6:46 ` [gentoo-dev] [RFC] RESTRICT=parallel for builds that can't be executed in parallel Justin
2010-04-14 12:58   ` Michał Górny
2010-04-14 13:03   ` [gentoo-dev] " Duncan
2010-04-14 23:36     ` Ryan Hill
2010-04-21 10:34   ` [gentoo-dev] " Luca Barbato
2010-04-30 16:32     ` Enrico Weigelt
2010-04-21 10:38 ` Luca Barbato

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=20100414181029.GC30025@hrair \
    --to=ferringb@gmail.com \
    --cc=gentoo-dev@lists.gentoo.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