umount(/proc) after CLONE_NEWNS in 2.6.25?
Since 2.6.25, it isn't possible anymore to umount
/proc after clone(CLONE_NEWNS). It worked fine
before. E.g:
# strace newnamespace umount -n /proc
2.6.24:
[pid 30121] clone(child_stack=0xff8c21f4, flags=CLONE_NEWNS|SIGCHLD) = 30122 [pid 30122] execve("/usr/sbin/umount", ["umount", "-n", "/proc"])
...
[pid 30122] oldumount("/proc") = 0
2.6.25:
[pid 6308] clone(child_stack=0xbfc9de94, flags=CLONE_NEWNS|SIGCHLD) = 6309 [pid 6309] execve("/usr/sbin/umount", ["umount", "-n", "/proc"])
...
[pid 6309] oldumount("/proc") = -1 EBUSY (Device or resource busy)
umount: /proc: device is busy
Yes, various NAMESPACEs are enabled (i'm trying to experiment with those).
Is it intentional?
Thanks.
/mjt
Quoted 10 lines · Michael Tokarev
[pid 6308]
clone(child_stack=0xbfc9de94, flags=CLONE_NEWNS|SIGCHLD)= 6309 [pid 6309]execve("/usr/sbin/umount", ["umount", "-n", "/proc"])
...
[pid 6309]oldumount("/proc")= -1 EBUSY (Device or resource busy)
umount: /proc: device is busyYes, various NAMESPACEs are enabled (i'm trying to experiment with those).
Is it intentional?
It's very odd. Could you bisect that down to offending changeset or at least narrow the things down to -rc<something>? I'm going down right now, so won't be able to look into that until tonight...
Quoted 6 lines · Al Viro
Quoted 6 lines
[pid 6308]
clone(child_stack=0xbfc9de94, flags=CLONE_NEWNS|SIGCHLD)= 6309 [pid 6309]execve("/usr/sbin/umount", ["umount", "-n", "/proc"])
...
[pid 6309]oldumount("/proc")= -1 EBUSY (Device or resource busy)
umount: /proc: device is busy
Quoted 8 lines
Quoted 4 lines
Yes, various NAMESPACEs are enabled (i'm trying to experiment with those).
Is it intentional?
It's very odd. Could you bisect that down to offending changeset or at least narrow the things down to -rc<something>? I'm going down right now, so won't be able to look into that until tonight...
Check the version of umount(8) you've got. And see if that strace happens to have open of /proc/mounts, without matching close by the time it calls umount(). util-linux-ng 2.13.1 is _that_ dumb...
Please, make sure that you are using the same userland for testing - with aforementioned version of umount(8) behaviour is triggered with .24 as well as with .25 and there's nothing kernel could do about that...
Quoted 12 lines · Al Viro
Quoted 11 lines · Al Viro
Quoted 10 lines
[pid 6308]
clone(child_stack=0xbfc9de94, flags=CLONE_NEWNS|SIGCHLD)= 6309 [pid 6309]execve("/usr/sbin/umount", ["umount", "-n", "/proc"])
...
[pid 6309]oldumount("/proc")= -1 EBUSY (Device or resource busy)
umount: /proc: device is busyYes, various NAMESPACEs are enabled (i'm trying to experiment with those).
Is it intentional?
Quoted 7 lines
Quoted 3 lines
It's very odd. Could you bisect that down to offending changeset or at least narrow the things down to -rc<something>? I'm going down right now, so won't be able to look into that until tonight...
Check the version of umount(8) you've got. And see if that strace happens to have open of
/proc/mounts, without matching close by the time it callsumount(). util-linux-ng 2.13.1 is _that_ dumb...
Umm... Looks like something more odd is going on...
Quoted 5 lines · Al Viro
Quoted 3 lines
Check the version of umount(8) you've got. And see if that strace happens to have open of
/proc/mounts, without matching close by the time it callsumount(). util-linux-ng 2.13.1 is _that_ dumb...Umm... Looks like something more odd is going on...
... or something much simpler:
; cat /proc/mounts |grep proc
proc /proc proc rw,nosuid,nodev,noexec 0 0
usbfs /proc/bus/usb usbfs rw 0 0
;
and unmounting the stuff mounted under /proc before doing umount /proc works as expected. Amazing how well the first cup of coffee helps...
Quoted 9 lines · Al Viro
Quoted 4 lines · Al Viro
Quoted 3 lines
Check the version of umount(8) you've got. And see if that strace happens to have open of
/proc/mounts, without matching close by the time it callsumount(). util-linux-ng 2.13.1 is _that_ dumb...Umm... Looks like something more odd is going on...
... or something much simpler:
Quoted 7 lines
; cat
/proc/mounts|grep proc
proc /proc proc rw,nosuid,nodev,noexec 0 0
usbfs/proc/bus/usbusbfs rw 0 0
;and unmounting the stuff mounted under /proc before doing umount /proc works as expected. Amazing how well the first cup of coffee helps...
Hey. Don't paint ME *that* dumb... ;)
It was indeed the case here. I never tried those things on my home machine before, and decided to experiment, but I forgot that it has /proc/bus/usb mounted. And for comparison I used another machine which does NOT have that filesystem mounted. How.. dum^Wodd... ;)
Please excuse me for the noise.
/mj