From nobody Tue Oct 5 17:54:38 2021 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B261312D5359 for ; Tue, 5 Oct 2021 17:55:18 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HP4xK2QRWz3gxf for ; Tue, 5 Oct 2021 17:55:17 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: by mail-qk1-x732.google.com with SMTP id m7so3828119qke.8 for ; Tue, 05 Oct 2021 10:55:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9LAJfNA/J+GI7sLeeWVEhcuM6/dzluvXek+kAdz08Cg=; b=M6GnTaOHG4fxbyCPXtv6xsbeYtWXwJcD2Snk3a+DKc/lCmGT8Pzc4KuLmqx3J/s+LS A4OpSSsXR+6MlfHfrHQyHUwpx+AqexdEq/8VoqxhTZNkojaiTudaI+MwZVlk5hBkDAf1 24EtTkLQBO6vY8L6Xk5WKceHvHuv/qWn/IWW4fFVsG/5G24ZE0bdhHKliwHy61N5jdK8 rSbyE6qir+DMl5p39kiFLhBIG87SWRquS8brJbWM4dfEM1Ieo4VOi+sj5ua7AJHKkSm/ /5z7LBZkMYmPsAV67AuhkMjFbCeJViNOw4eqEDoHO1gBGBqvNU0in429mojfQb8zhuU3 sYRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9LAJfNA/J+GI7sLeeWVEhcuM6/dzluvXek+kAdz08Cg=; b=3TfwRW3SDbO3PxsBVKA/gh1UTmrrLiJ93pJ2kdY5JX/yeUPXZtEFc3Qft2Ejzf3FXI QyZ4nKhghsYDHkdoZij4V6Ri7UFL6158to6b1BfjZzmBbW7IM406QhmbwxJ4lbVB20RF hwDJrlrGI80GLUbAczWs4XczNE77VKn5T8kOOM+9bKoqzqemrh4jC/iH8zy791SW1fIZ Nk0a5E0SWTTICfo1rlrj6jmhqUJrSpiRUAD6L8/CwIdS2Wz3j4o/eQiK8CHhHDb8xvg8 HdrJBi5d3hbjS8v7ZI7fXe5JCyhtZNoOviNYjcjhziSymFHRHJMdzhQKKjrRZ6367Lej xSBw== X-Gm-Message-State: AOAM5327J33ZtOUGt64+NVfy5YjGhLA9MfQSy2YoUXZI3U7xxSwuP6Db bns8TjH5QyyVVlrNEFYs1+anLq7Shgm77JBOoNT7dLiAMm7bmw== X-Google-Smtp-Source: ABdhPJxw4UVmX1nqH3vtLRrjrqc9NhxNs63ES7SZUN3Lu6CNmM4702LJ/COKZW9A8dIM7bbjKRps0a3yS/EXA9mUqC4= X-Received: by 2002:a37:946:: with SMTP id 67mr15805443qkj.473.1633456516715; Tue, 05 Oct 2021 10:55:16 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Odhiambo Washington Date: Tue, 5 Oct 2021 20:54:38 +0300 Message-ID: Subject: Re: How do I get a coredump file from an application? To: Yuri Cc: questions Content-Type: multipart/alternative; boundary="0000000000006f59f905cd9ebb01" X-Rspamd-Queue-Id: 4HP4xK2QRWz3gxf X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=M6GnTaOH; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of odhiambo@gmail.com designates 2607:f8b0:4864:20::732 as permitted sender) smtp.mailfrom=odhiambo@gmail.com X-Spamd-Result: default: False [-2.38 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::732:from]; MID_RHS_MATCH_FROMTLD(0.00)[]; NEURAL_HAM_SHORT(-0.38)[-0.384]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; SUBJECT_ENDS_QUESTION(1.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --0000000000006f59f905cd9ebb01 Content-Type: text/plain; charset="UTF-8" On Mon, Oct 4, 2021 at 12:01 PM Yuri 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--