[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
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261233

            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
                    i386
           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
load.

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
related.

(1)
https://github.com/freebsd/freebsd-src/commit/a165b4591e48cd2adce8215fca73147c016e6cea#diff-b34ee41e14f87fb2b18fdf77337237f336830ae88aac2a02e1c32aa45e43b4de

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
Uptime:3m20s


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
 
Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
 
Features2=0x1fbae3ff<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX>
  AMD Features=0x28100000<NX,RDTSCP,LM>
  AMD Features2=0x1<LAHF>
  XSAVE Features=0x1<XSAVEOPT>
  VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
  TSC: P-state invariant, performance statistics

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