[asterisk-users] Segmentation Fault Asterisk 13.7.0-rc2 (libmysqlclient?)

Matthew Murphy mrmdev at outlook.com
Mon Jan 18 13:17:47 CST 2016


Hi everyone,

I am getting a segmentation fault (seems to occur randomly) using Asterisk 13.7.0-rc2 with PJProject 2.4.5. It appears to be something that libmysqlclient is complaining about when doing a query in ps_endpoint_id_ips. We are using Asterisk Realtime. This also seems to occur in Asterisk 13.5.0.


Below is a backtrace that might help a little. I have looked through the change log for the 13.7.0 release and some of items addressed may fix my problem. Before diving in and attempting to upgrade to the final version of 13.7.0, I was hoping someone with knowledge would be able to look at this and let me know if this is something already seen or if this is entirely new.


Thanks for the help!


--Matt


---------------------------------------
BACKTRACE BELOW
---------------------------------------




[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `asterisk -g'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f1e02e8a120 in list_add () from /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18
#0  0x00007f1e02e8a120 in list_add () from /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18
No symbol table info available.
#1  0x00007f1e0339d132 in my_SQLAllocStmt () from /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
No symbol table info available.
#2  0x00007f1e38354af4 in ?? () from /usr/lib/x86_64-linux-gnu/libodbc.so.2
No symbol table info available.
#3  0x00007f1e01e8f16f in custom_prepare (obj=0x1e588c8, data=0x7f1dc8a289b0) at res_config_odbc.c:107
        res = 0
        x = 1
        count = 0
        cps = 0x7f1dc8a289b0
        field = 0x1e588a8
        encodebuf = "\001\200\255\373\000\000\000\001P\205\242\310\035\177\000\000P\205\242\310\035\177\000\000P\205\242\310\035\177\000\000P\205\242\310\035\177\000\000\206\205\242\310\035\177\000\000\237\205\242\310\035\177\000\000P\205\242\310\035\177\000\000\237\205\242\310\035\177\000\000\342X\350\002\036\177\000\000\247p\350\001\000\000\000\000\351ʎ:\036\177\000\000\000\000\000\000\000\000\000\000\335Y\350\002\036\177\000\000`\000\000\000\004\000\000\000\a\000\000\000\000\000\000\000@\256\350\001\000\000\000\000\a", '\000' <repeats 15 times>, "\340U\347\002\036\177\000\000\a\000\000\000\000\000\000\000;\000\000\000\000\000\000\000\002\000\000\000\035\177\000\001`\204\242\310\035\177\000\000\377\377\377\377\000\000\000\000\000"...
        stmt = 0x0
        __PRETTY_FUNCTION__ = "custom_prepare"
#4  0x00007f1e385b9783 in ast_odbc_prepare_and_execute (obj=0x1e588c8, prepare_cb=0x7f1e01e8f11f <custom_prepare>, data=0x7f1dc8a289b0) at res_odbc.c:640
        res = 0
        i = 0
        attempt = 0
        nativeerror = 0
        numfields = 0
        diagbytes = 0
        state = "\v:\351\001\036\177\000\000t\001"
        diagnostic = "\340\030\006\244\035\177\000\000̜\242\310\035\177\000\000\200\020\024\002\000\000\000\000,Z_9\036\177\000\000)\266\227V\000\000\000\000\320\003\000\000\000\000\000\000\240\210\242\310\035\177\000\000\350\341\000D\035\177\000\000\300s\276\314\035\177\000\000\255I^\000\000\000\000\000\350\341\000D\035\177\000\000p>d\000\000\000\000\000̜\242\310\034\b\000\000K6d\000\000\000\000\000\320\003\000\000\000\000\000\000\001\000\000\000\000\000\000\000`\211\242\310\035\177\000\000Г\002\244\035\177\000\000\360\210\242\310\035\177\000\000\065\200^\000\000\000\000\000 at F\351\001\036\177\000\000`\211\242\310t\001\000\000\v:\351\001\036\177\000\000\000\001\000\000\000\000\000\000\300\211\242\310\035\177\000\000ȑ\242\310"...
        stmt = 0x7f1dc8a297b0
        __PRETTY_FUNCTION__ = "ast_odbc_prepare_and_execute"
#5  0x00007f1e01e90715 in realtime_multi_odbc (database=0x7f1dc8a298d0 "asterisk", table=0x7f1dc8a297d0 "ps_endpoint_id_ips", fields=0x7f1da40185f0) at res_config_odbc.c:376
        obj = 0x1e588c8
        stmt = 0x25ed6b2
        sql = "SELECT * FROM ps_endpoint_id_ips WHERE id LIKE ? ORDER BY id\000\177\000\000\377\377\377\377\377\377\377\377\000\000\000\000\000\000\000\000`\224\242\310\035\177\000\000m\225\242\310\035\177\000\000`\225\242\310\035\177\000\000`\226\242\310\035\177\000\000@\225\242\310\035\177\000\000\033\311d9\036\177\000\000P\225\242\310\035\177\000\000ȕ\242\310", '\000' <repeats 16 times>, "\377\377\377\377", '\000' <repeats 16 times>, " R\234\317\035\177\000\000\000\000\000\000\035\177", '\000' <repeats 14 times>...
        coltitle = "\002", '\000' <repeats 15 times>, "|\000\000\000\000\000\000\000ǫ\b\316", '\000' <repeats 12 times>, "\002", '\000' <repeats 19 times>, "\021\000\000\000\000\000\000\000\035\177\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\062\062\062\000\000\000\000\035\177\000\000\000\000\000\000\035\177\000\000\000\000\000\000\035\177\000\000\000\000\000\000\036\177\000\000\377\377\377\377\035\177\000\000\000\000\000\000\036\177", '\000' <repeats 26 times>, "\377\377\377\377\377\377\377\377%", '\000' <repeats 15 times>, "\372I\\9\036\177\000\000\000\224\242\310\035\000\000\000\062"...
        rowdata = 0x7f1da4001110
        initfield = 0x7f1dc8a28960 "id"
        op = 0x7f1e01e93b2d ""
        field = 0x0
        stringp = 0x7f1dc8a29300 "4\377\340\314\035\177"
        chunk = 0x4dbc40 <_dtor_lock+47> "\311\303UH\211\345SH\203\354XH\211}ȉu\304H\211U\270\211M\300L\211E\260D\211M\254H\307", <incomplete sequence \340>
        collen = 0
        res = 0
        x = 8981696
        var = 0x0
        cfg = 0x0
        cat = 0x0
        connected_flag = {flags = 4}
        colsize = 139766825746481
        colcount = 0
        datatype = 0
        decimaldigits = 0
        nullable = 1
        indicator = 139767788641634
        cps = {sql = 0x7f1dc8a29320 "SELECT * FROM ps_endpoint_id_ips WHERE id LIKE ? ORDER BY id", extra = 0x0, __field_mgr_pool = 0x7f1da40293d0, encoding = {0x8b4a02 <__ast_string_field_empty_buffer+2> "" <repeats 256 times>}, __field_mgr = {last_alloc = 0x0, embedded_pool = 0x0}, fields = 0x7f1da40185f0, skip = 0}
        __PRETTY_FUNCTION__ = "realtime_multi_odbc"
#6  0x00000000004dcbfe in ast_load_realtime_multientry_fields (family=0x25ed6a0 "ps_endpoint_id_ips", fields=0x7f1da40185f0) at config.c:3292
        eng = 0x7f1e02095580 <odbc_engine>
        db = "asterisk\000\000\000\000\000\000\000\000\000\232\242\310\035\177\000\000 \000\000\244\035\177\000\000 \027\002\000\000\000\000\000z\000\000\000\000\000\000\000\340\030\006\244\035\177\000\000̜\242\310\035\177\000\000\200\020\024\002\000\000\000\000,Z_9\036\177\000\000\360\231\242\310\035\177\000\000\000\232\242\310\035\177\000\000\220\231\242\310\035\177\000\000\350\341\000D\035\177\000\000\300s\276\314\035\177\000\000\255I^\000\000\000\000\000\254\376\340\314\035\177\000\000\300Ka\000\000\000\000\000\000\000\000\000.\001\000\000k=a\000\000\000\000\000z\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000h\000\000\000\000\000\000\000\360\205\001\244\035\177\000\000\340\231\242\310\035\177\000\000="...
        table = "ps_endpoint_id_ips\000\310\035\177\000\000@\232\242\310\035\177\000\000A\232\242\310\035\177", '\000' <repeats 50 times>, "\270\061\025\002\000\000\000\000\000\000\242\310\035\177\000\000\000\000\000\000\000\000\000\000\241\273_\000\000\000\000\000O\274_\000\000\000\000\000\377\377\377\377\377\377\377\377\000\000\000\000\000\000\000\000;\274_\000\000\000\000\000\340\061\025\002\000\000\000\000\377\377\377\377\002\000\000\000\300\326^\002\000\000\000\000\t\000\000\000\000\000\000\000\260\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000"...
        res = 0x0
        i = 1
#7  0x00007f1dcce0f91e in sorcery_realtime_retrieve_multiple (sorcery=0x213f828, data=0x25ed6a0, type=0x25ebdd8 "identify", objects=0x7f1da40103c0, fields=0x7f1da40185f0) at res_sorcery_realtime.c:200
        family = 0x25ed6a0 "ps_endpoint_id_ips"
        rows = 0x0
        all = 0x7f1da40185f0
        row = 0x0
#8  0x00000000005b49b1 in ast_sorcery_retrieve_by_fields (sorcery=0x213f828, type=0x7f1d716c91cb "identify", flags=3, fields=0x0) at sorcery.c:1892
        wizard = 0x25ebd58
        object_type = 0x25ebdd8
        object = 0x7f1da40103c0
        i = 0
        cached = 0
        __PRETTY_FUNCTION__ = "ast_sorcery_retrieve_by_fields"
#9  0x00007f1d716c824b in ip_identify (rdata=0x7f1d4400e1e8) at res_pjsip_endpoint_identifier_ip.c:126
        addr = {ss = {ss_family = 0, __ss_align = 0, __ss_padding = '\000' <repeats 111 times>}, len = 0}
        candidates = 0x237c700
        match = 0x7f1d4400e1e8
        endpoint = 0x7f1dccbe73c0 <param>
        __PRETTY_FUNCTION__ = "ip_identify"
#10 0x00007f1dcc9c0602 in ast_sip_identify_endpoint (rdata=rdata at entry=0x7f1d4400e1e8) at res_pjsip.c:2203
        iter = 0x237c700
        endpoint = 0x0
        lock = 0x7f1dccbe6a80 <endpoint_identifiers>
        __PRETTY_FUNCTION__ = "ast_sip_identify_endpoint"
#11 0x00007f1dcc9cab38 in endpoint_lookup (rdata=0x7f1d4400e1e8) at res_pjsip/pjsip_distributor.c:375
        endpoint = <optimized out>
        is_ack = 0
#12 0x00007f1dcf9ab54b in pjsip_endpt_process_rx_data () from /usr/lib/libpjsip.so.2
No symbol table info available.
#13 0x00007f1dcc9ca417 in distribute (data=0x7f1d4400e1e8) at res_pjsip/pjsip_distributor.c:453
        param = {start_prio = 0, start_mod = 0x7f1dccbe7500 <distributor_mod>, idx_after_start = 1, silent = 0}
        handled = 0
        rdata = 0x7f1d4400e1e8
        is_request = <optimized out>
        is_ack = 0
        endpoint = <optimized out>
#14 0x00000000005d28a1 in ast_taskprocessor_execute (tps=0x215c848) at taskprocessor.c:784
        local = {local_data = 0x7f1dbc000c10, data = 0x5e4d12 <ast_threadstorage_set_ptr+60>}
        t = 0x7f1d44000920
        size = 34981960
        __PRETTY_FUNCTION__ = "ast_taskprocessor_execute"
#15 0x00000000005db252 in execute_tasks (data=0x215c848) at threadpool.c:1320
        tps = 0x215c848
#16 0x00000000005d28a1 in ast_taskprocessor_execute (tps=0x2159f88) at taskprocessor.c:784
        local = {local_data = 0x7f1dc8a29d80, data = 0x215af10}
        t = 0x7f1d44000950
        size = 34975560
        __PRETTY_FUNCTION__ = "ast_taskprocessor_execute"
#17 0x00000000005d9583 in threadpool_execute (pool=0x215af68) at threadpool.c:351
        __PRETTY_FUNCTION__ = "threadpool_execute"
#18 0x00000000005dabd6 in worker_active (worker=0x7f1dbc0019c8) at threadpool.c:1103
        alive = 0
#19 0x00000000005da993 in worker_start (arg=0x7f1dbc0019c8) at threadpool.c:1023
        worker = 0x7f1dbc0019c8
        __PRETTY_FUNCTION__ = "worker_start"
#20 0x00000000005e64e8 in dummy_start (data=0x7f1dbc0008f0) at utils.c:1237
        __cancel_buf = {__cancel_jmp_buf = {{__cancel_jmp_buf = {0, 2276975003624127690, 0, 139765684898832, 17, 139765896881920, 2276975003615739082, -2187938759501955894}, __mask_was_saved = 0}}, __pad = {0x7f1dc8a29ef0, 0x0, 0x0, 0x7f1e3aaf62e8 <__pthread_keys+8>}}
        __cancel_routine = 0x44f303 <ast_unregister_thread>
        __cancel_arg = 0x7f1dc8a2a700
        __not_first_call = 0
        ret = 0x7f1e39918878
        a = {start_routine = 0x5da90c <worker_start>, data = 0x7f1dbc0019c8, name = 0x7f1dbc000a80 "worker_start         started at [ 1077] threadpool.c worker_thread_start()"}
#21 0x00007f1e3a8e60a4 in start_thread (arg=0x7f1dc8a2a700) at pthread_create.c:309
        __res = <optimized out>
        pd = 0x7f1dc8a2a700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {139765896881920, -2187938019840508726, 0, 139765684898832, 17, 139765896881920, 2276975003617836234, 2278422195582516426}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#22 0x00007f1e3965f04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
No locals.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160118/c7f79589/attachment.html>


More information about the asterisk-users mailing list