Asterisk crash very often

After upgrade asterisk to “Asterisk 18.3.0”, system crashed very often. System messages show the same error:

[12374.018980] asterisk[15815]: segfault at 10 ip 000000000058e445 sp 00007f2fed2d1f30 error 4 in asterisk[400000+2f0000]

Core crash event file read

#0  0x000000000058e445 in stasis_topic_subscribers (topic=0x0) at stasis.c:645
#1  0x000000000058fe2b in publish_msg (topic=0x0, message=0x7f2fa40058b8, sync_sub=0x0) at stasis.c:1465
#2  0x000000000058ff57 in stasis_publish (topic=0x0, message=0x7f2fa40058b8) at stasis.c:1512
#3  0x000000000059e7c3 in ast_channel_publish_blob (chan=0x7f2fc0005370, type=0x2059248, blob=0x7f2fa4004b60) at stasis_channels.c:1145
#4  0x000000000059e88f in ast_channel_publish_varset (chan=0x7f2fc0005370, name=0x7f2ff849e134 "AGISTATUS", value=0x7f2ff849d2f3 "SUCCESS") at stasis_channels.c:1171
#5  0x000000000054c663 in pbx_builtin_setvar_helper (chan=0x7f2fc0005370, name=0x7f2ff849e134 "AGISTATUS", value=0x7f2ff849d2f3 "SUCCESS") at pbx_variables.c:1116
#6  0x00007f2ff849befb in agi_exec_full (chan=0x7f2fc0005370, data=0x7f2fed2d2700 "agi://", enhanced=0, dead=1) at res_agi.c:4545
#7  0x00007f2ff849bfc0 in agi_exec (chan=0x7f2fc0005370, data=0x7f2fed2d2700 "agi://") at res_agi.c:4566
#8  0x00000000005422f0 in pbx_exec (c=0x7f2fc0005370, app=0x27b7f90, data=0x7f2fed2d2700 "agi://") at pbx_app.c:492
#9  0x000000000052dcd0 in pbx_extension_helper (c=0x7f2fc0005370, con=0x0, context=0x7f2fc0005d30 "crm-hangup", exten=0x7f2fc0005d80 "s", priority=7, label=0x0, callerid=0x7f2fa40056e0 "\330\001", action=E_SPAWN, found=0x7f2fed2d58d4,
    combined_find_spawn=1) at pbx.c:2947
#10 0x0000000000531adc in ast_spawn_extension (c=0x7f2fc0005370, context=0x7f2fc0005d30 "crm-hangup", exten=0x7f2fc0005d80 "s", priority=7, callerid=0x7f2fa40056e0 "\330\001", found=0x7f2fed2d58d4, combined_find_spawn=1) at pbx.c:4206
#11 0x00007f302234c429 in gosub_run (chan=0x7f2fc0005370, sub_args=0x7f2fa4004ff8 "crm-hangup,s,1", ignore_hangup=1) at app_stack.c:1056
#12 0x0000000000443737 in ast_app_exec_sub (autoservice_chan=0x0, sub_chan=0x7f2fc0005370, sub_args=0x7f2fa4004ff8 "crm-hangup,s,1", ignore_hangup=1) at app.c:387
#13 0x0000000000547ae1 in ast_pbx_hangup_handler_run (chan=0x7f2fc0005370) at pbx_hangup_handler.c:86
#14 0x0000000000533acf in __ast_pbx_run (c=0x7f2fc0005370, args=0x0) at pbx.c:4599
#15 0x0000000000533f6d in pbx_thread (data=0x7f2fc0005370) at pbx.c:4704
#16 0x00000000005c7aaa in dummy_start (data=0x7f2f3c0026c0) at utils.c:1299
#17 0x00007f30729dcea5 in start_thread () from /lib64/
#18 0x00007f3071a7b8dd in clone () from /lib64/

I have read a lot of posts but no one of them solve my issue.


It’s difficult to see what your issue actually is. Does that happen during a call, or already when you start asterisk?

Sometimes it happens during a call but never on asterisk startup. Sometimes it seems good for 2-3 days, but sometimes it happen twice a day.

That would be a bug, please file an issue[1]. You’re setting a dialplan variable in a hangup handler and things have been destroyed already, the code should handle that.


May I downgrade to asterisk 13 ? Potentially issue occurred after upgrade

The code in question does not handle that situation in 13 either.

@jcolp , I created a bug report to jira, according to your advice


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