FS#47729 - [arch-install-scripts] arch-chroot sometimes not umounting

Attached to Project: Arch Linux
Opened by Janne Heß (das_j) - Tuesday, 12 January 2016, 20:14 GMT
Last edited by Dave Reisner (falconindy) - Monday, 01 February 2016, 13:47 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Dave Reisner (falconindy)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

We run arch-chroot in Jenkins to allow building in a chroot.
Recently, the build failed because the call within the changeroot had an exit code != 0.
So arch-chroot also exited with an exit code != 0 which is fine, but it didn't umount some mounts (like /dev).
I ran rm -rf $chrootpath and whoosh, my /dev was gone.

IMO, arch-chroot should assure that all mounted FSs are umounted or at least print a warning.

Additional info:
* package version(s)
arch-install-scripts 15-1
* config and/or log files etc.


Steps to reproduce:

Run a command that fails in a chroot in Jenkins.
This task depends upon

Closed by  Dave Reisner (falconindy)
Monday, 01 February 2016, 13:47 GMT
Reason for closing:  Works for me
Comment by Dave Reisner (falconindy) - Thursday, 14 January 2016, 16:24 GMT
It's not obvious to me how this would happen. chroot teardown happens on an EXIT trap, so bash would need to suffer some horrible fate (e.g. SIGSEGV) in order for the trap to not run. Teardown is by no means conditional on the exit status of the chroot'd command.
Comment by Dave Reisner (falconindy) - Thursday, 28 January 2016, 21:12 GMT
Ping? Any logfiles or additional info available?

Loading...