FreePBX 14 unable to start Asterisk 13, segfault, AMI failed, continual restarting Asterisk

Hi FreePBX team,

On our production server we currently have installed Asterisk 13.13-cert6 with FreePBX 14 on Debian 8.11.

We need to upgrade asterisk to version 13.38.0. Therefore I have setup a virtualbox with the same setup to test the upgrade.

The process looks like:

  • Having a running asterisk 13.13-cert6 / FreePBX 14
  • fwconsole stop
  • cd asterisk-13.38.0/
    • contrib/scripts/get_mp3_source.sh
    • contrib/scripts/install_prereq install
    • ./configure --with-pjproject-bundled
    • make menuselect
    • make
    • make install
    • chown asterisk. /var/run/asterisk
    • chown -R asterisk. /etc/asterisk
    • chown -R asterisk. /var/{lib,log,spool}/asterisk
    • chown -R asterisk. /usr/lib/asterisk

Result after fwconsole start --verbose
ps -auxf | grep asterisk

 root     32323  0.0  0.1   4340  1268 pts/0    S    09:43   0:00 /bin/sh /usr/sbin/safe_asterisk -U asterisk -G asterisk

tail -f /var/log/asterisk/safe_asterisk.log

safe_asterisk[32312]: Automatically restarting Asterisk.
safe_asterisk[32312]: Asterisk ended with exit status 139
safe_asterisk[32312]: Asterisk exited on signal 11.
safe_asterisk[32312]: Automatically restarting Asterisk.
safe_asterisk[32312]: Asterisk ended with exit status 139
safe_asterisk[32312]: Asterisk exited on signal 11.

tail -f /var/log/syslog

Dec 13 09:43:05 debian kernel: [36434.904226] asterisk[32397]: segfault at 94830b9a ip 00007f26b8c40dcc sp 00007ffc8d57f340 error 4 in libc-2.19.so[7f26b8bf6000+1a1000]
Dec 13 09:43:09 debian kernel: [36439.246872] asterisk[32459]: segfault at 60391b9a ip 00007f4c8f93edcc sp 00007ffc8ef901b0 error 4 in libc-2.19.so[7f4c8f8f4000+1a1000]
Dec 13 09:43:14 debian kernel: [36443.582546] asterisk[32518]: segfault at f0830b9a ip 00007ff114d21dcc sp 00007ffcf869c320 error 4 in libc-2.19.so[7ff114cd7000+1a1000]
Dec 13 09:43:18 debian kernel: [36447.913482] asterisk[32573]: segfault at f4c81b9a ip 00007fa8191b3dcc sp 00007ffcdaa13950 error 4 in libc-2.19.so[7fa819169000+1a1000]

tail -f /var/log/asterisk/freepbx.log

[2020-Dec-13 09:46:02] [CRITICAL] (admin/bootstrap.php:260) - Connection attmempt to AMI failed
[2020-Dec-13 09:46:02] [CRITICAL] (admin/bootstrap.php:260) - Connection attmempt to AMI failed
[2020-Dec-13 09:47:02] [CRITICAL] (admin/bootstrap.php:260) - Connection attmempt to AMI failed
[2020-Dec-13 09:47:02] [freepbx.INFO]: Deprecated way to add Console commands for module pm2, adding console commands this way can have negative performance impacts. 
Please use module.xml. 

Result after manually called /usr/sbin/asterisk -U asterisk -G asterisk
All errors are gone and asterisk does not crash
ps -auxf | grep asterisk

asterisk   917  0.9  6.0 1638340 61896 ?       Ssl  09:47   0:15 /usr/sbin/asterisk -U asterisk -G asterisk

Result after fwconsole restart —verbose

  Running FreePBX shutdown...
  Core FastAGI Server is not running
  Shutting down Asterisk Gracefully. Will forcefully kill after 30 seconds.
  Press C to Cancel
  Press N to shut down NOW
  [============================] < 1 sec
  Running FreePBX startup...
  Starting Asterisk...
  [--------------->------------] 31 secs
  In Start.class.php line 191:                                                  
  [Exception]                                   
  Unable to connect to Asterisk. Did it start?  
                                                     
  Exception trace:
  () at /var/www/html/admin/libraries/Console/Start.class.php:191
  FreePBX\Console\Command\Start->startAsterisk() at /var/www/html/admin/libraries/Console/Start.class.php:131
  FreePBX\Console\Command\Start->execute() at /var/www/html/admin/libraries/Console/Restart.class.php:33
  FreePBX\Console\Command\Restart->execute() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Command/Command.php:255
  Symfony\Component\Console\Command\Command->run() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php:960
  Symfony\Component\Console\Application->doRunCommand() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php:255
  Symfony\Component\Console\Application->doRun() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php:148
  Symfony\Component\Console\Application->run() at /var/lib/asterisk/bin/fwconsole:164

Output crash core report
crashreports.tgz (33.2 KB)

Any recommendations to solve this issue?
Thanks in advance.

Kind regards,
Markus

Probably a hardware issue. Maybe a failing disk or ram module?

Try this

I have tested this setup on a mac host with vmware and on a linux host with virtualbox. So on both machines i should have a hardware issue?

And i have also tested a clean 13.38.0 / freepbx setup on the vm environment without any issues.

Do you have any other suggestions?
Right now I’m standing in line.

Thanks in advance!

Well, you have

Dec 13 09:43:09 debian kernel: [36439.246872] asterisk[32459]: segfault at 60391b9a ip 00007f4c8f93edcc sp 00007ffc8ef901b0 error 4 in libc-2.19.so[7f4c8f8f4000+1a1000]

pointing at libc (2.19) , that seems to be the Ubuntu 18.4, I would try Debian, recipes in the wiki, I never had a problem.

Also Asterisk 13 is a little long in the tooth, so start off by trying a newer version of Asterisk first

https://downloads.asterisk.org/pub/telephony/asterisk/?C=N;O=D

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