<div dir="ltr"><div><div><div><div><div><div><div><div>I think were getting closer:<br><br></div>I did:<br></div>- I edited /etc/default/asterisk to include :<br>AST_USER="root"<br>AST_GROUP="root"<br><br></div># systemctl daemon-reload<br></div># systemctl start asterisk<br># ps aux | grep asterisk<br>root      3602  7.1  2.5  60332 26012 ?        Ssl  16:00   0:03 /usr/sbin/asterisk -U root -G root -g<br></div><div># rasterisk<br></div><div># pkill -SEGV asterisk<br><br></div>Then console showed:<br></div>Segmentation error (core dumped)<br></div><br></div>and a /core file is created<br><div><div><br><br></div><div>I also tried with asterisk run asterisk user and group and looked for any newly created (find / -cmin -2) : nothing looking like a core file, though I might overlooked it.<br></div><div><div><div><div><br><div>So, it really look like a configuration issue: "how to specify, with asterisk and systemd among others, where core files are dumped ?".<br></div><div><br>I'll read again this thread advices and report back here.<br></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-09-07 21:44 GMT+02:00 George Joseph <span dir="ltr"><<a href="mailto:gjoseph@digium.com" target="_blank">gjoseph@digium.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Sep 7, 2016 at 11:15 AM, Olivier <span dir="ltr"><<a href="mailto:oza.4h07@gmail.com" target="_blank">oza.4h07@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>2016-09-06 17:48 GMT+02:00 Tzafrir Cohen <span dir="ltr"><<a href="mailto:tzafrir.cohen@xorcom.com" target="_blank">tzafrir.cohen@xorcom.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"><span>On Tue, Sep 06, 2016 at 06:37:52AM -0600, George Joseph wrote:<br>
> On Tue, Sep 6, 2016 at 1:55 AM, Olivier <<a href="mailto:oza.4h07@gmail.com" target="_blank">oza.4h07@gmail.com</a>> wrote:<br>
<br>
</span><span>> > Where should core file be created when Asterisk is run as a daemon by<br>
> > asterisk user and group ?<br>
> > Is there a setting I can use to specify the directory used (so that we can<br>
> > make sure appropriate ownership is set) ?<br>
> ><br>
><br>
> "$ sysctl kernel.core_pattern" will show you where core files are written.<br>
> For Asterisk to produce the core file, it has to be started with the '-g'<br>
> option so make sure your asterisk.service file is adding the option.<br></span></blockquote><div><br></div></span><div>My asterisk.service is :<br><br># cat /run/systemd/generator.late/as<wbr>terisk.service <br># Automatically generated by systemd-sysv-generator<br><br>[Unit]<br>SourcePath=/etc/init.d/asteris<wbr>k<br>Description=LSB: Asterisk PBX<br>Before=runlevel2.target runlevel3.target runlevel4.target runlevel5.target shutdown.target<br>After=network-online.target systemd-journald-dev-log.socke<wbr>t nss-lookup.target local-fs.target remote-fs.target dahdi.service misdn.service lcr.service wanrouter.service mysql.service postgresql.service<br>Wants=network-online.target<br>Conflicts=shutdown.target<br><br>[Service]<br>Type=forking<br>Restart=no<br>TimeoutSec=5min<br>IgnoreSIGPIPE=no<br>KillMode=process<br>GuessMainPID=no<br>RemainAfterExit=yes<br>SysVStartPriority=2<br>ExecStart=/etc/init.d/asterisk start<br>ExecStop=/etc/init.d/asterisk stop<br>ExecReload=/etc/init.d/asteris<wbr>k reload<br><br><br></div><div>My /etc/init.d/asterisk file is sourcing my /etc/default/asterisk which includes an (uncommented) line COREDUMP=yes.<br></div><div>I also have<br># grep core /etc/asterisk/asterisk.conf <br>dumpcore = yes<br></div><div><br></div><div>make menuselect shows:<br>[*] DONT_OPTIMIZE<br>[*] COMPILE_DOUBLE<br>[ ] DEBUG_THREADS<br>[*] LOADABLE_MODULES<br>[ ] DEBUG_FD_LEAKS<br>[*] BETTER_BACKTRACES<br>[ ] LOTS_OF_SPANS<br>[ ] MALLOC_DEBUG<br>[ ] DEBUG_CHAOS<br>[*] BUILD_NATIVE<br>    --- Extended ---<br>[ ] REF_DEBUG<br>[ ] AO2_DEBUG<br>[ ] STATIC_BUILD<br>XXX REBUILD_PARSERS<br>[ ] LOW_MEMORY<br>[ ] DISABLE_INLINE<br>[*] OPTIONAL_API<br>XXX USE_HOARD_ALLOCATOR<br>[ ] RADIO_RELAX<br>[ ] G711_NEW_ALGORITHM<br>< > G711_REDUCED_BRANCHING<br>< > TEST_CODING_TABLES<br>< > TEST_TANDEM_TRANSCODING<br>[ ] ADDRESS_SANITIZER<br>[ ] THREAD_SANITIZER<br>[ ] LEAK_SANITIZER<br>[ ] UNDEFINED_SANITIZER<br>[ ] BUSYDETECT_TONEONLY<br>[ ] BUSYDETECT_COMPARE_TONE_AND_SI<wbr>LENCE<br>[ ] BUSYDETECT_DEBUG<br>[ ] INTEGER_CALLERID<br><br></div><div> <br></div><div>Is there a way to read Compiler Flags from a running system without looking at source file directory ?<br><br>If someone forgets to select appropriate Compiler Flags, does it prevent Asterisk to produce a core file (even an empty one) ?<br></div></div></div></div></blockquote><div><br></div></div></div><div>If -g is specified a core file should always be produced.  See my earlier reply.  I think one is being produced, it's just not where you think it should be. :)</div><div><div class="h5"><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><span><div><br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><span>
<br>
</span>Specifically, if the first character of core_pattern is '!', the rest<br>
should be an executable, to which the core file is handled. IIRC Centos7<br>
had something of that type installed by default. On Debian Stable you<br>
have the package corekeeper (or maybe also systemd-coredump from<br>
backports). I haven't tried any of those.<br>
<span><font color="#888888"><br>
--<br>
               Tzafrir Cohen<br>
