From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7059736144635756544 X-Received: by 2002:a1c:ed19:: with SMTP id l25mr1288385wmh.49.1643963721154; Fri, 04 Feb 2022 00:35:21 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:600c:3487:: with SMTP id a7ls5814735wmq.2.canary-gmail; Fri, 04 Feb 2022 00:35:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJyBxR5bIKX0KbhVKRw+oRmd0gWXBTAHYFSUiR58MIdjInPQHkDX4Su2xP5jzMcFQVM80O18 X-Received: by 2002:a05:600c:281:: with SMTP id 1mr1312860wmk.134.1643963720227; Fri, 04 Feb 2022 00:35:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643963720; cv=none; d=google.com; s=arc-20160816; b=UxZ1exofzrkkLXEVWfYmU+IXC0Wc9Nb5lk5Q5mtc9RTt/d3OHzz2lxtINqg1paccaY 8ktmAq2Wsvtiebtt5Gk5pGqKw5OShgVKVP1xxj/nC7YnTw8srYWWI8c50U5GdjP5yegQ gkG77I8F9icgKT22ax2iJJLY2dJGM7irhUMj+Sa6zd0oybLRi9pp09plYtWyG79OGiH/ flZJqYGDfNWUrbASeRrbM2uwChJ+FPpUvuJxV0fqawZmB8J4rL8VB1xyo0HOCJYfF8SI fD1V9vyl/B7wX+Htoa5JtSiuiRUN5uIJ8pqLeQQmrf8VpahPYi1uHEytlnFqG0t6TGhi xbWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:ironport-sdr :ironport-sdr; bh=olmcwHT5Ed6vz1oOutKtAP0pgiQqgdn1suDRuICkGgU=; b=H0KoOfA0eMhEo3cCTMnRxK7NYJozCqkRmzGqwRff1e+ShcjPhqAsP7Gaaq4w/+LYEx tfSFZu5x/ZfU1HqvHwmo5/NHvWC8oLjwR7TkSgYgd/J5Wr6jQ6+2YPvbnOZRRjq2IuG3 nOoEtfYFGbpr3JWp2OGG7kb+f1suEgkDo9HpWX+cXGHZhQGKGwcg2lfrhAku23qtIkrB oIlF/dcHBBESiTvLDcH2uWpjuhoPPBjAuEw6JV7ZzMImXnBV6clNUisVL3ipw+QtRzCr c93Fy/6CUcv4c+UeNObLKLxhAXE1u5AypH8+Fc0NmNgBbZ6rHFatLPNU7JaDvT9kgkei e3sg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.137.252 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com. [68.232.137.252]) by gmr-mx.google.com with ESMTPS id u14si48039wrf.0.2022.02.04.00.35.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Feb 2022 00:35:20 -0800 (PST) Received-SPF: pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.137.252 as permitted sender) client-ip=68.232.137.252; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.137.252 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com IronPort-SDR: t0V7JwO+CT39IZR9Mp4CfSJ4hNATwd+50HORkv6FCJJCzODeFhWMl/4+PGVZkInYf2MOQVUj4d 44desBur4xGC+RhLp1Iu/huA5psLtZmmnOrhAso/HKoES7Q0VAU0XasTNPNP7AK+25u2i9VzPC ifKfHx1EtRyxbINnKO6m1M3kWBNG4/7F1W3cOXb9EZaEY+j7cPUPgas1lBuan4X6YvN9OxknFU AFr5DiMw2eSy3fHv383+e4/86qKK9gSl4nks94WrXp3yM6uEb1lBhJ7K0zMYERmYUB6uJiee15 NCyHIvInI318UGG8lvZz/k0U X-IronPort-AV: E=Sophos;i="5.88,342,1635235200"; d="scan'208";a="71553359" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 04 Feb 2022 00:35:17 -0800 IronPort-SDR: 7lWlJ+oToqKYbSLF3GsibEjlztL3n3eD5QEX1SqWR88Ika8kf05DiouIpA/+flDxcaXupcPjft zyeAf9VSi8QUSWHSgNEdwV4vnlx9wDVNgCAVz3OcmSnLslCIenDQkgazaDGhTnDCGp1HtityNm GxauanP0FkHFpF4gfPmnicqtBQyIrB3HUnSq6LXuVgI6PwBMr7BJC1L1Nb7TUhV9BPdu4U1lGm cPIcCp4778uJMTx/fshOZ7q7L//KAbzXKvybn8Y+MGtK4xySuICXF4bHWwTo68PD+lqPUOmpeg lAo= Message-ID: <8624f471d03f81542a5cceda9e4c4af54b44b79b.camel@mentor.com> Subject: Re: [PATCH] dpkg-base: cope with race around check/creation of .git-downloads symlink From: Cedric Hombourger To: Jan Kiszka , Date: Fri, 4 Feb 2022 09:34:59 +0100 In-Reply-To: <0a7f590d-63f5-5505-a9c9-718f9d8c81fb@siemens.com> References: <20220201134125.24853-1-Cedric_Hombourger@mentor.com> <0a7f590d-63f5-5505-a9c9-718f9d8c81fb@siemens.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Return-Path: Cedric_Hombourger@mentor.com X-TUID: zQQPcaF39B7e 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 > > --- > >  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 >