From: Cedric Hombourger <Cedric_Hombourger@mentor.com>
To: Jan Kiszka <jan.kiszka@siemens.com>, <isar-users@googlegroups.com>
Subject: Re: [PATCH] dpkg-base: cope with race around check/creation of .git-downloads symlink
Date: Fri, 4 Feb 2022 09:34:59 +0100 [thread overview]
Message-ID: <8624f471d03f81542a5cceda9e4c4af54b44b79b.camel@mentor.com> (raw)
In-Reply-To: <0a7f590d-63f5-5505-a9c9-718f9d8c81fb@siemens.com>
On Wed, 2022-02-02 at 08:05 +0100, Jan Kiszka wrote:
> On 01.02.22 14:41, Cedric Hombourger wrote:
> > There is a race condition between the check for the .git-downloads
> > symbolic
> > link existing and its creation. Ignore the FileExistsError
> > exception when
> > hitting this race.
> >
> > Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> > ---
> > meta/classes/dpkg-base.bbclass | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-
> > base.bbclass
> > index 2add0b2..3aa52b1 100644
> > --- a/meta/classes/dpkg-base.bbclass
> > +++ b/meta/classes/dpkg-base.bbclass
> > @@ -23,7 +23,10 @@ python do_adjust_git() {
> > git_dl = os.path.join(d.getVar("DL_DIR"), "git")
> >
> > if not os.path.exists(git_link) or os.path.realpath(git_link)
> > != git_dl:
> > - os.symlink(git_dl, git_link)
> > + try:
> > + os.symlink(git_dl, git_link)
> > + except FileExistsError:
> > + pass
> >
> > for src_uri in (d.getVar("SRC_URI", True) or "").split():
> > try:
>
> do_adjust_git is run under global ${DL_DIR}/git/isar.lock - how do
> you
> trigger this race then?
good catch. I had not noticed this lock. I have been getting this
exception while building on a machine with many CPUs (32 IIRC). I have
no idea how this could happen with this lock held. Going to debug
further. Thanks for the pointer
>
> Jan
>
next prev parent reply other threads:[~2022-02-04 8:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-01 13:41 Cedric Hombourger
2022-02-02 7:05 ` Jan Kiszka
2022-02-04 8:34 ` Cedric Hombourger [this message]
2022-02-04 10:50 ` [[PATCH v2]] dpkg-base: resolve DL_DIR in do_adjust_git Cedric Hombourger
2022-02-04 10:54 ` [PATCH v3] " Cedric Hombourger
2022-02-04 11:04 ` Jan Kiszka
2022-02-04 12:45 ` Cedric Hombourger
2022-02-09 8:12 ` [PATCH v4 0/1] " Cedric Hombourger
2022-02-09 8:12 ` [PATCH v4 1/1] " Cedric Hombourger
2022-02-21 9:25 ` [PATCH v4 0/1] " Anton Mikanovich
2022-02-04 12:30 ` [PATCH v3] " Henning Schild
2022-02-04 12:43 ` Jan Kiszka
2023-02-16 12:57 ` Henning Schild
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=8624f471d03f81542a5cceda9e4c4af54b44b79b.camel@mentor.com \
--to=cedric_hombourger@mentor.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.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