DF-0843 / panic.txt
DF-0843 — Phase 8 caught a deadlock in the FIRST fix attempt (the fix.diff
that only `git apply --check`'d as clean). This is the boot.log panic
signature from the patched kernel built from the first fix.diff, which
omitted lock release on ufsdirhash_recycle()'s two early `return (-1)`
paths (TAILQ_FIRST==NULL at :938 and --dh_score>0 at :944). Build, the
new build, then dir creation recursed through:
ufsdirhash_build() -> ufsdirhash_recycle() [acquires LK_EXCLUSIVE,
returns -1 WITHOUT releasing] -> build continues ->
ufsdirhash_build INSERT_TAIL [re-acquires LK_EXCLUSIVE]
=> "lockmgr: locking against myself"
This is exactly why Phase 8 (build + boot + run) is mandatory: a diff that
passes `git apply --check` and compiles cleanly can still be wrong.
The corrected fix.diff adds LK_RELEASE before every return path in
ufsdirhash_recycle; the corrected kernel boots and runs cleanly.
--- serial console (boot.log) excerpt, first (buggy) fix attempt: ---
panic: lockmgr: locking against myself
cpuid = 2
Trace beginning at frame 0xfffff801182d7368
lockmgr_exclusive() at lockmgr_exclusive+0x3e0 0xffffffff80647f30
lockmgr_exclusive() at lockmgr_exclusive+0x3e0 0xffffffff80647f30
ufsdirhash_build() at ufsdirhash_build+0x152 0xffffffff8091adb2
ufs_lookup() at ufs_lookup+0xd7 0xffffffff809147f7
vop_old_lookup() at vop_old_lookup+0x9c 0xffffffff80709cdc
vop_compat_ncreate() at vop_compat_ncreate+0xa5 0xffffffff806e6da5
Debugger("panic")
CPU2 stopping CPUs: 0x0000003b
stopped
Stopped at Debugger+0x7c: movb $0,0xbdae79(%rip)
db>
--- corrected fix boots clean: ---
DragonFly 6.5-DEVELOPMENT #1: Mon Jul 6 06:49:30 UTC 2026
(live dirhash trigger: 53,372,271 iterations across 8 threads, no panic,
no lockmgr errors, guest stayed up)