Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CRASH] acc.c:701 - ctx->extra_values is 0x0 #3478

Open
ar45 opened this issue Sep 23, 2024 · 5 comments
Open

[CRASH] acc.c:701 - ctx->extra_values is 0x0 #3478

ar45 opened this issue Sep 23, 2024 · 5 comments
Assignees
Labels
Milestone

Comments

@ar45
Copy link
Contributor

ar45 commented Sep 23, 2024

OpenSIPS version you are running

version: opensips 3.5.0 (x86_64/linux)
flags: STATS: On, EXTRA_DEBUG, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
git revision: 284ab21ad
main.c compiled on 20:35:55 Sep 11 2024 with cc 12

Crash Core Dump

#0  0x00007aa85e8b9dbc in acc_db_cdrs (dlg=dlg@entry=0x7aa86017f4f0, msg=<optimized out>, ctx=ctx@entry=0x7aa85fed0e28) at acc.c:701
701			VAL_STR(db_vals+i) = ctx->extra_values[extra->tag_idx].value;
(gdb) bt full
#0  0x00007aa85e8b9dbc in acc_db_cdrs (dlg=dlg@entry=0x7aa86017f4f0, msg=<optimized out>, ctx=ctx@entry=0x7aa85fed0e28) at acc.c:701
        total = 41
        i = 7
        ret = 36
        res = -1
        j = <optimized out>
        nr_leg_vals = <optimized out>
        start_time = {tv_sec = 1727063477, tv_usec = 874037}
        core_s = {s = 0x7aa8a0bdda98 "\006", len = 91}
        leg_s = {s = 0x0, len = <optimized out>}
        extra_s = {s = 0x0, len = <optimized out>}
        table = {s = 0x7aa8601824e0 "acc", len = 3}
        my_ps = 0x0
        ins_list = 0x0
        extra = 0x7aa89fe16c68
        __FUNCTION__ = "acc_db_cdrs"
#1  0x00007aa85e8c8dfa in acc_dlg_ended (_params=0x7aa85ee42880 <params>, type=<optimized out>, dlg=0x7aa86017f4f0) at acc_logic.c:855
        t = <optimized out>
        ctx = 0x7aa85fed0e28
        t = <optimized out>
        ctx = <optimized out>
        __FUNCTION__ = "acc_dlg_ended"

To Reproduce
Start 6 calls, and leave them hanging...

INVITE
< 200
ACK

Kill the dialogs using mi command

opensips-cli -x mi dlg_list | jq '.Dialogs[].ID' -r | xargs -n 1 opensips-cli -x mi dlg_end_dlg

after 2 or 3 dialogs, opensips crashes

@bogdan-iancu
Copy link
Member

Could you provide a full complete BT, please ?

@bogdan-iancu bogdan-iancu self-assigned this Sep 23, 2024
@bogdan-iancu bogdan-iancu added this to the 3.5.2 milestone Sep 23, 2024
@ar45
Copy link
Contributor Author

ar45 commented Sep 23, 2024

I'm having a hard time to reproduce this now. I wonder if this is a race condition killing the dialog in very early state.

Copy link

github-actions bot commented Oct 9, 2024

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Oct 9, 2024
@ar45
Copy link
Contributor Author

ar45 commented Oct 9, 2024

@bogdan-iancu Could this be caused by another opensips instance running on the same machine accidentally sharing the same fifo file? does the shm memory get shared between the 2? or just with child processes ?

@github-actions github-actions bot removed the stale label Oct 10, 2024
Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants