[Home]

Summary:ASTERISK-12462: [patch] 'module unload chan_iax2.so' causes errors on cli, however module unloads
Reporter:Paul Belanger (pabelanger)Labels:
Date Opened:2008-07-26 11:54:35Date Closed:2011-06-07 14:10:20
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Channels/chan_iax2
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20080730__bug13170.diff.txt
( 1) 20081020__bug13170.diff.txt
( 2) full.txt
( 3) lock.txt
Description:Upon unload, chan_iax2 dumps a few ERROR messages to the cli (see below).

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

grimlock*CLI> core set verbose 999
Verbosity was 0 and is now 999
grimlock*CLI> core set debug 999
Core debug was 0 and is now 999
grimlock*CLI> module unload chan_iax2.so
 == Unregistered custom function IAXPEER
 == Unregistered custom function IAXVAR
[Jul 26 12:55:13] ERROR[15401]: /home/pabelanger/svn/asterisk-1.6.0/include/asterisk/lock.h:351 __ast_pthread_mutex_destroy: chan_iax2.c line 9471 (iax2_process_thread_cleanup): Error destroying mutex &thread->lock: Device or resource busy
[Jul 26 12:55:13] ERROR[15402]: /home/pabelanger/svn/asterisk-1.6.0/include/asterisk/lock.h:351 __ast_pthread_mutex_destroy: chan_iax2.c line 9471 (iax2_process_thread_cleanup): Error destroying mutex &thread->lock: Device or resource busy
[Jul 26 12:55:13] ERROR[15405]: /home/pabelanger/svn/asterisk-1.6.0/include/asterisk/lock.h:351 __ast_pthread_mutex_destroy: chan_iax2.c line 9471 (iax2_process_thread_cleanup): Error destroying mutex &thread->lock: Device or resource busy
[Jul 26 12:55:13] ERROR[15403]: /home/pabelanger/svn/asterisk-1.6.0/include/asterisk/lock.h:351 __ast_pthread_mutex_destroy: chan_iax2.c line 9471 (iax2_process_thread_cleanup): Error destroying mutex &thread->lock: Device or resource busy
[Jul 26 12:55:13] ERROR[15404]: /home/pabelanger/svn/asterisk-1.6.0/include/asterisk/lock.h:351 __ast_pthread_mutex_destroy: chan_iax2.c line 9471 (iax2_process_thread_cleanup): Error destroying mutex &thread->lock: Device or resource busy
[Jul 26 12:55:13] ERROR[15406]: /home/pabelanger/svn/asterisk-1.6.0/include/asterisk/lock.h:351 __ast_pthread_mutex_destroy: chan_iax2.c line 9471 (iax2_process_thread_cleanup): Error destroying mutex &thread->lock: Device or resource busy
[Jul 26 12:55:13] ERROR[15407]: /home/pabelanger/svn/asterisk-1.6.0/include/asterisk/lock.h:351 __ast_pthread_mutex_destroy: chan_iax2.c line 9471 (iax2_process_thread_cleanup): Error destroying mutex &thread->lock: Device or resource busy
[Jul 26 12:55:13] ERROR[15399]: /home/pabelanger/svn/asterisk-1.6.0/include/asterisk/lock.h:351 __ast_pthread_mutex_destroy: chan_iax2.c line 9471 (iax2_process_thread_cleanup): Error destroying mutex &thread->lock: Device or resource busy
[Jul 26 12:55:13] ERROR[15400]: /home/pabelanger/svn/asterisk-1.6.0/include/asterisk/lock.h:351 __ast_pthread_mutex_destroy: chan_iax2.c line 9471 (iax2_process_thread_cleanup): Error destroying mutex &thread->lock: Device or resource busy
[Jul 26 12:55:13] ERROR[15398]: /home/pabelanger/svn/asterisk-1.6.0/include/asterisk/lock.h:351 __ast_pthread_mutex_destroy: chan_iax2.c line 9471 (iax2_process_thread_cleanup): Error destroying mutex &thread->lock: Device or resource busy
 == Manager unregistered action IAXpeers
 == Manager unregistered action IAXpeerlist
 == Manager unregistered action IAXnetstats
 == Unregistered application 'IAX2Provision'
 == Unregistered channel type 'IAX2'
Comments:By: Tilghman Lesher (tilghman) 2008-07-30 18:12:56

Let's try something along these lines.  Does this make the errors go away?

By: Paul Belanger (pabelanger) 2008-07-30 18:33:42

Corydon76: Applied your patch, it seems to lock on 'module unload chan_iax2.so' now.  See attached files.

By: Tilghman Lesher (tilghman) 2008-10-20 12:13:01

Tweaked patch slightly, so that it no longer blocks cancellation during socket_process().

By: Paul Belanger (pabelanger) 2008-11-04 12:22:27.000-0600

I should note, running the latest 1.6.0 branch, I was not able to reproduce this issue.  I can still test the patch if you like.

---
$ svn info
Path: .
URL: http://svn.digium.com/svn/asterisk/branches/1.6.0
Repository Root: http://svn.digium.com/svn/asterisk
Repository UUID: 4a481080-769f-4faf-86ef-b2ff1d3f910b
Revision: 154226

By: Tilghman Lesher (tilghman) 2008-12-10 12:38:57.000-0600

Okay, if it's no longer a problem, then no patch is necessary.