Asterisk SIGSEGV Segmentation fault on pjsip 18.20.x and 20.6.0

I need help with some random crash I have on my Asterisk, I’ve tried to upgrade other version of 18.20 and also have the exact same issue on version 20.6.

Maybe someone has this issue aswell and could help me found a solution, or anyidea of those crash reason.

Thanks

!@!@!@! thread1.txt !@!@!@!

$1 = {si_signo = 11, si_errno = 0, si_code = 128, _sifields = {_pad = {0 <repeats 28 times>}, _kill = {si_pid = 0, si_uid = 0}, _timer = {si_tid = 0, si_overrun = 0, si_sigval = {sival_int = 0, sival_ptr = 0x0}}, _rt = {si_pid = 0, si_uid = 0, si_sigval = {sival_in
t = 0, sival_ptr = 0x0}}, _sigchld = {si_pid = 0, si_uid = 0, si_status = 0, si_utime = 0, si_stime = 0}, _sigfault = {si_addr = 0x0}, _sigpoll = {si_band = 0, si_fd = 0}}}
Signal Stop Print Pass to program Description
SIGSEGV Yes Yes Yes Segmentation fault

Thread 1 (Thread 0x7f5b151af700 (LWP 7620)):
#0 0x0000000000460b0c in ao2_ref (user_data=user_data@entry=0x6f70646e655f7370, delta=delta@entry=1, tag=tag@entry=0x0, file=file@entry=0x7f5b57e863f2 “res_pjsip_session.c”, line=line@entry=3639, func=func@entry=0x7f5b57e8a060 <PRETTY_FUNCTION.36037> “ast_si
p_dialog_get_session”) at astobj2.c:501
p__LINE
= 0x6f70646e655f7358
obj =
obj_mutex =
obj_rwlock =
obj_lockobj =
current_value =
ret =
privdataoptions =
weakproxy =
lock_state =
PRETTY_FUNCTION = “__ao2_ref”
#1 0x00007f5b57e82782 in ast_sip_dialog_get_session (dlg=) at res_pjsip_session.c:3639
inv_session =
session = 0x6f70646e655f7370
PRETTY_FUNCTION = “ast_sip_dialog_get_session”
#2 0x00007f5b57e85880 in session_outgoing_nat_hook (tdata=0x7f59a40700b8, transport=0x37bc898) at res_pjsip_session.c:5596
transport_state = 0x37bd110
hook = 0x0
sdp_info =
sdp =
dlg =
session =
stream =
FUNCTION = “session_outgoing_nat_hook”
PRETTY_FUNCTION = “session_outgoing_nat_hook”
#3 0x00007f5b542f3689 in nat_invoke_hook (obj=, arg=, flags=) at res_pjsip_nat.c:253
hook =
#4 0x00000000004631ed in internal_ao2_traverse (self=self@entry=0x7f5ac8422d98, flags=flags@entry=OBJ_SEARCH_NONE, cb_fn=cb_fn@entry=0x7f5b542f3670 <nat_invoke_hook>, arg=arg@entry=0x7f5b151ae8c0, tag=tag@entry=0x0, file=file@entry=0x7f5b542f474a “res_pjsip_nat.c”
, line=391, func=0x7f5b542f4bce <PRETTY_FUNCTION.27028> “process_nat”, type=AO2_CALLBACK_DEFAULT, data=0x0) at astobj2_container.c:328
match = 3
ret = 0x0
cb_default = 0x7f5b542f3670 <nat_invoke_hook>
node = 0x7f5ac8221748
traversal_state = 0x7f5b151ae760
orig_lock = AO2_LOCK_REQ_MUTEX
multi_container = 0x0
multi_iterator = 0x0
#5 0x0000000000463655 in __ao2_callback (c=c@entry=0x7f5ac8422d98, flags=flags@entry=OBJ_SEARCH_NONE, cb_fn=cb_fn@entry=0x7f5b542f3670 <nat_invoke_hook>, arg=arg@entry=0x7f5b151ae8c0, tag=tag@entry=0x0, file=file@entry=0x7f5b542f474a “res_pjsip_nat.c”, line=line@e
ntry=391, func=func@entry=0x7f5b542f4bce <PRETTY_FUNCTION.27028> “process_nat”) at astobj2_container.c:414
No locals.
#6 0x00007f5b542f3d62 in process_nat (tdata=0x7f59a40700b8) at res_pjsip_nat.c:391
hook_details = {tdata = 0x7f59a40700b8, transport = 0x37bc898}
transport = 0x37bc898
transport_state = 0x37bd110
via =
details = {type = AST_TRANSPORT_TLS, transport = 0x14, factory = 0x0, local_address = {ptr = 0x7f5bac270750 “185.82.x.x”, slen = 14}, local_port = 5061}
addr = {ss = {ss_family = 0, __ss_padding = ‘000’ <repeats 117 times>, __ss_align = 0}, len = 0}
uri =
hooks = 0x7f5ac8422d98
#7 nat_on_tx_message (tdata=0x7f59a40700b8) at res_pjsip_nat.c:400
No locals.
#8 0x00007f5bc99502a6 in endpt_on_tx_msg (endpt=, tdata=0x7f59a40700b8) at …/src/pjsip/sip_endpoint.c:1115
status = 0
mod = 0x7f5b544f6280 <nat_module>
#9 0x00007f5bc995767f in pjsip_transport_send (tr=0x7f5bac14cf78, tdata=tdata@entry=0x7f59a40700b8, addr=addr@entry=0x7f59a40702a8, addr_len=addr_len@entry=16, token=token@entry=0x7f59a4073130, cb=cb@entry=0x7f5bc9951b40 <stateless_send_transport_cb>) at …/src/pj
sip/sip_transport.c:935
status =
#10 0x00007f5bc9951cdf in stateless_send_transport_cb (token=token@entry=0x7f59a4073130, tdata=tdata@entry=0x7f59a40700b8, sent=, sent@entry=-70002) at …/src/pjsip/sip_util.c:1276
status =
cont = 1
cur_addr = 0x7f59a40702a8
cur_addr_len = 16
via =
stateless_data = 0x7f59a4073130
need_update_via =
#11 0x00007f5bc995209a in stateless_send_resolver_callback (status=, token=0x7f59a4073130, addr=) at …/src/pjsip/sip_util.c:1377
stateless_data = 0x7f59a4073130
tdata = 0x7f59a40700b8
#12 0x00007f5b5a7613f1 in sip_resolve_invoke_user_callback (data=0x7f59a4073f48) at res_pjsip/pjsip_resolver.c:206
resolve = 0x7f59a4073f48
FUNCTION = “sip_resolve_invoke_user_callback”
PRETTY_FUNCTION = “sip_resolve_invoke_user_callback”
#13 0x00000000005aafd0 in ast_taskprocessor_execute (tps=tps@entry=0x7f5ac8433bc0) at taskprocessor.c:1302
local = {local_data = 0x7f5b18002448, data = 0x0}
t = 0x7f5b88000e10
PRETTY_FUNCTION = “ast_taskprocessor_execute”
#14 0x00000000005b2050 in execute_tasks (data=0x7f5ac8433bc0) at threadpool.c:1350
tps = 0x7f5ac8433bc0
#15 0x00000000005aafd0 in ast_taskprocessor_execute (tps=0x34cd310) at taskprocessor.c:1302
local = {local_data = 0x7f5b18002448, data = 0x56a34}
t = 0x7f5b880015a0
PRETTY_FUNCTION = “ast_taskprocessor_execute”
#16 0x00000000005b2c50 in threadpool_execute (pool=0x34cfe80) at threadpool.c:367
No locals.
#17 worker_active (worker=0x7f5b18002410) at threadpool.c:1137
No locals.
#18 worker_start (arg=arg@entry=0x7f5b18002410) at threadpool.c:1056
worker = 0x7f5b18002410
saved_state =
PRETTY_FUNCTION = “worker_start”
#19 0x00000000005baa59 in dummy_start (data=) at utils.c:1607
__cancel_buf = {__cancel_jmp_buf = {{__cancel_jmp_buf = {140029221416448, 8348212800442470743, 0, 512000, 7, 140029172840192, -8255971702752800425, 8348213527567143255}, __mask_was_saved = 0}}, __pad = {0x7f5b151aedb0, 0x0, 0x7f5bc706d6c2 <__libc_thread_fre
eres+34>, 0x7d000}}
__cancel_arg = 0x7f5b151af700
__not_first_call =
ret =
a = {start_routine = 0x5b2870 <worker_start>, data = 0x7f5b18002410, name = 0x7f5b18002e00 “worker_start started at [ 1111] threadpool.c worker_thread_start()”}
PRETTY_FUNCTION = “dummy_start”
#20 0x00007f5bc908fea5 in start_thread () from /lib64/libpthread.so.0
No symbol table info available.
#21 0x00007f5bc6ffab0d in clone () from /lib64/libc.so.6
No symbol table info available.

