[Pkg-sysvinit-devel] Bug#476695: Needless stats in readproc()

Goswin von Brederlow goswin-v-b at web.de
Fri Apr 18 13:59:02 UTC 2008


Package: sysvinit-utils
Version: 2.86.ds1-56
Severity: wishlist
Tags: patch

Hi,

we use fuse-unionfs for /usr in a pool of systems. When rebooting
killall5 will stop all processes to avoid race conditions and then
calls readproc(). readproc(), being a common function for killall5 and
pidof, in turn stat()s /proc/pid/exe for every process. Since our /usr
is a fuse filesystem this deadlocks. killall5 waits for stat() and
stat() waits for the stopped fuse-unionfs process.

The attached patch adds a new parameter to readproc() telling it to
stat or not to stat and sets this flag for the killa5 and pidof case.

The patch also mlocks killall5 into memory to avoid demand page
loading. This would deadlock if /sbin is on a fuse filesystem.

MfG
	Goswin

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.22-xen-ubuntu
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages sysvinit-utils depends on:
ii  libc6                         2.7-10     GNU C Library: Shared libraries
ii  libselinux1                   2.0.59-1   SELinux shared libraries
ii  libsepol1                     2.0.25-1   Security Enhanced Linux policy lib

sysvinit-utils recommends no packages.

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 84-killall_no_stat.dpatch
Type: application/x-shellscript
Size: 2199 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20080418/bdad1d44/attachment.bin 


More information about the Pkg-sysvinit-devel mailing list