I am running Asterisk 1.4.5 and addons 1.4.1 in a CentOS 5 Server. My PBX has experienced several core dumps the last couple of days and I am not sure if this is what's causing it, but it always seems to happen when a particular extension on a grandstream phone uses ChanSpy SIP group. I have not been able to locate where the core dump file is being saved. I can't find it in my TMP directory. I would also like to know if Asterisk can be setup to automatically re start if there is a core dump. I was thinking of setting up a cron job to launch Asterisk every minute. If it's running, no harm done, and if it crashes, the cron job will make sure that it's started every 60 seconds. Any suggestions? Thank you Ed Nu?ez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070626/fde1713a/attachment.htm
> I would also like to know if Asterisk can be setup to automatically restart if there is a core dump. Sure! You should already have the required script. Just run it from safe_asterisk. Here is a link with more info: http://www.asteriskdocs.org/modules/tinycontent/content/docbook/current/docs -html/x389.html John -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070626/723c7df9/attachment.htm
use the safe_asterisk script it will restart asterisk if it crashes and it enables core dumps (your core size limit is probably set to 0 when you start asterisk). From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Ed Nu?ez Sent: Tuesday, June 26, 2007 2:22 PM To: Asterisk Users Mailing List - Non-Commercial Discussion; asterisk-users-bounces at lists.digium.com Subject: [asterisk-users] kore dump I am running Asterisk 1.4.5 and addons 1.4.1 in a CentOS 5 Server. My PBX has experienced several core dumps the last couple of days and I am not sure if this is what's causing it, but it always seems to happen when a particular extension on a grandstream phone uses ChanSpy SIP group. I have not been able to locate where the core dump file is being saved. I can't find it in my TMP directory. I would also like to know if Asterisk can be setup to automatically re start if there is a core dump. I was thinking of setting up a cron job to launch Asterisk every minute. If it's running, no harm done, and if it crashes, the cron job will make sure that it's started every 60 seconds. Any suggestions? Thank you Ed Nu?ez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070626/53a3ca96/attachment.htm
On 6/26/07, Ed Nu?ez <enunez at netoneint.com> wrote:> I have not been able to locate where the core dump file is being saved. I > can't find it in my TMP directory.Check the directory in which you're starting Asterisk. It doesn't sound like you're using the Red Hat initscript to start Asterisk, so you're probably starting it manually. I'd check there first.> I would also like to know if Asterisk can be setup to automatically re start > if there is a core dump. I was thinking of setting up a cron job to launch > Asterisk every minute. If it's running, no harm done, and if it crashes, > the cron job will make sure that it's started every 60 seconds.Check out the safe_asterisk script that's installed with Asterisk. Again, I recommend you check out the initscript, which calls safe_asterisk and restarts Asterisk if it crashes. It also ensures that your core dumps end up in /tmp where you can find them more easily. On Red Hat and CentOS, you can install the initscript by typing "make config" in the Asterisk source directory. -Jared
Ed, I am having a problem with Asterisk frequently crashing on me as well. I just run it under supervise: http://cr.yp.to/daemontools/supervise.html This way it will be restarted if svc determines it isn't running. Eric On Tue, 2007-06-26 at 13:22 -0500, Ed Nu?ez wrote:> I am running Asterisk 1.4.5 and addons 1.4.1 in a CentOS 5 Server. > > > > My PBX has experienced several core dumps the last couple of days and > I am not sure if this is what?s causing it, but it always seems to > happen when a particular extension on a grandstream phone uses ChanSpy > SIP group. > > > > I have not been able to locate where the core dump file is being > saved. I can?t find it in my TMP directory. > > > > I would also like to know if Asterisk can be setup to automatically re > start if there is a core dump. I was thinking of setting up a cron > job to launch Asterisk every minute. If it?s running, no harm done, > and if it crashes, the cron job will make sure that it?s started every > 60 seconds. > > > > Any suggestions? > > > > > > Thank you > > > > Ed Nu?ez > > > _______________________________________________ > --Bandwidth and Colocation Provided by http://www.api-digital.com-- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-- Eric Lubow LinkExperts, Inc. Systems Administrator e: elubow at linkexperts.com w: www.linkexperts.com p: 212.542.5201
For anyone interested on the crashes I was experiencing when using ChanSpy from SIP extension to SIP extensions with the group option. For the last couple of days, I?ve been monitoring from Zap extensions to SIP extensions, and the system has not crashed once. The problem only happens when I spy from SIP. From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Vadim Berezniker Sent: Tuesday, June 26, 2007 2:36 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] kore dump use the safe_asterisk script it will restart asterisk if it crashes and it enables core dumps (your core size limit is probably set to 0 when you start asterisk). From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Ed Nu?ez Sent: Tuesday, June 26, 2007 2:22 PM To: Asterisk Users Mailing List - Non-Commercial Discussion; asterisk-users-bounces at lists.digium.com Subject: [asterisk-users] kore dump I am running Asterisk 1.4.5 and addons 1.4.1 in a CentOS 5 Server. My PBX has experienced several core dumps the last couple of days and I am not sure if this is what?s causing it, but it always seems to happen when a particular extension on a grandstream phone uses ChanSpy SIP group. I have not been able to locate where the core dump file is being saved. I can?t find it in my TMP directory. I would also like to know if Asterisk can be setup to automatically re start if there is a core dump. I was thinking of setting up a cron job to launch Asterisk every minute. If it?s running, no harm done, and if it crashes, the cron job will make sure that it?s started every 60 seconds. Any suggestions? Thank you Ed Nu?ez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070629/62e1f186/attachment.htm
Ed Nu?ez wrote:> For anyone interested on the crashes I was experiencing when using > ChanSpy from SIP extension to SIP extensions with the group option. For > the last couple of days, I?ve been monitoring from Zap extensions to SIP > extensions, and the system has not crashed once. The problem only > happens when I spy from SIP.First, just to be safe, give 1.4.6 a try. If you still have a problem, please report it to bugs.digium.com We would be happy to help figure it out and get it fixed. To get the backtrace: 1) Run "make menuselect", go to "Compiler Flags", select "DONT_OPTIMIZE". 2) # make clean ; make ; make install 3) Run asterisk with the -g argument 4) gdb /usr/sbin/asterisk core.12345 4.i) (gdb) bt 4.ii) (gdb) bt full -- Russell Bryant Software Engineer Digium, Inc.