Date: Tue, 5 Oct 2021 20:54:38 +0300 From: Odhiambo Washington <odhiambo@gmail.com> To: Yuri <yuri@aetern.org> Cc: questions <questions@freebsd.org> Subject: Re: How do I get a coredump file from an application? Message-ID: <CAAdA2WPa=YJp-61fqonGfaU3LNAT%2BSDjt-Dsv%2BwqydQW3=yXgw@mail.gmail.com> In-Reply-To: <f355b1bf-2c27-201f-3eaf-fd9e13e58f3c@aetern.org> References: <CAAdA2WPSfnbWLi3FZYmqONCYGg_7wgEObq8TzKbaY-cd8G13yw@mail.gmail.com> <f355b1bf-2c27-201f-3eaf-fd9e13e58f3c@aetern.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000006f59f905cd9ebb01 Content-Type: text/plain; charset="UTF-8" On Mon, Oct 4, 2021 at 12:01 PM Yuri <yuri@aetern.org> wrote: > Odhiambo Washington wrote: > > Hi > > > > root@gw:/var/log/exim # freebsd-version -kru > > 13.0-RELEASE-p4 > > 13.0-RELEASE-p4 > > 13.0-RELEASE-p4 > > > > > > 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. > > > > I have manually compiled the application with the following option: > > CC=clang -ggdb > > CXX=clang++ > > CPP=clang-cpp > > Don't. > > Use the following knob documented in ports(7) and (somewhat more > verbose) in /usr/ports/Mk/bsd.port.mk: > > Hello Yuri, I am not using the port. I am doing a manual compile for a version that has not yet hit the ports. > # WITH_DEBUG - If set, debugging flags are added to CFLAGS and the > # binaries don't get stripped by INSTALL_PROGRAM or > # INSTALL_LIB. Besides, individual ports might > # add their specific to produce binaries for debugging > # purposes. You can override the debug flags that are > # passed to the compiler by setting DEBUG_FLAGS. It is > # set to "-g" at default. > > > > With the hopes that the binary will then come with debugging symbols. > > > > Additionally, I have done the following: > > > > mkdir -p /var/coredumps > > chmod 1777 /var/coredumps > > > > Added the following to /etc/sysctl.conf: > > > > kern.corefile=/var/coredumps/%U/%N.core > > kern.coredump=1 > > > > And finally: > > > > sysctl -w kern.coredump=1 > > sysctl -w kern.corefile=/var/coredumps/%U/%N.core > > sysctl -w kern.sugid_coredump=1 (this actually seems to be the default) > > > > Is this all that I need to do or am I missing something crucial in this > > endeavor? > > Never used exim so guessing - you likely need to tell exim to actually > dump the core. > That's exactly what I want, but don't know how to do. -- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' :-) --0000000000006f59f905cd9ebb01--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAAdA2WPa=YJp-61fqonGfaU3LNAT%2BSDjt-Dsv%2BwqydQW3=yXgw>