[Home]

Summary:ASTERISK-04005: [patch] cli auto-completion after unloading chan_iax causes core
Reporter:drmac (drmac)Labels:
Date Opened:2005-04-27 15:47:35Date Closed:2008-01-15 15:32:31.000-0600
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) chan_iax.patch.txt
Description:1. Start asterisk
2. Unload chan_iax.so
3. Type "ia" then hit tab.
4. segfault

here is a bt using "make valgrind"

(gdb) bt full
#0  0x0809b4b7 in join (dest=0xbfffd330 "", destsize=80, w=0x4042ae60) at cli.c:890
       x = 0
#1  0xbfffd380 in ?? ()
No symbol table info available.
#2  0x080bf6a5 in main (argc=2, argv=0xbfffe1d4) at asterisk.c:2018
       title = "Asterisk Console on 'switchy' (pid 16010)", '\0' <repeats 23 times>, "\001", '\0' <repeats 47 times>, "\006\000\000\000\200\222%@ÿÿ\017\000Q", '\0' <repeats 71 times>, "\001\224\000@g\f\001B0R\r@\001\224\000@\0220\002@ o\001@»\223\000@,X\001@ðl\001@\000\000\000\000<ßÿ¿M\221\000@\037\r\001B\2240\002@â\t\000@"
       c = -1
       filename = "/root/.asterisk_history", '\0' <repeats 56 times>
       hostname = "switchy\000\177\f\001B7#\005\b\000\000\000\000\000\000\000\000 \000\000\0006\r\001B\204¼\000B\2243\000B\000P\r@\017\000\000\000ð£$@,X\001@Ô[\001@Ñê\004\b@áÿ¿V\201\000@Ñê\004\b\216ÿw\001xÌ\004\bðàÿ¿\210[\001@\a\000\000\000P¤$@\000\000\000\000\001\000\000\000\003\000\000\000¤àÿ¿\000\000\000\000ne)\000°àÿ¿ \000\000\000\000\000\200\000ÿÿÿÿ0>\002@\000\000\000\200\000\000\000\000\000\000\000\000\177\200\000@,X\001@\037\037\000\000ðàÿ¿\034áÿ¿\003¾\000@\234Q\r@\000\000\000\000\216ÿw\001\200áÿ¿8Z\001@"...
       tmp = "Asterisk Ready.\n", '\0' <repeats 63 times>
       xarg = 0x0
       x = 2
       f = (FILE *) 0x812d570
       sigs = {__val = {134238211, 0 <repeats 31 times>}}
       num = 21
       buf = 0x812bd10 "ia"
       runuser = 0x0
       rungroup = 0x0
       silly_macos = {{fd = 15, events = -23568, revents = 16420}}
#3  0x42015574 in __libc_start_main () from /lib/tls/libc.so.6
No symbol table info available.


###### Another one: #######

(gdb) thread apply all bt

Thread 6 (process 17007):
#0  0xffffe002 in ?? ()
#1  0x080bab2b in listener (unused=0x0) at asterisk.c:342

Thread 5 (process 17008):
#0  0xffffe002 in ?? ()
#1  0x400242b6 in start_thread () from /lib/tls/libpthread.so.0

Thread 4 (process 17009):
#0  0xffffe002 in ?? ()

Thread 3 (process 17011):
#0  0xffffe002 in ?? ()
#1  0x08054730 in ast_io_wait (ioc=0x3e8, howlong=135193704) at io.c:255

Thread 2 (process 17013):
#0  0xffffe002 in ?? ()
#1  0x406483e1 in scan_thread (unused=0x0) at pbx_spool.c:324

Thread 1 (process 17005):
#0  0x0809b4b7 in join (dest=0xbfffe4b0 "", destsize=80, w=0x4042bea0) at cli.c:890
#1  0xbfffe500 in ?? ()
#2  0x080bf6a5 in main (argc=2, argv=0xbffff354) at asterisk.c:2018
#3  0x42015574 in __libc_start_main () from /lib/tls/libc.so.6


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

Somebody forgot to unresister a CLI command..tsk..tsk..

Disclaimer on file
mboehm@cytelcom.com
Comments:By: Brian West (bkw918) 2005-04-27 17:53:22

HAHA you would think after the 10 plus of these types of bugs people would remember that if you REGISTER something DO NOT FORGET TO UNREGISTER IT TOO!!!

/b

By: drmac (drmac) 2005-04-27 19:39:55

aye. same thing happened in ASTERISK-3375. there were many cli commands registered but none of them got unregistered. I'm glad i caught those before hand. afraid i had to learn about this one the hard way.

By: Kevin P. Fleming (kpfleming) 2005-04-28 11:31:29

Committed to CVS, thanks!

By: Russell Bryant (russell) 2005-05-09 22:33:06

not an issue in 1.0

By: Digium Subversion (svnbot) 2008-01-15 15:32:31.000-0600

Repository: asterisk
Revision: 5525

U   trunk/channels/chan_iax2.c

------------------------------------------------------------------------
r5525 | kpfleming | 2008-01-15 15:32:30 -0600 (Tue, 15 Jan 2008) | 2 lines

unregister reload command (bug ASTERISK-4005)

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

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