Repeated Asterisk 10.7.0 Crashes

Home » Asterisk Users » Repeated Asterisk 10.7.0 Crashes
Asterisk Users 3 Comments

I’m getting cycles of repeated crashes which occur and then stop occurring. Looking at the dumps via gdb shows that something peculiar is happening that looks like memory corruption:

Program terminated with signal 6, Aborted.
#0 0x0000003686e30285 in raise () from /lib64/libc.so.6
(gdb) up
#1 0x0000003686e31d30 in abort () from /lib64/libc.so.6
(gdb) up
#2 0x0000003686e6971b in __libc_message () from /lib64/libc.so.6
(gdb) up
#3 0x0000003686e71e7e in _int_malloc () from /lib64/libc.so.6
(gdb) up
#4 0x0000003686e7382d in calloc () from /lib64/libc.so.6
(gdb) up
#5 0x000000000054a2a0 in _ast_calloc (num_structs=1, struct_size

3 thoughts on - Repeated Asterisk 10.7.0 Crashes

  • I looked at the code in question and I don’t see how the below is possible. What am I missing?

    =429== Invalid write of size 1
    =429== at 0x3686E68744: vsnprintf (in /lib64/libc-2.5.so)
    =429== by 0x53C766: __ast_debug_str_helper (strings.c:76)
    =429== by 0x4D835E: __ast_verbose_ap (strings.h:782)
    =429== by 0x4D85FE: __ast_verbose (logger.c:1531)
    =429== by 0x16D376D3: config_load (chan_skinny.c:7823)
    =429== by 0x16D37EED: load_module (chan_skinny.c:7968)
    =429== by 0x4D33C2: start_resource (loader.c:800)
    =429== by 0x4D3EB7: load_resource_list (loader.c:994)
    =429== by 0x4D4309: load_modules (loader.c:1147)
    =429== by 0x43DA3C: main (asterisk.c:3982)
    =429== Address 0x59e1b40 is 4 bytes after a block of size 156 alloc’d

  • Thanks for the pointer. Valgrind wasn’t needed since Asterisk MALLOC_DEBUG
    was enough.

    It took almost 1.5 hours in GDB, but I found it. Because I was having problems with res_speech_lumenvox, I was using UniMRCP, which uses Sofia-SIP. But there’s a bug:

    *** su_uniqueid.c.old 2011-08-22 07:05:02.000000000 -0400
    — su_uniqueid.c 2012-09-04 23:46:02.000000000 -0400
    ***************
    *** 100,104 ****

    static pthread_once_t once = PTHREAD_ONCE_INIT;
    ! static int done_once = 1;
    static pthread_key_t state_key;

    — 100,104 —