Zombie process ?

Discussion of Transmission that doesn't fit in the other categories
Post Reply
coolmatt
Posts: 3
Joined: Sun Jan 29, 2012 12:25 pm

Zombie process ?

Post by coolmatt »

Hi,

Set up a little download server : Ubuntu + Transmission daemon. Love it. Works so good !
Though I'm a linux enthusiast, I'm also a newbie... and confused with this :

I wrote a bash script (torrent-done-script-filename) that calls another script (which performs tests and processes the downloaded file). All works fine but my primary script never dies... the process becomes Zombie. I guess it has to do with exit status and/or PID file... but I'm not so good with shell. Could someone point me in the right direction, please ?

Thanks a lot.
matt.

downloaded.sh :

#! /bin/bash

if [ -f /home/matt/scripts/transmission/toprocess/$TR_TORRENT_HASH ]
then
read line < /home/matt/scripts/transmission/toprocess/$TR_TORRENT_HASH
$line &
fi

exit()
gunzip
Posts: 272
Joined: Wed May 05, 2010 2:12 am

Re: Zombie process ?

Post by gunzip »

coolmatt wrote:exit()
that doesn't look right. try changing it to..

exit 0

also, depending on what exactly the secondary script is doing, try dropping the & after $line , though this is not mandatory.
coolmatt
Posts: 3
Joined: Sun Jan 29, 2012 12:25 pm

Re: Zombie process ?

Post by coolmatt »

Thanks,

Changed to "exit 0" but not better...

What I can't figure out is even when the "if" statement fails (so the script executes only exit 0), the process still goes zombie...

I also tried this without success :

wait
exit $?
gunzip
Posts: 272
Joined: Wed May 05, 2010 2:12 am

Re: Zombie process ?

Post by gunzip »

coolmatt wrote: What I can't figure out is even when the "if" statement fails (so the script executes only exit 0), the process still goes zombie...

I also tried this without success :

wait
exit $?
what version of the daemon are you running? it's just that i've used the script-done feature countless times and it never ended up as a zombie process. i'm running version 2.42 under Debian.
coolmatt
Posts: 3
Joined: Sun Jan 29, 2012 12:25 pm

Re: Zombie process ?

Post by coolmatt »

Hi gunzip

Thanks for your support.

transmission-remote --version reports 2.13

Will check changelogs on later versions (maybe it is an old bug) and upgrade to 2.42
gunzip
Posts: 272
Joined: Wed May 05, 2010 2:12 am

Re: Zombie process ?

Post by gunzip »

coolmatt wrote:transmission-remote --version reports 2.13

Will check changelogs on later versions (maybe it is an old bug) and upgrade to 2.42
yikes version 2.13 is pretty dated to be using at this point. there is this bug:

https://trac.transmissionbt.com/changeset/11536 (handle zombie processes)

which was fixed in 2.22 , so maybe you're seeing some of those effects.
Post Reply