Bug#273780: asterisk: under ALSA, infinite-loops immediately on installation

Nathan Myers Nathan Myers <ncm@cantrip.org>, 273780@bugs.debian.org
Tue, 28 Sep 2004 00:16:01 -0400


Package: asterisk
Version: 1:1.0.0-2
Severity: critical
Justification: breaks the whole system

I (apt-get) installed asterisk 1.0.0-1.  After installation was
complete, CPU usage pegged at 100% and my /var partition filled to 100% 
very quickly.  The /var/log/asterisk/messages file contained millions
of copies of the line "WARNING[-1231201360]: Read error on sound device:
Invalid argument".  (The changelog for 1.0.0-2 doesn't hint that 
anything has been done about this problem.)

It turned out that my system is set up with ALSA drivers, and the 
default configuration's /etc/asterisk/modules.conf has a line 
"noload => chan_alsa.so".  Commenting this out, and uncommenting
instead "noload => chan_oss.so" appears to fix the immediate 
problem.

It seems that the installation script should try to detect whether
alsa or oss is in place and adjust /etc/asterisk/modules.conf
accordingly.  Failing that, it should configure asterisk not to
start up without a manually-set-up sound configuration, or maybe
it should configure asterisk to run without a sound device, and 
issue appropriate log messages explaining what it is doing, and 
why, and how to fix it.

Asterisk also tries to run a bunch of other stuff that it shouldn't,
such as res_odbc, an mp3 player, and mysql1 and mysql2.  As it happens, 
it is also filling my log partition with a complaint every 500 seconds
that it can't spawn an mp3player:

WARNING[-1215546448]: /var/lib/asterisk/mohmp3 is not a
valid directory
WARNING[-1215546448]: unable to spawn mp3player
NOTICE[-1215546448]: Request to schedule in the past?!?!
WARNING[-1215546448]: /var/lib/asterisk/mohmp3 is not a valid directory
WARNING[-1215546448]: unable to spawn mp3player

That's happening slowly enough to be a much smaller problem, which
I'll file separately if asked to.  Setting 
/etc/asterisk/musiconhold.conf to pass "-o alsa" to mpg321, as it 
ought to do, does not fix this last bit.  (I notice there is no 
dependency on an mp3 player in the package details.)

I don't know what to make of the logged complaint, 
"/var/lib/asterisk/mohmp3 is not a valid directory", above.
Sure enough, it's not, but so what?

-- System Information:
Debian Release: 2.2
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.9-rc2-mm1
Locale: LANG=C, LC_CTYPE=C

Versions of packages asterisk depends on:
ii  asterisk-sounds       1:1.0.0-1          Sound files for asterisk
ii  libasound2            1.0.5-1            Advanced Linux Sound Architecture 
ii  libc6                 2.3.2.ds1-16       GNU C Library: Shared libraries an
ii  libedit2              2.9.cvs.20040827-1 BSD editline and history libraries
pi  libexpat1             1.95.6-6           XML parsing C library - runtime li
pi  libglib1.2            1.2.10-ximian.2    The GLib library of C routines
ii  libgsm1               1.0.10-11.2        Shared libraries for GSM speech co
ii  libgtk1.2             1.2.10-17          The GIMP Toolkit set of widgets fo
ii  libncurses5           5.4-3              Shared libraries for terminal hand
ii  libopenh323-1.13.2    1.13.5.4-4         H.323 aka VoIP library
ii  libpq3                7.4.1-1            Shared library libpq.so.3 for Post
ii  libpt-1.6.3           1.6.6.4-5          Portable Windows Library
ii  libspeex1             1.0.rel.1-2        The Speex Speech Codec
ii  libssl0.9.7           0.9.7d-1           SSL shared libraries
ii  libx11-6              4.3.0-5            X Window System protocol client li
ii  libxext6              4.3.0-5            X Window System miscellaneous exte
ii  libxi6                4.3.0-5            X Window System Input extension li
ii  unixodbc              2.2.4-9            ODBC tools libraries
ii  xlibs                 4.3.0-5            X Window System client libraries m
ii  zlib1g                1:1.2.1-2          compression library - runtime

-- no debconf information