[Home]

Summary:ASTERISK-04400: changing any iax peer name while using dnsmgr on reload will segfault.
Reporter:Brian West (bkw918)Labels:
Date Opened:2005-06-12 11:24:43Date Closed:2005-06-23 15:12:29
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Step 1. Stop Asterisk
Step 2. Enable DNSMGR
Step 3. Start Asterisk
Step 4. Open iax.conf change one peer's name.
Step 5. asterisk -r, reload chan_iax2.so
Step 6. Inspect the core.

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

(gdb) bt full
#0  0xffffe410 in ?? ()
No symbol table info available.
#1  0xb6eb8d24 in ?? ()
No symbol table info available.
#2  0x00000006 in ?? ()
No symbol table info available.
#3  0x000026a0 in ?? ()
No symbol table info available.
#4  0xb7e3d2c1 in raise () from /lib/libc.so.6
No symbol table info available.
ASTERISK-1  0xb7e3ea59 in abort () from /lib/libc.so.6
No symbol table info available.
ASTERISK-2  0xb7e70c7a in __fsetlocking () from /lib/libc.so.6
No symbol table info available.
ASTERISK-3  0xb7e76b57 in malloc_usable_size () from /lib/libc.so.6
No symbol table info available.
ASTERISK-4  0xb7e7761b in free () from /lib/libc.so.6
No symbol table info available.
ASTERISK-5  0xb754625e in destroy_peer (peer=0x81250e0) at chan_iax2.c:8226
       x = 18
ASTERISK-6 0xb7553e35 in reload_config () at chan_iax2.c:8238
       reg = (struct iax2_registry *) 0x0
       peer = (struct iax2_peer *) 0x0
ASTERISK-7 0x0805ae0d in ast_module_reload (name=0xb7554050 "?[???\215t&") at loader.c:245
       m = (struct module *) 0x8182828
       reloaded = 2
       oldversion = 118046317
       reload = (int (*)(void)) 0xb7554050 <reload>
ASTERISK-8 0x0808ebdc in handle_reload (fd=9, argc=1, argv=0xb6eb90d0) at cli.c:148
       x = 135306592
       res = 0
ASTERISK-9 0x08091a03 in ast_cli_command (fd=9, s=0x0) at cli.c:1280
       argv = {0x814f038 "reload", 0x0, 0x83766a4 "\021", 0x83766ac "?\2103\b??7\b)\001", 0x0, 0xb6eb9220 "reload", 0xb6eb9220 "reload", 0xb6eb9220 "reload",
 0xb6eb9220 "reload", 0xb6eb9236 "set debug atleast 0", 0xb6eb941f "?shinzon", 0xb6eb9220 "reload", 0xb6eb941f "?shinzon", 0x0, 0x0, 0x0, 0x0, 0x0,
 0x70412069 <Address 0x70412069 out of bounds>, 0x0, 0x3a363120 <Address 0x3a363120 out of bounds>, 0x34000000 <Address 0x34000000 out of bounds>, 0x0,
 0x30322054 <Address 0x30322054 out of bounds>, 0x3530 <Address 0x3530 out of bounds>, 0x0, 0x0, 0xffffffff <Address 0xffffffff out of bounds>, 0x0, 0x0,
 0x0, 0x0, 0x36383669 <Address 0x36383669 out of bounds>, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xb7f26500 "", 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
 0x6f6e2800 <Address 0x6f6e2800 out of bounds>, 0x29656e <Address 0x29656e out of bounds>, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
 0xb7f2af08 "?]\021", 0x8119b20 "\t", 0xb6eb9220 "reload", 0xb6eb91e8 "?\224?c2\v\b\t"}
       e = (struct ast_cli_entry *) 0x8109d60
       x = 1
       dup = 0x814f038 "reload"
       __PRETTY_FUNCTION__ = "ast_cli_command"
ASTERISK-10 0x080b3263 in netconsole (vconsole=0x8119b20) at asterisk.c:444
       hostname = "shinzon", '\0' <repeats 56 times>
       tmp = "reload\000\000ose atleast 0\000set debug atleast 0\000\000ho sees us as 69.154.144.52:4569\n\000\000\000\r  == Parsing '/etc/asterisk/cdr_tds.conf': Found\n\000    -- Reloading module 'app_txtcidname.so' (TXTCIDName)\n\000\r  == Parsin"...        res = 0        fds = {{fd = 9, events = 1, revents = 1}, {fd = 16, events = 1, revents = 0}}        __PRETTY_FUNCTION__ = "netconsole"ASTERISK-11 0xb7fd6580 in __pthread_initialize_minimal () from /lib/libpthread.so.0No symbol table info available.ASTERISK-12 0xb7ecd51e in clone () from /lib/libc.so.6No symbol table info available.
Comments:By: Kevin P. Fleming (kpfleming) 2005-06-21 19:58:45

I can't reproduce any crash, although there is certainly some odd behavior since the dnsmgr code is not really completed yet (primarily if you change the hostname for a peer and then reload it doesn't get updated properly).

By: Kevin P. Fleming (kpfleming) 2005-06-23 15:12:17

Fixed in CVS HEAD, the dnsmgr was allocating the wrong amount of memory for structures. Thanks for the report and the backtraces (via IRC).