I've been experiencing some crashes in Asterisk in the past few weeks. I haven't been able to find out why as gdb shows it's in a different function every time. But, in the meantime, I've been using safe_asterisk hoping that it would simply restart Asterisk by itself. It doesn't seem to do that. Whenever Asterisk crashed, the list of processes doesn't show asterisk or safe_asterisk running anymore. I do not get an e-mail notification and the core dumped is in the standard format
e.g. core.18875 not core.`hostname`-`date -Iseconds`. Does anyone know what I could do to troubleshoot this since I can't really force a crash to see what the script is doing? I have the following variables set in safe_asterisk:
<br><br>#!/bin/sh<br>CLIARGS="$*" # Grab any args passed to safe_asterisk<br>TTY=9 # TTY (if you want one) for Asterisk to run on<br>CONSOLE=no # Whether or not you want a console
<br>NOTIFY=<a href="mailto:myemail@mydomain.com">myemail@mydomain.com</a> # Who to notify about crashes<br>DUMPDROP=/tmp<br><br>I also noticed the line <br>"elif [ $EXITSTATUS -gt 128 ];"<br>inside the script yet my cores show:
<br>"Core was generated by `asterisk -vvvg'.<br>Program terminated with signal 11, Segmentation fault."<br>so perhaps that is why the restart is not triggered?<br><br>