[Home]

Summary:ASTERISK-12988: Asterisk restarted automatically
Reporter:sajumurali (sajumurali)Labels:
Date Opened:2008-10-30 02:36:44Date Closed:2011-06-07 14:10:25
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Addons/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:When I start my asterisk the following error has been shown repeatedly:

[root@ace7 ~]# /usr/sbin/safe_asterisk: line 125: 20703 Segmentation fault      (core dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} >&/dev/${TTY} < /dev/${TTY}
Asterisk ended with exit status 139
Asterisk exited on signal 11.
Automatically restarting Asterisk.
mpg123: no process killed
/usr/sbin/safe_asterisk: line 125: 20774 Segmentation fault      (core dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} >&/dev/${TTY} < /dev/${TTY}
Asterisk ended with exit status 139
Asterisk exited on signal 11.
Automatically restarting Asterisk.

Is at any problem of the safe_asterisk file? If yes where is the problem? I added the file safe_asterisk as additional information.  Please take it as an urgent matter and give me an early reply.

Thanks

****** ADDITIONAL INFORMATION ******

124 run_asterisk()
125 {
126         while :; do
127
128                 if [ "$TTY" != "" ]; then
129                         cd /tmp
130                         stty sane < /dev/${TTY}
131                         nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} >& /dev/${TTY} < /dev/${TTY}
132                 else
133                         cd /tmp
134                         nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS}
135                 fi
136                 EXITSTATUS=$?
137                 echo "Asterisk ended with exit status $EXITSTATUS"
138                 if [ "$EXITSTATUS" = "0" ]; then
139                         # Properly shutdown....
140                         echo "Asterisk shutdown normally."
141                         exit 0
142                 elif [ $EXITSTATUS -gt 128 ]; then
143                         let EXITSIGNAL=EXITSTATUS-128
144                         echo "Asterisk exited on signal $EXITSIGNAL."
145                         if [ "$NOTIFY" != "" ]; then
146                                 echo "Asterisk on $MACHINE exited on signal $EXITSIGNAL.  Might want to take a peek." | \
147                                 mail -s "Asterisk Died" $NOTIFY
148                         fi
149                         if [ "$EXEC" != "" ]; then
150                                 $EXEC
151                         fi
152
153                         PID=`cat ${ASTPIDFILE}`
154                         if [ -f /tmp/core.${PID} ]; then
155                                 mv /tmp/core.${PID} ${DUMPDROP}/core.`hostname`-`date -Iseconds` &
156                         elif [ -f /tmp/core ]; then
157                                 mv /tmp/core ${DUMPDROP}/core.`hostname`-`date -Iseconds` &
158                         fi
159                 else
160                         echo "Asterisk died with code $EXITSTATUS."
161
162                         PID=`cat ${ASTPIDFILE}`
163                         if [ -f /tmp/core.${PID} ]; then
164                                 mv /tmp/core.${PID} ${DUMPDROP}/core.`hostname`-`date -Iseconds` &
165                         elif [ -f /tmp/core ]; then
166                                 mv /tmp/core ${DUMPDROP}/core.`hostname`-`date -Iseconds` &
167                         fi
168                 fi
169                 echo "Automatically restarting Asterisk."
170                 sleep $SLEEPSECS
171                 if [ $KILLALLMPG123 ]
172                 then
173                         killall -9 mpg123
174                 fi
175         done
176 }
177
178 run_asterisk &


                                                           

Comments:By: Eliel Sardanons (eliel) 2008-10-30 05:17:38

It looks like asterisk is crashing, what happen if you run it like:
/usr/sbin/asterisk -g
?
If it crashes please upload the backtrace of the generated coredump.

By: David Woolley (davidw) 2008-10-30 06:53:30

safe_asterisk already runs it with dumps enabled, and places them in /tmp/

By: sajumurali (sajumurali) 2008-10-31 03:22:19

Thanks to all for reading this and giving valuable information.
Just forget this I re installed the asterisk and the problem is solved now its working..

Thank you for all..........

By: Eliel Sardanons (eliel) 2008-10-31 03:36:37

closed per user request.