Tinderd Bug - Tinderd killing wrong processes
Tom Judge
tom at tomjudge.com
Thu Mar 12 16:23:22 EDT 2009
Joe Marcus Clarke wrote:
> On Thu, 2009-03-12 at 14:23 -0500, Tom Judge wrote:
>
>
>> 2) Why would tinderd think that a jailed processes has a file open in
>> the mount point /data/tinderbox/portstrees/mintel-6-2-mysql-5-0-51 when
>> the jail can't even access that path?
>>
>
> Look at the code in lib/tinderlib.sh for killMountProcesses(). It uses
> fstat on the mountpoint to determine what processes need to be killed.
>
>
>
Would this not be a more suitable:
-------------
killMountProcesses () {
dir=$1
pids="XXX"
while [ ! -z "${pids}" ]; do
pids=$(lsof | fgrep "${dir}" | awk '{print $2}' | sort -u)
if [ ! -z "${pids}" ]; then
echo "Killing off pids in ${dir}"
ps -p ${pids}
kill -KILL ${pids} 2> /dev/null
sleep 2
fi
done
}
-------------
Lsof correctly resolves the nullfs layer and prints out information
about the upper nullfs layer, fstat(1) does not seem to be able to do this.
Tom
More information about the tinderbox-list
mailing list