Random segfaults on Asterisk

I have a brand new installation of Freepbx 13.0.120.3 fully updated. I works but I keep getting segfaults at random intervals. I see the following message in /var/log/messages:

Jul 17 18:29:45 pbxbogota kernel: asterisk[4470]: segfault at 188 ip 00007ff73e12d23f sp 00007ff6c2d4e5c0 error 4 in libasteriskpj.so.2[7ff73e0bb000+180000]
Jul 17 18:31:47 pbxbogota kernel: asterisk[5564]: segfault at 188 ip 00007febaf75a23f sp 00007feb344355c0 error 4 in libasteriskpj.so.2[7febaf6e8000+180000]
Jul 17 18:32:49 pbxbogota kernel: asterisk[5677]: segfault at 188 ip 00007f2cc462f23f sp 00007f2c493b75c0 error 4 in libasteriskpj.so.2[7f2cc45bd000+180000]
Jul 17 18:40:36 pbxbogota kernel: asterisk[5840]: segfault at 188 ip 00007fc4531f323f sp 00007fc3cbf7d5c0 error 4 in libasteriskpj.so.2[7fc453181000+180000]

The closest issue I could find was that the digium module to provision phones was causing a crash and they recommended to remove the asterisk package via yum. I simply ran the “asterisk-version-switch” command and selected version 13 again. That downloaded all asterisk 13 packages again and erased the res_digiumphone package. Sadly this did not fix the problem as I am still getting segfaults.

The Freepbx distro is running on a virtual machine. Any recommendations on where to look for the problem?

If you’re getting segfaults with two different versions of a software package that thousands of people use without problems, I’d start looking at hardware. That, and my experience tells me that when you start seeing segfaults in Asterisk, you have about a 3 in 4 chance that you’ve got a bad memory stick (at least, that’s my scoreboard, and the 4th one had a bad CPU, so the memory could have been bad too).

I simply cannot blame the hardware because as I mentioned this is running on a VM and none of the other machines running in the same server have any problems. Even the old Elastix VM we are trying to replace here runs fine (we are replacing a very old version). I am going to try moving back to chan_sip to see if that makes Asterisk happy as the crash seems to be directly linked to PJSIP.

I have now done a completely new install using CentOS 7 and compiling asterisk by hand and I still get random segfaults in libasteriskpj.so.2 (same error as the Freepbx ISO). Apparently VMware ESXI 4 has a real problem with PJSIP. Currently running is a very old elastix that works but since it is based on CentOS 5 it cannot be updated anymore.

Anyone running Freepbx on VMware? I am guessing that since version 4 of ESXI is also very old that may contirbute to the problem. Any pointers?

Without getting verbose. post the issue of:-

rasterisk -V

I have freepbx 14.0.1.4 (asterisk 13.15-13.17) on vmware 6 without issue. vmware 4 is quite old, who knows!

We are using CentOS 7.3 with Asterisk 13.17.0 and Freepbx 14.0.1.4 at the moment with the same results as using the Freepbx ISO that comes with CentOS 6, Asterisk 13.15. We did the testing with only a couple simultaneous calls and 50 registered extensions. The segfault only occurs when there are more active users. We had 25 segfaults in a two hour span.

Confirmed on lasted Asterisk.

kernel: asterisk[8653]: segfault at 18 ip 000000000053cecc sp 00007f256c503250 error 4 in asterisk[400000+3af000]

Randomly. Running VM. And everything is updated.
“Thousands” may not notice it, because it restarts itself in seconds. Don’t you blame hardware. :angry:

Intel processor?

Did you install the latest Intel patch which causes random reboots?