From nobody Tue Nov 9 03:03:45 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 016B2185470A for ; Tue, 9 Nov 2021 03:05:19 +0000 (UTC) (envelope-from warlock@phouka1.phouka.net) Received: from phouka1.phouka.net (phouka1.phouka.net [107.170.196.116]) (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 (2048 bits) client-digest SHA256) (Client CN "phouka.net", Issuer "Go Daddy Secure Certificate Authority - G2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HpCXG11PZz4qXr for ; Tue, 9 Nov 2021 03:05:18 +0000 (UTC) (envelope-from warlock@phouka1.phouka.net) Received: from phouka1.phouka.net (localhost [127.0.0.1]) by phouka1.phouka.net (8.16.1/8.16.1) with ESMTPS id 1A933jbC050278 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 8 Nov 2021 19:03:46 -0800 (PST) (envelope-from warlock@phouka1.phouka.net) Received: (from warlock@localhost) by phouka1.phouka.net (8.16.1/8.16.1/Submit) id 1A933jA7050258; Mon, 8 Nov 2021 19:03:45 -0800 (PST) (envelope-from warlock) Date: Mon, 8 Nov 2021 19:03:45 -0800 From: John Kennedy To: Alexander Cc: "freebsd-current@freebsd.org" Subject: Re: Problems with getting a crash dump Message-ID: References: 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=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4HpCXG11PZz4qXr X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of warlock@phouka1.phouka.net has no SPF policy when checking 107.170.196.116) smtp.mailfrom=warlock@phouka1.phouka.net X-Spamd-Result: default: False [2.19 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_SPAM_SHORT(0.99)[0.989]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[phouka.net]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_SPAM_LONG(1.00)[1.000]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[warlock@phouka.net,warlock@phouka1.phouka.net]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:14061, ipnet:107.170.192.0/18, country:US]; FROM_NEQ_ENVFROM(0.00)[warlock@phouka.net,warlock@phouka1.phouka.net] X-ThisMailContainsUnwantedMimeParts: N On Mon, Nov 08, 2021 at 07:08:31PM +0000, Alexander wrote: > 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 it. > I started by following the instructions in the FreeBSD Handbook. ... > /dev/nvd0p2.eli is an active swap device and I configured it to be used as a > dump device like this: ... Much like you, I found that my current (encryptd) swap files weren't going to work and I used an external USB stick. [/etc/rc.conf] # Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable #dumpdev="AUTO" dumpdev="/dev/da0p1" [dumpon -vl] kernel dumps on priority: device 0: da0p1 [gpart show da0] => 40 240353200 da0 GPT (115G) 40 240353200 1 freebsd-swap (115G) [swapctl -lm] Device: 1MB-blocks Used: /dev/nvd1p3.eli 8192 2932 Apparently the last time I crashed was ~Mar 2021 so your version mileage may vary (not 14), but make sure the OS didn't already do it for you (at least if you're booting up fully into multi-user mode; you did say single). The /var/crash directory is the default location for where savecore stashes the info for you. Note that I made da0p1 swap, but I didn't actually configure it that way in /etc/fstab so I'm not using slow, unencrypted USB for swap, just dumps. The stick had a little write-LED on it, so it was obvious when it was being hit and I think the kernel panic-dump had a status output of some sort (it's been a while), although that might be obscured (under X11, etc). I sort of remember a prompt where I could have done something interactive that I might have had to continue on from before it did the dump. Again, it's been a while since I had a dump that I was trying hard to report. 115G is more than enough to hold 32G of RAM and 8G of swap. Remember that some of your RAM might *be* swapped out (so, worse cast, RAM+swap). Seems like you'd have good odds in a nice, controlled test of not needing all that space but kernel crash dumps are often pretty brainless because they know they've just lost at Russian roulette and don't know what they can trust (don't know about FreeBSD specifically). Lets just say that it has a very different approach to swap than ancient SunOS. You've got some interesting physical quirks (ala, 14 + USB stick) that I couldn't test with my setup, but I do have a bhyve running 14 that I could probably try crashing in a similar way (no USB of course). It sounds like you're going down the right path, although I'd try to borrow a bigger USB stick and see if that helps.