From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Tue, 15 Sep 2026 10:33:22 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-ed1-f57.google.com (mail-ed1-f57.google.com [209.85.208.57]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 68F8XHUB000885 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 15 Sep 2026 10:33:17 +0200 Received: by mail-ed1-f57.google.com with SMTP id 4fb4d7f45d1cf-6a91d818528sf4751772a12.3 for ; Tue, 15 Sep 2026 01:33:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1789461192; cv=pass; d=google.com; s=arc-20260327; b=APGCO4iFOxT4LedWQDflCaghzUvchoiYpxOFTNH58RhG3hrNtefQSDZfJH/5wzxiWE iIMoOGNthn21YjW6ja0plNJ2ay1b7bh8DaGznkiU2Cc/M4VMql/f0fkV/G0lhpVelIU7 0UIjLuW8sZc5qcVilINzZvLVajS24kNqCGnffh1nUAwkVi28WIRPqXkDMbseRebT3yxv nCT8ACzY4tO4omNSY5XgrUY75/NHnVK5GwMYSBFut1z1W0z/t4MSETpUosjjoQs8YvYI wwsMrhBlyggzu7ES4dZ2uGle3YgMs5tJ+eEtzSDl+aBtgVp1WQfTMwgJ0o9q6OTVrGz3 DYHQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :sender:dkim-signature; bh=ucNrKiGIdE4SIdCl7Nc3LHbCvUDvgZkgeueyaSZEOO0=; fh=w6eHJcvAgKDI0ToFYh2iGtPzq1wwk9Xo1reDsyIIH/E=; b=CD/WYqsZ5ud1c+SEk9iT1YlsI2rInxVSBnGi15UeQRJiQcn4peqrvw5tfaco4qJzr9 XgKDEF0iUsLMa7oIKvBavvwMMjckGpCj9cj9SHCGxU+PBd1QD6NZI7ZfKGjR4I7350VW bUTol05EDnROGtI+xl7SD0oYWFFHo/nvslqWMmcsoFAadiCZtpdSAnAKLwq2vTVkM8u9 JTOyphXSZHr01n8SzL0312+QR4XLcPMrKBfSy2VHtN7H6Liv6DRNuM4y5t7WV/JM7tkm hBfZoOmjkjLpM2QlbEsCUXtm63xXRt2YCPF6NGNTWLfgdYk8KCucn0/SLXJ1a/6K7iby WdeQ==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20251104; t=1789461192; x=1790065992; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:content-type:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to:content-type; bh=ucNrKiGIdE4SIdCl7Nc3LHbCvUDvgZkgeueyaSZEOO0=; b=vLE44P/ZIurII8EXZAG45KOBp/WF5FGdbh2AmyYPxuOLMdXGKWeGsRAM8/IeSTIzEV aVHq3HFAejz38NFGxQh0l4K1zmKK102dFEQE2y3VA2Rak+0tYqxQgdTDvfNdlm174ECR hn+DJnvCUn1/6N70hvmIZ7GsawL5wY3usfmrJYmfVEQ9u5habs2XpwYIydagf4U27U09 W446afJzW3hluN9jw+kQguageN0YVpy8ZDAw3X57fUNtNs3I1afa0sus57tl8aZiBEIN 8kk5rE67KyU4ZHdnKSqM+4c8K6gWZZw+PZJGTeonmWiJ7OJU6419zAJtH+6ZQc3xUsWB hRUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789461192; x=1790065992; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:content-type :in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:x-beenthere:x-gm-message-state:sender :from:to:cc:subject:date:message-id:reply-to:content-type; bh=ucNrKiGIdE4SIdCl7Nc3LHbCvUDvgZkgeueyaSZEOO0=; b=1Ev2BqlgCFnX6KPGu3gDpaLrPLHF0ikS3/78bQe0V7JJlZU+VI/jriHFUzNzYitde5 KlJFL9tmoWNKXpddUmWsXSEyteKyNow5epLtecpLTBYG1x628A3UVmxV6VCfNteHYbd3 Ba9ezaX7c8tYvI0CHj60+zfbfQSkb85KDAJffI52nMkgo6uuHYh2aC2BbbGinuQ9dn2l EujLvyZexGCXQOZi2oMn6PmCtd65ty2dGPbMawYWMc1bY11vrqb5dzKr6owuNd6EOZCV DfwYj1MIjpzUviztSAM2voUsbG1Dgh36jIPE0mBLINPtWGN3OtdwlvWLsUWtp6zEiSNf CePA== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AKwUvBzqRFtE7+jF8FAA58DmWnmWeoASZFE9h4lP3VgWML42WdaOROzLF6y6nNnz50wV04MNUmMs@ilbers.de X-Gm-Message-State: AFuF++noBpbmdALmtNxiIhu3LyVXjRVUZwoB6i2qb6p8pZKkq1m81V+h untSLM1g3tj5sGj6gvfgrG+gE65mYJuGN1ynoo/b+d67TjUcjc/2OjkK X-Received: by 2002:a05:6402:388b:b0:6a9:b203:f410 with SMTP id 4fb4d7f45d1cf-6a9f63d183cmr3967111a12.21.1789461192229; Tue, 15 Sep 2026 01:33:12 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="ATskLdfkHTS+7d6A6DrI2oNe/RmaU5tVPWF+PRtnJJG1alXKIw==" Received: by 2002:a05:6402:a5c9:20b0:6a9:b9dc:eb70 with SMTP id 4fb4d7f45d1cf-6a9b9dcec0fls4264358a12.1.-pod-prod-03-eu; Tue, 15 Sep 2026 01:33:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvBxPIBaUIwXjmEC+gYv0jg+K8SI+JOr7sddTRK8bbFW66n7qQ+gsmL5MvHxBhzNtn1xuxuF9KAMLqYsR@googlegroups.com X-Received: by 2002:a05:6402:388b:b0:6a9:b203:f410 with SMTP id 4fb4d7f45d1cf-6a9f63d183cmr3966988a12.21.1789461190091; Tue, 15 Sep 2026 01:33:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1789461190; cv=none; d=google.com; s=arc-20260327; b=MivhMGw1Nik1OzYiLqo0nwD9wUwGZ0nteVB6lV0edYm3p3rbEuw12WHo3PlhN33pi3 YoLIBLFaUSfQKXaWQ9q/Sag4+Y9KGrFDfGqJi1AgqTHODetH1kyr0lIfsxdTbteHxCaK yuDkjZZdnQTip8S/ghXexkUalRDzvZNbwaQ4nxpAjMuItsUV4VPOx5wYg0bZ0yC2mlD6 SIlvnU5mfuzOibWPA58hhwwJHtEaB9T0ZXwOACmhzKNGdBXXtGmiFxszyyKSzuNRhkjL A42MwAs4MskdEbQ/xI3pOMV7sJHj5cxV9McHocY60WcPcY2XJl0DLcdpMHva98wRbSvS CbSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id; bh=H7DPooCVskOy6MCuFfUg0fkjoHeHc+ysb7nIsyhuQtU=; fh=ez+yYIN2+t1/A1KtVD1essDQ6+anTTnZTbSXjuK9WaU=; b=MJwT1iZdenYeRUjTOjw4dMSciT8Mm84N9SdsViKvCv69qf75W1lOZIGTEnWvJae7HN 0T9cN5/OTvH0r+xx6xLOrlWBQl6cDh2Rt7Wexmnj2imV0oj6F4rljuMfOz5qf0XvLi94 ZC5WzNkurPNwq8B26BPKGaJP0OygeYc02cOlQvDronx+AFRGPk8uTSMVEAtm3S40TSb8 10EfjOmyy/+beZ9tyTZmOe8Q/TDUQgaBew2FNzn433TFQPlH/dSzGfKeh997lR098tiK ZTYAj5jajcrlhAnaCmaqVCMNP5wojNJpJNK8zSl9tjZGixMdGNFLUzJdcJhPkwJVty1a dAaA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 4fb4d7f45d1cf-6a9b583ce2dsi226261a12.2.2026.09.15.01.33.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Sep 2026 01:33:10 -0700 (PDT) Received-SPF: pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from [192.168.178.24] (dslb-188-101-241-026.188.101.pools.vodafone-ip.de [188.101.241.26]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 68F8X5AI000870 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Sep 2026 10:33:05 +0200 Message-ID: <97a48fec-67a4-4527-9020-c8009877fc4d@ilbers.de> Date: Tue, 15 Sep 2026 10:33:05 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/1] fix(bootstrap): make sstate updates of bootstrap atomic To: Felix Moessbauer , isar-users@googlegroups.com References: <20260911150634.2086579-1-felix.moessbauer@siemens.com> Content-Language: en-US From: Zhihang Wei In-Reply-To: <20260911150634.2086579-1-felix.moessbauer@siemens.com> Content-Type: text/plain; charset="UTF-8"; format=flowed X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-Original-Sender: wzh@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-TUID: 7xBDJMocyhkz Applied to next, thanks. Zhihang On 9/11/26 17:06, 'Felix Moessbauer' via isar-users wrote: > When running under multiconfig, targets that share the same distro and > arch build the same bootstrap. As long as this is identical, this is not > problematic. However, the deploy of the artifact to the sstate cache is > not syncronized with with its consumers (the rootfs_prepare tasks) of > other machines running simultaneously. These races have been there ever > since, but with the deploy-via-sstate and other recent changes to > increase the caching, they became much more likely. > > We fix this by adding a lock. > > Fixes: 7ac2f931 ("bootstrap: directly deploy via sstate cache") > Signed-off-by: Felix Moessbauer > --- > This continues the "Fix various race conditions on multiconfig" series. > As we aim towards more efficiently using the sstate cache, it also becomes > more likely to hit these races (despite that they have been there ever since). > In general, our multiconfig approach is problematic if two targets with > different machines share the same architecture and distro. > > I'm also pretty sure they surface now because I run the testsuite with > sstate caching enabled, resulting in much closer timings than when building > without the cache (=> races occur more likely). > > Best regards, > Felix Moessbauer > > meta/classes-recipe/rootfs.bbclass | 11 ++++++++++- > meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc | 4 ++++ > 2 files changed, 14 insertions(+), 1 deletion(-) > > diff --git a/meta/classes-recipe/rootfs.bbclass b/meta/classes-recipe/rootfs.bbclass > index cf996f5c..b5cfac07 100644 > --- a/meta/classes-recipe/rootfs.bbclass > +++ b/meta/classes-recipe/rootfs.bbclass > @@ -238,6 +238,12 @@ rootfs_do_qemu() { > BOOTSTRAP_SRC = "${DEPLOY_DIR_BOOTSTRAP}/${ROOTFS_DISTRO}-host_${DISTRO}-${DISTRO_ARCH}.tar.zst" > BOOTSTRAP_SRC:${ROOTFS_ARCH} = "${DEPLOY_DIR_BOOTSTRAP}/${ROOTFS_DISTRO}-${ROOTFS_ARCH}.tar.zst" > > +# Matches do_bootstrap[sstate-lockfile]: a shared read lock held only around the > +# untar below excludes a concurrent do_bootstrap of another multiconfig swapping > +# this tarball out mid-extraction. > +BOOTSTRAP_SRC_LOCK = "${DEPLOY_DIR}/bootstrap.${ROOTFS_DISTRO}-host_${DISTRO}-${DISTRO_ARCH}.lock" > +BOOTSTRAP_SRC_LOCK:${ROOTFS_ARCH} = "${DEPLOY_DIR}/bootstrap.${ROOTFS_DISTRO}-${ROOTFS_ARCH}.lock" > + > def rootfs_extra_import(d): > bb.utils._context["rootfs_progress"] = __import__("rootfs_progress") > return "" > @@ -247,10 +253,13 @@ ROOTFS_EXTRA_IMPORTED := "${@rootfs_extra_import(d)}" > rootfs_prepare[weight] = "25" > rootfs_prepare(){ > rm -rf ${ROOTFSDIR} > - run_privileged_heredoc << 'EOF' > + ( > + flock -s 9 > + run_privileged_heredoc << 'EOF' > mkdir -p ${ROOTFSDIR} > tar -xf "${BOOTSTRAP_SRC}" -C "${ROOTFSDIR}" --exclude="./dev/console" > EOF > + ) 9<> "${BOOTSTRAP_SRC_LOCK}" > > # setup chroot > run_privileged "${ROOTFSDIR}/chroot-setup.sh" "setup" "${ROOTFSDIR}" > diff --git a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc > index 5d4ca1ef..f31affff 100644 > --- a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc > +++ b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc > @@ -136,6 +136,10 @@ do_bootstrap[sstate-outputdirs] = "${DEPLOY_DIR_BOOTSTRAP}" > do_bootstrap[dirs] = "${BOOTSTRAP_TMPDIR} ${WORKDIR}/trusted.gpg.d ${WORKDIR}/sources.list.d" > do_bootstrap[depends] = "base-apt:do_cache isar-apt:do_cache_config" > do_bootstrap[network] = "${TASK_USE_NETWORK_AND_SUDO}" > +# DEPLOY_DIR_BOOTSTRAP is shared by all multiconfigs. Keep the lock next > +# to, not inside, DEPLOY_DIR_BOOTSTRAP so sstate_clean_manifest() cannot sweep it. > +DEPLOY_DIR_BOOTSTRAP_LOCK = "${DEPLOY_DIR}/bootstrap.${DEPLOY_ISAR_BOOTSTRAP}.lock" > +do_bootstrap[sstate-lockfile] = "${DEPLOY_DIR_BOOTSTRAP_LOCK}" > > DEB_DL_LOCK ?= "${DEBDIR}/${BOOTSTRAP_BASE_DISTRO}-${BASE_DISTRO_CODENAME}.lock" > -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/97a48fec-67a4-4527-9020-c8009877fc4d%40ilbers.de.