Re: How do I get a coredump file from an application?
Date: Wed, 06 Oct 2021 09:37:55 UTC
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 '^$|^.*#' :-)