[Bug 665185] Re: /etc/init.d/sendsigs fails to kill some processes
Launchpad Bug Tracker
665185 at bugs.launchpad.net
Sat Jun 11 19:36:24 UTC 2011
** Branch linked: lp:ubuntu/sysvinit
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to sysvinit in Ubuntu.
https://bugs.launchpad.net/bugs/665185
Title:
/etc/init.d/sendsigs fails to kill some processes
Status in “sysvinit” package in Ubuntu:
Fix Released
Status in “sysvinit” source package in Lucid:
Fix Committed
Status in “sysvinit” source package in Maverick:
Fix Committed
Bug description:
Binary package hint: sysvinit
While tracking the cause of unclean shutdowns on my system (/ fails to
unmount), I stumbled on the following.
In /etc/init.d/sendsigs, there is an inner loop which appends to a
variable:
for pid in $(initctl list | sed -n -e "/process [0-9]/s/.*process //p"); do
OMITPIDS="${OMITPIDS:+$OMITPIDS }-o $pid"
done
This loop gets executed 10 times by an outer loop:
for seq in 1 2 3 4 5 6 7 8 9 10; do
...
done
OMITPIDS grows very long, and at some point the subsequent command
killall5 -18 $OMITPIDS
overflows with "omit pid buffer size 16 exceeded!" (I guess killall5
"benefits" from legacy coding practices...)
Solution: reinitialize OMITPIDS inside the outer loop (before the
inner loop):
OMITPIDS0="$OMITPIDS"
for seq in 1 2 3 4 5 6 7 8 9 10; do
OMITPIDS="$OMITPIDS0"
# inner loop
# do the killall -18 test ...
done
Of course this can still fail and killall5 should be fixed.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: initscripts 2.87dsf-4ubuntu17
ProcVersionSignature: Ubuntu 2.6.32-25.45-generic 2.6.32.21+drm33.7
Uname: Linux 2.6.32-25-generic i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Fri Oct 22 18:56:31 2010
ProcEnviron:
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: sysvinit
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/665185/+subscriptions
More information about the foundations-bugs
mailing list