[Bug 261233] Frequent kernel panics during disk access after upgrading from 12.2-RELEASE-p7 to 12.2-p12 or 12.3 on i386

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 15 Jan 2022 17:49:39 UTC

            Bug ID: 261233
           Summary: Frequent kernel panics during disk access after
                    upgrading from 12.2-RELEASE-p7 to 12.2-p12 or 12.3 on
           Product: Base System
           Version: 12.2-RELEASE
          Hardware: i386
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: fbsdzilla@coupin.net

I updated my server 2 days ago using freebsd-update from a 12.2-RELEASE-p7
kernel to p12 and since then it panicked something like 20 times in 24h as soon
as there's filesystem activity. gmirror repairs seemed to have no impact
though. Reverting to old p7 kernel it's now been stable again for 24h. I tried
upgrading to 12.3 but it crashed like 12.2p12 after the kernel upgrade step and
even before I got a chance to upgrade binaries.

I managed to snap a picture of the panic stacktrace right before it rebooted
after one of the crashes (see transcript below).

I read the changes from p7 to p12 and I think it's related to changes made in
the pmap code by this commit (1) as the stacktrace starts in PTDpde.

I'll admit, that while I've been running FreeBSD servers since, I think, 2.7
I'm not familiar with the kernel code but it reeks of race condition under

The machine is a Core i5 2400 (see details below), and yes I know I could be
running the 64 bits version, but I never needed to go above 4GB of RAM and it's
been running the 32 bits version of the OS flawlessly for years now.

Sorry if this is a duplicate but I searched and could not find anything


panic: vm_fault: fault on nofault entry, addr: 0
cpuid = 1
time = 1642161900
KDB: stack backtrace:
#0 0x10327ae at kdb_backtrace+0x4e
#1 0xfed128 at vpanic+0x118
#2 0xfeda4 at panic+0x14
#3 0x12e5733 at vm_fault+0x2613
#4 0x12e3832 at vm_fault_trap+0x42
#5 0x154c0f5 at trap_pfault+0x115
#6 0x154b71f at trap+0x36f
#7 0xffc0319d at PTDpde-0x41a5
#8 0x18bbaa3 at _umtx_op_nwake_private+0x93
#9 0x154c7b9 at syscall+0×3e9
#10 0xffc033e7 at PTDpde+0x43ef

CPU: Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz (3093.04-MHz 686-class CPU)
  Origin="GenuineIntel"  Id=0x206a7  Family=0x6  Model=0x2a  Stepping=7
  AMD Features=0x28100000<NX,RDTSCP,LM>
  AMD Features2=0x1<LAHF>
  XSAVE Features=0x1<XSAVEOPT>
  TSC: P-state invariant, performance statistics

You are receiving this mail because:
You are the assignee for the bug.