Date: Thu, 7 Oct 2021 10:28:28 +0300 From: Odhiambo Washington <odhiambo@gmail.com> To: Kurt Hackenberg <kh@panix.com> Cc: questions <questions@freebsd.org> Subject: Re: How do I get a coredump file from an application? Message-ID: <CAAdA2WNnvWqV2mNSsEVuC=%2BuK=EuyjPUFp21GurUFM4Y8ZxbJw@mail.gmail.com> In-Reply-To: <YV5kktlieKXBTmVM@rain.home> References: <CAAdA2WPSfnbWLi3FZYmqONCYGg_7wgEObq8TzKbaY-cd8G13yw@mail.gmail.com> <ba885bec-33e7-c935-3a3a-b6138e4f7447@panix.com> <CAAdA2WOviDitn6NJiAEgc65XzyK30Zd3Xq8K1NiWqDTeWjLj6g@mail.gmail.com> <YV5kktlieKXBTmVM@rain.home>
next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000a8617705cdbe3772 Content-Type: text/plain; charset="UTF-8" On Thu, Oct 7, 2021 at 6:09 AM Kurt Hackenberg <kh@panix.com> wrote: > On Wed, Oct 06, 2021 at 12:37:55PM +0300, Odhiambo Washington wrote: > > >And an Exim developer has given me this task - to get Exim to > >create dump. > >I quote him below: > > > >*Arranging one is hard as Exim is setuid. I've not tried **on a BSD, but > >Linux requires some deliberate relaxation of security* > > You said you've already set the sysctl kern.sugid_coredump. > > That developer seems to have missed that, apparently, Exim catches the > signal SIGSEGV, which means that signal will never cause a coredump. > You could confirm that Exim catches that signal by searching the > source code for calls to signal() or sigaction(), or for "SIGSEGV", or > for the log string "maybe attempt to write to immutable memory". > > If Exim catches that signal, then the only way to get a coredump is to > make Exim not catch that signal -- that is, temporarily remove the > call to signal() or sigaction(). > > See the man pages signal(3) and sigaction(2). > > Attached are two small sample programs that demonstrate a segmentation > violation without and with catching the signal. When the signal is > not caught, the OS writes a coredump file; when the signal is caught, > no coredump is produced. > Hi Kurt, Thanks so much for the explanation. Let me discuss this with the Exim developer and see if we end up with something. -- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' :-) --000000000000a8617705cdbe3772--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAAdA2WNnvWqV2mNSsEVuC=%2BuK=EuyjPUFp21GurUFM4Y8ZxbJw>