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; Wed, 02 Oct 2024 17:10:32 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-oa1-f64.google.com (mail-oa1-f64.google.com [209.85.160.64]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 492FAUDj019639 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 2 Oct 2024 17:10:31 +0200 Received: by mail-oa1-f64.google.com with SMTP id 586e51a60fabf-2875591da01sf3140338fac.0 for ; Wed, 02 Oct 2024 08:10:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727881825; cv=pass; d=google.com; s=arc-20240605; b=R9uTSzp8gbG16mvCC4LbielavsSGyikADE1ReiIifLKUcEXZdKb52+VuQkHIO508at oFBPIiFnJEQZxfiTrpeDcGJ1Ssj1xNQJE+mZYZaJN3UinKWb9VMgk/qaj4bWvYXenaEq Wjj5gOWm5DNz4V91vfjsGtDd6NLEEY3naDjE0oowoqMv3/+PaE2ZoUg0MBmYubtIed5/ 8MoKsXtRY+eIdEUeIxiErH2NuUxKPTdzoT3U0DoM6ULBQMUgHCHn3fDZsBra4y7ZY5dN 9gMOJDFdMuTOHMFes2CKHq55yNee9PQDtyyGZjwnW4IQnWeO1Sf5j9dQc4xQicIoVuy2 AQkg== 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:reply-to:feedback-id:mime-version :content-transfer-encoding:references:in-reply-to:date:to:from :subject:message-id:dkim-signature; bh=ctc+Aqy71jFIFlK/bSgYClJlyjjoTmkUacZQuRzrP94=; fh=qRGx9bziAXOmOYm9PmjH0H0e+appKPcP7po12SAUOsM=; b=lDlIoXHBNnK9T03WqffwEt5tnss77UEA+xBFdqLpeMt8T6FMHP90/lSY7+xiNyth73 0/EkFE/A9jS/JDZ1XHSyTZS1PUBR5D1pr0iMM/JY7TO2wCCA8aQmpO4LbH75eix6e6Dt IOxY1ON8kwHyVx0tGnRU7GJJuRUcXnE/6PvgmRWlG67UKsD5S0E0ghk+tU/y/XovUASx mfoCKzgw4Jk8xZZ0O1GGjGQNR5wg68O9v5TSMVR8F1mn+zw27Xl6FJjrEwUwy8kQnJcK RrcsTPFfrw9TQ2RhqZz2skItlaGK/BX2hGDqgTzEzgWoPOCGnvPd3plN51ycuyDT9pJS hM7Q==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=TQwNOlK7; spf=pass (google.com: domain of fm-68982-20241002151020800ba6ab3bd976e6ff-mwvzju@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-68982-20241002151020800ba6ab3bd976e6ff-mwVZjU@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1727881825; x=1728486625; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:content-transfer-encoding:references:in-reply-to:date :to:from:subject:message-id:from:to:cc:subject:date:message-id :reply-to; bh=ctc+Aqy71jFIFlK/bSgYClJlyjjoTmkUacZQuRzrP94=; b=uF3t9srWpQtXUopJLIaDTHMz/dS9F7PnpmGpTIYZb5CiuBKlzr9b3PxvKgQ65Pz7ph SwgM74fHPVJW0TIghcJtt9EzhcaxLFereYvcdN8A0/S9YJwz36UUSqpkhePS8NN/s5Kq 5IvXtXw6bPvWKiDqHqEbnUebAMtC2MmekRn6yQJhsoG6UH6Atqg3cmtHxZaFBhBKxmIP CYYdBM+UWMC0xye6bk1VhGl46WVdPK/gJMEeomuxlobSbXMX7dtzsY3Rxb69V8XXi0gR 6Rq01dfTUcFckw5mqdtUt7ULgLlz0pWbWOgJ6rF0TewYBzclmxvWrTWLW/dWDOS2Q/eU KqmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727881825; x=1728486625; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:content-transfer-encoding:references:in-reply-to:date :to:from:subject:message-id:x-beenthere:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=ctc+Aqy71jFIFlK/bSgYClJlyjjoTmkUacZQuRzrP94=; b=S4d7dMyzAK3mrezT5y2+H8xfDWdjSNfWcsOvIW+HXTkCvGgI7tnS72twbJLNEC3fBg 6M0+c+o04LgIFo7re+7ar99vm0G5IUz4E8Ampv/EHx4HtJGCsaElmZ2cBa8h5oJ74Y1c ZBjiRcAJVEPnu4ItjhKFLd0EzG1oXty0+w5UcJmLNk9dofrRFnYzI+EbdgFGB/4anOxr +ZGf7ej3pQDaDY6dcFXA5S8LhrItDzSzOQfsJ2lZHkpMktYktz7hTDYPRdiSFw2V77ME 7JEjASZt7Gm6KNyLZnwk2YoLTed8wS8fnoSd2c7ikQsXnIRHKJ9YttVWxdOD1/N4hNCC Ys8w== X-Forwarded-Encrypted: i=2; AJvYcCXMxj5BP0Fey8EXR1V89dRFQxFFamFoiyaMgJCxbD5Nke5zqa3AqfJKJOYCURVi2tx6coEq@ilbers.de X-Gm-Message-State: AOJu0YzSsKe/0di0Peo8m0hyllzdruCmODwNcFQYdvs/+PcWMMagDH/k wZa3f9C6pl8tQgs4cqqRimCMR6AXXSpO5Cb3cz8Ttmewq5RsV9Ef X-Google-Smtp-Source: AGHT+IFmguJ+phyLLT7Jt6MRUoHEwvawJBcYiezin7D1Kn8rDXv74F3GlVQGZ0Adk+eSZdG8eIFqtA== X-Received: by 2002:a05:6871:24cb:b0:287:5003:c6f4 with SMTP id 586e51a60fabf-28788f36862mr2161501fac.39.1727881824835; Wed, 02 Oct 2024 08:10:24 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6870:4e05:b0:27c:a756:f49d with SMTP id 586e51a60fabf-286f91b6f77ls255699fac.1.-pod-prod-02-us; Wed, 02 Oct 2024 08:10:23 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX3JqJgTRA3dfn/jBDKXVrS8DxX/tjxU0WeqLbqFGKcMlLqgcP4str4xMe0V6u1aSbYVWQlUP2xkfDt@googlegroups.com X-Received: by 2002:a05:6870:1719:b0:287:34a7:af9a with SMTP id 586e51a60fabf-28788a60264mr2601907fac.12.1727881823017; Wed, 02 Oct 2024 08:10:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727881823; cv=none; d=google.com; s=arc-20240605; b=ib1GfUXypmRzvIeqx2JreEhaFbutVBRI+WjmILdMOeww0NnoXV7dJxFgCTnyTE2iKG YgKWZvbWMuwROMbVNKQaoeJdqus01FaMsY8u11tcfET/jDW4ezAR9WNh9qoVxLqVS/wd LCNROZhl9doRvDqaKNxzH6Y9/QIPzk6xfwwIqEZFYWHn5hgdlssN1jzBH1Jx4I6rDKzm LQQBdHZShLYSPuYL1iZCXDad55XPJDyG5HW/WU494YMNBgPaAM9h29dRM+MmTCo4wmg7 MJHPI1iBSntorz+aunsNv+8Y8MIkTD/a7gksWW7ghuVIjWDqJgVUcb+umlF1DCKuq3I+ TQdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=feedback-id:mime-version:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:dkim-signature; bh=04PGOoXDxDrK3RXBlvH4cOWexNB+FD5jV/J5u7t0pkY=; fh=jvYxwxBQgtgU44CT7SDnebPco7buBFqduqvn6kvyOj4=; b=f2LdKIq0zuVrmll9m6ELkhLPFnHPSXaSn7WN3r3yfeKnHFh5Mp2YA+/QsCjg6Nn61a rsaIDkRXN6wug6BQ0oicr/BVjscJ/s3EENKnn1lEFlvBhpHhJ/Mle3E1mtNGTH10F9gl mg3sEXqfpmtZ1aEqFKGF5WsFTt7rITioMOwE3Pedbx3vfK4T4L+PJlHE9r6cF0G5OfhV 2qJLOcROTQYHevcA6lUoaZhFO3wO/zR9u41YZ21elP+CeUw//L7itw3BLLQZc9sd8mQ5 taLqqpuBPXVXsk7PvD+LZkdfIFZCUs9Ob3OOP+G6odpRU3J4Z4A70wlcsalu5GK15ntw y2MA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=TQwNOlK7; spf=pass (google.com: domain of fm-68982-20241002151020800ba6ab3bd976e6ff-mwvzju@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-68982-20241002151020800ba6ab3bd976e6ff-mwVZjU@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-225.siemens.flowmailer.net (mta-64-225.siemens.flowmailer.net. [185.136.64.225]) by gmr-mx.google.com with ESMTPS id 586e51a60fabf-2870f7484f8si566127fac.1.2024.10.02.08.10.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Oct 2024 08:10:22 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-68982-20241002151020800ba6ab3bd976e6ff-mwvzju@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) client-ip=185.136.64.225; Received: by mta-64-225.siemens.flowmailer.net with ESMTPSA id 20241002151020800ba6ab3bd976e6ff for ; Wed, 02 Oct 2024 17:10:20 +0200 Message-ID: <716633968fcf2babb39125d568c48d69aead3b78.camel@siemens.com> Subject: Re: [PATCH] initramfs: Add missing umounts after generation From: "'Florian Bezdeka' via isar-users" To: Jan Kiszka , "Moessbauer, Felix (T CED OES-DE)" , "isar-users@googlegroups.com" Date: Wed, 02 Oct 2024 17:10:17 +0200 In-Reply-To: References: <1646de44-c244-43b3-ad57-b3bf702608b0@siemens.com> <855415c409c8a24b672ed64dba8f3227edf23355.camel@siemens.com> <4271f8a5-45d8-4e75-9a39-7c11a3411ef6@siemens.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-68982:519-21489:flowmailer X-Original-Sender: florian.bezdeka@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=TQwNOlK7; spf=pass (google.com: domain of fm-68982-20241002151020800ba6ab3bd976e6ff-mwvzju@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-68982-20241002151020800ba6ab3bd976e6ff-mwVZjU@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Florian Bezdeka Reply-To: Florian Bezdeka 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-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, 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-TUID: wkeV5aypGCOy On Wed, 2024-10-02 at 12:28 +0200, Jan Kiszka wrote: > On 02.10.24 10:31, Florian Bezdeka wrote: > > On Tue, 2024-10-01 at 12:04 +0200, 'Jan Kiszka' via isar-users wrote: > > > On 01.10.24 09:38, Moessbauer, Felix (T CED OES-DE) wrote: > > > > On Mon, 2024-09-30 at 21:42 +0200, 'Jan Kiszka' via isar-users wrot= e: > > > > > From: Jan Kiszka > > > > >=20 > > > > > Failing to unmount what was mounted via rootfs_do_mounts can caus= e > > > > > troubles on rebuilds. > > > >=20 > > > > Why is that not caught by the cleanup handler in [1]? > > > > I'm just wondering as the mounting and unmounting does not happen i= n > > > > the same task, hence we will run into problems on partial rebuilds. > > > >=20 > > > > [1]https://github.com/ilbers/isar/blob/51462e82e4a108c9c94ba4099465= f5a19a7125a6/meta/classes/isar-events.bbclass#L53 > > >=20 > > > I didn't analyze that yet, but it is a valid question why our diagnos= tic > > > framework failed as well. > >=20 > > Taken from the cleanup handler referenced above: > >=20 > > with open('/proc/mounts') as f: > > for line in f.readlines(): > > if basepath in line: > > bb.debug(1, '%s left mounted, unmounting...' % line.spl= it()[1]) > > subprocess.call( > > ["sudo", "umount", line.split()[1]], > > stdout=3Dsubprocess.DEVNULL, > > stderr=3Dsubprocess.DEVNULL, > > ) > >=20 > > Problems: > >=20 > > - bb.debug() will not make it to stdout as long as the log level is not > > =C2=A0 set accordingly. By default the level is not set to debug, so no= body > > will notice. > >=20 > > - The cleanup handler is executed in "build" context, not "task"=20 > > context. (Naming might be wrong bitbake wise...). With that there is > > no log file where bb.debug() will write to. Nobody will notice > > (again...). > >=20 > > - subprocess.call() might fail silently, there is no error checking. > > In my case: "target is busy.\n" > >=20 > > - The cleanup handler is called twice. Not sure if that is correct... > >=20 > > At the end our "(u)mount mistake detection mechanism" seems broken. As > > first step I would vote for a bb.debug() -> bb.warn() migration. Manual > > inspection of stdout still required... > >=20 >=20 > Ack. And a test for this handler would be good. Technically someone should go and revert=20 72ec986d9cd3 ("events: Do not warn on left mounts by default") then. https://github.com/ilbers/isar/commit/72ec986d9cd3a3913e8592554456d5968d6b6= 59a >=20 > Lazy umount was apparently dropped without review/testing of the safety > mechanisms and the code that is involved in mounting. We all assumed to > world would be fine while things de facto work not that well. On top > comes that most users are in containers and only notice those issues on > rebuilds or due to further special factors. >=20 > Jan >=20 > --=20 > Siemens AG, Technology > Linux Expert Center --=20 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 e= mail to isar-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/= isar-users/716633968fcf2babb39125d568c48d69aead3b78.camel%40siemens.com.