Summary: | ASTERISK-11595: Zap restart, deadlock message | ||
Reporter: | Balgansuren Batsukh (balgaa) | Labels: | |
Date Opened: | 2008-03-06 23:15:06.000-0600 | Date Closed: | 2008-03-24 12:51:49 |
Priority: | Critical | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_zap |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | Hello, I get followings message since Asterisk-1.4.16 until now. It is in /var/log/asterisk/messages: [Feb 21 18:56:37] NOTICE[10957] chan_zap.c: Avoiding deadlock... [Feb 21 18:56:37] NOTICE[10957] chan_zap.c: Avoiding deadlock... [Feb 21 18:56:37] NOTICE[10957] chan_zap.c: Avoiding deadlock... [Feb 21 18:56:37] NOTICE[10957] chan_zap.c: Avoiding deadlock... [Feb 21 18:56:37] NOTICE[10957] chan_zap.c: Avoiding deadlock... [Feb 21 18:56:37] NOTICE[10957] chan_zap.c: Avoiding deadlock... [Feb 21 18:56:37] NOTICE[10957] chan_zap.c: Avoiding deadlock... Usually, when I try to restart Zap channel. I need to do it 2-3 times, sometimes Asterisk get core dump. pbx:/var/log/asterisk# asterisk -r Asterisk 1.4.17, Copyright (C) 1999 - 2007 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.4.17 currently running on pbx (pid = 2342) Verbosity is at least 6 pbx*CLI> zap restart Destroying channels and reloading zaptel configuration. == Parsing '/etc/asterisk/zapata.conf': Found == Parsing '/etc/asterisk/zapata-channels.conf': Found [Mar 9 12:56:06] WARNING[2667]: chan_zap.c:904 zt_open: Unable to specify channel 1: Device or resource busy [Mar 9 12:56:06] ERROR[2667]: chan_zap.c:7186 mkintf: Unable to open channel 1: Device or resource busy here = 0, tmp->channel = 1, channel = 1 [Mar 9 12:56:06] ERROR[2667]: chan_zap.c:10527 build_channels: Unable to register channel '1' [Mar 9 12:56:06] WARNING[2667]: chan_zap.c:9824 zap_restart: Reload channels from zap config failed! [Mar 9 12:56:06] WARNING[2425]: chan_zap.c:4788 zt_read: zt_rec: Bad file descriptor [Mar 9 12:56:06] WARNING[2425]: chan_zap.c:1643 zt_confmute: zt confmute(0) failed on channel 6: Bad file descriptor [Mar 9 12:56:06] DEBUG[2425]: chan_zap.c:1574 set_actual_rxgain: Failed to read gains: Bad file descriptor [Mar 9 12:56:06] WARNING[2425]: chan_zap.c:1608 restore_gains: Unable to restore gains: Bad file descriptor [Mar 9 12:56:06] WARNING[2425]: chan_zap.c:2586 zt_hangup: Unable to set law on channel 6 to default [Mar 9 12:56:06] WARNING[2425]: chan_zap.c:1625 zt_set_hook: zt hook failed: Bad file descriptor [Mar 9 12:56:06] WARNING[2425]: chan_zap.c:2644 zt_hangup: Unable to hangup line Zap/6-1 [Mar 9 12:56:06] WARNING[2425]: chan_zap.c:1351 reset_conf: Failed to reset conferencing on channel 6! -- Hungup 'Zap/6-1' == Spawn extension (boldsoft, 99133572, 1) exited non-zero on 'SIP/804-082b8570' pbx*CLI> zap restart Destroying channels and reloading zaptel configuration. == Parsing '/etc/asterisk/zapata.conf': Found == Parsing '/etc/asterisk/zapata-channels.conf': Found -- Registered channel 1, FXS Kewlstart signalling -- Registered channel 2, FXS Kewlstart signalling -- Registered channel 3, FXS Kewlstart signalling -- Registered channel 4, FXS Kewlstart signalling -- Registered channel 5, FXS Kewlstart signalling -- Registered channel 6, FXS Kewlstart signalling -- Registered channel 7, FXS Kewlstart signalling -- Registered channel 8, FXS Kewlstart signalling -- Registered channel 9, FXO Kewlstart signalling -- Registered channel 10, FXO Kewlstart signalling -- Registered channel 11, FXO Kewlstart signalling -- Registered channel 12, FXO Kewlstart signalling -- Automatically generated pseudo channel What is problem of Deadlock message and Zap problem? | ||
Comments: | By: Russell Bryant (russell) 2008-03-14 15:11:58 I'm pretty sure this has already been fixed. Try 1.4 from svn. If you still have problems, reopen with "core show locks" output with Asterisk compiled with DEBUG_THREADS enabled. svn co http://svn.digium.com/svn/asterisk/branches/1.4 asterisk-1.4 By: Balgansuren Batsukh (balgaa) 2008-03-21 09:42:56 I installed latest svn source and still get deadlock. pbx*CLI> core show version Asterisk SVN-branch-1.4-r110163 built by root @ pbx.boldsoft.mn on a i686 running Linux on 2008-03-22 09:51:49 UTC /var/log/asterisk/messages: --------------------------- [Mar 22 20:52:01] NOTICE[17001] chan_zap.c: Avoiding deadlock... [Mar 22 20:52:01] NOTICE[17001] chan_zap.c: Avoiding deadlock... [Mar 22 20:52:01] NOTICE[17001] chan_zap.c: Avoiding deadlock... [Mar 22 20:52:01] NOTICE[17001] chan_zap.c: Avoiding deadlock... [Mar 22 20:52:01] NOTICE[17001] chan_zap.c: Avoiding deadlock... [Mar 22 20:52:01] NOTICE[17001] chan_zap.c: Avoiding deadlock... [Mar 22 20:52:01] NOTICE[17001] chan_zap.c: Avoiding deadlock... [Mar 22 20:52:01] NOTICE[17001] chan_zap.c: Avoiding deadlock... [Mar 22 20:52:01] NOTICE[17001] chan_zap.c: Avoiding deadlock... [Mar 22 20:52:01] NOTICE[17001] chan_zap.c: Avoiding deadlock... [Mar 22 20:52:01] NOTICE[17001] chan_zap.c: Avoiding deadlock... [Mar 22 20:52:01] NOTICE[17001] chan_zap.c: Avoiding deadlock... [Mar 22 20:52:01] NOTICE[17001] chan_zap.c: Avoiding deadlock... [Mar 22 20:52:01] NOTICE[17001] chan_zap.c: Avoiding deadlock... [Mar 22 20:52:01] NOTICE[17001] chan_zap.c: Avoiding deadlock... [Mar 22 20:52:01] NOTICE[17001] chan_zap.c: Avoiding deadlock... [Mar 22 20:52:01] NOTICE[17001] chan_zap.c: Avoiding deadlock... [Mar 22 20:52:01] NOTICE[17001] chan_zap.c: Avoiding deadlock... [Mar 22 20:52:01] NOTICE[17001] chan_zap.c: Avoiding deadlock... pbx*CLI> core show threads 0xb68d6bb0 netconsole started at [ 1005] asterisk.c listener() 0xb6912bb0 monitor_sig_flags started at [ 3003] asterisk.c main() 0xb694ebb0 do_monitor started at [ 4589] chan_skinny.c restart_monitor() 0xb698abb0 accept_thread started at [ 4775] chan_skinny.c reload_config() 0xb6b42bb0 do_monitor started at [ 3547] chan_mgcp.c restart_monitor() 0xb6ba0bb0 do_monitor started at [ 2723] src/chan_h323.c restart_monitor() 0xb6bdcbb0 ooh323c_stack_thread started at [ 43] src/ooh323cDriver.c ooh323c_start_stack_thread() 0xb6e07bb0 scan_thread started at [ 499] pbx_spool.c load_module() 0xb6e4fbb0 device_state_thread started at [ 4913] app_queue.c load_module() 0xb6f9cbb0 do_monitor started at [ 7027] chan_zap.c restart_monitor() 0xb716abb0 sound_thread started at [ 1812] chan_oss.c store_config() 0xb71a6bb0 sound_thread started at [ 1812] chan_oss.c store_config() 0xb726fbb0 network_thread started at [ 8911] chan_iax2.c start_network_thread() 0xb72abbb0 sched_thread started at [ 8910] chan_iax2.c start_network_thread() 0xb72e7bb0 iax2_process_thread started at [ 8900] chan_iax2.c start_network_thread() 0xb7323bb0 iax2_process_thread started at [ 8900] chan_iax2.c start_network_thread() 0xb735fbb0 iax2_process_thread started at [ 8900] chan_iax2.c start_network_thread() 0xb739bbb0 iax2_process_thread started at [ 8900] chan_iax2.c start_network_thread() 0xb73d7bb0 iax2_process_thread started at [ 8900] chan_iax2.c start_network_thread() 0xb7413bb0 iax2_process_thread started at [ 8900] chan_iax2.c start_network_thread() 0xb744fbb0 iax2_process_thread started at [ 8900] chan_iax2.c start_network_thread() 0xb748bbb0 iax2_process_thread started at [ 8900] chan_iax2.c start_network_thread() 0xb74c7bb0 iax2_process_thread started at [ 8900] chan_iax2.c start_network_thread() 0xb7503bb0 iax2_process_thread started at [ 8900] chan_iax2.c start_network_thread() 0xb77b1bb0 do_monitor started at [ 1130] chan_phone.c restart_monitor() 0xb7918bb0 do_monitor started at [15752] chan_sip.c restart_monitor() 0xb7c93bb0 do_parking_thread started at [ 2458] res_features.c load_module() 0xb7d01bb0 do_devstate_changes started at [ 386] devicestate.c ast_device_state_engine_init() 0xb7d3dbb0 listener started at [ 1063] asterisk.c ast_makesocket() 29 threads listed. But deadlock didn't show up when I compile source with your suggested DEBUG_THREADS enabled, without this option deadlock appear on /var/log/asterisk/messages file. By: Russell Bryant (russell) 2008-03-21 10:08:01 I can't think of a reason why it wouldn't happen with DEBUG_THREADS on. I would leave that enabled and see if you can get it to happen. If not, there isn't much I can do. By: Russell Bryant (russell) 2008-03-24 12:51:49 Feel free to reopen this issue if you can reproduce it with DEBUG_THREADS enabled. |