From patchwork Thu Dec 5 15:53:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Mikanovich X-Patchwork-Id: 232 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 05 Dec 2024 16:53:30 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-ed1-f62.google.com (mail-ed1-f62.google.com [209.85.208.62]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4B5FrUhc030374 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 5 Dec 2024 16:53:30 +0100 Received: by mail-ed1-f62.google.com with SMTP id 4fb4d7f45d1cf-5d34c8fbca7sf381655a12.0 for ; Thu, 05 Dec 2024 07:53:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1733414005; cv=pass; d=google.com; s=arc-20240605; b=dM5Dyr7Z5pSQnxV+wrnzTJxUtR+53zmXNHA+VsZVfJlxUT7btlkXgqcEjAwaRvQo5r YANNh1kKjG2WTPWna8d8BjzZH5p1FfNn52Ow1ylgHzyzB0gXb/GUlEDPrb3ZNzdSexfp H2xYnCAdHsxAfCO76F7Ex1oeRnAiGbnpz1+mOPowFMcOLKfrqv1J5n2C4oKCvmSVor8l SLqI/sdbAgTvcLdjX6IaQl8GxJ+cdWKkZAcJnpngq7x8JCxK4ZNIgn4cybKhydem/iV8 dN5bvwRzElb9sJNSV/v+cRV+B8XZFCu59E6DBDoWcVikY3YU7l3uQ9r4MuRpuRtsmDEa CheA== 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=7KGDtcnoUR+85kn1a494WWsFKSsDkvhwFRBUOUAjDWg=; fh=kMfe5XcWJNLLowMDkmOrWb8dswwleDA9USMizVy63A8=; b=P4NvPfPEVbxQ7AvgHVPHHJPyus/PNDbkHJYYqizA5ccl6aTFDKbX6dl9vUB1sv8Fvt Ppq26evxJF3VBTEFb+pXt+UgDBSBVAgsfCcVyaERM0HBadFqNodGIm1m+zxzZLyoVLRZ 1f6PuhTYd0ITalAZC6361oaPfdxGtoN61s0vlSObUgDHNn/opmfeZzCL/bGZ9+bCjeWA YmE/3AV2+uIQ65aeIPZ8akpvgjuZS+ghPcu7Ln5z0xYmj/rFTN3H/2UhgBHdfQg8pgvO ojxjdyzqBjofCuTISmSZo5Wqm2SqkPM/zRlfAQY+9QYbN90k2RzIMhPxOoU/ga3pB+U+ 6WZA==; 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=1733414005; x=1734018805; 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=7KGDtcnoUR+85kn1a494WWsFKSsDkvhwFRBUOUAjDWg=; b=N/xZBmcC+iadEMBGXDuwMyXDz33zVbS2I2ngpFZjczjYiMz/az/5ZsKN9KqrijkJFN sqTkwDYGhCsmE4BVNN0/K4in+X7wXzU4VV616LS121zVWcjcTs/8/hGmMwXJK/IrT93I bb2wiUujSL3tChFxytoI7lm7zNJEmeslMtytW5jeKyU4vk1K5Gd803kLkcS3wqWnmgBa fU8szr2ozdWdLyrjIJCnejriaRUC3v//ZX3qCoXY8ozb77tChyAcMYye9oqFV6NSFon3 f0J1garvVZa9rkx18/LFwm968hoGUbk8nyrxEN12G9rWzYkZppRTgeqkRva6YyyWB+Gz 1P2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733414005; x=1734018805; 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=7KGDtcnoUR+85kn1a494WWsFKSsDkvhwFRBUOUAjDWg=; b=w3A+G7WWZl1QPwo8FJ7++OiRz5JV5VB6h73AEwJKnYj75t4TzdD5gqVQHiFM4DaZcg EIR/qURvP4Z8KXEb84WJsX/F06hEg3JjBW/hC3Z3gF68+aR0LrdSWCfwbYK62INtWVTD 6OlNj2O0FhpmBTu8iGRcAjmCgIowQlmDAqepfGjZ2s1Dl9XyRpmRKEvjMyfB7fOR6qwL aOQGIdfgEEuPqRcvmClLWKPiDgxE8Z9IstJD2eGByS9PAwZLuBbBf1kXxr+rpsPY/Ai/ BzsKepH99SCRPCnKpGrmfCbLKS/UhTttv82kZdxkhjWFLuO8WDVLx4crpr7rnQjvzOtN ThYw== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCU9lzMkFPhGQeVMHSFrYDTRUuYJxnAnWiYO6bKLz8wUd5oRf7mGgSY5xU8/OvH/5vLfYL6vkRM=@isar-build.org X-Gm-Message-State: AOJu0YwO/vWfH9rnChwvgXHdpOA6+6MgZN0SYBUb+cYb0uSruJVdLZ6R wXwE6RwhTFxcH43+MCkPNuWcpXBna9J5bQDrFLGCHMP7ACVBfMih X-Google-Smtp-Source: AGHT+IHuAsFcfwvGZhEy3pOdsELFHvMGl2WrE4xXHUfu0szKi+tW9F0idQDvBZcOR+n1Csz1F9DyhA== X-Received: by 2002:a05:6402:3405:b0:5d1:2677:b042 with SMTP id 4fb4d7f45d1cf-5d12677b0e4mr2784240a12.34.1733414003572; Thu, 05 Dec 2024 07:53:23 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:aa7:c0c3:0:b0:5d0:bf2a:3cd7 with SMTP id 4fb4d7f45d1cf-5d1251fbe7fls27506a12.2.-pod-prod-01-eu; Thu, 05 Dec 2024 07:53:21 -0800 (PST) X-Received: by 2002:a50:ec91:0:b0:5d1:2290:c623 with SMTP id 4fb4d7f45d1cf-5d12290c6cfmr4422868a12.7.1733414001325; Thu, 05 Dec 2024 07:53:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733414001; cv=none; d=google.com; s=arc-20240605; b=TgR906y9uGZc2NBVW6ck4J0+GpaveoBXZyLOPgCZ1qGTNUdnrEhwzBnGs1D6gftPRR Mqd/P6RzE1v7IXUjnu4ZgKm/olmvoTOErL50VFwoco/0iKnl4v8FZDF8ALmf2oyTYjq2 cACuRu7K8Ow99lS54prDM4gsoqgcc6iFNaMXCbhJqFI7cbWuYW3ojN0J3zastbOQxBrj MMDZOlyhp11EJP6dKDKR+G0iaswSUzFjWDpNeFGtsZWMJZBPUgyXm/QgxhVFh6CrbKiB 24N7UIeLpBrIY6HMYLeI7zeiiMCZ8CHDvDn/3eP7fSI8CkJMsx6SBdg0slpyipfJTOUE QDhg== 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=hMI5LRDDML/+3kfaRDVxwO8T6I+DZYeYJtiNTXIU4/o=; fh=/h9QQkzJ8EboVkWg45aWwpaUro6WMavIVd2OhN45RtE=; b=PYmeyM+dVrZKeTBlFgB/YU99IN2GreV6g0skVl8UfPn8Lbhafnj+ML4UpDBZghORC4 W96RpF4dB0LzeQirJS8EoQ6MTvHM65TKcUK7LjYSxJtJLqzRTZqrkJ4RvNMdzjpKH8Nk CgO0o+oaEM3PretGpZOHVfareH/0SI+8urgNW7eOpWzw5jLB1fe68hipJ82dlK7n+/59 Wcf/T9uj8ifmHYS11jubVICRTczydOe4XK0wKkpGikWJXbnBQIRKe98EL1xbQOcOXsDL 5jUPvOkYPxWphkQhaB3QQ6xhmnmAxPFE6kLnHNtNogyWFogRxKDmeFOX+cefxePcyGmm AD9Q==; 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 4fb4d7f45d1cf-5d149a47d7dsi27754a12.2.2024.12.05.07.53.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Dec 2024 07:53:21 -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 4B5FrKI7030356 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 5 Dec 2024 16:53:20 +0100 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Anton Mikanovich Subject: [RFC 0/1] External fix for sporadic schroot race issue Date: Thu, 5 Dec 2024 17:53:11 +0200 Message-Id: <20241205155312.2373479-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 not tested yet because issue reproducing is quite tricky. 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