From nobody Mon Nov 08 19:08:31 2021 X-Original-To: freebsd-current@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 5922F1854BD1 for ; Mon, 8 Nov 2021 19:08:43 +0000 (UTC) (envelope-from alex@alexslomka.xyz) Received: from mail-4022.proton.ch (mail-4022.proton.ch [185.70.40.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "protonmail.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hp0yL3ZLqz3rZn for ; Mon, 8 Nov 2021 19:08:42 +0000 (UTC) (envelope-from alex@alexslomka.xyz) Date: Mon, 08 Nov 2021 19:08:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alexslomka.xyz; s=protonmail; t=1636398513; bh=OTyY1zjSTTbit4lXHbJFvLvSgGUSXWIFNY7GXZZRb2Q=; h=Date:To:From:Reply-To:Subject:From; b=GFyGTMTk00gke+dNW52V2vfivcpF2+hz0PbPErUcpJcKuTW0yRsf7ZZfvEXDJ+523 84MxTf+RgycgH+Pr9+07mE5uyrP4z1AVXTFhcfaZQBYwf8w/kk4MBRyEmsKGDz1dQU c2iP9DyEWovGdqb1o03lqbrxvd3SZrbizsuTJkrk= To: "freebsd-current@freebsd.org" From: Alexander Reply-To: Alexander Subject: Problems with getting a crash dump Message-ID: List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=0.8 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD, FROM_SUSPICIOUS_NTLD_FP,PDS_OTHER_BAD_TLD shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Rspamd-Queue-Id: 4Hp0yL3ZLqz3rZn X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=alexslomka.xyz header.s=protonmail header.b=GFyGTMTk; dmarc=none; spf=pass (mx1.freebsd.org: domain of alex@alexslomka.xyz designates 185.70.40.22 as permitted sender) smtp.mailfrom=alex@alexslomka.xyz X-Spamd-Result: default: False [-1.50 / 15.00]; HAS_REPLYTO(0.00)[alex@alexslomka.xyz]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[alexslomka.xyz:s=protonmail]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[alex]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip4:185.70.40.0/24]; DMARC_NA(0.00)[alexslomka.xyz]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DKIM_TRACE(0.00)[alexslomka.xyz:+]; NEURAL_SPAM_LONG(1.00)[1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; TO_DN_EQ_ADDR_ALL(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RWL_MAILSPIKE_VERYGOOD(0.00)[185.70.40.22:from]; ASN(0.00)[asn:62371, ipnet:185.70.40.0/24, country:CH]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Hello, I am currently using FreeBSD 14.0-CURRENT and I found a bug that triggers a kernel panic. I wanted to make a kernel crash dump to further investigate the issue, but after a few tries I still did not manage to do i= t. I started by following the instructions in the FreeBSD Handbook. I checked = that /dev/nvd0p2.eli is an active swap device and I configured it to be used as = a dump device like this: # dumpon -v /dev/nvd0p2.eli # sysctl debug.kdb.panic=3D1 Then I booted into single user mode to extract the core dumb: # savecore -vC /dev/nvd0p2 checking for kernel dump on device /dev/nvd0p2 mediasize =3D 2147483648 bytes sectorsize =3D 512 bytes magic mismatch on last dump header on /dev/nvd0p2 No dump exists A you can see the core dump was not written to the device. Later I also tri= ed using /dev/nvd0p2 (with out the "eli" part), because /dev/nvd0p2.eli is onl= y available after I enable it using swapon, but the handbook states the I sho= uld first extract the dump, before I use the device as swap again. But the resu= lt was the same. /dev/nvd0p2 is only 2gb in size and it's an encrypted swap de= vice, so I thought that: 1) Maybe the size of the device is to small even for a minidump. 2) Perhaps using encrypted swap as a dump device is not supported. Because of those complications I decided to use an external 8gb USB drive a= s my dump device. # gpart create -s gpt /dev/da0 # gpart add -t freebsd-swap /dev/da0 # swapoff -a # swapon /dev/da0p1 # dumpon -v /dev/da0p1 kernel dumps on priority: device 0: da0p1 I have 8gb of RAM so a 8gb dump device should be big enough for a minidump. I used `sysctl debug.kdb.panic=3D1` to crash the kernel and rebooted the sy= stem. I also waited for 10 minutes to ensure the the kernel finished writing the = core dump to the device. # savecore -vC /dev/da0p1 checking for kernel dump on device /dev/da0p1 mediasize =3D 7744741376 bytes sectorsize =3D 512 bytes magic mismatch on last dump header on /dev/da0p1 No dump exists As you can see I still did not manage to get a kernel crash dump. Any ideas= ? Here is a picture of the output I get after running `sysctl debug.kdb.panic= =3D1`: https://forums.freebsd.org/attachments/img_20211108_163313-jpeg.11936/ PS yes kern.coredump is set to 1.