/etc/init.d/sendsigs fails to kill some processes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sysvinit (Ubuntu) |
Fix Released
|
Low
|
Surbhi Palande | ||
Lucid |
Fix Released
|
High
|
Surbhi Palande | ||
Maverick |
Fix Released
|
Low
|
Surbhi Palande |
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.
for pid in $(initctl list | sed -n -e "/process [0-9]/s/.*process //p"); do
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=
for seq in 1 2 3 4 5 6 7 8 9 10; do
OMITPIDS=
# 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
ProcVersionSign
Uname: Linux 2.6.32-25-generic i686
NonfreeKernelMo
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
tags: | added: patch |
I wonder why ubuntu-bug filed this report against sysvinit? The problem is in the initscripts package, and that's what I originally requested...