[Pkg-sysvinit-devel] Bug#391375: initscripts: umountnfs.sh: shutdown fails in presence of bind-mounts

Gabor Gombas gombasg at sztaki.hu
Fri Oct 6 10:13:36 UTC 2006


Package: initscripts
Version: 2.86.ds1-31
Severity: normal


Hi,

After the latest sysvinit/initscripts upgrades shutdown seems to be
broken. This machine has (among other things) /sys and /dev/pts
bind-mounted in a chroot. At the end of the shutdown (both after the
'Asking non-system processes to terminate...' and the 'Killing
non-system processes...' messages), the initscripts complain that some
processes are using these bind-mounted locations. But AFAICT that's
false, the listed processes (_including_ init itself) are using the
original locations (i.e. /sys), not the bind-mounted ones.

After the fuser output, there are two more messages:

error: '/etc/init.d/rc' exited outside the expected code flow.
INIT: no more processes left in this runlevel

and nothing else happens after this. I can only reboot/poweroff using
SysRq at this point.

A quick experiment shows that fuser cannot make a difference between
processes holding the source of a bind mount and processes holding the
target of the bind mount:

	# mkdir /tmp/a /tmp/b
	# mount -t tmpfs tmpfs /tmp/a
	# mount --bind /tmp/a /tmp/b
	# cd /tmp/a
	# fuser -m /tmp/b
	/tmp/b:		3958c

The behaviour of fuser is correct (it works on the filesystem level,
while bind mounts are pure namespace operations only). But the effect is
that the 'fuser' call in umountnfs.sh line 98 just kills /etc/init.d/rc
because it thinks it is using the bind-mounted location when in fact it
does not. If I just comment out the whole 'if [ -x /bin/fuser ]' block
and revert to using /etc/init.d/sendsigs, then everything works again.

Gabor

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (101, 'experimental')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages initscripts depends on:
ii  debianutils                  2.17.3      Miscellaneous utilities specific t
ii  e2fsprogs                    1.39-1.1    ext2 file system utilities and lib
ii  libc6                        2.5-0exp1   GNU C Library: Shared libraries
ii  lsb-base                     3.1-17      Linux Standard Base 3.1 init scrip
ii  mount                        2.12r-11    Tools for mounting and manipulatin
ii  sysvinit-utils               2.86.ds1-31 System-V-like utilities

Versions of packages initscripts recommends:
ii  psmisc                        22.3-1     Utilities that use the proc filesy

-- no debconf information




More information about the Pkg-sysvinit-devel mailing list