[asterisk-biz] Asterisk 1.4.22.1 and zombies
Sabine Jordan
jordan at rate-one.de
Wed Jan 21 08:54:26 CST 2009
Hello,
I've done some more research on the system. here's what I've found out.
The defunct processes are from the application but these proceses are
children of the asterisk process.
It looks like that:
ps -ef |grep asterisk |grep -v defunct
root 2741 1 0 11:47 ? 00:01:04 asterisk
root 24149 2741 0 15:46 ? 00:00:00 /usr/bin/php -q
/distributed/ipc_asterisk/asterisk/asterisk.php 0
root 24179 2741 0 15:46 ? 00:00:00 /usr/bin/php -q
/distributed/ipc_asterisk/asterisk/asterisk.php 0
root 24180 2741 0 15:46 ? 00:00:00 /usr/bin/php -q
/distributed/ipc_asterisk/asterisk/asterisk.php 0
root 24183 2741 0 15:46 ? 00:00:00 /usr/bin/php -q
/distributed/ipc_asterisk/asterisk/asterisk.php 0
ps -ef |grep asterisk |grep defunct
root 18371 2741 0 14:43 ? 00:00:00 [asterisk.php] <defunct>
root 18380 2741 0 14:44 ? 00:00:00 [asterisk.php] <defunct>
root 18384 2741 0 14:44 ? 00:00:00 [asterisk.php] <defunct>
root 18490 2741 0 14:45 ? 00:00:00 [asterisk.php] <defunct>
root 18500 2741 0 14:45 ? 00:00:00 [asterisk.php] <defunct>
...
There are 175 defunct zombies right now.
I've noticed the following warning while searching through
/var/log/asterisk/messages
tail -f messages
[Jan 20 16:52:11] NOTICE[4013] sched.c: Scheduled event in 0 ms?
[Jan 20 16:55:24] NOTICE[4335] pbx_spool.c: Call failed to go through,
reason (1) Hangup
[Jan 20 16:55:31] NOTICE[3427] pbx_spool.c: Call completed to
SIP/11751003515006796 at sip-03.systemhaus.net
[Jan 20 16:57:46] WARNING[4457] file.c: Failed to write frame
[Jan 20 17:03:41] NOTICE[5113] pbx_spool.c: Call failed to go through,
reason (1) Hangup
[Jan 20 17:03:48] NOTICE[3840] pbx_spool.c: Call completed to
SIP/117510079439421410 at sip-03.systemhaus.net
[Jan 20 17:05:17] NOTICE[5166] sched.c: Scheduled event in 0 ms?
[Jan 20 17:11:16] NOTICE[5560] sched.c: Scheduled event in 0 ms?
[Jan 20 17:13:27] NOTICE[5728] sched.c: Scheduled event in 0 ms?
[Jan 20 17:15:03] WARNING[5807] channel.c: No channel type registered
for 'Zap'
[Jan 20 17:18:21] WARNING[6314] channel.c: No channel type registered
for 'Zap'
[Jan 20 17:18:54] NOTICE[6350] sched.c: Scheduled event in 0 ms?
[Jan 20 17:20:28] WARNING[6539] file.c: Failed to write frame
[Jan 20 17:21:39] WARNING[6604] file.c: Failed to write frame
[Jan 20 17:23:29] NOTICE[6810] pbx_spool.c: Call failed to go through,
reason (1) Hangup
[Jan 20 17:23:34] NOTICE[5966] pbx_spool.c: Call completed to
SIP/117510098318808514 at sip-03.systemhaus.net
[Jan 20 17:25:01] WARNING[6909] channel.c: No channel type registered
for 'Zap'
[Jan 20 17:25:15] NOTICE[6948] sched.c: Scheduled event in 0 ms?
[Jan 20 17:25:36] WARNING[6953] channel.c: No channel type registered
for 'Zap'
[Jan 20 17:25:38] NOTICE[6907] sched.c: Scheduled event in 0 ms?
We've had no zombies yesterday until 17:10 the first zombies started to
reappear. I've also noticed that all the zombies disappear when there
are no acitve channels on the server. After a while they are starting to
reappear.
I know that the warning in messages, are just warning and no errors, but
I've also noticed - since we use ztdummy for meetme, because we do not
have any zaptel interface installed on the server - that one needs to
load chan_zap.so to use meetme correctly. unfortunenatly chan_zap.so is
not installed and I do not know why and if that may be the cause of the
problems. We've had asterisk version 1.4.21 before, where chan_zap.so
was available form the sources and could be found in the directory
channels, but we've also got these warnings... Maybe it's because the
newer versions of asterisk already use dahdi?
Any more ideas would be appreciated. Thank you in advance.
Sabine
Trixter aka Bret McDanel schrieb:
> 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 :)
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-biz mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-biz
--
dtms GmbH
Sabine Jordan
System Engineer
Isaac-Fulda-Allee 5
55124 Mainz
T: + 49 (0) 180 / 30 70 3 325*
F: + 49 (0) 180 / 30 70 3 309*
Infos unter: www.dtms.de
* (0,09 €/Min. aus dem dt. Festnetz, abweichende Preise aus dem Mobilfunk)
More information about the asterisk-biz
mailing list