Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#528497: asterisk: false EX-CANARY message on startup

478 views
Skip to first unread message

Tzafrir Cohen

unread,
May 13, 2009, 6:10:23 AM5/13/09
to
Package: asterisk
Version: 1:1.6.1.0~dfsg-1
Severity: normal

Sometimes (most notably on boot) Asterisk would give the strange "dead
canary" message:

Setting up asterisk (1:1.6.1.0~dfsg-0.7196) ...
Starting Asterisk PBX: The canary is no more. He has ceased to be!
He's expired and gone to meet his maker! He's a stiff! Bereft of life,
he rests in peace. His metabolic processes are now history! He's off
the twig! He's kicked the bucket. He's shuffled off his mortal coil,
run down the curtain, and joined the bleeding choir invisible!! THIS is
an EX-CANARY. (Reducing priority)
asterisk.

When Asterisk runs in real-time scheduling priority (-p, the default in
Debian), it may not be so nice if it gets into a 100% CPU loop. Thus as
of Asterisk 1.6.0 there is a separate Asterisk Canary" child process
that runs at a normal priorty and writes every 5 seconds to

/var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet

While the canary is tweeting, we know Asterisk is not taking 100% CPU
time. If Asterisk notices nobody updates the file, it responds by
dropping the real-time scheduling priority.

For most Lenny and above systems this feature is not really needed
anyway, because as of kernel 2.6.25, the "real-time scheduling priority"
will not resort to taking only 95% CPU time after a while.

The issue at hand seems to be
https://issues.asterisk.org/view.php?id=15093 .
However maybe we should just drop this feature until the upstream issue
is fixed? It mostly adds noise.

-- System Information:
Debian Release: 5.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/1 CPU core)
Locale: LANG=he_IL.UTF-8, LC_CTYPE=he_IL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages asterisk depends on:
ii adduser 3.110 add and remove users and groups
ii asterisk-config 1:1.4.21.2~dfsg-3 Configuration files for Asterisk
ii asterisk-sounds-ma 1:1.4.21.2~dfsg-3 Core Sound files for Asterisk (Eng
ii libasound2 1.0.16-2 ALSA library
ii libc-client2007b 7:2007b~dfsg-4+lenny3 c-client library for mail protocol
ii libc6 2.7-18 GNU C Library: Shared libraries
ii libcap2 2.11-2 support for getting/setting POSIX.
ii libcurl3 7.18.2-8 Multi-protocol file transfer libra
ii libgcc1 1:4.3.2-1.1 GCC support library
ii libgsm1 1.0.12-1 Shared libraries for GSM speech co
ii libiksemel3 1.2-4 C library for the Jabber IM platfo
ii libncurses5 5.7+20081213-1 shared libraries for terminal hand
ii libnewt0.52 0.52.2-11.3 Not Erik's Windowing Toolkit - tex
ii libogg0 1.1.3-4 Ogg Bitstream Library
ii libpopt0 1.14-4 lib for parsing cmdline parameters
ii libpq5 8.3.5-1 PostgreSQL C client library
ii libpri1.0 1.4.3-2 Primary Rate ISDN specification li
ii libradiusclient-ng 0.5.5-1 Enhanced RADIUS client library
ii libsnmp15 5.4.1~dfsg-12 SNMP (Simple Network Management Pr
ii libspeex1 1.2~rc1-1 The Speex codec runtime library
ii libspeexdsp1 1.2~rc1-1 The Speex extended runtime library
ii libsqlite0 2.8.17-4 SQLite shared library
ii libssl0.9.8 0.9.8g-15 SSL shared libraries
ii libstdc++6 4.3.2-1.1 The GNU Standard C++ Library v3
ii libtonezone1 1:1.4.11~dfsg-3 tonezone library (runtime)
ii libvorbis0a 1.2.0.dfsg-3.1 The Vorbis General Audio Compressi
ii libvorbisenc2 1.2.0.dfsg-3.1 The Vorbis General Audio Compressi
ii libvpb0 4.2.38-1 Voicetronix telephony hardware use
ii unixodbc 2.2.11-16 ODBC tools libraries
ii zlib1g 1:1.2.3.3.dfsg-12 compression library - runtime

asterisk recommends no packages.

Versions of packages asterisk suggests:
ii asterisk-dev 1:1.4.21.2~dfsg-3 Development files for Asterisk
pn asterisk-doc <none> (no description available)
pn asterisk-h323 <none> (no description available)
pn ekiga <none> (no description available)
ii kphone 1:4.2-7~etch.4794 Voice over IP (VoIP) phone applica
pn ohphone <none> (no description available)
ii twinkle 1:1.2-3 Voice over Internet Protocol (VoIP

-- no debconf information

--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Kilian Krause

unread,
May 15, 2009, 10:20:15 AM5/15/09
to
Tzafrir,

On Wed, May 13, 2009 at 01:02:12PM +0300, Tzafrir Cohen wrote:
> When Asterisk runs in real-time scheduling priority (-p, the default in
> Debian), it may not be so nice if it gets into a 100% CPU loop. Thus as
> of Asterisk 1.6.0 there is a separate Asterisk Canary" child process
> that runs at a normal priorty and writes every 5 seconds to
>
> /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet

...sounds to me like we would need to initialize that file in the init
script to make sure the tweet is there when asterisk is launched. Is that a
possible solution?

--
Best regards,
Kilian

signature.asc

Tzafrir Cohen

unread,
May 15, 2009, 10:40:17 AM5/15/09
to

I've added a patch from upstream that fixes the problem by running the
canary process after daemonizing. This also means that the canary runs
as the Asterisk user. The problem was that the fork caused the
monitoring thread in the Asterisk process to wake up too soon.

However I still suspect that sudden changes of the system clock may have
a strange effect on the canary mechanism.

--
Tzafrir Cohen
icq#16849755 jabber:tzafri...@xorcom.com
+972-50-7952406 mailto:tzafri...@xorcom.com
http://www.xorcom.com iax:gu...@local.xorcom.com/tzafrir

0 new messages