Re: [Dnsmasq-discuss] dnsmasq crash - no core dump generated

2018-12-28 Thread Arvind Nagarajan
Thanks Simon. Yes I am able to generate coredump with your suggestion.

Date: Fri, 28 Dec 2018 09:59:29 +
From: Simon Kelley 
To: dnsmasq-discuss@lists.thekelleys.org.uk
Subject: Re: [Dnsmasq-discuss] dnsmasq crash - no core dump generated
Message-ID: 8980a6c8-59db-1c76-2afe-7eac1096d...@thekelleys.org.uk
Content-Type: text/plain; charset=utf-8

This code is relevant, in src/dnsmasq.c


  if (option_bool(OPT_DEBUG))
prctl(PR_SET_DUMPABLE, 1, 0, 0, 0);



Cheers,

Simon.

On Thu, Dec 27, 2018 at 7:40 PM Arvind Nagarajan
 wrote:
>
> Hi All,
>
> When dnsmasq crashes due to segfault (SIGSEGV) I am not getting a core
> file generated.
> Is this expected?
> dnsmasq is managed by systemd and started using
> systemctl start dnsmasq.
> The dnsmasq service file starts dnsmasq with '-k' option - keep in
> foreground mode.
>
> Howerver If I run the dnsmasq in debug mode using '-d' mode the core
> dump is getting generated.
>
> Do I need to add any signal handling code/any config knob to generate
> core dump in -k' mode.
> Any pointers regarding this will be helpful.
>
> Thanks,
> Arvind

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] dnsmasq crash - no core dump generated

2018-12-28 Thread Simon Kelley
This code is relevant, in src/dnsmasq.c


  if (option_bool(OPT_DEBUG))
prctl(PR_SET_DUMPABLE, 1, 0, 0, 0);



Cheers,

Simon.

On 28/12/2018 03:40, Arvind Nagarajan wrote:
> Hi All,
> 
> When dnsmasq crashes due to segfault (SIGSEGV) I am not getting a core
> file generated.
> Is this expected?
> dnsmasq is managed by systemd and started using
> systemctl start dnsmasq.
> The dnsmasq service file starts dnsmasq with '-k' option - keep in
> foreground mode.
> 
> Howerver If I run the dnsmasq in debug mode using '-d' mode the core
> dump is getting generated.
> 
> Do I need to add any signal handling code/any config knob to generate
> core dump in -k' mode.
> Any pointers regarding this will be helpful.
> 
> Thanks,
> Arvind
> 
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss