Summary:ASTERISK-03951: 'Avoiding initial deadlock' message and Asterisk stops to operate
Reporter:alextitov (alextitov)Labels:
Date Opened:2005-04-18 08:01:22Date Closed:2005-04-28 23:37:05
Versions:Frequency of
Environment:Attachments:( 0) ast-h323-dead.diff
( 1) ast-h323-dead-codec.diff
( 2) full.log.txt
( 3) threads_backtrace.txt
Description:I'm not sure if it is H.323 project bug so please correct it if I'm wrong.

Sometimes (once a several days) we fail to dial H.323 endpoint and see 'Avoiding initial deadlock' message in console as an answer for 'show channels' command.

Backtrace and full log with 15 minutes before deadlock are attached.
I found first thread (24 Thread 10534935 (LWP 6586)) according to http://www.voip-info.org/tiki-index.php?page=Asterisk%20debugging
> thread 24
> frame 3
gave me nothing (from my sight):
(gdb) thread 24
[Switching to thread 24 (Thread 10534935 (LWP 6586))]#0  0x40029604 in __pthread_sigsuspend ()
  from /lib/libpthread.so.0
(gdb) frame 2
#2  0x4002aa6b in __pthread_lock () from /lib/libpthread.so.0
(gdb) frame 3
#3  0x40027bbd in pthread_mutex_lock () from /lib/libpthread.so.0

What can I do to debug it better next time deadlock occurs ?


We use DLink DVG-1104DH (H.323) as a FXO gateway to outer world and Cisco ATA 186 (SIP) with DLink 104SH (H.323) as a phone FXS gateways.

Also we use attended transfer feature:
atxfer => #
with a tiny 'patch' from ASTERISK-3813841

Linux Debian 2.4.29
pwlib 1.8.1
openh323 1.15.1

Also, thank you for resolving bug ASTERISK-3813848, I was late to  post there that everything works fine.
Comments:By: Paul Cadach (pcadach) 2005-04-21 11:39:17

Alex, try attached patch - it should help with deadlocks on DTMF transmission (look for thread # 29 state in threads_backtrace.txt). Waiting for your feedback.

edited on: 04-21-05 11:57

By: alextitov (alextitov) 2005-04-22 01:57:31

Thank you, PCadach,

I've patched my sources with ast-h323-dead.diff and started Asterisk.
However I can't say if patch works untill we look at Asterisk for at least a week.
(that deadlock happens once a several days, maybe 3 or 5 days).

I'll report here once and if deadlock happens again.

By: Paul Cadach (pcadach) 2005-04-27 14:39:32

Common "hot fixes" added (the patch is equal to one at ASTERISK-3888 and ASTERISK-3928).

By: jerjer (jerjer) 2005-04-28 23:36:52

fixed in -head

By: jerjer (jerjer) 2005-04-28 23:37:05

not in -stable