DragonFlyBSD Kernel Audit
DF-3061 / run.log
← back to finding ↓ download raw
# DF-3061 run log (reconstructed from session captures; the QEMU serial
# file is truncated on each boot, so the fix-run console lines live in
# this transcript rather than a file)

## Baseline run 1 (stock kernel #0: Thu Jul 2 06:02:54 UTC 2026)
setup: nfsd -t -u -n 4; mountd; /export exported "-maproot=root localhost";
mount localhost:/export /mnt/nfs; 2x /tmp/rc4 /export + 6x /tmp/cl /mnt/nfs
result after ~2.5 min (guest ssh died; serial console):

  kern_rename: retry due to race on: "src" -> "src" (24,4)
  nfs - retry rename src to dst
  Fatal user address access from kernel mode from nfsd at ffffffff806478a1
  Fatal trap 12: page fault while in kernel mode
  cpuid = 1; lapic id = 1
  fault virtual address = 0xc8
  fault code = supervisor read data, page not present
  instruction pointer = 0x8:0xffffffff806478a1
  current process = 2145 (nfsd)
  CPU1 stopping CPUs: 0x0000003d
  Stopped at lockmgr_release+0x11: movq 0x8(%rdi),%rsi

(full capture: panic_boot_full.log / panic.txt)

## Baseline run 2 (stock kernel, after vm.sh reset with-src)
identical setup; panic after ~2.5 min:

  nfs - retry rename src to dst
  Fatal user address access from kernel mode from nfsd at ffffffff806478a1
  cpuid = 2; lapic id = 2
  fault virtual address = 0xc8
  current process = 839 (nfsd)
  Stopped at lockmgr_release+0x11

(full capture: panic_run2.txt)

## Fix-validation run (patched kernel #1: Sat Sep 5 19:57:12 UTC 2026,
## fix.diff applied to /usr/src, make nativekernel + installkernel)
identical setup and identical racers (2x rc4 /export, 6x cl /mnt/nfs).
race duration > 6 minutes (>= 2x baseline panic time):

  $ dmesg | grep -c "nfs - retry rename"   -> 8
  $ dmesg | grep -c Fatal                  -> 0
  $ uptime -> up 8 mins ... load averages: 0.15, 0.05, 0.02

The retry branch fired repeatedly (console spam "nfs - retry rename
dst to src" / "src to dst" throughout the race) with NO trap and NO
panic; system stayed responsive during the race.

Observation (not attributed to the fix): the post-race
`sync && umount /mnt/nfs` (umount of the loopback NFS client mount while
local nfsd still serves it) hung the guest's login path until power
cycle. The stock kernel never reaches umount (it panics first), so this
cannot be compared against baseline; primary fix criterion (panic gone
while the retry path is exercised) is met.

## Fix build
make nativekernel KERNCONF=X86_64_GENERIC: completed Sat Sep 5 20:11:23
UTC 2026 (see build.log); make installkernel: completed 20:13:51
(install.log); rebooted into #1 Sat Sep 5 19:57:12 UTC 2026.