From: "'Florian Bezdeka' via isar-users" <isar-users@googlegroups.com>
To: Jan Kiszka <jan.kiszka@siemens.com>,
"Moessbauer, Felix (T CED OES-DE)" <felix.moessbauer@siemens.com>,
"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Subject: Re: [PATCH] initramfs: Add missing umounts after generation
Date: Wed, 02 Oct 2024 10:31:03 +0200 [thread overview]
Message-ID: <ce41863a20176bee41fabdd7963d132ad53fe505.camel@siemens.com> (raw)
In-Reply-To: <4271f8a5-45d8-4e75-9a39-7c11a3411ef6@siemens.com>
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 wrote:
> > > From: Jan Kiszka <jan.kiszka@siemens.com>
> > >
> > > Failing to unmount what was mounted via rootfs_do_mounts can cause
> > > troubles on rebuilds.
> >
> > Why is that not caught by the cleanup handler in [1]?
> > I'm just wondering as the mounting and unmounting does not happen in
> > the same task, hence we will run into problems on partial rebuilds.
> >
> > [1]https://github.com/ilbers/isar/blob/51462e82e4a108c9c94ba4099465f5a19a7125a6/meta/classes/isar-events.bbclass#L53
>
> I didn't analyze that yet, but it is a valid question why our diagnostic
> framework failed as well.
Taken from the cleanup handler referenced above:
with open('/proc/mounts') as f:
for line in f.readlines():
if basepath in line:
bb.debug(1, '%s left mounted, unmounting...' % line.split()[1])
subprocess.call(
["sudo", "umount", line.split()[1]],
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
)
Problems:
- bb.debug() will not make it to stdout as long as the log level is not
set accordingly. By default the level is not set to debug, so nobody
will notice.
- The cleanup handler is executed in "build" context, not "task"
context. (Naming might be wrong bitbake wise...). With that there is
no log file where bb.debug() will write to. Nobody will notice
(again...).
- subprocess.call() might fail silently, there is no error checking.
In my case: "target is busy.\n"
- The cleanup handler is called twice. Not sure if that is correct...
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...
Florian
>
> Jan
>
> --
> Siemens AG, Technology
> Linux Expert Center
--
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 on the web visit https://groups.google.com/d/msgid/isar-users/ce41863a20176bee41fabdd7963d132ad53fe505.camel%40siemens.com.
next prev parent reply other threads:[~2024-10-02 8:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-30 19:42 'Jan Kiszka' via isar-users
2024-10-01 7:38 ` 'MOESSBAUER, Felix' via isar-users
2024-10-01 10:04 ` 'Jan Kiszka' via isar-users
2024-10-02 8:31 ` 'Florian Bezdeka' via isar-users [this message]
2024-10-02 10:28 ` 'Jan Kiszka' via isar-users
2024-10-02 15:10 ` 'Florian Bezdeka' via isar-users
2024-10-03 16:15 ` Baurzhan Ismagulov
2024-10-04 7:47 ` 'Jan Kiszka' via isar-users
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ce41863a20176bee41fabdd7963d132ad53fe505.camel@siemens.com \
--to=isar-users@googlegroups.com \
--cc=felix.moessbauer@siemens.com \
--cc=florian.bezdeka@siemens.com \
--cc=jan.kiszka@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox