[Home]

Summary:ASTERISK-15430: chan_iax2.c dead lock at chan_iax2.c:2563
Reporter:Jens von Bülow (jensvb)Labels:
Date Opened:2010-01-14 10:32:42.000-0600Date Closed:2010-03-02 01:06:17.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_iax2
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-5706-core-backtrace.txt
( 1) asterisk-5706-lock.txt
Description:Hi,

I experienced a dead lock in chan_iax2 today.

First noticed it when the manager interface stopped responding. I could hang the cli just by running a "core show channels". The first time the command didn't complete and from then on no cli commands were accepted. The lock also happened when I tried to show the current iax channels using "iax2 show channels".

I attached to the running process with GDB and took a backtrace of all running threads.

I also caused a "segfault" with a kill -11 and have also attached the full backtrace.

I am not 100% certain that the dead lock was in fact in chan_iax2.c, I am out of my depth and need help with this one.

Thanks & Regards
Jens


****** ADDITIONAL INFORMATION ******

Thread 17 looks like the one that is waiting for the lock.

(gdb) bt full
#0  0x000000381180d4f4 in __lll_robust_lock_wait () from /lib64/libpthread.so.0
No symbol table info available.
#1  0x0000003811808c04 in _L_robust_lock_392 () from /lib64/libpthread.so.0
No symbol table info available.
#2  0x000000381180873e in __pthread_mutex_lock_full () from /lib64/libpthread.so.0
No symbol table info available.
#3  0x00002aaac61125a9 in ast_mutex_lock (pmutex=0x2aaac64e2f40) at /root/_ast1428/asterisk-1.4.28/include/asterisk/lock.h:759
No locals.
#4  0x00002aaac611781d in iax2_queue_frame (callno=32768, f=0x414fae60) at chan_iax2.c:2563
No locals.
ASTERISK-1  0x00002aaac611cd1b in __auto_congest (nothing=0x8000) at chan_iax2.c:4049
       callno = 32768
       f = {frametype = AST_FRAME_CONTROL, subclass = 8, datalen = 0, samples = 0, mallocd = 0, mallocd_hdr_len = 0, offset = 0, src = 0x0, data = 0x0, delivery = {tv_sec = 0,
   tv_usec = 0}, frame_list = {next = 0x0}, flags = 0, ts = 0, len = 0, seqno = 0}
       __PRETTY_FUNCTION__ = "__auto_congest"
ASTERISK-2  0x00002aaac613f816 in iax2_process_thread (data=0x2aaab85d7e10) at chan_iax2.c:10048
       __cancel_buf = {__cancel_jmp_buf = {{__cancel_jmp_buf = {0, -7702914142082449892, 0, 1095745536, 1095743808, 4096, -7702914142082457460, -7702867522281013993},
     __mask_was_saved = 0}}, __pad = {0x414fb080, 0x0, 0x1fb3f3c0, 0x15c40}}
       __cancel_routine = (void (*)(void *)) 0x2aaac613f2ad <iax2_process_thread_cleanup>
       __cancel_arg = (void *) 0x2aaab85d7e10
       not_first_call = 0
       thread = (struct iax2_thread *) 0x2aaab85d7e10
       tv = {tv_sec = 0, tv_usec = 0}
       ts = {tv_sec = 24, tv_nsec = 240803858541}
       put_into_idle = 1
ASTERISK-3  0x00000000004cb7a9 in dummy_start (data=0x2aaab85d2920) at utils.c:856
       __cancel_buf = {__cancel_jmp_buf = {{__cancel_jmp_buf = {0, -7702914142082449588, 0, 1095745536, 1095743808, 4096, -7702914142082449908, -7702914143173166836},
     __mask_was_saved = 0}}, __pad = {0x414fb1d0, 0x0, 0x0, 0x0}}
       __cancel_routine = (void (*)(void *)) 0x4243c4 <ast_unregister_thread>
       __cancel_arg = (void *) 0x414fb940
       not_first_call = 0
       ret = (void *) 0x0
       a = {start_routine = 0x2aaac613f30f <iax2_process_thread>, data = 0x2aaab85d7e10, name = 0x2aaab85d2790 "iax2_process_thread  started at [10580] chan_iax2.c start_network_thread()"}
ASTERISK-4  0x0000003811806617 in start_thread () from /lib64/libpthread.so.0
No symbol table info available.
ASTERISK-5  0x00000038110d3c2d in clone () from /lib64/libc.so.6
No symbol table info available.
(gdb)


Comments:By: Tilghman Lesher (tilghman) 2010-03-01 17:24:20.000-0600

Please compile with DEBUG_THREADS.  When the lockup occurs, obtain the output of 'core show locks', and upload the resulting output to the file upload area of this issue.

By: Jens von Bülow (jensvb) 2010-03-01 22:48:07.000-0600

The lockup has not occurred since.... I have in the past had problems with DEBUG_THREADS causing segfaults so don't run my servers with that anymore. If you can't make heads or tails from the information supplied, just close the ticket.