icq#16849755              <a href="mailto:jabber%3Atzafrir.cohen@xorcom.com" target="_blank">jabber:tzafrir.cohen@xorcom.co<wbr>m</a><br>
<a value="+972507952406" href="tel:%2B972-50-7952406" target="_blank">+972-50-7952406</a>           mailto:<a href="mailto:tzafrir.cohen@xorcom.com" target="_blank">tzafrir.cohen@xorcom.c<wbr>om</a><br>
<a rel="noreferrer" href="http://www.xorcom.com" target="_blank">http://www.xorcom.com</a><br>
</font></span><div><div><br>
--<br>
______________________________<wbr>______________________________<wbr>_________<br>
-- Bandwidth and Colocation Provided by <a rel="noreferrer" href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016<br>
      <a rel="noreferrer" href="http://www.asterisk.org/community/astricon-user-conference" target="_blank">http://www.asterisk.org/commun<wbr>ity/astricon-user-conference</a><br>
<br>
New to Asterisk? Start here:<br>
      <a rel="noreferrer" href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" target="_blank">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 rel="noreferrer" href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailm<wbr>an/listinfo/asterisk-users</a><br>
</div></div></blockquote></span></div><br></div></div>
<br>--<br>
______________________________<wbr>______________________________<wbr>_________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016<br>
      <a href="http://www.asterisk.org/community/astricon-user-conference" rel="noreferrer" target="_blank">http://www.asterisk.org/commun<wbr>ity/astricon-user-conference</a><br>
<br>
New to Asterisk? Start here:<br>
      <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">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 href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailm<wbr>an/listinfo/asterisk-users</a><br></blockquote></div></div></div><br><br clear="all"><span class=""><div><br></div>-- <br><div data-smartmail="gmail_signature"><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 href="http://www.digium.com/" rel="noreferrer" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">www.digium.com</a><span style="font-size:12.8px"> & </span><a href="http://www.asterisk.org/" rel="noreferrer" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">www.<wbr>asterisk.org</a><br><div><br></div></div></div>
</span></div></div>
<br>--<br>
______________________________<wbr>______________________________<wbr>_________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016<br>
      <a href="http://www.asterisk.org/community/astricon-user-conference" rel="noreferrer" target="_blank">http://www.asterisk.org/<wbr>community/astricon-user-<wbr>conference</a><br>
<br>
New to Asterisk? Start here:<br>
      <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">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 href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/<wbr>mailman/listinfo/asterisk-<wbr>users</a><br></blockquote></div><br></div>