public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "'Florian Bezdeka' via isar-users" <isar-users@googlegroups.com>
To: Anton Mikanovich <amikan@ilbers.de>, isar-users@googlegroups.com
Cc: Jan Kiszka <jan.kiszka@siemens.com>, Baurzhan Ismagulov <ibr@ilbers.de>
Subject: Re: [PATCH] meta: Drop lazy and recursive unmounts
Date: Tue, 01 Oct 2024 13:59:25 +0200	[thread overview]
Message-ID: <b631604383ed020ce51c0c3f75aa3693509c4293.camel@siemens.com> (raw)
In-Reply-To: <deeeb768-e3c4-43a4-a132-51fb51643f0b@ilbers.de>

On Fri, 2024-09-06 at 17:34 +0300, Anton Mikanovich wrote:
> 29/08/2024 15:26, Florian Bezdeka wrote:
> > I think this is the relevant line from "mount":
> > 
> > tmpfs on /builds/<project>/build/tmp/work/debian-bookworm-amd64/sbuild-
> > chroot-target/1.0-r0/rootfs/dev type tmpfs
> > (rw,nosuid,size=65536k,mode=755,inode64)
> > 
> > Florian
> 
> So it is sbuild who should manage mount in this rootfs. Not sure how 
> this patch
> influence on internal sbuild mount/unmount logic. But sbuild shouldn't 
> left any
> mounts without any errors. Do you have any packages failed to be built?
> 
> Are there any lost schroot sessions running before external rm you have 
> issue
> with? This can be checked with 'schroot -la' command.

This one, right after the build completed, delivers:

W: No chroots are defined in ‘/etc/schroot/schroot.conf’ or
‘/etc/schroot/chroot.d’

> 
> You can also try to add some verbose to sbuild with following change:
> 
> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
> index bcc3f828..b54e3ab9 100644
> --- a/meta/classes/dpkg.bbclass
> +++ b/meta/classes/dpkg.bbclass
> @@ -113,6 +113,8 @@ dpkg_runbuild() {
>       DSC_FILE=$(find ${WORKDIR} -maxdepth 1 -name 
> "${DEBIAN_SOURCE}_*.dsc" -print)
> 
>       sbuild -A -n -c ${SBUILD_CHROOT} \
> +        -D \
> +        --chroot-setup-commands="mount" \
>           --host=${PACKAGE_ARCH} --build=${BUILD_ARCH} ${profiles} \
>           --no-run-lintian --no-run-piuparts --no-run-autopkgtest 
> --resolve-alternatives \
>           --bd-uninstallable-explainer=apt \
> 
> This will be very helpfull to get some build logs from your setup.

I scanned the logs and searched for /dev mounts. Typical example:

tmp/work/debian-bookworm-amd64/isar-exclude-docs/0.2.2-r0/temp/log.do_dpkg_build.18089
521:devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666)
522:tmpfs on /dev/shm type tmpfs (rw,relatime,inode64)

At the end I still have one active /dev mount:
tmpfs on /builds/myproject/build/tmp/work/debian-bookworm-amd64/sbuild-chroot-target/1.0-r0/rootfs/dev type tmpfs (rw,nosuid,size=65536k,mode=755,inode64)

Trying to delete the sbuild-chroot-target delivers:

rm: cannot remove 'build/tmp/work/debian-bookworm-amd64/sbuild-chroot-target/1.0-r0/rootfs/dev/shm': Device or resource busy
rm: cannot remove 'build/tmp/work/debian-bookworm-amd64/sbuild-chroot-target/1.0-r0/rootfs/dev/termination-log': Device or resource busy
rm: cannot remove 'build/tmp/work/debian-bookworm-amd64/sbuild-chroot-target/1.0-r0/rootfs/dev/mqueue': Device or resource busy
rm: cannot remove 'build/tmp/work/debian-bookworm-amd64/sbuild-chroot-target/1.0-r0/rootfs/dev/pts': Device or resource busy

mqueue and termination-log are host specific. That might be the reason
why I can only reproduce in CI setups. k8s has some "specials" like
termination-log here.

It seems that the mount comes from the rootfs_postprocess task of
sbuild-chroot-target. Which task should undo/clean them up?

Florian 

-- 
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/b631604383ed020ce51c0c3f75aa3693509c4293.camel%40siemens.com.

  reply	other threads:[~2024-10-01 11:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19 10:41 Anton Mikanovich
2024-06-26  6:31 ` Uladzimir Bely
2024-08-28 13:05 ` 'Florian Bezdeka' via isar-users
2024-08-29  9:26   ` Anton Mikanovich
2024-08-29 12:26     ` 'Florian Bezdeka' via isar-users
2024-09-06 14:34       ` Anton Mikanovich
2024-10-01 11:59         ` 'Florian Bezdeka' via isar-users [this message]
2024-10-01 12:14           ` 'Jan Kiszka' via isar-users
2024-10-01 12:18             ` 'Florian Bezdeka' via isar-users
2024-10-01 12:28               ` 'Jan Kiszka' via isar-users
2024-10-03 14:37           ` Baurzhan Ismagulov
2024-10-04  7:28             ` 'Florian Bezdeka' via isar-users
2024-10-04  8:00               ` Uladzimir Bely
2024-10-04  8:16                 ` 'Jan Kiszka' via isar-users
2024-10-10  4:33                   ` 'Jan Kiszka' via isar-users
2024-10-10  9:43                     ` Baurzhan Ismagulov

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=b631604383ed020ce51c0c3f75aa3693509c4293.camel@siemens.com \
    --to=isar-users@googlegroups.com \
    --cc=amikan@ilbers.de \
    --cc=florian.bezdeka@siemens.com \
    --cc=ibr@ilbers.de \
    --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