(gdb) bt #0 0x009ef63b in strlen () from /lib/tls/libc.so.6 #1 0x009c3525 in vfprintf () from /lib/tls/libc.so.6 #2 0x009e0cd6 in vsnprintf () from /lib/tls/libc.so.6 #3 0x081144eb in ast_dynamic_str_thread_build_va (buf=0x36d3908, max_len=8192, ts=0x8172904, append=0, fmt=0x358474 "%s line %d (%s): Error: '%s' was locked here.\n", ap=0x36d3944 "\001") at utils.c:1307 #4 0x080bf659 in ast_log (level=4, file=0x358074 "/usr/src/asterisk-test/1.4.20rc2/asterisk-1.4.20-rc2/include/asterisk/lock.h", line=291, function=0x3583d7 "__ast_pthread_mutex_destroy", fmt=0x358474 "%s line %d (%s): Error: '%s' was locked here.\n") at logger.c:807 #5 0x003560e1 in __ast_pthread_mutex_destroy (filename=0x356ef4 "app_chanspy.c", lineno=661, func=0x358360 "common_exec", mutex_name=0x35836c "&chanspy_ds.lock", t=0x36d3a44) at /usr/src/asterisk-test/1.4.20rc2/asterisk-1.4.20-rc2/include/asterisk/lock.h:290 #6 0x00355eb5 in common_exec (chan=0xb693c9a0, flags=0x36d4de8, volfactor=0, fd=0, mygroup=0x0, spec=0x36d3d80 "SIP/XXXX-p7138", exten=0x0, context=0x0) at app_chanspy.c:661 #7 0x003567ab in chanspy_exec (chan=0xb693c9a0, data=0x36d3d80) at app_chanspy.c:736 #8 0x080ccb29 in pbx_exec (c=0xb693c9a0, app=0x8af2158, data=0x36d6f50) at /usr/src/asterisk-test/1.4.20rc2/asterisk-1.4.20-rc2/include/asterisk/strings.h:35 #9 0x080d05a1 in pbx_extension_helper (c=0xb693c9a0, con=0x0, context=0xb693cbe0 "XXXX", exten=0xb693cc30 "*888", priority=202, label=0x0, callerid=0xb72f4530 "XXXXXXXXXX", action=E_SPAWN) at pbx.c:1862 #10 0x080d18d1 in ast_spawn_extension (c=0xb693c9a0, context=0xb693cbe0 "XXXX", exten=0xb693cc30 "*888", priority=202, callerid=0xb72f4530 "XXXXXXXXXX") at pbx.c:2317 #11 0x080d1e1b in __ast_pbx_run (c=0xb693c9a0) at pbx.c:2419 #12 0x080d2bf0 in pbx_thread (data=0xb693c9a0) at pbx.c:2636 #13 0x08113724 in dummy_start (data=0xb7aeb8d8) at utils.c:865 #14 0x00b633cc in start_thread () from /lib/tls/libpthread.so.0 #15 0x00a4ec3e in clone () from /lib/tls/libc.so.6 (gdb) bt full #0 0x009ef63b in strlen () from /lib/tls/libc.so.6 No symbol table info available. #1 0x009c3525 in vfprintf () from /lib/tls/libc.so.6 No symbol table info available. #2 0x009e0cd6 in vsnprintf () from /lib/tls/libc.so.6 No symbol table info available. #3 0x081144eb in ast_dynamic_str_thread_build_va (buf=0x36d3908, max_len=8192, ts=0x8172904, append=0, fmt=0x358474 "%s line %d (%s): Error: '%s' was locked here.\n", ap=0x36d3944 "\001") at utils.c:1307 res = 135600688 offset = 0 __PRETTY_FUNCTION__ = "ast_dynamic_str_thread_build_va" #4 0x080bf659 in ast_log (level=4, file=0x358074 "/usr/src/asterisk-test/1.4.20rc2/asterisk-1.4.20-rc2/include/asterisk/lock.h", line=291, function=0x3583d7 "__ast_pthread_mutex_destroy", fmt=0x358474 "%s line %d (%s): Error: '%s' was locked here.\n") at logger.c:807 __res = 97 res = 97 res = 109 chan = (struct logchannel *) 0x8ae6230 buf = (struct ast_dynamic_str *) 0x9574740 t = 1218729043 tm = {tm_sec = 43, tm_min = 50, tm_hour = 11, tm_mday = 14, tm_mon = 7, tm_year = 108, tm_wday = 4, tm_yday = 226, tm_isdst = 1, tm_gmtoff = -14400, tm_zone = 0x0} date = "Aug 14 11:50:43", '\0' , "eh?\000\020\2315\000\001\000\000\000?8m\003\201\031\021\b\000\000\000\000?-\021\b", '\0' , "'N?\000\000\000\000\000\020\2315" ap = 0x36d3944 "\001" __PRETTY_FUNCTION__ = "ast_log" #5 0x003560e1 in __ast_pthread_mutex_destroy (filename=0x356ef4 "app_chanspy.c", lineno=661, func=0x358360 "common_exec", mutex_name=0x35836c "&chanspy_ds.lock", t=0x36d3a44) at /usr/src/asterisk-test/1.4.20rc2/asterisk-1.4.20-rc2/include/asterisk/lock.h:290 res = 16 canlog = 1 __PRETTY_FUNCTION__ = "__ast_pthread_mutex_destroy" #6 0x00355eb5 in common_exec (chan=0xb693c9a0, flags=0x36d4de8, volfactor=0, fd=0, mygroup=0x0, spec=0x36d3d80 "SIP/XXXX-p7138", exten=0x0, context=0x0) at app_chanspy.c:661 nameprefix = "D?\203\v(\b\000\000h, "\020GH\v@??\000` \000\000@??\000?;m\003\003+?\000\000\000\000\000\000\000\000\000eh?\000\001\000\000\000H#\027\b?;m\003\201\031\021\b\000\000\000\000?-\021\b", '\0' , "'N?\000\000\000\000\000\001\000\000\000H#\027\b\000\000\000\000?;m\003\v2\021\bD?\203\v(\b\000\000?;m\003\036?\v\b\002\000\000\0008?\203\v8 to continue, or q to quit--- #7 0x003567ab in chanspy_exec (chan=0xb693c9a0, data=0x36d3d80) at app_chanspy.c:736 u = (struct ast_module_user *) 0xa06cfe8 options = 0x36d3d8f "q" spec = 0x36d3d80 "SIP/XXXX-p7138" argv = {0x36d3d80 "SIP/XXXX-p7138", 0x36d3d8f "q"} mygroup = 0x0 recbase = 0x0 fd = 0 flags = {flags = 1} oldwf = 4 argc = 2 volfactor = 0 res = 145695084 __PRETTY_FUNCTION__ = "chanspy_exec" #8 0x080ccb29 in pbx_exec (c=0xb693c9a0, app=0x8af2158, data=0x36d6f50) at /usr/src/asterisk-test/1.4.20rc2/asterisk-1.4.20-rc2/include/asterisk/strings.h:35 res = 57495200 saved_c_appl = 0x0 saved_c_data = 0x0 #9 0x080d05a1 in pbx_extension_helper (c=0xb693c9a0, con=0x0, context=0xb693cbe0 "XXXX", exten=0xb693cc30 "*888", priority=202, label=0x0, callerid=0xb72f4530 "XXXXXXXXXX", action=E_SPAWN) at pbx.c:1862 e = (struct ast_exten *) 0xb6e729a0 app = (struct ast_app *) 0x8af2158 res = 8 q = {incstack = {0xb6e1a6ac "XXXX", 0xb68c59f4 "default-out", 0xb662a71c "default-internal", 0xb6e9c494 "local-gw", 0xb6e648f4 "XXXX-7188", 0xb5d4d86c "XXXX-7199", 0xb650f364 "XXXX-page-by-phone", 0xb5d75aa4 "XXXX-cran-voicemail-direct", 0xb5f550b4 "XXXX-out", 0xb5f01464 "XXXX-optout", 0xb662fadc "dialout", 0xb6dd55ac "tollfree-dialout", 0xb65cd4ec "dialout-main", 0xb6e3bfa4 "XXXX-local", 0x0 }, stacklen = 14, status = 5, swo = 0x0, data = 0x0, foundcontext = 0xb6e2c312 "XXXX-chan-spy"} passdata = "SIP/XXXX-p7138|q", '\0' matching_action = 0 __PRETTY_FUNCTION__ = "pbx_extension_helper" #10 0x080d18d1 in ast_spawn_extension (c=0xb693c9a0, context=0xb693cbe0 "XXXX", exten=0xb693cc30 "*888", priority=202, callerid=0xb72f4530 "XXXXXXXXXX") at pbx.c:2317 No locals. #11 0x080d1e1b in __ast_pbx_run (c=0xb693c9a0) at pbx.c:2419 dst_exten = "?\222m\003,\223m\003\000\000\000\0008\223m\003??\000\001\000\000\000@??\000X\222m\003V?\236\000@??\000(\b\000\000\000\000\000\000?\v\002\000(\b\000\000\bd(\f?\206\236\000\000\000\000\000\000\000\000\000\210\222m\003?\026\021\b\001\000\000\000(\b\000\000?h?\000\234\222m\003\201\031\021\b\000\000\000\000?\222m\003eh?\000\001\000\000\000H?\026\b?\222m\003\201\031\021\b\000\000\000\000?-\021\bx3\026\b\226\000\000\000a3\026\b'N?\000\000\000\000\000\001\000\000\000H?\026\b\000\000\000\000?\222m\003\v2\021\bD?\203\v(\b\000\000?\222m\003\030\236\006\b\000\000\000\0008?\203\v"... pos = 0 digit = 0 found = 1 res = 0 autoloopflag = 0 error = 0 __PRETTY_FUNCTION__ = "__ast_pbx_run" #12 0x080d2bf0 in pbx_thread (data=0xb693c9a0) at pbx.c:2636 c = (struct ast_channel *) 0xb693c9a0 #13 0x08113724 in dummy_start (data=0xb7aeb8d8) at utils.c:865 _buffer = {__routine = 0x806a287 , __arg = 0x36d9ba0, __canceltype = 148763216, __prev = 0x0} ret = (void *) 0xaac6f4 a = {start_routine = 0x80d2bd9 , data = 0xb693c9a0, name = 0xb6bdd300 "pbx_thread", ' ' , "started at [ 2660] pbx.c ast_pbx_start()"} ---Type to continue, or q to quit--- lock_info = (struct thr_lock_info *) 0xb83f538 mutex_attr = {__mutexkind = 1} #14 0x00b633cc in start_thread () from /lib/tls/libpthread.so.0 No symbol table info available. #15 0x00a4ec3e in clone () from /lib/tls/libc.so.6 No symbol table info available.