From patchwork Fri Dec 20 08:29:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Mikanovich X-Patchwork-Id: 235 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 20 Dec 2024 09:30:16 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-wr1-f60.google.com (mail-wr1-f60.google.com [209.85.221.60]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4BK8UFAf014252 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 20 Dec 2024 09:30:15 +0100 Received: by mail-wr1-f60.google.com with SMTP id ffacd0b85a97d-385e1339790sf1000629f8f.2 for ; Fri, 20 Dec 2024 00:30:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734683410; cv=pass; d=google.com; s=arc-20240605; b=Wv7KueUGf1SWwlMrmUdYwmdSPYr46CA/3f19pl1X13mCtFmuSdYAjOFurYYzbJhvp1 bllmnLPSAUEe4Xlke53Kbkmcl2452cZe5w2Z1b1UdH6AQo0Z09kLl8QEJS3cvt78knue NkKs92Rf6iw6MEhg5lXITVVspoFlw6WygAZ+/awOgWO8Mc7e7aLr58KiDzthqx9KZuiB J2GRHXuntbTsRdjLr1HdqAKy5fR6q4bdM+fjAnSyS6KddGzsLvbh9EvZ7+qT1CwEfbSB KedAo435V0ik0zXZImh5yxmmDDc1jy61UXvWKxuIWZsHjasdaLgqUn8dvMmJfA8QXYaq vNog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=w8AxU/h+Omp41e4y06P+j1PQlWTcVI97SIGBx0dtNko=; fh=nKIbpIELhEf3rAjePBf5SJHTMzJy2eZhCZQ5GxRq5EI=; b=T1sPFI1kCJ+E+MIdGSRPatB+Pr5pynBW5okRhgnYkaJsqqZW3PG3Y2471ib7JLw70a uamyACMU3SXt75MnwMq8Cohzoj49jHQwoy+kXn8UwJn8qLVIK6iJJ9LoGzbCJZzGIivv 5mmCnWiDRIWPwjsWgM4pDCWNo1mGD1DePNfPf0KZHrmFletVlu/S08uMdQLQtTzC9Tnc p1hGHzFjgSlkau7QgskqHAPj+cAoeohA9cPyTRCAzkdJjbJ4/mhKsZ142nrtYVw/8ER/ DIEuPPdSahMBxnop0DvH5EWwbBTznu0JmnPy/mxAlTjvOFlwY1vD4OUMf9wuLaOxiGhm Xnvw==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1734683410; x=1735288210; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :sender:from:to:cc:subject:date:message-id:reply-to; bh=w8AxU/h+Omp41e4y06P+j1PQlWTcVI97SIGBx0dtNko=; b=TgXxCVrxuSXcK8qa9Q7xclFDLAVg1y0WAyVluHKiqMmcZEZCQzDr1wbdGmuh9lwxfB 0ujgYVzmonYvf8KbpLOkci9ni6N7sUBY51BC5xCiXUwWdIEDp1a1uk6jE5eZT0M0K/Gp NCrXFenvh9JZSF6IVYLDAO9/I/0Wc31e/dQXbP/V3atf77uOF0M7hNmBDvgVPjWUHE/y 6noydF5NX9vPvuEQ8wTLO5yxW+9JFAxJC6KSke5DLEoZlof5zRLgpAzU5+H52FHngNuX 19eDis/LuhqKuIvqYSvJL3BC8pRd2TV0+cySyvTdCi1HlQYYIUici5o3MAWvnmbPoSKx QfIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734683410; x=1735288210; 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:mime-version :message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=w8AxU/h+Omp41e4y06P+j1PQlWTcVI97SIGBx0dtNko=; b=KkwwQfy7K+Jd4nAQn2xi0qdkjHNK5VIZVALSSgG5cyiriGWfa5oejdIEm1lpoYPM6M 8qBDpdLIA+gMYOMmQjgb1bjRHzCv7uAvr27ExXWgYmPxFHQVwnotf6o5irFM2pVbzIlZ PtssrVdNY0P8VLGuKBmBU8RrCQtyL2R/SgBX1RxdrjR58sdVOtmPAEji+xeJ1a3bwa5Z zbOZVmKK6v38GpsGzhD0l6kruzi5sYQojkvbJX+rdcSiE9SEu+qWNiMziFvSVYRu8tSI 9u7Xz5m7f0mZRfCGCtcVfLee2yQP9GZH5TyTsDFDx91pNeMUD/fEju654F7Wehflfh9f PrXg== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCUJFF57lieZHhdAudbR1g88z8FTrbxx+SnG2KIdO/NBG8Lyl/tZOwvt/zlbSLkS5ZCAdxiJ1cE=@isar-build.org X-Gm-Message-State: AOJu0YzAdyCjIhlzkAvwAK3u6RlxUFOmxhxO7dLDz1m4/e4Ghrtu8NMW S7wEYEnUVpy8YWEaPfeoDrxtSMgTPKa7AVVemw1F8KSwH9L2MSG4 X-Google-Smtp-Source: AGHT+IGeFxb3d540M/87sJZlFn5gUfxHuz5DO/F5kBbCDph3ANv0Q60fIn5uYbKKyJjNVG6RnL1U1Q== X-Received: by 2002:a05:6000:4028:b0:385:ded5:86ee with SMTP id ffacd0b85a97d-38a224069b1mr1610952f8f.57.1734683409301; Fri, 20 Dec 2024 00:30:09 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:600c:4996:b0:434:a059:b74e with SMTP id 5b1f17b1804b1-4365c51dff9ls11077345e9.2.-pod-prod-05-eu; Fri, 20 Dec 2024 00:30:07 -0800 (PST) X-Received: by 2002:a05:600c:3b8f:b0:434:a706:c0fb with SMTP id 5b1f17b1804b1-4366854c030mr19733965e9.10.1734683407304; Fri, 20 Dec 2024 00:30:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734683407; cv=none; d=google.com; s=arc-20240605; b=RWtnCD/WTxTqiZTNzec1wBiv3EC322/B+H+sZRZansoV8xr58NJ2MMqy5VE+iszviO Vl5BDVV6heq9TQHj1hM+i5QQKB//8Vbvwwr9EPI+MCO8g7GmoIs0BABSX0WoQZcBXC43 q76pz1VeXOwVnaZrDs7kvsxyl8znCyP8tokZ4zzf5GUFRn/3KjJKwGJiB0X0qIC4CKPU KfCjJImuTaa7q0cRJ41w5KnnEy98ImbOfSlcoMyJbgC9rGZEz34180n/3FcK4x52e/Qo 9OFBgC0Ui8wkTo8aNum1yQYNUwidQOdlKjdTS7EoIseCX69XJrsoTn70W7qRONabbtcZ 0rtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=4eG164PkEso5Du/Mib27yuTW50GkRU2XS+c7KL5NehU=; fh=/h9QQkzJ8EboVkWg45aWwpaUro6WMavIVd2OhN45RtE=; b=bH9Cd8MX6QDMgSCKDJ+17tUmNLw/INLu+YyTWLZUTNNanr5MMFVk6OwL5V8fv+3Oa7 WOARXHC6rbcFefbLGrTT1brpnmPSZwk7r9qAVY8/edTFjvpTDUZp3gwTx2sVOWmPcr3t qiOA/F4v19N3F3iNEww4gbBEDkUvDqw8xrE2aAPPZOQE4J8oTPY1FZjiZUwnZEW6n32J 4YkTQFIUZLamdyvHskJGi24BI+uaH95i4KQankmdl/KXoc5catIj13iRj7nFb3qSxpX+ yUMLkcQKHZCK6kvit8WTmvJ82o/X0ZPuvYCB0aHuJMZNkLa1QGC7+nd9ke8K/uaoMvna 2FuQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 5b1f17b1804b1-436633b9f5dsi1029425e9.1.2024.12.20.00.30.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Dec 2024 00:30:07 -0800 (PST) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from user-B660.promwad.corp ([159.148.83.114]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 4BK8U6J3014233 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 Dec 2024 09:30:06 +0100 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Anton Mikanovich Subject: [PATCH 0/1] External fix for sporadic schroot race issue Date: Fri, 20 Dec 2024 10:29:58 +0200 Message-Id: <20241220082959.3123651-1-amikan@ilbers.de> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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_BLOCKED,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: amikan@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= After some experimenting with locking inside and outside of schroot and sbuild tools I've finally found the way how to made almost the same locking in Isar only without much build speed influence. The idea is to cover all separate schroot calls with the lock based on what type of the call it is: - Session begin and any commands in already present session will use the lock in shared mode, so multiple executions possible. - Session end which can remove config files and cause race scenario will use the lock in exclusive mode, so it will wait for the time no other schroot instances running. Luckly we always use schroot with separate session create/end commands even inside sbuild. The only thing needed is to put a little script into the location inserted to PATH. This patch is just a copy of RFC was sent previously with no changes. It was tested on our CI and now is ready to be merged. Anton Mikanovich (1): meta: Protect schroot config management meta/classes/dpkg.bbclass | 3 +++ meta/classes/sbuild.bbclass | 6 ++++++ scripts/schroot | 43 +++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100755 scripts/schroot