Asterisk Crash

Hello,

We updated a FreePBX 17 to the latest version, as well as Asterisk to 22.8.2.

Later that day, Asterisk randomly crashed.

Unfortunately, no backtraces were collected or saved.

From what I can tell in the logs, a user listened to their voicemail, and as soon as they hung up Asterisk crashed. It seems to me like the MWI notify had something wrong.

Looking at the syslog, I see the below:

2026-04-16T15:29:33.041634-04:00 PBX1-NY1 kernel: [37697.552583] show_signal_msg: 5 callbacks suppressed
2026-04-16T15:29:33.041651-04:00 PBX1-NY1 kernel: [37697.552585] asterisk[1573]: segfault at 90 ip 00007f47085eb260 sp 00007f46bb304570 error 4 in app_voicemail.so[7f47085ea000+37000] likely on CPU 7 (core 3, socket 0)
2026-04-16T15:29:33.041653-04:00 PBX1-NY1 kernel: [37697.552597] Code: 8b 40 04 48 8b 55 f8 48 89 d6 89 c7 e8 29 fd ff ff 48 8b 45 f8 c9 c3 55 48 89 e5 48 89 7d f8 48 83 7d f8 00 74 0b 48 8b 45 f8 <0f> b6 00 84 c0 75 07 b8 01 00 00 00 eb 05 b8 00 00 00 00 5d c3 55
2026-04-16T15:29:33.072663-04:00 PBX1-NY1 mariadbd[932]: 2026-04-16 15:29:33 56195 [Warning] Aborted connection 56195 to db: 'asteriskcdrdb' user: 'freepbxuser' host: 'localhost' (Got an error reading communication packets)

And this is what I see in the Asterisk logs:

[2026-04-16 15:29:33] ERROR[1573] stasis_state.c: FRACK!, Failed assertion bad magic number 0x0 for object 0x7f45011e5ac0 (0)
[2026-04-16 15:29:33] ERROR[1573] : Got 17 backtrace records
# 0: /usr/sbin/asterisk(__ast_assert_failed+0x90) [0x555a80294747]
# 1: /usr/sbin/asterisk(+0x76202) [0x555a800ee202]
# 2: /usr/sbin/asterisk(__ao2_lock+0x64) [0x555a800ee268]
# 3: /usr/sbin/asterisk(stasis_state_subscriber_data+0x3e) [0x555a802650b7]
# 4: /usr/sbin/asterisk(ast_mwi_subscriber_data+0x20) [0x555a801cbccb]
# 5: /lib/x86_64-linux-gnu/asterisk/modules/res_pjsip_mwi.so(+0x4332) [0x7f46c007e332]
# 6: /usr/sbin/asterisk(+0x78d4f) [0x555a800f0d4f]
# 7: /usr/sbin/asterisk(__ao2_callback+0x4f) [0x555a800f1011]
# 8: /lib/x86_64-linux-gnu/asterisk/modules/res_pjsip_mwi.so(+0x4fdf) [0x7f46c007efdf]
# 9: /lib/x86_64-linux-gnu/asterisk/modules/res_pjsip_mwi.so(+0x69fd) [0x7f46c00809fd]
#10: /usr/sbin/asterisk(ast_taskprocessor_execute+0x166) [0x555a8027c594]
#11: /usr/sbin/asterisk(+0x1ff6bd) [0x555a802776bd]
#12: /usr/sbin/asterisk(ast_taskprocessor_execute+0x166) [0x555a8027c594]
#13: /usr/sbin/asterisk(+0x20069c) [0x555a8027869c]
#14: /usr/sbin/asterisk(+0x2196d4) [0x555a802916d4]
#15: /lib/x86_64-linux-gnu/libc.so.6(+0x891f5) [0x7f470d6a71f5]
#16: /lib/x86_64-linux-gnu/libc.so.6(+0x1098dc) [0x7f470d7278dc]

[2026-04-16 15:29:33] ERROR[1573] stasis_state.c: FRACK!, Failed assertion bad magic number 0x0 for object 0x7f45011e5ac0 (0)
[2026-04-16 15:29:33] ERROR[1573] : Got 17 backtrace records
# 0: /usr/sbin/asterisk(__ast_assert_failed+0x90) [0x555a80294747]
# 1: /usr/sbin/asterisk(+0x76202) [0x555a800ee202]
# 2: /usr/sbin/asterisk(__ao2_unlock+0x60) [0x555a800ee4a1]
# 3: /usr/sbin/asterisk(stasis_state_subscriber_data+0xba) [0x555a80265133]
# 4: /usr/sbin/asterisk(ast_mwi_subscriber_data+0x20) [0x555a801cbccb]
# 5: /lib/x86_64-linux-gnu/asterisk/modules/res_pjsip_mwi.so(+0x4332) [0x7f46c007e332]
# 6: /usr/sbin/asterisk(+0x78d4f) [0x555a800f0d4f]
# 7: /usr/sbin/asterisk(__ao2_callback+0x4f) [0x555a800f1011]
# 8: /lib/x86_64-linux-gnu/asterisk/modules/res_pjsip_mwi.so(+0x4fdf) [0x7f46c007efdf]
# 9: /lib/x86_64-linux-gnu/asterisk/modules/res_pjsip_mwi.so(+0x69fd) [0x7f46c00809fd]
#10: /usr/sbin/asterisk(ast_taskprocessor_execute+0x166) [0x555a8027c594]
#11: /usr/sbin/asterisk(+0x1ff6bd) [0x555a802776bd]
#12: /usr/sbin/asterisk(ast_taskprocessor_execute+0x166) [0x555a8027c594]
#13: /usr/sbin/asterisk(+0x20069c) [0x555a8027869c]
#14: /usr/sbin/asterisk(+0x2196d4) [0x555a802916d4]
#15: /lib/x86_64-linux-gnu/libc.so.6(+0x891f5) [0x7f470d6a71f5]
#16: /lib/x86_64-linux-gnu/libc.so.6(+0x1098dc) [0x7f470d7278dc]

I know that without a backtrace, I have likely hit a dead end. But I am trying my luck to see if anyone else has experienced something similar.

Thank you

There have been no issue reports filed and I’ve seen no other mentions across the community forums or Reddit. Can’t say that code has been touched really either.

What was the prior version?

The previous version was 22.6.0

I looked through the difference but didn’t see any changes in either res_pjsip_mwi or the underlying stasis state API that would have caused this.

Are you doing reloads often? Is it subscription based or unsolicited MWI?

It was set to auto.

I didn’t reload that day all day post the update. (It crashed around 8 hours after the update)

I’ve been dabbling in stuff but haven’t uncovered anything for this, and still no reports on the Asterisk side.

I am a bit lost here as well.

It didn’t happen since and I hope it won’t happen again.

I did reinstall Asterisk a day after the crash, so hopefully this fixed it.

Thanks so much for looking into this, Josh!