[Home]

Summary:ASTERISK-08948: cant unload chan_sip
Reporter:Clod Patry (junky)Labels:
Date Opened:2007-03-06 10:37:16.000-0600Date Closed:2007-03-20 15:29:35
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:When I:
*CLI> module unload chan_sip.so
 == Unregistered channel type 'SIP'
 == Unregistered custom function SIPCHANINFO
 == Unregistered custom function SIPPEER
 == Unregistered custom function SIP_HEADER
 == Unregistered custom function CHECKSIPDOMAIN
 == Unregistered application 'SIPDtmfMode'
 == Unregistered application 'SIPAddHeader'
 == Manager unregistered action SIPpeers
 == Manager unregistered action SIPshowpeer

(stuck here)

it's look like
pthread_join(monitor_thread, NULL);
is the problem, if i put that line in comments, it's unload correctly, I just cant load it back.

I know that join is calling
monitor_thread
which is calling
do_monitor
So there's probably a lock somewhere in that function, which hasnt been released.

Any doc for debugging deadlocks at this point?




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

I've tried it with 1.4.1 (chan_sip.c and rtp.c) and still getting the same problems.

uname -a
Linux 10.2.110.195 2.6.11 #1 Wed Nov 29 17:26:24 EST 2006 ppc unknown unknown GNU/Linux

Comments:By: Clod Patry (junky) 2007-03-06 10:51:25.000-0600

leave 1.4.0, since this is 1.4.0.
Ive tried with changing just chan_sip.so and rtp.c (from 1.4.1) without success.

By: Clod Patry (junky) 2007-03-06 11:59:06.000-0600

The problems seems to be in:
ast_sched_wait
im not getting out of that function, so do_monitor cant finish, for a complete unload.

By: Russell Bryant (russell) 2007-03-06 12:17:44.000-0600

I can't reproduce this.  Catch me on IRC and let me know if you have a machine that I could log in to to observe the problem.

By: Clod Patry (junky) 2007-03-06 12:30:06.000-0600

Im sorry, this is in ast_io_wait.

By: Anthony LaMantia-2 (anthonyl) 2007-03-09 02:55:12.000-0600

info on deadlock debugging can be found here: http://www.voip-info.org/wiki/view/Asterisk+debugging#HowToDebugaDeadLockinAsterisk

By: Clod Patry (junky) 2007-03-20 14:49:30

Since im using uClibC, RTLD_NOLOAD is not supported on it.
A quick ugly hack is to #undef HAVE_RTLD_NOLOAD in loader.c
I've some problem with chan_iax2.so and app_voicemail.so, but will try to trackdown what might be the problems.

By: Jason Parker (jparker) 2007-03-20 15:29:34

It is technically supported, but it doesn't do anything - and that's where the bug is.