[Asterisk-Dev] moh issues

Luigi Rizzo rizzo at icir.org
Sat Jun 11 05:33:39 MST 2005


i tried to enable music-on-hold (res_musiconhold.c) on my system
(asterisk-current with FreeBSD 4.11 and the modified chan_oss.c
that is on mantis) but i am having problems which i am not clear how
to debug.

I suspect something in the thread scheduling, but it might well
be some kind of deadlock caused by the activation of moh.

the bottom line is that i'd like to know whether i am trying to
use something that is known broken, or whether moh does actually work,
in which case i'd like to know on what platform.

--- Detailed problem description: ---

Symptoms are that when the moh thread starts (because it founds a
valid directory in moh.conf), after a few iterations it remains
blocked on the usleep() near line 488 in monmp3thread(), despite
the value passed is a reasonably small one (< 100ms).

As far as i can tell there are no moh clients.

Then sometimes if i type a few commands on the CLI the thread,
or there are some network events, the usleep() unblocks and
monmp3thread does one more iteration, but basically most
threads seem to be blocked, CPU usage is close to 0,
mpg123 is blocked on a select()

The audio device (which is unrelated, as mpg123 should talk
to stdout not to the audio device, but it is managed by
a separate thread) does not respond anymore.
SIP transactions also seem to progress randomly.

If i try to stop asterisk ("stop now" from the cli) behaviour
varies - sometimes it terminates reasonably well, most of the
times enters an infinite loop which a bit of debugging shows to
be in monmp3thread(), and trying to break out of it with control-C
causes eventually a few free()s of invalid pointers and a core dump.

Any suggestions on what to look for in order to debug this problem ?

        cheers
        luigi




More information about the asterisk-dev mailing list