Asterisk Seg Fault 1.4.43

Home » Asterisk Users » Asterisk Seg Fault 1.4.43
Asterisk Users 8 Comments

Asterisk[11543]: segfault at b755ebb4 ip 00296f96 sp b6fbf628 error 6 in libc-2.12.so[21c000+190000]

I got the above seg fault on 1.4.43, I have recompiled with debug info. Is there any way to take the above and “locate” where in the code that is ???

Any other thoughts?

Jerry

8 thoughts on - Asterisk Seg Fault 1.4.43

  • Jerry Geis писал 28.12.2012 15:59:

    segfault at b755ebb4 ip 00296f96 sp b6fbf628 error 6 in libc-2.12.so[21c000+190000]
    have recompiled with debug info. and “locate” where in the code that is ???

    Analyze the core file with gdb. Google has lots of information on that.

    Last time I had the same problem, I found out that my chan_sip was faulting, and recompiling helped me.

  • If you got the segfault, then recompiled with debug info, then the addresses in the segfault are no longer relevant to the binary you have.

    Are you getting the segfault repeatedly? If so, then just wait for it to happen again with the debug info and work with that, and/or the core file that Asterisk creates.

    If you can’t reproduce the segfault, unfortunately that is just the way of things sometimes. Could be a random bit-flip in a stick of memory.

    In either case, if that segfault line was generated by a non-debug asterisk build, it isn’t really useful to you.

  • I was able with gdb to set a break point at the address of the instruction pointer:

    ip 00296f96

    This is in memcpu_iax32, which is called from sip_alloc() which is called from transmiter_register()

    ??

    Jerry

  • you’ve recompiled it including debug info, you have a different binary, with different addresses. Chances are slim that this is actually where the crash occurred.

    Reproduce the segfault with the new debug binary.

  • Shouldn’t there be:
    ao2_lock()/ao2_unlock() and ao2_ref()’s in the ast_readaudio_callback() function????

    What if a hangup is happening while in this function?
    That seems like what could be happening.

    Jerry

  • I finally got it to happen again.

    #0 0x00296f96 in __memcpy_ia32 () from /lib/libc.so.6
    #1 0x00000002 in ?? ()
    #2 0x4d44fa0e in snd_pcm_area_copy () from /usr/lib/libasound.so.2
    #3 0x4d44ff09 in snd_pcm_areas_copy () from /usr/lib/libasound.so.2
    #4 0x4d4620f4 in snd_pcm_mmap_read_areas () from /usr/lib/libasound.so.2
    #5 0x4d454bd0 in snd1_pcm_read_areas () from /usr/lib/libasound.so.2
    #6 0x4d4624e4 in snd_pcm_mmap_readi () from /usr/lib/libasound.so.2
    #7 0x4d44bbe5 in _snd_pcm_readi () from /usr/lib/libasound.so.2
    #8 0x4d44d2d3 in snd_pcm_readi () from /usr/lib/libasound.so.2
    #9 0xb7496575 in alsa_read (chan=0x830ac00) at chan_alsa.c:711
    #10 0x0808b658 in __ast_read (chan=0x830ac00, dropaudio=0) at channel.c:2411
    #11 0x0808d325 in ast_read (c0=0xb750eb68, c1=0x830ac00, config=0xb6f2acdc, fo=0xb6f29dac, rc=0xb6f29da8) at channel.c:2720
    #12 ast_generic_bridge (c0=0xb750eb68, c1=0x830ac00, config=0xb6f2acdc, fo=0xb6f29dac, rc=0xb6f29da8) at channel.c:4647
    #13 ast_channel_bridge (c0=0xb750eb68, c1=0x830ac00, config=0xb6f2acdc, fo=0xb6f29dac, rc=0xb6f29da8) at channel.c:4989
    #14 0xb74f2fad in ast_bridge_call (chan=0xb750eb68, peer=0x830ac00, config=0xb6f2acdc) at res_features.c:2281
    #15 0xb6f6df63 in dial_exec_full (chan=0xb750eb68, data=, peerflags=0xb6f2ae4c, continue_exec=0x0)
    at app_dial.c:1894
    #16 0xb6f703c6 in dial_exec (chan=0xb750eb68, data=0xb6f2cebc) at app_dial.c:1942
    #17 0x080d2d9b in pbx_exec (c=0xb750eb68, con=
    , context=0xb750ece8 “smvoice-pa”,
    exten=0xb750ed38 “s”, priority=8, label=0x0, callerid=0xb7510b30 “501”, action=E_SPAWN) at pbx.c:550
    #18 pbx_extension_helper (c=0xb750eb68, con=
    , context=0xb750ece8 “smvoice-pa”,
    exten=0xb750ed38 “s”, priority=8, label=0x0, callerid=0xb7510b30 “501”, action=E_SPAWN) at pbx.c:1893
    #19 0x080d432f in ast_spawn_extension (c=0xb750eb68) at pbx.c:2367
    #20 __ast_pbx_run (c=0xb750eb68) at pbx.c:2461
    #21 0x080d5e3e in pbx_thread (data=0xb750eb68) at pbx.c:2688
    #22 0x08107e6b in dummy_start (data=0xb750f4a8) at utils.c:856
    #23 0x003c1a49 in start_thread () from /lib/libpthread.so.0
    #24 0x002fe63e in clone () from /lib/libc.so.6

    This is from the gdb “where” command. I am just calling into the box and using the ALSA channel for audio. This is VERY hard to re-create but it does happen.

    jerry