Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Oct 2021 12:37:55 +0300
From:      Odhiambo Washington <odhiambo@gmail.com>
To:        Kurt Hackenberg <kh@panix.com>
Cc:        User Questions <freebsd-questions@freebsd.org>
Subject:   Re: How do I get a coredump file from an application?
Message-ID:  <CAAdA2WOviDitn6NJiAEgc65XzyK30Zd3Xq8K1NiWqDTeWjLj6g@mail.gmail.com>
In-Reply-To: <ba885bec-33e7-c935-3a3a-b6138e4f7447@panix.com>
References:  <CAAdA2WPSfnbWLi3FZYmqONCYGg_7wgEObq8TzKbaY-cd8G13yw@mail.gmail.com> <ba885bec-33e7-c935-3a3a-b6138e4f7447@panix.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000ee5bf305cdabe8ea
Content-Type: text/plain; charset="UTF-8"

On Tue, Oct 5, 2021 at 10:56 PM Kurt Hackenberg <kh@panix.com> wrote:

> On 2021/10/04 03:44, Odhiambo Washington wrote:
>
> > I have my MTA (Exim) crushing, with the following message in its
> panic.log:
> >
> > 2021-10-01 04:10:58 SIGSEGV (maybe attempt to write to immutable memory)
> > 2021-10-01 04:11:26 SIGSEGV (maybe attempt to write to immutable memory)
> > 2021-10-01 04:11:30 SIGSEGV (maybe attempt to write to immutable memory)
> > 2021-10-01 04:11:35 SIGSEGV (maybe attempt to write to immutable memory)
> >
> > I need to obtain a coredump file from the crashing process for debugging
> > purposes.
>
> Is that a file named "panic.log" that's written by Exim itself?
>

Yes


> The default action for SIGSEGV is for the kernel to write the coredump
> file and end the process. If Exim receives that signal, logs it, and
> keeps running, Exim must handle the signal itself.
>

Okay.


> Have you checked Exim's documentation about this?
>

Yes, I have. 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*
*restrictions (setuid programs are carrying sensitive info; a **dump file
has that info, leaving dump files with such info*
*lying around is obviously a major risk...)*

*Enable setuid coredumps (NOTE: not recommended for longterm **use.  Core
files will contain credentials and personally-identifying*
*information.  Leaving them lying around will eventually result in **a
leak).*

*Build exim without compiler optimisation ( -O0 ) and with debugger **symbols
(for clang: -ggdb, -glldb, -gsce, -gdbx  depending on your debugger ).*

*clang docs:   https://clang.llvm.org/docs/UsersManual.html
<https://clang.llvm.org/docs/UsersManual.html>*

*Run until you get a coredump.  Get the stacktrace from that.*

And I was hoping that the actions I took with regard to sysctl.conf would
help achieve that.



-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", egrep -v '^$|^.*#' :-)

--000000000000ee5bf305cdabe8ea--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAAdA2WOviDitn6NJiAEgc65XzyK30Zd3Xq8K1NiWqDTeWjLj6g>