Asterisk crashes

I have been seeing these crashes occasionally upon reload in all current major versions of Asterisk across several systems:

[905746.674480] asterisk[2911948]: segfault at 40 ip 00007fc1f0a5adb0 sp 00007fc1c5080d20 error 4 in libc.so.6[7fc1f0a45000+155000] likely on CPU 0 (core 0, socket 0)
[905746.674494] Code: 66 ff ff ff 66 0f 1f 44 00 00 31 f6 e9 59 ff ff ff 66 0f 1f 84 00 00 00 00 00 55 48 89 fd 53 89 f3 48 83 ec 08 e8 d0 00 00 00 <8b> 45 40 85 c0 75 14 85 db b8 01 00 00 00 48 89 ef 0f 44 d8 89 de
[1136275.633759] asterisk[2984156]: segfault at 40 ip 00007fe243a5adb0 sp 00007fe217cfdd20 error 4 in libc.so.6[7fe243a45000+155000] likely on CPU 0 (core 0, socket 0)
[1136275.633775] Code: 66 ff ff ff 66 0f 1f 44 00 00 31 f6 e9 59 ff ff ff 66 0f 1f 84 00 00 00 00 00 55 48 89 fd 53 89 f3 48 83 ec 08 e8 d0 00 00 00 <8b> 45 40 85 c0 75 14 85 db b8 01 00 00 00 48 89 ef 0f 44 d8 89 de
[1299284.926635] asterisk[4183676]: segfault at 40 ip 00007fa679e5adb0 sp 00007fa64e3f8d20 error 4 in libc.so.6[7fa679e45000+155000] likely on CPU 0 (core 0, socket 0)
[1299284.926653] Code: 66 ff ff ff 66 0f 1f 44 00 00 31 f6 e9 59 ff ff ff 66 0f 1f 84 00 00 00 00 00 55 48 89 fd 53 89 f3 48 83 ec 08 e8 d0 00 00 00 <8b> 45 40 85 c0 75 14 85 db b8 01 00 00 00 48 89 ef 0f 44 d8 89 de

The logs above are asterisk 20 on a FreePBX 17 server. I was previously running 22 and 21 also on this server and observed the exact same crashes; running version 20 was an attempt to find a non-crashing version.

I have observed this on a PBXact 15 server running the latest asterisk 18, also:

[14488935.032288] asterisk[30154]: segfault at 40 ip 00007f0bf69f51f0 sp 00007f0b647a5bf0 error 4 in libc-2.17.so[7f0bf69bf000+1c3000]

There’s nothing in the log, only a segfault in the kernel log. The only pattern I see is we do a reload (from GUI or fwconsole r) and the crash/restart happens 45-60 seconds later. The asterisk full log shows an ordinary log message and then 45-60 seconds later, the asterisk startup banner.

For Asterisk I haven’t seen any reported issues like this, or noticed any crash trends. A backtrace would be needed to see where it’s really crashing at. For PBXact 15 that might have the debug symbols available so getting a backtrace might be possible there[1] if there’s a core dump.

[1] https://sangomakb.atlassian.net/wiki/spaces/SS/pages/31162494/Support+Services+-+Providing+Great+Debug#Backtraces-(Segfaults/Core-Dumps/Asterisk-Crashing)

Indeed, core dumps available on both. I could only install the debug symbols on the PBXact 15 server. The package does not seem to be available on FreePBX 17.

PBXact 15 with Asterisk 18

FreePBX 17 with Asterisk 20

It would appear to be: [bug]: FATAL: unhandled exception PJLIB/No memory! · Issue #727 · asterisk/asterisk · GitHub

Not a new issue, you are the third person to bring it up.