(gdb) bt #0 __GI___pthread_mutex_lock (mutex=0x7f172ac9e700) at ../nptl/pthread_mutex_lock.c:66 #1 0x0000000000549c4e in ast_reentrancy_lock (lt=0x0) at /data/development/asterisk/asterisk_13_git/include/asterisk/lock.h:464 #2 0x000000000054a766 in __ast_pthread_mutex_lock (filename=0x7f175356534b "app_voicemail.c", lineno=3008, func=0x7f175356e780 <__PRETTY_FUNCTION__.19541> "init_mailstream", mutex_name=0x7f17535671c0 "&mail_open_lock", t=0x7f17537770e0 ) at lock.c:289 #3 0x00007f17535340ac in init_mailstream (vms=0x1b80c60, box=0) at app_voicemail.c:3008 #4 0x00007f1753531962 in __messagecount (context=0x7f172ac9cd16 "default", mailbox=0x7f172ac9cd10 "98011", folder=0x7f176c427b7c "INBOX") at app_voicemail.c:2502 #5 0x00007f175353313c in inboxcount2 (mailbox_context=0x7f176401a2e0 "98011@default", urgentmsgs=0x7f172ac9dd4c, newmsgs=0x7f172ac9dd44, oldmsgs=0x7f172ac9dd48) at app_voicemail.c:2817 #6 0x00007f1753556897 in poll_subscribed_mailbox (mwi_sub=0x7f176401a2c0) at app_voicemail.c:12834 #7 0x00007f175355698c in poll_subscribed_mailboxes () at app_voicemail.c:12852 #8 0x00007f1753556ae3 in mb_poll_thread (data=0x0) at app_voicemail.c:12875 #9 0x0000000000620ad8 in dummy_start (data=0x1705200) at utils.c:1237 #10 0x00007f17a41d2182 in start_thread (arg=0x7f172ac9e700) at pthread_create.c:312 #11 0x00007f17a348b47d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 (gdb) up #1 0x0000000000549c4e in ast_reentrancy_lock (lt=0x0) at /data/development/asterisk/asterisk_13_git/include/asterisk/lock.h:464 464 if ((res = pthread_mutex_lock(<->reentr_mutex))) { (gdb) #2 0x000000000054a766 in __ast_pthread_mutex_lock (filename=0x7f175356534b "app_voicemail.c", lineno=3008, func=0x7f175356e780 <__PRETTY_FUNCTION__.19541> "init_mailstream", mutex_name=0x7f17535671c0 "&mail_open_lock", t=0x7f17537770e0 ) at lock.c:289 289 ast_reentrancy_lock(lt); (gdb) print t->tracking $7 = 0 (gdb) print lt $8 = (struct ast_lock_track *) 0x0 (gdb) print t->track $9 = (struct ast_lock_track *) 0x0 (gdb) print canlog $10 = 0 (gdb) list 284 if (res == EBUSY) { 285 wait_time = time(NULL) - seconds; 286 if (wait_time > reported_wait && (wait_time % 5) == 0) { 287 __ast_mutex_logger("%s line %d (%s): Deadlock? waited %d sec for mutex '%s'?\n", 288 filename, lineno, func, (int) wait_time, mutex_name); 289 ast_reentrancy_lock(lt); 290 #ifdef HAVE_BKTR 291 __dump_backtrace(<->backtrace[lt->reentrancy], canlog); 292 #endif 293 __ast_mutex_logger("%s line %d (%s): '%s' was locked here.\n",