[asterisk-users] [SOLVED] Re: Feature Request: what about "core stop panic" ?

George Joseph gjoseph at digium.com
Tue Sep 6 07:37:52 CDT 2016


On Tue, Sep 6, 2016 at 1:55 AM, Olivier <oza.4h07 at gmail.com> wrote:

> Hello,
>
> After testing "pkill -SEGV -f /usr/sbin/asterisk" on Debian Jessie
> platform, I've got several questions :
>
>
> 1.  When I issue a "cd /tmp; asterisk -cvvvvvvvvvvvg -U asterisk -G
> asterisk" command, and then issue a "pkill -SEGV asterisk" command,
> I can read on Asterisk console:
> *CLI> Segmentation error (core dumped)
> (*) I translated into english the exact output I got.
>
> I see a /tmp/core file exists.
>
> My asterisk.conf includes:
> full = verbose,notice,warning,error,debug
>
> After Asterisk's stop, my /var/log:asterisk/full doesn't include any
> mention to Segmentation error.
> I cannot find anything in dmesg, /var/log/messages or /var/log/kern.log as
> I did when a real segmentation fault occurred on production system.
>
> I would expect Asterisk to log something.
> Is this expected behaviour ?
>

Yes.  Asterisk can't really log anything when it ends abruptly because of
critical signals like SEGV and since it was user initiated, rather than an
actual SEGV, there won't be a message in the kernel log buffer.


>
>
> 2. When I issue a "cd /tmp; systemctl start asterisk" command, and then
> issue a "pkill -SEGV asterisk" command,
> I can read on Asterisk console:
> Disconnected from Asterisk server
> Asterisk cleanly ending (0).
> Executing last minute cleanups
>
> I cannot find any core file anyware.
>
> File /var/log:asterisk/full doesn't include any mention to Segmentation
> error.
>
> Where should core file be created when Asterisk is run as a daemon by
> asterisk user and group ?
> Is there a setting I can use to specify the directory used (so that we can
> make sure appropriate ownership is set) ?
>

"$ sysctl kernel.core_pattern" will show you where core files are written.
For Asterisk to produce the core file, it has to be started with the '-g'
option so make sure your asterisk.service file is adding the option.



>
> Cheers
>
>
> 2016-09-05 13:36 GMT+02:00 Olivier <oza.4h07 at gmail.com>:
>
>>
>>
>> 2016-09-02 20:40 GMT+02:00 George Joseph <gjoseph at digium.com>:
>>
>>>
>>>
>>> On Fri, Sep 2, 2016 at 9:34 AM, Olivier <oza.4h07 at gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> I had a recent case where Asterisk stopped due to a segfault.
>>>> This reminded me that being sure that whenever such issue occurs, it's
>>>> useful to have a core file or various data at hand to analyze and exchange
>>>> with support teams.
>>>>
>>>> How can you double check a running Asterisk system would produce such
>>>> data if a segfault arrises ?
>>>>
>>>> 1. To my knowledge, no tool exists for this. Is it correct ?
>>>> 2. If such tool do not exist, what would you say about something like
>>>> "core stop panic", "core stop segfault" or whatever ?
>>>>
>>>
>>>
>>> How about just running "pkill -SEGV -f /usr/sbin/asterisk" from the
>>> shell?
>>>
>>
>> It seems to comply to what I'm after.
>> Thank you very for sharing this here.
>>
>>
>>
>>
>>> Works for me.
>>>
>>>
>>>
>>>>
>>>> Best Regards
>>>>
>>>>
>>>>
>>>> --
>>>> _____________________________________________________________________
>>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>>
>>>> Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
>>>>       http://www.asterisk.org/community/astricon-user-conference
>>>>
>>>> New to Asterisk? Start here:
>>>>       https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>>>
>>>> asterisk-users mailing list
>>>> To UNSUBSCRIBE or update options visit:
>>>>    http://lists.digium.com/mailman/listinfo/asterisk-users
>>>>
>>>
>>>
>>>
>>> --
>>> George Joseph
>>> Digium, Inc. | Software Developer
>>> 445 Jan Davis Drive NW - Huntsville, AL 35806 - US
>>> Check us out at: www.digium.com & www.asterisk.org
>>>
>>>
>>> --
>>> _____________________________________________________________________
>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>
>>> Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
>>>       http://www.asterisk.org/community/astricon-user-conference
>>>
>>> New to Asterisk? Start here:
>>>       https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>>
>>> asterisk-users mailing list
>>> To UNSUBSCRIBE or update options visit:
>>>    http://lists.digium.com/mailman/listinfo/asterisk-users
>>>
>>
>>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
>       http://www.asterisk.org/community/astricon-user-conference
>
> New to Asterisk? Start here:
>       https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
George Joseph
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160906/58b1b85d/attachment.html>


More information about the asterisk-users mailing list