Asterisk restarts after giving message 'Segmentation fault'

Currently I’m running asterisk-1.8.4. I wrote an AGI which gets the parameters from dial plan and use these parameters to execute another application and the application I’m trying to run is Qpage.

Here is my case; using AMI, I’m receiving data request from a client which sends the parameters/values for Qpage via dialplan. In the dialplan I called an AGI(written in perl) which gets the values from dial plan and sets these values for Qpage to send paging messages. This case works great if the event is triggered one by one, means second processing starts if first one processed successfully. But in case if the event is triggered more than one times concurrently, after processing any on event where second event is under processing, asterisk restarts itself. The messages I’m getting after asterisk restarts is listed below;

Disconnected from Asterisk server
/usr/sbin/safe_asterisk: line 145: 24983 Segmentation fault (core dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} > /dev/${TTY} 2>&1 < /dev/${TTY}
Asterisk ended with exit status 139
Asterisk exited on signal 11.
Executing last minute cleanups

The hardware I’m using for Qpage is Dialogic Diva UM PRI T1 card for modem communication. And I unload the from asterisk modules.conf in case asterisk does not consumes all channels.

Please advise at earliest to stop asterisk to restart again. Further added, I’ll share the script as per FYI.

Start Asterisk directly, rather than from safe_asterisk :smile: It will then stop dead when it crashes. It is safe_asterisk that is restarting it.

Seriously, follow the instructions at … +Backtrace

Compiling with no optimisation is important. If you don’t do it, it is unlikely that anyone will look at your bug report. Most packaged binaries are not suitable for this.

Please note that such bugs can be difficult to trace and you should not expect quick results. If you need that, you will need to pay for support.

As I tested out, I observed that asterisk is not crashing by itself, the AGI I wrote is crashing the asterisk. It only happens when concurrent requests are made. Shall I send my code so you may pin point the problem?

No. I do not have the time to do detailed investigations.

Nothing an AGI script does should be able to crash Asterisk.