[asterisk-users] [SOLVED] Re: Feature Request: what about "core stop panic" ?
George Joseph
gjoseph at digium.com
Wed Sep 7 14:44:17 CDT 2016
On Wed, Sep 7, 2016 at 11:15 AM, Olivier <oza.4h07 at gmail.com> wrote:
>
>
> 2016-09-06 17:48 GMT+02:00 Tzafrir Cohen <tzafrir.cohen at xorcom.com>:
>
>> On Tue, Sep 06, 2016 at 06:37:52AM -0600, George Joseph wrote:
>> > On Tue, Sep 6, 2016 at 1:55 AM, Olivier <oza.4h07 at gmail.com> wrote:
>>
>> > > 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.
>>
>
> My asterisk.service is :
>
> # cat /run/systemd/generator.late/asterisk.service
> # Automatically generated by systemd-sysv-generator
>
> [Unit]
> SourcePath=/etc/init.d/asterisk
> Description=LSB: Asterisk PBX
> Before=runlevel2.target runlevel3.target runlevel4.target runlevel5.target
> shutdown.target
> After=network-online.target systemd-journald-dev-log.socket
> nss-lookup.target local-fs.target remote-fs.target dahdi.service
> misdn.service lcr.service wanrouter.service mysql.service postgresql.service
> Wants=network-online.target
> Conflicts=shutdown.target
>
> [Service]
> Type=forking
> Restart=no
> TimeoutSec=5min
> IgnoreSIGPIPE=no
> KillMode=process
> GuessMainPID=no
> RemainAfterExit=yes
> SysVStartPriority=2
> ExecStart=/etc/init.d/asterisk start
> ExecStop=/etc/init.d/asterisk stop
> ExecReload=/etc/init.d/asterisk reload
>
>
> My /etc/init.d/asterisk file is sourcing my /etc/default/asterisk which
> includes an (uncommented) line COREDUMP=yes.
> I also have
> # grep core /etc/asterisk/asterisk.conf
> dumpcore = yes
>
> make menuselect shows:
> [*] DONT_OPTIMIZE
> [*] COMPILE_DOUBLE
> [ ] DEBUG_THREADS
> [*] LOADABLE_MODULES
> [ ] DEBUG_FD_LEAKS
> [*] BETTER_BACKTRACES
> [ ] LOTS_OF_SPANS
> [ ] MALLOC_DEBUG
> [ ] DEBUG_CHAOS
> [*] BUILD_NATIVE
> --- Extended ---
> [ ] REF_DEBUG
> [ ] AO2_DEBUG
> [ ] STATIC_BUILD
> XXX REBUILD_PARSERS
> [ ] LOW_MEMORY
> [ ] DISABLE_INLINE
> [*] OPTIONAL_API
> XXX USE_HOARD_ALLOCATOR
> [ ] RADIO_RELAX
> [ ] G711_NEW_ALGORITHM
> < > G711_REDUCED_BRANCHING
> < > TEST_CODING_TABLES
> < > TEST_TANDEM_TRANSCODING
> [ ] ADDRESS_SANITIZER
> [ ] THREAD_SANITIZER
> [ ] LEAK_SANITIZER
> [ ] UNDEFINED_SANITIZER
> [ ] BUSYDETECT_TONEONLY
> [ ] BUSYDETECT_COMPARE_TONE_AND_SILENCE
> [ ] BUSYDETECT_DEBUG
> [ ] INTEGER_CALLERID
>
>
> Is there a way to read Compiler Flags from a running system without
> looking at source file directory ?
>
> If someone forgets to select appropriate Compiler Flags, does it prevent
> Asterisk to produce a core file (even an empty one) ?
>
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. :)
>
>
>> Specifically, if the first character of core_pattern is '!', the rest
>> should be an executable, to which the core file is handled. IIRC Centos7
>> had something of that type installed by default. On Debian Stable you
>> have the package corekeeper (or maybe also systemd-coredump from
>> backports). I haven't tried any of those.
>>
>> --
>> Tzafrir Cohen
>> icq#16849755 jabber:tzafrir.cohen at xorcom.com
>> +972-50-7952406 mailto:tzafrir.cohen at xorcom.com
>> http://www.xorcom.com
>>
>> --
>> _____________________________________________________________________
>> -- 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/20160907/82fbe064/attachment.html>
More information about the asterisk-users
mailing list