All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Kanavin <alex.kanavin@gmail.com>
To: Martin Koppehel <martin@mko.dev>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>,
	bitbake-devel <bitbake-devel@lists.openembedded.org>,
	Daniel.Baumgart@iris-sensing.net,
	OE-core <openembedded-core@lists.openembedded.org>,
	Jasper Orschulko <Jasper.Orschulko@iris-sensing.com>
Subject: Re: [bitbake-devel] [PATCH 2/2] fetch2: Fix race condition in latest_revision
Date: Mon, 8 Nov 2021 11:28:24 +0100	[thread overview]
Message-ID: <CANNYZj8vpBCLhaUywM-EOSkCMgh0968WbS7BND9U-jHbO4Q=og@mail.gmail.com> (raw)
In-Reply-To: <5538dd6d-94df-af1f-8141-4d6b63f119d1@mko.dev>

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

It helps if you can provide a specific example/test case for this.

Alex

On Mon, 8 Nov 2021 at 11:26, Martin Koppehel <martin@mko.dev> wrote:

> -- snip
> > I'm afraid I don't understand why this is a race condition? Where is the
> timeout
> > that stops one being set?
>
> The commit message is misleading here, will change that. It is actually
> not a race condition as we originally thought, but more a problem of
> recursive calls to _latest_revision.
>
> The git fetcher does something similar in _lsremote, where the git
> lsremote would be called recursively to populate the environment, and
> there's code in place to prevent that.
>
> In our case, since we persist the revs, we have to filter out empty revs
> because otherwise the next repo fetcher invocation would also try to
> populate the environment but then revs[key] would already be set to an
> empty string, causing a metadata mismatch later.
>
> Therefore we only populate the revision cache if _latest_revision
> actually returns a valid value.
> We did reproduce this with multiple recipes that used up the same
> SRC_URI and therefore influencing each other, this case works fine now.
>
> Cheers,
> Martin
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#12933):
> https://lists.openembedded.org/g/bitbake-devel/message/12933
> Mute This Topic: https://lists.openembedded.org/mt/86840265/1686489
> Group Owner: bitbake-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [
> alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

[-- Attachment #2: Type: text/html, Size: 2500 bytes --]

  reply	other threads:[~2021-11-08 10:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05 13:30 [PATCH 1/2] fetch2/repo: Implement AUTOREV for repo fetcher Jasper Orschulko
2021-11-05 13:30 ` [PATCH 2/2] fetch2: Fix race condition in latest_revision Jasper Orschulko
2021-11-07  8:54   ` [bitbake-devel] " Richard Purdie
2021-11-08 10:26     ` Martin Koppehel
2021-11-08 10:28       ` Alexander Kanavin [this message]
2021-11-10 15:45         ` Jasper Orschulko

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='CANNYZj8vpBCLhaUywM-EOSkCMgh0968WbS7BND9U-jHbO4Q=og@mail.gmail.com' \
    --to=alex.kanavin@gmail.com \
    --cc=Daniel.Baumgart@iris-sensing.net \
    --cc=Jasper.Orschulko@iris-sensing.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=martin@mko.dev \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.