!@!@!@! brief.txt !@!@!@!

$2 = {si_signo = 11, si_errno = 0, si_code = 128, _sifields = {_pad = {0 <repeats 28 times>}, _kill = {si_pid = 0, si_uid = 0}, _timer = {si_tid = 0, si_overrun = 0, si_sigval = {sival_int = 0, sival_ptr = 0x0}}, _rt = {si_pid = 0, si_uid = 0, si_sigval = {sival_in
t = 0, sival_ptr = 0x0}}, _sigchld = {si_pid = 0, si_uid = 0, si_status = 0, si_utime = 0, si_stime = 0}, _sigfault = {si_addr = 0x0}, _sigpoll = {si_band = 0, si_fd = 0}}}
Signal Stop Print Pass to program Description
SIGSEGV Yes Yes Yes Segmentation fault

Thread 95 (Thread 0x7f5b4413c700 (LWP 617)):
#0 0x00007f5bc6fefddd in poll () from /lib64/libc.so.6
#1 0x00000000004489ac in poll (__timeout=, __nfds=0, __fds=0x0) at /usr/include/bits/poll2.h:46
#2 shaun_of_the_dead (data=data@entry=0x0) at app.c:116
#3 0x00000000005baa59 in dummy_start (data=) at utils.c:1607
#4 0x00007f5bc908fea5 in start_thread () from /lib64/libpthread.so.0
#5 0x00007f5bc6ffab0d in clone () from /lib64/libc.so.6

