[asterisk-bugs] [JIRA] (ASTERISK-30380) res_pjsip: Crash in simple

Reuben Farrelly (JIRA) noreply at issues.asterisk.org
Wed Dec 28 20:19:06 CST 2022


    [ https://issues.asterisk.org/jira/browse/ASTERISK-30380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=261081#comment-261081 ] 

Reuben Farrelly commented on ASTERISK-30380:
--------------------------------------------

Updated core outputs this time with pjsip debug symbols.   Acknowledge re: this being an untested version of pjsip.

The other updated core outputs will be uploaded shortly.

Thread 1 (Thread 0x7fc94032f6c0 (LWP 7904)):
#0  0x00007fc940bfef71 in pjsip_evsub_send_request (sub=0x7fc8cc0466f8, tdata=0x0) at ../src/pjsip-simple/evsub.c:1396
        status = 0
#1  0x00007fc940c00916 in on_tsx_state_uas (sub=0x7fc8cc0466f8, tsx=0x7fc8cc026fe8, event=0x7fc94032e9c0) at ../src/pjsip-simple/evsub.c:2228
        expires = 0x7fc8dc05ad98
        tdata = 0x7fc8cc01d978
        st_code = 200
        st_text = 0x0
        body = 0x0
        old_state = PJSIP_EVSUB_STATE_ACTIVE
        old_state_str = {ptr = 0x7fc940c091bc "ACTIVE", slen = 6}
        reason = {ptr = 0x0, slen = 0}
        rdata = 0x7fc8dc05b0e8
        msg = 0x7fc8dc06b440
        res_hdr = {prev = 0x7fc94032e890, next = 0x7fc94032e890, type = 3422840568, name = {ptr = 0x7fc941f6ede3 <grp_lock_acquire+100> "slen = 140502342232368}, sname = {ptr = 0x7fc8d0017188 "210q0017", slen = 140500459942360}, vptr = 0x7fc8d0017188}
        status = 0
        event_hdr = 0x7fc8dc05ade0
#2  0x00007fc940c00cd2 in mod_evsub_on_tsx_state (tsx=0x7fc8cc026fe8, event=0x7fc94032e9c0) at ../src/pjsip-simple/evsub.c:2333
        sub = 0x7fc8cc0466f8
#3  0x00007fc940bd602d in pjsip_dlg_on_tsx_state (dlg=0x7fc8cc03a368, tsx=0x7fc8cc026fe8, e=0x7fc94032e9c0) at ../src/pjsip/sip_dialog.c:2143
        i = 0
#4  0x00007fc940bd691e in mod_ua_on_tsx_state (tsx=0x7fc8cc026fe8, e=0x7fc94032e9c0) at ../src/pjsip/sip_ua_layer.c:186
        dlg = 0x7fc8cc03a368
#5  0x00007fc940bce0f3 in tsx_set_state (tsx=0x7fc8cc026fe8, state=PJSIP_TSX_STATE_TRYING, event_src_type=PJSIP_EVENT_RX_MSG, event_src=0x7fc8dc05b0e8, flag=0) at ../src/pjsip/sip_transaction.c:1339
        e = {prev = 0x7fc94032e9e0, next = 0x7fc941f6f523 <pj_grp_lock_add_ref+24>, type = PJSIP_EVENT_TSX_STATE, body = {timer = {entry = 0x7fc8dc05b0e8}, tsx_state = {src = {rdata = 0x7fc8dc05b0e8, tdata = 0x7fc8dc05b0e8, timer = 0x7fc8dc05b0e8, status = -603606808, data = 0x7fc8dc05b0e8}, tsx = 0x7fc8cc026fe8, prev_state = 0, type = PJSIP_EVENT_RX_MSG}, tx_msg = {tdata = 0x7fc8dc05b0e8}, tx_error = {tdata = 0x7fc8dc05b0e8, tsx = 0x7fc8cc026fe8}, rx_msg = {rdata = 0x7fc8dc05b0e8}, user = {user1 = 0x7fc8dc05b0e8, user2 = 0x7fc8cc026fe8, user3 = 0x300000000, user4 = 0x7fc94032ea00}}}
        prev_state = PJSIP_TSX_STATE_NULL
#6  0x00007fc940bd04f8 in tsx_on_state_null (tsx=0x7fc8cc026fe8, event=0x7fc94032ea50) at ../src/pjsip/sip_transaction.c:2540
        status = 32713
#7  0x00007fc940bcf124 in pjsip_tsx_recv_msg (tsx=0x7fc8cc026fe8, rdata=0x7fc8dc05b0e8) at ../src/pjsip/sip_transaction.c:1902
        event = {prev = 0x7fc8cc03c440, next = 0xdc06b468, type = PJSIP_EVENT_RX_MSG, body = {timer = {entry = 0x7fc8dc05b0e8}, tsx_state = {src = {rdata = 0x7fc8dc05b0e8, tdata = 0x7fc8dc05b0e8, timer = 0x7fc8dc05b0e8, status = -603606808, data = 0x7fc8dc05b0e8}, tsx = 0x7fc94032eaa0, prev_state = 1086136050, type = 32713}, tx_msg = {tdata = 0x7fc8dc05b0e8}, tx_error = {tdata = 0x7fc8dc05b0e8, tsx = 0x7fc94032eaa0}, rx_msg = {rdata = 0x7fc8dc05b0e8}, user = {user1 = 0x7fc8dc05b0e8, user2 = 0x7fc94032eaa0, user3 = 0x7fc940bd1ef2 <pjsip_uri_cmp+49>, user4 = 0x7fc900000006}}}
#8  0x00007fc940bd56b6 in pjsip_dlg_on_rx_request (dlg=0x7fc8cc03a368, rdata=0x7fc8dc05b0e8) at ../src/pjsip/sip_dialog.c:1785
        status = 0
        tsx = 0x7fc8cc026fe8
        processed = 0
        i = 1

> res_pjsip: Crash in simple
> --------------------------
>
>                 Key: ASTERISK-30380
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-30380
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: General
>    Affects Versions: 20.0.0, 20.1.0
>         Environment: Gentoo Linux x86_64 - Asterisk ebuild in portage tree
>            Reporter: Reuben Farrelly
>            Assignee: Reuben Farrelly
>         Attachments: core-asterisk-2022-12-28T23-40-58Z-brief.txt, core-asterisk-2022-12-28T23-40-58Z-full.txt, core-asterisk-2022-12-28T23-40-58Z-info.txt, core-asterisk-2022-12-28T23-40-58Z-locks.txt, core-asterisk-2022-12-28T23-40-58Z-thread1.txt, core-asterisk-2022-12-29T01-51-49Z-brief.txt, core-asterisk-2022-12-29T01-51-49Z-full.txt, core-asterisk-2022-12-29T01-51-49Z-info.txt, core-asterisk-2022-12-29T01-51-49Z-locks.txt, core-asterisk-2022-12-29T01-51-49Z-thread1.txt
>
>
> Asterisk is crashing frequently for me with the following printed in the system dmesg:
> [463264.572879] Code: 49 89 f0 8b b7 80 00 00 00 48 8d 97 88 00 00 00 31 c9 e9 f9 d3 ff ff 66 0f 1f 84 00 00 00 00 00 41 54 41 bc 0d 9c 02 00 55 53 <48> 8b 86 88 01 00 00 8b 10 85 d2 75 5b 48 89 fb 48 8b 7f 30 48 89
> [465079.782571] asterisk[5122]: segfault at 188 ip 00007f785395ed9a sp 00007f78514b5890 error 4 in libpjsip-simple.so.2[7f785395c000+a000] likely on CPU 1 (core 1, socket 0)
> [465079.782580] Code: 49 89 f0 8b b7 80 00 00 00 48 8d 97 88 00 00 00 31 c9 e9 f9 d3 ff ff 66 0f 1f 84 00 00 00 00 00 41 54 41 bc 0d 9c 02 00 55 53 <48> 8b 86 88 01 00 00 8b 10 85 d2 75 5b 48 89 fb 48 8b 7f 30 48 89
> [466895.025012] asterisk[5307]: segfault at 188 ip 00007fdd6445cd9a sp 00007fdd15f8a890 error 4 in libpjsip-simple.so.2[7fdd6445a000+a000] likely on CPU 3 (core 3, socket 0)
> [466895.025028] Code: 49 89 f0 8b b7 80 00 00 00 48 8d 97 88 00 00 00 31 c9 e9 f9 d3 ff ff 66 0f 1f 84 00 00 00 00 00 41 54 41 bc 0d 9c 02 00 55 53 <48> 8b 86 88 01 00 00 8b 10 85 d2 75 5b 48 89 fb 48 8b 7f 30 48 89
> This is with Asterisk-20.0.0 and 20.1.0-rc1.  Gentoo policy is that bundled libraries are not used so I am using the Gentoo portage pjsip (2.13).
> I have followed the instructions around generating a backtrace and will attach these soon.  However in short this is what is printed:
> Thread 71 (Thread 0x7f7865b6f6c0 (LWP 5096)):
> #0  0x00007f7865cc70ca in fdatasync () at /lib64/libc.so.6
> #1  0x00007f786643bc81 in unixSync () at /usr/lib64/libsqlite3.so.0
> #2  0x00007f7866489aab in syncJournal.part.0 () at /usr/lib64/libsqlite3.so.0
> #3  0x00007f7866495786 in sqlite3PagerCommitPhaseOne.part.0 () at /usr/lib64/libsqlite3.so.0
> #4  0x00007f7866496a3b in sqlite3BtreeCommitPhaseOne.part.0 () at /usr/lib64/libsqlite3.so.0
> #5  0x00007f7866498c28 in sqlite3VdbeHalt () at /usr/lib64/libsqlite3.so.0
> #6  0x00007f78664d09a4 in sqlite3VdbeExec () at /usr/lib64/libsqlite3.so.0
> #7  0x00007f78664d3ca6 in sqlite3_step () at /usr/lib64/libsqlite3.so.0
> #8  0x00007f78664d47ad in sqlite3_exec () at /usr/lib64/libsqlite3.so.0
> #9  0x000055f1869c29ec in db_execute_sql (sql=0x55f186b8563b "COMMIT", callback=0x0, arg=0x0) at db.c:315
>         errmsg = 0x0
>         res = 0
>         __FUNCTION__ = "db_execute_sql"
> #10 0x000055f1869c2a9b in ast_db_commit_transaction () at db.c:331
> #11 0x000055f1869c576c in db_sync_thread (data=0x0) at db.c:1148
>         __PRETTY_FUNCTION__ = "db_sync_thread"
> sqlite was updated on this system from 3.39 to 3.40 on November 25th which could be related.  Either way, Asterisk should not be crashing and restarting like this.
> These crashes happen every 30 minutes or so.
> I do not have sqlite configured anywhere in asterisk.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list