Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#32834 - [schroot] If user executes commands to schroot via GNU parallel bad things happen

Attached to Project: Community Packages
Opened by John (graysky) - Sunday, 25 November 2012, 03:07 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 25 November 2012, 03:31 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: When I use [community]/parallel to call schroot to do work I got tons of errors traced back to 10mount. Repeated calls like this break systemd to the point of not being able to shutdown the system.

Additional info:
* package version(s) 1.6.3-3.
* /etc/schroot/schroot.conf attached.
* /etc/schroot/arch32/mount attached.
Steps to reproduce:
1) Setup a 32bit chroot per the wiki (https://wiki.archlinux.org/index.php/Schroot).
2) Use systemd to start it (again, the wiki page gives an example service file and /usr/local/bin/arch32 script).
2) Install [community]/parallel.
3) Try to execute this simple command:

% echo "1\n2\n3\n4" > jobs
% cat jobs | parallel schroot -p --

For me, here is the output although the errors vary from usage-to-usage:
% cat jobs | parallel schroot -p -- echo
E: 10mount: mount: proc is already mounted or /var/lib/schroot/mount/Arch32-018919b8-63ac-4f7f-93cf-45c3ee4f64f8/proc busy
E: 10mount: proc is already mounted on /proc
E: 10mount: proc is already mounted on /var/lib/schroot/mount/Arch32-bc99b770-c93d-435d-99b9-df4e1b3a3ddc/proc
E: 10mount: proc is already mounted on /var/lib/schroot/mount/Arch32-35eaf99f-c958-4649-9e88-89e6a4eb40da/proc
E: 10mount: proc is already mounted on /opt/arch32/proc
E: 10mount: proc is already mounted on /var/lib/schroot/mount/Arch32-bc9d4b91-8116-4786-bcf3-f91a07eb1644/proc
E: 10mount: proc is already mounted on /var/lib/schroot/mount/Arch32-c77b2185-4385-410c-ba71-2d7c4e49847b/proc
E: 10mount: proc is already mounted on /var/lib/schroot/mount/Arch32-bc9d4b91-8116-4786-bcf3-f91a07eb1644/proc
E: 10mount: proc is already mounted on /var/lib/schroot/mount/Arch32-bc99b770-c93d-435d-99b9-df4e1b3a3ddc/proc
E: 10mount: proc is already mounted on /var/lib/schroot/mount/Arch32-35eaf99f-c958-4649-9e88-89e6a4eb40da/proc
E: 10mount: proc is already mounted on /opt/arch32/proc
E: 10mount: proc is already mounted on /var/lib/schroot/mount/Arch32-4743437c-a358-41f1-b40e-7ef029977073/proc
E: 10mount: proc is already mounted on /var/lib/schroot/mount/Arch32-c77b2185-4385-410c-ba71-2d7c4e49847b/proc
E: 10mount: proc is already mounted on /var/lib/schroot/mount/Arch32-bc9d4b91-8116-4786-bcf3-f91a07eb1644/proc
E: 10mount: proc is already mounted on /var/lib/schroot/mount/Arch32-bc99b770-c93d-435d-99b9-df4e1b3a3ddc/proc
E: 10mount: proc is already mounted on /var/lib/schroot/mount/Arch32-35eaf99f-c958-4649-9e88-89e6a4eb40da/proc
E: 10mount: proc is already mounted on /opt/arch32/proc
E: 10mount: proc is already mounted on /var/lib/schroot/mount/Arch32-018919b8-63ac-4f7f-93cf-45c3ee4f64f8/proc
E: 10mount: proc is already mounted on /var/lib/schroot/mount/Arch32-625dd9d5-4861-4102-8ac7-f9eb68b3d557/proc
E: 10mount: proc is already mounted on /var/lib/schroot/mount/Arch32-018919b8-63ac-4f7f-93cf-45c3ee4f64f8/proc
E: 10mount: proc is already mounted on /var/lib/schroot/mount/Arch32-4743437c-a358-41f1-b40e-7ef029977073/proc
E: 10mount: proc is already mounted on /var/lib/schroot/mount/Arch32-c77b2185-4385-410c-ba71-2d7c4e49847b/proc
E: 10mount: proc is already mounted on /var/lib/schroot/mount/Arch32-bc9d4b91-8116-4786-bcf3-f91a07eb1644/proc
E: 10mount: proc is already mounted on /var/lib/schroot/mount/Arch32-bc99b770-c93d-435d-99b9-df4e1b3a3ddc/proc
E: 10mount: proc is already mounted on /var/lib/schroot/mount/Arch32-35eaf99f-c958-4649-9e88-89e6a4eb40da/proc
E: 10mount: proc is already mounted on /opt/arch32/proc
E: 10mount: umount: /var/lib/schroot/mount/Arch32-018919b8-63ac-4f7f-93cf-45c3ee4f64f8/dev/shm: not mounted
E: Arch32-018919b8-63ac-4f7f-93cf-45c3ee4f64f8: Chroot setup failed: stage=setup-start
E: 10mount: umount: /var/lib/schroot/mount/Arch32-4743437c-a358-41f1-b40e-7ef029977073/dev/pts: not mounted
E: Arch32-4743437c-a358-41f1-b40e-7ef029977073: Chroot setup failed: stage=setup-stop
1
E: 10mount: umount: /var/lib/schroot/mount/Arch32-625dd9d5-4861-4102-8ac7-f9eb68b3d557/dev: target is busy.
E: 10mount: (In some cases useful info about processes that use
E: 10mount: the device is found by lsof(8) or fuser(1))
E: Arch32-625dd9d5-4861-4102-8ac7-f9eb68b3d557: Chroot setup failed: stage=setup-stop
3
This task depends upon

Closed by  Dave Reisner (falconindy)
Sunday, 25 November 2012, 03:31 GMT
Reason for closing:  Not a bug
Comment by Dave Reisner (falconindy) - Sunday, 25 November 2012, 03:10 GMT
Yes, bad things happen if you try to create a chroot for every individual process and those chroots are mounted on the same directory. What's the actual bug you're reporting here? Seems to me like you were given a gun and ammo, you decided to load the gun and point it at a soft fleshy part of your own body.
Comment by John (graysky) - Sunday, 25 November 2012, 03:15 GMT
My understanding about schroot is not as deep as yours is, Dave. How would I safely use parallel to do work inside my i686 chroot?
Comment by Dave Reisner (falconindy) - Sunday, 25 November 2012, 03:31 GMT
By invoking schroot once instead of once for every worker? I've no idea what to recommend since it's not at all clear what it is you're trying to do -- the workload, the constraints, etc. Furthermore, the last few time I've given you advice on the forums, you've ignored it and gone with the less sane solution. Most recently, and to quote you on the topic of parallel: "Powerful stuff once you learn how to invoke it".

There's no bug here. Please ask for help on the forums.

Loading...