Summary: | ASTERISK-13021: Asterisks threads hangs | ||
Reporter: | Anton Fedorov (datacompboy) | Labels: | |
Date Opened: | 2008-11-06 04:08:45.000-0600 | Date Closed: | 2011-06-07 14:08:01 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_zap |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | after some time of works, several asterisk threads hangs eating as much CPU, as they can. ****** STEPS TO REPRODUCE ****** ## Dialplan: [from-pstn] include => input [input] #include "servers/*/home/service/extensions-global.conf" [default] exten => _X.,1,Dial(ZAP/g0/${EXTEN}) ###servers/ec/home/service/extensions-global.conf### [input](+) exten => 260122,1,Dial(SIP/${EXTEN}@ec) exten => _260122.,1,Dial(SIP/${EXTEN}@ec) exten => 2601906,1,Dial(SIP/${EXTEN}@ec) exten => _2601906.,1,Dial(SIP/${EXTEN}@ec) ****** ADDITIONAL INFORMATION ****** (gdb) bt #0 0x00007f8d666a5ff1 in nanosleep () from /lib/libc.so.6 #1 0x00007f8d666d14c4 in usleep () from /lib/libc.so.6 #2 0x00007f8d5aae8bd2 in zt_call (ast=0x1adb2e0, rdest=<value optimized out>, timeout=<value optimized out>) at chan_zap.c:784 #3 0x0000000000437339 in ast_call (chan=0x1adb2e0, addr=0x41d065f0 "g0/02132136960", timeout=0) at channel.c:3090 #4 0x00007f8d4c03bf6b in dial_exec_full (chan=0x7f8d601042a0, data=<value optimized out>, peerflags=0x41d06940, continue_exec=0x0) at app_dial.c:1268 ASTERISK-1 0x00007f8d4c0404c5 in dial_exec (chan=0x41d052f0, data=0x0) at app_dial.c:1776 ASTERISK-2 0x000000000047252a in pbx_exec (c=0x7f8d601042a0, app=0x19df4a0, data=0x41d08a00) at pbx.c:537 ASTERISK-3 0x0000000000473234 in pbx_extension_helper (c=0x7f8d601042a0, con=<value optimized out>, context=0x7f8d601044f0 "default", exten=0x7f8d60104540 "02132136960", priority=2, label=0x0, callerid=0x7f8d60102130 "Unknown", action=E_SPAWN) at pbx.c:1862 ASTERISK-4 0x0000000000473693 in ast_spawn_extension (c=0x41d052f0, context=<value optimized out>, exten=<value optimized out>, priority=<value optimized out>, callerid=<value optimized out>) at pbx.c:2317 ASTERISK-5 0x000000000047423c in __ast_pbx_run (c=0x7f8d601042a0) at pbx.c:2419 ASTERISK-6 0x0000000000474ba9 in pbx_thread (data=0x41d052f0) at pbx.c:2636 ASTERISK-7 0x000000000049b76c in dummy_start (data=<value optimized out>) at utils.c:895 ASTERISK-8 0x00007f8d67037fc7 in start_thread () from /lib/libpthread.so.0 ASTERISK-9 0x00007f8d666d75ad in clone () from /lib/libc.so.6 ASTERISK-10 0x0000000000000000 in ?? () | ||
Comments: | By: Anton Fedorov (datacompboy) 2008-11-06 04:09:09.000-0600 (gdb) bt full #0 0x00007f8d666a5ff1 in nanosleep () from /lib/libc.so.6 No symbol table info available. #1 0x00007f8d666d14c4 in usleep () from /lib/libc.so.6 No symbol table info available. #2 0x00007f8d5aae8bd2 in zt_call (ast=0x1adb2e0, rdest=<value optimized out>, timeout=<value optimized out>) at chan_zap.c:784 ldp_strip = <value optimized out> rr_str = <value optimized out> redirect_reason = <value optimized out> sr = <value optimized out> pridialplan = <value optimized out> prilocaldialplan = <value optimized out> exclusive = <value optimized out> p = (struct zt_pvt *) 0x7f8d600630d0 x = 3 res = 0 index = <value optimized out> mysig = 128 c = 0x41d05373 "02132136960" n = 0x1a5bec0 "Unknown" l = 0x19ecba0 "Unknown" s = 0x0 dest = "g0/02132136960", '\0' <repeats 74 times>, "`\000\000\000\000\000\000\0000", '\0' <repeats 43 times>, "\004", '\0 ' <repeats 11 times>, "?i\225f\215\177\000\000\017\000\000\000\000\000\000\0000\000\00 0\000\000\000\000\000?J¦\001\000\000\000\0 00¬?-\001\000\000\000\000?¦-\001\000\000\000\000hC\020`\215\177\00 0\000\b\000\000\000\000\000\000\000=B\020`\215\177\000\000p?\2 36\001\000\000\000\000¦pG\000\000\000\000\0000i?A\000\000\000\000¬ ?-\001\000\000\000" __PRETTY_FUNCTION__ = "zt_call" #3 0x0000000000437339 in ast_call (chan=0x1adb2e0, addr=0x41d065f0 "g0/02132136960", timeout=0) at channel.c:3090 res = -1 #4 0x00007f8d4c03bf6b in dial_exec_full (chan=0x7f8d601042a0, data=<value optimized out>, peerflags=0x41d06940, continue_exec=0x0) at app_dial.c:1268 di = <value optimized out> dialed_interfaces = <value optimized out> res = -1 u = (struct ast_module_user *) 0x1a389b0 rest = 0x41d05540 "ZAP" outgoing = (struct dial_localuser *) 0x0 peer = <value optimized out> to = <value optimized out> numbusy = 0 numcongestion = 0 numnochan = 0 cause = 0 numsubst = "g0/02132136960", '\0' <repeats 241 times> cidname = '\0' <repeats 79 times> privdb_val = 0 calldurationlimit = 0 timelimit = 0 play_warning = 0 warning_freq = 0 warning_sound = 0x0 end_sound = 0x0 start_sound = 0x0 dtmfcalled = 0x0 dtmfcalling = 0x0 status = "INVALIDARGS", '\0' <repeats 244 times> play_to_caller = 0 play_to_callee = 0 sentringing = <value optimized out> moh = <value optimized out> outbound_group = 0x0 result = <value optimized out> start_time = <value optimized out> privintro = '\0' <repeats 1023 times> privcid = '\0' <repeats 255 times> opermode = 0 args = {argc = 1, argv = 0x41d06888, peers = 0x41d05540 "ZAP", timeout = 0x0, options = 0x0, url = 0x0} opts = {flags = 0} opt_args = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0} datastore = (struct ast_datastore *) 0x1aecc90 fulldial = 0 num_dialed = 1 __PRETTY_FUNCTION__ = "dial_exec_full" ASTERISK-1 0x00007f8d4c0404c5 in dial_exec (chan=0x41d052f0, data=0x0) at app_dial.c:1776 peerflags = {flags = 0} ASTERISK-2 0x000000000047252a in pbx_exec (c=0x7f8d601042a0, app=0x19df4a0, data=0x41d08a00) at pbx.c:537 res = 0 saved_c_appl = 0x0 saved_c_data = 0x0 ASTERISK-3 0x0000000000473234 in pbx_extension_helper (c=0x7f8d601042a0, con=<value optimized out>, context=0x7f8d601044f0 "default", exten=0x7f8d60104540 "02132136960", priority=2, label=0x0, callerid=0x7f8d60102130 "Unknown", action=E_SPAWN) at pbx.c:1862 e = <value optimized out> app = (struct ast_app *) 0x19df4a0 res = <value optimized out> q = {incstack = {0x0 <repeats 128 times>}, stacklen = 0, status = 5, swo = 0x0, data = 0x0, foundcontext = 0x7f8d601044f0 "default"} passdata = "ZAP/g0/02132136960", '\0' <repeats 8173 times> matching_action = <value optimized out> __PRETTY_FUNCTION__ = "pbx_extension_helper" ASTERISK-4 0x0000000000473693 in ast_spawn_extension (c=0x41d052f0, context=<value optimized out>, exten=<value optimized out>, priority=<value optimized out>, callerid=<value optimized out>) at pbx.c:2317 No locals. ASTERISK-5 0x000000000047423c in __ast_pbx_run (c=0x7f8d601042a0) at pbx.c:2419 dst_exten = '\0' <repeats 120 times>, "@\000\000\000\000\000\000\000\030", '\0' <repeats 43 times>, "\002", '\0' <repeat s 11 times>, "?i\225f\215\177\000\000\000\000\000\000\000\000\000\000\030\000 \000\000\000\000\000\000?J¦\001\000\000\000\0001u\0 01\000\000\000\000\000\000\020\000\000\000\000\000\000\000?\236\ 001\000\000\000\000??\017`\215\177\000\000p\"?A\000\000\000" pos = 1101210224 digit = 3 found = 1 res = 0 error = <value optimized out> __PRETTY_FUNCTION__ = "__ast_pbx_run" ASTERISK-6 0x0000000000474ba9 in pbx_thread (data=0x41d052f0) at pbx.c:2636 No locals. ASTERISK-7 0x000000000049b76c in dummy_start (data=<value optimized out>) at utils.c:895 __cancel_buf = {__cancel_jmp_buf = {{__cancel_jmp_buf = {140245178767296, 161222725720342036, 1101210224, 140245295398656, 1104197968, 4096, 161079099342192148, 161223195727494676}, __mask_was_saved = 0}}, __pad = { 0x41d0b1e0, 0x0, 0x0, 0x0}} not_first_call = <value optimized out> ret = <value optimized out> ASTERISK-8 0x00007f8d67037fc7 in start_thread () from /lib/libpthread.so.0 No symbol table info available. ASTERISK-9 0x00007f8d666d75ad in clone () from /lib/libc.so.6 No symbol table info available. ASTERISK-10 0x0000000000000000 in ?? () No symbol table info available. By: Anton Fedorov (datacompboy) 2008-11-06 04:09:27.000-0600 hardware is two TE210P cards, 3 E1 cables in. zaptel is 1.4.11 By: snuffy (snuffy) 2008-11-06 04:28:12.000-0600 could you please recompile asterisk with 'dont optimize' and post a new bt/bt full as an attachment. If unsure follow guidelines in doc/backtrace.txt By: Tzafrir Cohen (tzafrir) 2008-11-06 05:33:04.000-0600 This is an issue with the Debian package that was accidentally reported here (I'll update it here with the Debian bug number when I have it). It seems that we have many channels busy at the DEADLOCK_AVOIDANCE macro. 777 static inline int pri_grab(struct zt_pvt *pvt, struct zt_pri *pri) 778 { 779 int res; 780 /* Grab the lock first */ 781 do { 782 res = ast_mutex_trylock(&pri->lock); 783 if (res) { 784 DEADLOCK_AVOIDANCE(&pvt->lock); 785 } 786 } while (res); 787 /* Then break the poll */ 788 pthread_kill(pri->master, SIGURG); 789 return 0; 790 } |