From: "'Jan Kiszka' via isar-users" <isar-users@googlegroups.com>
To: Florian Bezdeka <florian.bezdeka@siemens.com>,
Anton Mikanovich <amikan@ilbers.de>,
isar-users@googlegroups.com
Cc: Baurzhan Ismagulov <ibr@ilbers.de>
Subject: Re: [PATCH] meta: Drop lazy and recursive unmounts
Date: Tue, 1 Oct 2024 14:28:21 +0200 [thread overview]
Message-ID: <cfbb244d-dcd5-4d79-bb8d-7da451114133@siemens.com> (raw)
In-Reply-To: <862fb2631df7a50757a28d19adde49a780456a2e.camel@siemens.com>
On 01.10.24 14:18, Florian Bezdeka wrote:
> On Tue, 2024-10-01 at 14:14 +0200, Jan Kiszka wrote:
>> On 01.10.24 13:59, Florian Bezdeka wrote:
>>> 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?
>>
>> If you are building an image (image.bbclass), do_rootfs_finalize will
>> clean up. If no (see the initramfs issue), those mounts will stick.
>
> There is no do_rootfs_finalize task in the list of tasks:
>
> 20241001-074332.296794 do_fetch (805): log.do_fetch.805
> 20241001-074332.387021 do_unpack (969): log.do_unpack.969
> 20241001-074503.068122 do_rootfs_install (11792): log.do_rootfs_install.11792
> 20241001-074728.511151 do_rootfs_postprocess (18028): log.do_rootfs_postprocess.18028
> 20241001-074728.628202 do_rootfs (18057): log.do_rootfs.18057
> 20241001-074728.675634 do_sbuildchroot_deploy (18068): log.do_sbuildchroot_deploy.18068
>
> Missing task dependency somewhere?
Missing cleanup then for sbuild-chroot-*, analogously to initramfs_rootfs.
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/cfbb244d-dcd5-4d79-bb8d-7da451114133%40siemens.com.
next prev parent reply other threads:[~2024-10-01 12:28 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
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 [this message]
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=cfbb244d-dcd5-4d79-bb8d-7da451114133@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