<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2016-09-06 14:37 GMT+02:00 George Joseph <span dir="ltr"><<a target="_blank" href="mailto:gjoseph@digium.com">gjoseph@digium.com</a>></span>:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="gmail-">On Tue, Sep 6, 2016 at 1:55 AM, Olivier <span dir="ltr"><<a target="_blank" href="mailto:oza.4h07@gmail.com">oza.4h07@gmail.com</a>></span> wrote:<br></span><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div dir="ltr"><div><div><div><div><div><div><div><div>Hello,<br><br></div><span class="gmail-">After testing <span>"pkill -SEGV -f /usr/sbin/asterisk" on Debian Jessie platform, I've got several questions :<br><br><br></span></span></div><span class="gmail-"><span>1. When I issue a "cd /tmp; asterisk -cvvvvvvvvvvvg -U asterisk -G asterisk" command, and then issue a "pkill -SEGV asterisk" command,<br></span></span></div><span class="gmail-"><span>I can read on Asterisk console:<br>*CLI> Segmentation error (core dumped)<br></span></span></div><span class="gmail-"><span>(*) I translated into english the exact output I got.<br><br></span></span></div><span class="gmail-"><div><span>I see a /tmp/core file exists.<br></span></div><div><span><br></span></div><span>My asterisk.conf includes:<br>full = verbose,notice,warning,error,d<wbr>ebug<br><br></span></span></div><span class="gmail-"><span>After Asterisk's stop, my /var/log:asterisk/full doesn't include any mention to Segmentation error.<br></span></span></div><span class="gmail-"><div><span>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.<br></span></div><div><span><br></span></div><span>I would expect Asterisk to log something.<br></span></span></div><span class="gmail-"><div><span>Is this expected behaviour ?<br></span></div></span></div></blockquote><div><br></div><div>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.</div><span class="gmail-"><div> </div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div dir="ltr"><div><span><br><br>2. </span><span>When I issue a "cd /tmp; systemctl start asterisk" command, and then issue a "pkill
-SEGV asterisk" command,<br></span><span>I can read on Asterisk console:<br>Disconnected from Asterisk server<br>Asterisk cleanly ending (0).<br>Executing last minute cleanups<br><br></span></div><span></span><div><div><div><div><div><span>I cannot find any core file anyware.<br><br></span></div><div><span>File </span><span>/var/log:asterisk/full doesn't include any mention to Segmentation error.<br><br></span></div><div><span>Where should core file be created when Asterisk is run as a daemon by asterisk user and group ?<br></span></div><div><span>Is there a setting I can use to specify the directory used (so that we can make sure appropriate ownership is set) ?<br></span></div></div></div></div></div></div></blockquote><div><br></div></span><div>"$ 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. </div><div><div class="gmail-h5"><div><br></div></div></div></div></div></div></blockquote><div><br></div><div>My system shows:<br># ps aux | grep asteri<br>asterisk 429 7.3 2.4 59468 25088 ? Ssl 18:47 0:03 /usr/sbin/asterisk -U asterisk -G asterisk -g<br>...<br># sysctl kernel.core_pattern<br>kernel.core_pattern = core<br><br></div><div>Option -g is present.<br></div><div><br></div><div>So either, the "pkill -SEGV asterisk" command doesn't trigger any coredump "<span class="gmail-"><span>Asterisk cleanly ending (0)",<br></span></span></div><div><span class="gmail-"><span>either the core dump is not produced (find / -name "core.*" doesn't find anything) for some reason.<br></span></span></div><div> </div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="gmail-h5"><div></div><div> </div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div dir="ltr"><div><div><div><div><div><span><br></span></div><div><span>Cheers<br></span></div><div><span><br> </span></div></div></div></div></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2016-09-05 13:36 GMT+02:00 Olivier <span dir="ltr"><<a target="_blank" href="mailto:oza.4h07@gmail.com">oza.4h07@gmail.com</a>></span>:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>2016-09-02 20:40 GMT+02:00 George Joseph <span dir="ltr"><<a target="_blank" href="mailto:gjoseph@digium.com">gjoseph@digium.com</a>></span>:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Fri, Sep 2, 2016 at 9:34 AM, Olivier <span dir="ltr"><<a target="_blank" href="mailto:oza.4h07@gmail.com">oza.4h07@gmail.com</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div dir="ltr"><div><div><div>Hello,<br><br></div>I had a recent case where Asterisk stopped due to a segfault.<br></div>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.<br><br></div><div>How can you double check a running Asterisk system would produce such data if a segfault arrises ?<br></div><div><br>1. To my knowledge, no tool exists for this. Is it correct ?<br></div><div>2. If such tool do not exist, what would you say about something like "core stop panic", "core stop segfault" or whatever ?<br></div></div></blockquote><div><br></div><div><br></div></span><div>How about just running "pkill -SEGV -f /usr/sbin/asterisk" from the shell?</div></div></div></div></blockquote></span><div><br>It seems to comply to what I'm after.<br></div><div>Thank you very for sharing this here.<br><br></div><div><div><div><br></div><div> </div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Works for me.</div><div><br></div><div> </div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div dir="ltr"><div><br></div><div>Best Regards<br></div><div><br><br></div></div>
<br>--<br>
______________________________<wbr>______________________________<wbr>_________<br>
-- Bandwidth and Colocation Provided by <a target="_blank" rel="noreferrer" href="http://www.api-digital.com">http://www.api-digital.com</a> --<br>
<br>
Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016<br>
<a target="_blank" rel="noreferrer" href="http://www.asterisk.org/community/astricon-user-conference">http://www.asterisk.org/commun<wbr>ity/astricon-user-conference</a><br>
<br>
New to Asterisk? Start here:<br>
<a target="_blank" rel="noreferrer" href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started">https://wiki.asterisk.org/wiki<wbr>/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a target="_blank" rel="noreferrer" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailm<wbr>an/listinfo/asterisk-users</a><span><font color="#888888"><br></font></span></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><span style="font-size:12.8px">George Joseph</span><br style="font-size:12.8px"><span style="font-size:12.8px">Digium, Inc. | Software Developer</span><span style="font-size:12.8px"><br>445 Jan Davis Drive NW - Huntsville, AL 35806 - US<br></span><span style="font-size:12.8px">Check us out at: </span><a target="_blank" style="color:rgb(17,85,204);font-size:12.8px" rel="noreferrer" href="http://www.digium.com/">www.digium.com</a><span style="font-size:12.8px"> & </span><a target="_blank" style="color:rgb(17,85,204);font-size:12.8px" rel="noreferrer" href="http://www.asterisk.org/">www.aster<wbr>isk.org</a><br><div><br></div></div></div>
</font></span></div></div>
<br>--<br>
______________________________<wbr>______________________________<wbr>_________<br>
-- Bandwidth and Colocation Provided by <a target="_blank" rel="noreferrer" href="http://www.api-digital.com">http://www.api-digital.com</a> --<br>
<br>
Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016<br>
<a target="_blank" rel="noreferrer" href="http://www.asterisk.org/community/astricon-user-conference">http://www.asterisk.org/commun<wbr>ity/astricon-user-conference</a><br>
<br>
New to Asterisk? Start here:<br>
<a target="_blank" rel="noreferrer" href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started">https://wiki.asterisk.org/wiki<wbr>/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a target="_blank" rel="noreferrer" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailm<wbr>an/listinfo/asterisk-users</a><br></blockquote></div></div></div><br></div></div>
</blockquote></div><br></div>
</div></div><br>--<br>
______________________________<wbr>______________________________<wbr>_________<br>
-- Bandwidth and Colocation Provided by <a target="_blank" rel="noreferrer" href="http://www.api-digital.com">http://www.api-digital.com</a> --<br>
<br>
Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016<br>
<a target="_blank" rel="noreferrer" href="http://www.asterisk.org/community/astricon-user-conference">http://www.asterisk.org/commun<wbr>ity/astricon-user-conference</a><br>
<br>
New to Asterisk? Start here:<br>
<a target="_blank" rel="noreferrer" href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started">https://wiki.asterisk.org/wiki<wbr>/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a target="_blank" rel="noreferrer" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailm<wbr>an/listinfo/asterisk-users</a><br></blockquote></div></div></div><div><div class="gmail-h5"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><span style="font-size:12.8px">George Joseph</span><br style="font-size:12.8px"><span style="font-size:12.8px">Digium, Inc. | Software Developer</span><span style="font-size:12.8px"><br>445 Jan Davis Drive NW - Huntsville, AL 35806 - US<br></span><span style="font-size:12.8px">Check us out at: </span><a target="_blank" style="color:rgb(17,85,204);font-size:12.8px" rel="noreferrer" href="http://www.digium.com/">www.digium.com</a><span style="font-size:12.8px"> & </span><a target="_blank" style="color:rgb(17,85,204);font-size:12.8px" rel="noreferrer" href="http://www.asterisk.org/">www.<wbr>asterisk.org</a><br><div><br></div></div></div>
</div></div></div></div>
<br>--<br>
______________________________<wbr>______________________________<wbr>_________<br>
-- Bandwidth and Colocation Provided by <a target="_blank" rel="noreferrer" href="http://www.api-digital.com">http://www.api-digital.com</a> --<br>
<br>
Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016<br>
<a target="_blank" rel="noreferrer" href="http://www.asterisk.org/community/astricon-user-conference">http://www.asterisk.org/<wbr>community/astricon-user-<wbr>conference</a><br>
<br>
New to Asterisk? Start here:<br>
<a target="_blank" rel="noreferrer" href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started">https://wiki.asterisk.org/<wbr>wiki/display/AST/Getting+<wbr>Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a target="_blank" rel="noreferrer" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/<wbr>mailman/listinfo/asterisk-<wbr>users</a><br></blockquote></div><br></div></div>