[asterisk-dev] Asterisk lock-up with impossible(?) lock backtrace
kkm at adaptiveai.com
Wed Feb 16 18:55:31 CST 2011
I am trying to analyze https://issues.asterisk.org/view.php?id=18823 and
would appreciate any help on it.
The culprit is a pbx_thread that runs dialplan while holding a channel
lock. What I really cannot understand is its lock trace:
=== Thread ID: 140177859758416 (pbx_thread started at [ 5035]
pbx.c ast_pbx_start()) 0x7F7DB3894950
=== ---> Lock #0 (channel.c): MUTEX 3636 __ast_read chan 0xe45970 (1)
handle_request_do 23992 if (!p->owner || !ast_channel_trylock(p->owner))
sipsock_read 23936 handle_request_do(&req, &addr);
/usr/lib/asterisk/modules/chan_sip.so [0x7f7dc0c88684] do_monitor
24455 res = ast_io_wait(io, res);
I added the annotations obtained by resolving the addresses into source
in gdb. According to the trace, the lock was obtained by a pbx_thread in
do_monitor. But pbx_thread is not supposed to enter do_monitor ever! Or
is it? How can I interpret that?
I identified the thread in gdb not using any information from "core show
locks", and the thread holding the lock is really a pbx_thread. So only
this backtrace is not clicking into the picture.
I have 2 lock-ups in 1.8.1 and 2 in 1.8.3-rc2, with cores and
everything, and all 4 produce quite identical picture.
More information about the asterisk-dev