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.


Reply via email to