Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 655924 - Exiting catalyst with Ctrl-C (SIGINT/SIGTERM) fails to clean up bind mounts from chroot
Summary: Exiting catalyst with Ctrl-C (SIGINT/SIGTERM) fails to clean up bind mounts f...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: Catalyst (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Catalyst Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-17 00:20 UTC by Michael 'veremitz' Everitt
Modified: 2021-01-26 01:23 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael 'veremitz' Everitt 2018-05-17 00:20:08 UTC
Exiting catalyst with Ctrl-C (SIGINT/SIGTERM) fails to clean up bind mounts from chroot (exit fails hard, rather than cleaning up, eg. when emerge fails)
----
Exiting on signal Signals.SIGINT

(chroot) wand_MJE ~/catalyst # SIGINT signal recieved killing ./tmp/stage1-chroot.sh with pid 12811
/usr/share/catalyst/targets/support/functions.sh: line 19: 12811 Killed                  ${clst_CHROOT} ${chroot_path} .${destdir}/${file_name}
Comment 1 Matt Turner gentoo-dev 2021-01-26 01:23:57 UTC
commit 488b06bf5dbe1eba68ac11de95f56feeb6cead83
Author: Matt Turner <mattst88@gentoo.org>
Date:   Thu Oct 29 11:00:42 2020 -0400

    catalyst: Run the build sequence in new mount namespace
    
    Catalyst has a lot of code to unmount the bind mounts it's made, and
    then more to try harder when something fails. This is important because
    if bind mounts still exist within the chroot when clean up happens,
    files outside of the chroot on the host system can inadvertently be
    deleted. E.g., distfiles, binpkgs, kerncache.
    
    Running the build sequence (the steps that need bind mounts) within a
    mount namespace and exiting the mount namespace when finished ensures
    that clean up can never accidentally delete files outside the chroot.
    
    Signed-off-by: Matt Turner <mattst88@gentoo.org>