From owner-freebsd-questions@freebsd.org Mon Oct 4 09:00:42 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B8B367A330 for ; Mon, 4 Oct 2021 09:00:42 +0000 (UTC) (envelope-from yuri@aetern.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4HNF6y1KFLz3v1M for ; Mon, 4 Oct 2021 09:00:42 +0000 (UTC) (envelope-from yuri@aetern.org) Received: by mailman.nyi.freebsd.org (Postfix) id 2B3A467A32F; Mon, 4 Oct 2021 09:00:42 +0000 (UTC) Delivered-To: questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 29BB867A2AE for ; Mon, 4 Oct 2021 09:00:42 +0000 (UTC) (envelope-from yuri@aetern.org) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4HNF6x3xCyz3vD0 for ; Mon, 4 Oct 2021 09:00:41 +0000 (UTC) (envelope-from yuri@aetern.org) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 6D0CB5C00F4 for ; Mon, 4 Oct 2021 05:00:41 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 04 Oct 2021 05:00:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aetern.org; h= message-id:date:mime-version:subject:to:references:from :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=G SMoFAVW+dNEBO8CusFfd9NHELCvR3YR4TVSZ0MmAuI=; b=JtDIbBdtHKvI0snY8 9iEoT/aOfygUL++jwVcRwBLyvzSHVgYnj9hQqDPyGHrDwd6acFANiinF0dY9qD3d qgBOhdnkUBE/2tSr8JtXjSD/gR5TI/T3YJfYEhUdSAhQlrKZqZCAJPd/FZ1Fm2eP juD+NnuQLWgpgRHiCggJ5l2pqpzn3N8fMfA/fKbCOffbyDZpZnIUfl6g+8BqwKbL 4smse8EkJikgqQx9bMj/eOXHcTwIQEBTtlPfsXRqtFjkP/O4bUYb6uulx0oqKwVj 7pmBr1+gLridFsZDGOAd1NUm9d4YOvHOv57clmjgTElYFjLmbhI6pg8ZSwnMjSRm Np7iA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=GSMoFAVW+dNEBO8CusFfd9NHELCvR3YR4TVSZ0MmA uI=; b=mcGvKeFTcc/Pq2aoJ5iJS50X1WiFu9mJdHc6YjRpnnPMcv1beXjFRNBdc YA3+yVl9eSZbIydkCbsxX36xMrz6QoC4KA+YR3WTJjAxiTQdmWixkfaYW3PeoGYe NTAlR6OtksiTfcv5kLpPKyFK7mahFEgs2dOHxTeowEFzCru89m/GVOGRtWilPWoC QLjz1MWimOFHOW2HTsicI7lvCv3u/KwHyfySFYrEBLV/kQUcPorfmYaWgMKKg9s3 bR+MxamrAEqVo3VU5s4j7j/SihP6g9CNMK9FGP64gKURUClGRh/7WLap67S2Y9Py xHXFhjjH5GOyWruQE5jLALDj47ssg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudelvddgtdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtje ertddtfeejnecuhfhrohhmpegjuhhrihcuoeihuhhrihesrggvthgvrhhnrdhorhhgqeen ucggtffrrghtthgvrhhnpeefhffgtdelieeifeejiefhgfeitdeuvdeluefhfeetheetue fhgeejieeguedthfenucffohhmrghinhepphhorhhtrdhmkhenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpeihuhhrihesrggvthgvrhhnrdhorh hg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 4 Oct 2021 05:00:40 -0400 (EDT) Message-ID: Date: Mon, 4 Oct 2021 12:00:38 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.1.2 Subject: Re: How do I get a coredump file from an application? Content-Language: en-US To: questions References: From: Yuri In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4HNF6x3xCyz3vD0 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=aetern.org header.s=fm1 header.b=JtDIbBdt; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=mcGvKeFT; dmarc=none; spf=pass (mx1.freebsd.org: domain of yuri@aetern.org designates 66.111.4.26 as permitted sender) smtp.mailfrom=yuri@aetern.org X-Spamd-Result: default: False [-3.60 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[66.111.4.26:from]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.26]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[aetern.org:+,messagingengine.com:+]; NEURAL_HAM_SHORT(-1.00)[-0.999]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:11403, ipnet:66.111.0.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[66.111.4.26:from]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[aetern.org:s=fm1,messagingengine.com:s=fm1]; FREEFALL_USER(0.00)[yuri]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SUBJECT_ENDS_QUESTION(1.00)[]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; DMARC_NA(0.00)[aetern.org]; RCPT_COUNT_ONE(0.00)[1]; DWL_DNSWL_LOW(-1.00)[messagingengine.com:dkim]; MAILMAN_DEST(0.00)[questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2021 09:00:42 -0000 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: # 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.