public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Anton Mikanovich <amikan@ilbers.de>
To: "cedric.hombourger@siemens.com" <cedric.hombourger@siemens.com>,
	"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Subject: Re: [HELP] tmp/work/debian-bullseye-arm64/isar-image-base-qemuarm64/1.0-r0/mnt/rootfs: target is busy
Date: Mon, 26 Feb 2024 13:27:03 +0200	[thread overview]
Message-ID: <0173efd6-b53b-4f8c-b6cb-ef52ff22db8e@ilbers.de> (raw)
In-Reply-To: <87ba787bf61b06a69fe8bcfeb08a728c32f4878e.camel@siemens.com>

26/02/2024 12:26, 'cedric.hombourger@siemens.com' via isar-users wrote:
> Hello,
>
> Seeing some sporadic failures with the test suite (but also with builds
> of our Isar-based product) when rootfs_install_sstate_prepare gets
> executed:
>
> DEBUG: Executing shell function rootfs_install_sstate_prepare
> umount: /home/sutlej/isar/build/tmp/work/debian-bullseye-arm64/isar-
> image-base-qemuarm64/1.0-r0/mnt/rootfs: target is busy.
> WARNING: exit code 32 from a shell command.
>
> What's special about the machine I am running the builds on is that
> /proc/cpuinfo reports 64 processors hence builds get massively
> parallelized
>
> I wasn't able to get to the bottom of this issue and understand why the
> bind mount is busy since rootfs_install_sstate_prepare creates, uses
> and removes that bind mount in the same function.
>
> As a work-around, a lazy umount could be used but that annoys me as I'd
> like to understand what could cause this. Any ideas?
>
> Cedric
>
Hello Cedric,
Does this issue happens with testsuite only or on manual build also?
How much targets and how much images for the same target are been 
executed in
this bitbake call? Which Isar commit are you using?
We can try to reproduce the issue but need some details of your setup.

The issue like that can be caused by double-mount scenario we already faced
with: if some of the folders in Isar sources/builddir path is mounted inside
itself or its parent, it can cause doubling the mount and umount will fail.

Here is an example of this scenario:
$ mkdir dirA
$ mkdir dirB
$ echo "sudo umount ~/dirB" > dirA/um
$ sudo mount --bind dirA dirB
$ mount | grep dir
/dev/sdb1 on /path/dirB type ext4 (rw,relatime)
$ sudo mount --bind dirA dirB
$ mount | grep dir
/dev/sdb1 on /path/dirB type ext4 (rw,relatime)
/dev/sdb1 on /path/dirB type ext4 (rw,relatime)
/dev/sdb1 on /path/dirA type ext4 (rw,relatime)
$ bash ~/dirA/um
umount: /path/dirB: target is busy.

As a debug you can try to add some lsof/mount/findmnt inside the
rootfs_install_sstate_prepare task before umount/

P.S. lazy umount is not an option because it will only cover the issue which
can cause other issues to appear later on.


  parent reply	other threads:[~2024-02-26 11:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26 10:26 cedric.hombourger
2024-02-26 10:32 ` Jan Kiszka
2024-02-26 11:13   ` cedric.hombourger
2024-02-26 11:27 ` Anton Mikanovich [this message]
2024-02-26 11:40   ` cedric.hombourger

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=0173efd6-b53b-4f8c-b6cb-ef52ff22db8e@ilbers.de \
    --to=amikan@ilbers.de \
    --cc=cedric.hombourger@siemens.com \
    --cc=isar-users@googlegroups.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