Thread 94 (Thread 0x7f5b1729f700 (LWP 11171)):
#0 0x00007f5bc9093a35 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x000000000057a807 in sched_run (data=data@entry=0x38c5cb0) at sched.c:154
#2 0x00000000005baa59 in dummy_start (data=) at utils.c:1607
#3 0x00007f5bc908fea5 in start_thread () from /lib64/libpthread.so.0
#4 0x00007f5bc6ffab0d in clone () from /lib64/libc.so.6

Thread 93 (Thread 0x7f5b15902700 (LWP 11206)):
#0 0x00007f5bc9095b3b in do_futex_wait.constprop.1 () from /lib64/libpthread.so.0
#1 0x00007f5bc9095bcf in __new_sem_wait_slow.constprop.0 () from /lib64/libpthread.so.0
#2 0x00007f5bc9095c6b in sem_wait@@GLIBC_2.2.5 () from /lib64/libpthread.so.0
#3 0x00000000005ab108 in ast_sem_wait (sem=0x3badc50) at /usr/local/src/asterisk-18.20.2/include/asterisk/sem.h:61
#4 default_tps_processing_function (data=data@entry=0x3a7fe00) at taskprocessor.c:205
#5 0x00000000005baa59 in dummy_start (data=) at utils.c:1607
#6 0x00007f5bc908fea5 in start_thread () from /lib64/libpthread.so.0
#7 0x00007f5bc6ffab0d in clone () from /lib64/libc.so.6

Thread 92 (Thread 0x7f5b16a21700 (LWP 11173)):
#0 0x00007f5bc9093a35 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x000000000057a807 in sched_run (data=data@entry=0x3978380) at sched.c:154
#2 0x00000000005baa59 in dummy_start (data=) at utils.c:1607
#3 0x00007f5bc908fea5 in start_thread () from /lib64/libpthread.so.0
#4 0x00007f5bc6ffab0d in clone () from /lib64/libc.so.6

Thread 91 (Thread 0x7f5b1578b700 (LWP 11209)):
#0 0x00007f5bc6fefddd in poll () from /lib64/libc.so.6
#1 0x00007f5bc41af5de in poll (__timeout=-1, __nfds=0, __fds=0x0) at /usr/include/bits/poll2.h:46
#2 do_monitor (data=data@entry=0x0) at chan_phone.c:1102
#3 0x00000000005baa59 in dummy_start (data=) at utils.c:1607
#4 0x00007f5bc908fea5 in start_thread () from /lib64/libpthread.so.0
#5 0x00007f5bc6ffab0d in clone () from /lib64/libc.so.6

Thread 90 (Thread 0x7f5bc5441700 (LWP 11132)):
#0 0x00007f5bc6fefddd in poll () from /lib64/libc.so.6
#1 0x000000000045d3d0 in poll (__timeout=-1, __nfds=1, __fds=0x7f5bc5440c40) at /usr/include/bits/poll2.h:46
#2 listener (unused=unused@entry=0x0) at asterisk.c:1527
#3 0x00000000005baa59 in dummy_start (data=) at utils.c:1607
#4 0x00007f5bc908fea5 in start_thread () from /lib64/libpthread.so.0
#5 0x00007f5bc6ffab0d in clone () from /lib64/libc.so.6

Thread 89 (Thread 0x7f5b16631700 (LWP 11179)):
#0 0x00007f5bc9095b3b in do_futex_wait.constprop.1 () from /lib64/libpthread.so.0
#1 0x00007f5bc9095bcf in __new_sem_wait_slow.constprop.0 () from /lib64/libpthread.so.0
#2 0x00007f5bc9095c6b in sem_wait@@GLIBC_2.2.5 () from /lib64/libpthread.so.0
#3 0x00000000005ab108 in ast_sem_wait (sem=0x38a4c60) at /usr/local/src/asterisk-18.20.2/include/asterisk/sem.h:61
#4 default_tps_processing_function (data=data@entry=0x3a46da0) at taskprocessor.c:205
#5 0x00000000005baa59 in dummy_start (data=) at utils.c:1607
#6 0x00007f5bc908fea5 in start_thread () from /lib64/libpthread.so.0
#7 0x00007f5bc6ffab0d in clone () from /lib64/libc.so.6

This has an open issue here:

Thank you :slight_smile: :pray:t2:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.