From owner-freebsd-questions@freebsd.org Mon Oct 4 07:45:16 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 99D98678A70 for ; Mon, 4 Oct 2021 07:45:16 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4HNCRw2ry3z3qD3 for ; Mon, 4 Oct 2021 07:45:16 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id 60309678CBB; Mon, 4 Oct 2021 07:45:16 +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 5FF3B678D33 for ; Mon, 4 Oct 2021 07:45:16 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) (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 4HNCRv4kcKz3qLp for ; Mon, 4 Oct 2021 07:45:15 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: by mail-qk1-x72f.google.com with SMTP id 73so15618159qki.4 for ; Mon, 04 Oct 2021 00:45:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=+tyA/n1qSK0HtH0FK3JfljdItlSdL0+QsNuZqm05SK8=; b=jZhEl+A8h2gFZ1gfzBAR3mlKCH4J39PkhzZggJu6v/gcJp3M6/1ujWKddZo/PziPtl 0UoD5NAmlP6Ztg1/2amReklRdZIs0OCOThSfK22GZuFpqWwgkLS9DZecj0bnYfI9Yqym NsWTgIMe/qjKuo/6i47KfvBdNKh7Ync5ewk0zrfVycA10xAu9g+5rLlVn3HLK1NwgwHs O/kFa7PSfHtZ1O9ABouTqJMuSx+JQcv5hCyKbk00VoFYcTnMkHbREbJlRND895sbK9xH ZrUIDgXyqI10GSg2DYeJJ2MO4Cvezkeqw+jSDnhrzXnJdZMmggt0es623vVEhB4vJ9YT CYJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=+tyA/n1qSK0HtH0FK3JfljdItlSdL0+QsNuZqm05SK8=; b=QQotlkycFNc78zxa+jHOagWL27nCryb16AMY7KIAs8PPJwUQTcR0QOcLu9a29PA0nV PCwNpqYq6rdgWMWVGdeVXh8mp1iK8Bft7BLLYlKkIKhxxzil5/vPhl2sTqbT4KQMlgss ERhDnZyocDrJdJv+c79NC+co13wQeLzP9mZ7ohol8u66ITyZC1nw0dh+hbIjQHMn/0as Azmn2hOoMHNu6tzQ4+lMplp9iOBq8JAvzwhfjcAP+fchm2+a1JZZwT3JMIiz1RoSl+Ja WXZ9s/og9U2OEJ/6IM1qDmPlq87RN2ijD5qfn8qcNDYcmc9n31D6T/Ypmgyn3CvWGUn1 Qj5Q== X-Gm-Message-State: AOAM530OLcpA99J9zE6DESBOqgx/zccIX0vyjmFrWALOz8975ZidxFCP weHV6OzQP4uvePfynI2bKi0GsmZPOxXz4hEL3oWYvZGokd+p6X3B X-Google-Smtp-Source: ABdhPJwq0sn+gs06GVILwCwiZJODX9AoV1nz8w+FOMmMgxTSRF0nSjHXpk+VFNMFZCTyjd0ZgR6mXKjsRp1rM3J6eBM= X-Received: by 2002:a37:e93:: with SMTP id 141mr8621493qko.132.1633333508585; Mon, 04 Oct 2021 00:45:08 -0700 (PDT) MIME-Version: 1.0 From: Odhiambo Washington Date: Mon, 4 Oct 2021 10:44:31 +0300 Message-ID: Subject: How do I get a coredump file from an application? To: questions X-Rspamd-Queue-Id: 4HNCRv4kcKz3qLp X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=jZhEl+A8; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of odhiambo@gmail.com designates 2607:f8b0:4864:20::72f as permitted sender) smtp.mailfrom=odhiambo@gmail.com X-Spamd-Result: default: False [-2.97 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; 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)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; 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)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.97)[-0.975]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::72f:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[questions] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 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 07:45:16 -0000 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 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? Thanks in advance. -- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' :-)