[asterisk-biz] Asterisk 1.4.22.1 and zombies

Trixter aka Bret McDanel trixter at 0xdecafbad.com
Sat Jan 17 05:59:16 CST 2009


On Sat, 2009-01-17 at 12:34 +0100, Sabine Jordan wrote:
> I try not using the word zombie again ;) I will call them defunct
> processes instead.

to be clear, these defunct processes, are they asterisk or your
application?

You mentioned a script, is this an agi?  Asterisk will fork()/exec() the
agi, so asterisk is the parent of the agi process.  If the agi process
ends, but is waiting for the parent it goes into a defunct or properly a
zombie process (which predates the asterisk usage by a couple decades).
If the parent dies then so will the zombie in most cases.

*IF* all of this is correct, and its just a guess reading what you have
written, then the solution is probably to add a wait() call to the
parent so that it can pull off the status of the child, and the process
table can release the process.

Generally zombies do not consume much of anything, bit of ram while
waiting for the parent to acknowledge the child process died off for
whatever reason.  

You can see the parent id with ps, its the column entry "PPID" with
standard ps in most linux distros.  This can let you find out what the
parent really is, so you know which process needs to acknowledge the
death of its child, and let it rest in peace.  Think of wait() as a
funeral service for the now dead process :)


-- 
Trixter http://www.0xdecafbad.com     Bret McDanel
pgp key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8AE5C721

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.digium.com/pipermail/asterisk-biz/attachments/20090117/0da50466/attachment.pgp 


More information about the asterisk-biz mailing list