[Home]

Summary:ASTERISK-00793: unload chan_iaxX type command make crash, also if load back, it crash
Reporter:mochouinard (mochouinard)Labels:
Date Opened:2004-01-12 00:06:25.000-0600Date Closed:2008-01-15 14:40:57.000-0600
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) chan_iax_unregister.diff.txt
( 1) chan_iax2_unregister.diff.txt
Description:Bug 1 : Crash after unload
Asterisk Ready.
*CLI> unload chan_iax.so
 == Manager unregistered action IAXpeers
*CLI> hello
Segmentation fault

Bug 2 Crash on load after unload
Asterisk Ready.
*CLI> unload chan_iax.so
 == Manager unregistered action IAXpeers
*CLI> load chan_iax.so  
Loaded /usr/lib/asterisk/modules/chan_iax.so => (Inter Asterisk eXchange)
WARNING[1074398976]: File cli.c, Line 691 (ast_cli_register): Command 'iaxdebug' already registered (or something close enough)
 == Manager registered action IAXpeers
 == Parsing '/etc/asterisk/iax.conf': Found
 == Using TOS bits 16
WARNING[1074398976]: File channel.c, Line 164 (ast_channel_register_ex): Already have a handler for type 'IAX1'
ERROR[1074398976]: File chan_iax.c, Line 5429 (load_module): Unable to register channel class IAX1
Segmentation fault


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

IAX stuff isn't unregister when unloaded, IAX1,IAX2 protocol and also iaxdebug (like chan_sip.so was, but fixed in 798)
Comments:By: mochouinard (mochouinard) 2004-01-12 00:09:36.000-0600

------ UNLOAD of chan_iax.so
Asterisk Ready.
*CLI> unload chan_iax.so

Program received signal SIG32, Real-time event 32.
[Switching to Thread 1116957488 (LWP 25981)]
0xffffe002 in ?? ()
(gdb) bt full
#0  0xffffe002 in ?? ()
No symbol table info available.
#1  0x08051604 in ast_io_wait (ioc=0x80ed7e0, howlong=-4) at io.c:254
       res = 0
       x = 0
       origcnt = 135193264
#2  0x41a8842a in network_thread (ignore=0x0) at chan_iax.c:4522
       res = 101
       f = (struct ast_iax_frame *) 0x0
       freeme = (struct ast_iax_frame *) 0x3e8
#3  0x40023484 in start_thread () from /lib/tls/libpthread.so.0
----- UNLOAD of chan_iax2.so
Asterisk Ready.
*CLI> unload chan_iax2.so

Program received signal SIG32, Real-time event 32.
[Switching to Thread 1142135600 (LWP 25947)]
0xffffe002 in ?? ()
(gdb)
(gdb) bt full
#0  0xffffe002 in ?? ()
No symbol table info available.
#1  0x08051604 in ast_io_wait (ioc=0x80f6dd0, howlong=-4) at io.c:254
       res = 0
       x = 0
       origcnt = 135234048
#2  0x41be0d92 in network_thread (ignore=0x0) at chan_iax2.c:5096
       res = 101
       f = (struct iax_frame *) 0x0
       freeme = (struct iax_frame *) 0x41be0c3b
#3  0x40023484 in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.

By: Brian West (bkw918) 2004-01-12 11:58:35.000-0600

We were not unregistering all the CLI apps nor the channel type.  The attached patch should fix that.

By: Brian West (bkw918) 2004-01-12 12:14:45.000-0600

fixed in CVS.

By: Digium Subversion (svnbot) 2008-01-15 14:40:57.000-0600

Repository: asterisk
Revision: 1984

U   trunk/channels/chan_iax.c
U   trunk/channels/chan_iax2.c

------------------------------------------------------------------------
r1984 | jeremy | 2008-01-15 14:40:57 -0600 (Tue, 15 Jan 2008) | 2 lines

clean up our mess on unload. Bug ASTERISK-793

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=1984