panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *446731 12116 0 0 0 0K dhcpleased db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff824818ff) at panic+0x177 sys/kern/subr_prf.c:202 ufs_lookup() at ufs_lookup+0x174c ufs_dirbad sys/ufs/ufs/ufs_lookup.c:609 [inline] ufs_lookup() at ufs_lookup+0x174c sys/ufs/ufs/ufs_lookup.c:444 VOP_LOOKUP(fffffd806f559658,ffff8000211dc758,ffff8000211dc788) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff8000211dc728) at vfs_lookup+0x6e5 sys/kern/vfs_lookup.c:561 namei(ffff8000211dc728) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff8000211dc728,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff8000211937a8,ffffff9c,7f7ffffe66a0,0,0,ffff8000211dc910) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff8000211dc980) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000211dc980) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe6690, count: 5 https://www.openbsd.org/ddb.html describes the minimum info required in bug reports. Insufficient info makes it difficult to find and fix bugs. ddb{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic *cpu0: bad dir ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff824818ff) at panic+0x177 sys/kern/subr_prf.c:202 ufs_lookup() at ufs_lookup+0x174c ufs_dirbad sys/ufs/ufs/ufs_lookup.c:609 [inline] ufs_lookup() at ufs_lookup+0x174c sys/ufs/ufs/ufs_lookup.c:444 VOP_LOOKUP(fffffd806f559658,ffff8000211dc758,ffff8000211dc788) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff8000211dc728) at vfs_lookup+0x6e5 sys/kern/vfs_lookup.c:561 namei(ffff8000211dc728) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff8000211dc728,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff8000211937a8,ffffff9c,7f7ffffe66a0,0,0,ffff8000211dc910) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff8000211dc980) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000211dc980) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe6690, count: -10 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff8000211dc1e0 rbx 0xffffffff82774bff cpu_info_full_primary+0x2bff rdx 0 rcx 0 rax 0xffff8000211937a8 r8 0x101010101010101 r9 0x8080808080808080 r10 0x67a38756222edb01 r11 0x3c2bd91e74cea821 r12 0xffffffff82774a00 cpu_info_full_primary+0x2a00 r13 0 r14 0 r15 0x1 rip 0xffffffff8207c658 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000211dc1d0 ss 0 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (dhcpleased) pid=446731 stat=onproc flags process=0 proc=0 pri=17, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800021192d28,0xffff8000ffff7520 process=0xffff8000ffff8858 user=0xffff8000211d7000, vmspace=0xfffffd800858a8a0 estcpu=1, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 67437 162773 1816 0 2 0 syz-executor.2 67437 4284 1816 0 2 0x4000000 syz-executor.2 11893 516369 61776 0 2 0 syz-executor.3 11893 385296 61776 0 3 0x4000080 fsleep syz-executor.3 23168 173347 48285 0 3 0x80 nanoslp syz-executor.1 23168 61650 48285 0 3 0x4000080 lockf syz-executor.1 23168 141488 48285 0 3 0x4000080 fsleep syz-executor.1 23168 138326 48285 0 3 0x4000080 fsleep syz-executor.1 61776 271949 10563 0 3 0x82 nanoslp syz-executor.3 37402 165570 10563 0 2 0x2 syz-executor.0 1816 123933 10563 0 3 0x82 nanoslp syz-executor.2 48285 297918 10563 0 3 0x82 nanoslp syz-executor.1 45642 266632 0 0 3 0x14200 acct acct 84194 474855 1 0 3 0x100083 ttyin getty 94683 183855 0 0 3 0x14200 bored sosplice 10563 297197 24158 0 3 0x82 nanoslp syz-fuzzer 10563 466028 24158 0 3 0x4000082 nanoslp syz-fuzzer 10563 469185 24158 0 3 0x4000082 kqread syz-fuzzer 10563 217730 24158 0 3 0x4000082 thrsleep syz-fuzzer 10563 498830 24158 0 3 0x4000082 thrsleep syz-fuzzer 10563 236941 24158 0 3 0x4000082 thrsleep syz-fuzzer 10563 354320 24158 0 3 0x4000082 thrsleep syz-fuzzer 10563 60097 24158 0 3 0x4000082 thrsleep syz-fuzzer 10563 311905 24158 0 3 0x4000082 thrsleep syz-fuzzer 24158 502134 43663 0 3 0x10008a sigsusp ksh 43663 112577 26376 0 3 0x9a poll sshd 26376 353839 1 0 3 0x88 poll sshd 74531 23031 45234 74 3 0x100092 bpf pflogd 45234 401516 1 0 3 0x80 netio pflogd 48371 84173 87168 73 3 0x100090 kqread syslogd 87168 409729 1 0 3 0x100082 netio syslogd 4373 62512 1 0 3 0x100080 kqread resolvd 77829 226693 12116 77 3 0x100092 kqread dhcpleased 40061 241274 12116 77 3 0x100092 kqread dhcpleased *12116 446731 1 0 7 0 dhcpleased 72103 177758 0 0 3 0x14200 bored smr 26614 194892 0 0 2 0x14200 zerothread 55684 198668 0 0 3 0x14200 aiodoned aiodoned 66251 433097 0 0 3 0x14200 syncer update 64945 104280 0 0 3 0x14200 cleaner cleaner 30407 199760 0 0 3 0x14200 reaper reaper 54028 307467 0 0 3 0x14200 pgdaemon pagedaemon 85156 197787 0 0 3 0x14200 bored viomb 46286 157651 0 0 3 0x40014200 acpi0 acpi0 56087 461562 0 0 7 0x40014200 idle1 37777 297051 0 0 3 0x14200 bored softnet 87868 136431 0 0 3 0x14200 bored systqmp 30745 63745 0 0 3 0x14200 bored systq 75260 472585 0 0 2 0x40014200 softclock 41334 63825 0 0 3 0x40014200 idle0 1 12710 0 0 3 0x80082 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 12116 (dhcpleased) thread 0xffff8000211937a8 (446731) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff828752a0) #0 witness_lock+0x44d #1 __mp_acquire_count+0x48 sys/kern/kern_lock.c:227 #2 mi_switch+0x3d3 sys/kern/sched_bsd.c:416 #3 sleep_finish+0x1b2 sys/kern/kern_synch.c:433 #4 tsleep+0x12c sys/kern/kern_synch.c:158 #5 biowait+0x91 sys/kern/vfs_bio.c:1271 #6 ffs_bufatoff+0x125 sys/ufs/ffs/ffs_subr.c:71 #7 ufs_lookup+0x466 sys/ufs/ufs/ufs_lookup.c:258 #8 VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 #9 vfs_lookup+0x6e5 sys/kern/vfs_lookup.c:561 #10 namei+0x36a sys/kern/vfs_lookup.c:245 #11 vn_open+0x105 sys/kern/vfs_vnops.c:146 #12 doopenat+0x26a sys/kern/vfs_syscalls.c:1128 #13 syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] #13 syscall+0x489 sys/arch/amd64/amd64/trap.c:585 #14 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd806f10d920) #0 witness_lock+0x44d #1 rw_enter+0x3e1 sys/kern/kern_rwlock.c:310 #2 rrw_enter+0x8b sys/kern/kern_rwlock.c:461 #3 VOP_LOCK+0x87 sys/kern/vfs_vops.c:534 #4 vn_lock+0x84 sys/kern/vfs_vnops.c:579 #5 vget+0x1d3 sys/kern/vfs_subr.c:677 #6 cache_lookup+0x2b4 sys/kern/vfs_cache.c:224 #7 ufs_lookup+0x1ac sys/ufs/ufs/ufs_lookup.c:162 #8 VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 #9 vfs_lookup+0x6e5 sys/kern/vfs_lookup.c:561 #10 namei+0x36a sys/kern/vfs_lookup.c:245 #11 vn_open+0x105 sys/kern/vfs_vnops.c:146 #12 doopenat+0x26a sys/kern/vfs_syscalls.c:1128 #13 syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] #13 syscall+0x489 sys/arch/amd64/amd64/trap.c:585 #14 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10212 6507K 8273K 78643K 71583 0 pcb 13 20K 24K 78643K 5229 0 rtable 224 31K 33K 78643K 8119 0 ifaddr 81 25K 28K 78643K 2154 0 sysctl 2 0K 0K 78643K 2 0 counters 48 34K 35K 78643K 626 0 ioctlops 0 0K 8K 78643K 6804 0 iov 0 0K 24K 78643K 2101 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1482 93K 93K 78643K 16728 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 219 0 VM map 2 1K 1K 78643K 2 0 sem 21 10K 20K 78643K 718 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 9 29K 49K 78643K 22490 0 sigio 0 0K 0K 78643K 152 0 proc 81 88K 112K 78643K 4273 0 subproc 52 6K 7K 78643K 1403 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 2531 0 in_multi 52 3K 4K 78643K 3389 0 ether_multi 1 0K 0K 78643K 409 0 mrt 1 0K 0K 78643K 94 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 247 1102K 1102K 78643K 247 0 exec 0 0K 2K 78643K 6354 0 pfkey data 0 0K 0K 78643K 148 0 tdb 3 0K 0K 78643K 3 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 7 26K 26K 78643K 7 0 UVM amap 610 1558K 1561K 78643K 275747 0 UVM aobj 131 4K 4K 78643K 138 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 1868 0 NDP 10 0K 1K 78643K 745 0 temp 126 4242K 4332K 78643K 194235 0 kqueue 12 18K 24K 78643K 1474 0 SYN cache 2 8K 16K 78643K 3 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 22 0 0 1 0 1 1 0 8 0 rtpcb 120 1441 0 1438 17 16 1 3 0 8 0 rtentry 112 2277 0 2220 3 1 2 3 0 8 0 unpcb 136 23299 0 23280 228 219 9 9 0 8 8 syncache 296 66 0 66 25 25 0 1 0 8 0 tcpqe 32 108 75 108 9 9 0 1 0 8 0 tcpcb 736 10832 0 10813 363 358 5 20 0 8 3 arp 120 255 0 245 1 0 1 1 0 8 0 inpcb 304 27231 0 27216 338 328 10 16 0 8 8 rttmr 72 36 0 36 11 11 0 1 0 8 0 ip6q 72 8 0 8 2 2 0 1 0 8 0 ip6af 40 24 0 24 2 2 0 1 0 8 0 nd6 48 581 0 568 1 0 1 1 0 8 0 pkpcb 40 101 0 101 16 16 0 1 0 8 0 kcovpl 48 106 0 102 1 0 1 1 0 8 0 ppxss 1248 92 0 92 22 22 0 1 0 8 0 pfstscr 40 67 0 67 11 11 0 1 0 8 0 pffrag 232 245 0 244 14 13 1 1 0 482 0 pffrnode 88 243 0 242 14 13 1 1 0 8 0 pffrent 40 986 0 985 18 17 1 1 0 8 0 pfosfp 40 1469 0 1469 6 6 0 5 0 8 0 pfosfpen 112 1469 0 1469 22 22 0 21 0 8 0 pfrke_plain 168 18 0 18 3 3 0 1 0 8 0 pfrktable 1344 821 0 787 22 18 4 4 0 8 1 pfpktdelay 88 67 0 67 2 2 0 2 0 8 0 pftag 88 23 0 18 2 1 1 1 0 8 0 pfstitem 24 95 0 93 1 0 1 1 0 8 0 pfstkey 112 210 0 208 1 0 1 1 0 8 0 pfstate 320 152 0 150 3 2 1 3 0 8 0 pfrule 1360 1719 0 1262 45 6 39 39 0 8 0 art_heap8 4096 6 0 5 4 3 1 3 0 8 0 art_heap4 256 11014 0 10766 52 36 16 21 0 8 0 art_table 32 11020 0 10771 3 0 3 3 0 8 0 art_node 16 2262 0 2214 1 0 1 1 0 8 0 sysvmsgpl 40 28 0 0 1 0 1 1 0 8 0 semupl 112 6 0 6 3 3 0 1 0 8 0 semapl 112 706 0 687 1 0 1 1 0 8 0 shmpl 112 135 0 7 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 31675 0 30190 93 0 93 93 0 8 0 ffsino 272 31675 0 30190 100 0 100 100 0 8 0 nchpl 144 60966 0 59364 61 0 61 61 0 8 0 rtmask 32 36 0 36 3 3 0 1 0 8 0 uvmvnodes 80 6174 0 0 126 0 126 126 0 8 0 vnodes 224 6174 0 0 364 0 364 364 0 8 0 namei 1024 230497 0 230496 4 3 1 1 0 8 0 percpumem 16 325 0 289 1 0 1 1 0 8 0 vcpupl 2048 214 0 0 27 0 27 27 0 8 0 vmpool 560 288 0 74 16 0 16 16 0 8 0 pfiaddrpl 120 572 0 233 14 3 11 11 0 8 0 scsiplug 72 2 0 2 1 1 0 1 0 8 0 scxspl 216 186318 0 186318 33 32 1 8 0 8 1 plimitpl 152 2512 0 2501 1 0 1 1 0 8 0 sigapl 424 22460 0 22422 7 1 6 7 0 8 0 futexpl 64 212016 0 212013 6 5 1 1 0 8 0 knotepl 112 416 0 0 4 0 4 4 0 8 0 kqueuepl 216 5459 0 5451 99 98 1 8 0 8 0 pipepl 336 4622 0 4606 134 127 7 12 0 8 5 fdescpl 496 22412 0 22390 8 5 3 4 0 8 0 filepl 152 177228 0 177059 344 330 14 25 0 8 7 lockfpl 104 10155 0 10151 27 26 1 4 0 8 0 lockfspl 48 3809 0 3806 2 1 1 2 0 8 0 sessionpl 144 126 0 113 1 0 1 1 0 8 0 pgrppl 48 150 0 137 1 0 1 1 0 8 0 ucredpl 96 23861 0 23849 1 0 1 1 0 8 0 zombiepl 144 22422 0 22422 2 1 1 1 0 8 1 processpl 1064 22460 0 22422 6 2 4 5 0 8 0 procpl 672 59668 0 59617 19 13 6 8 0 8 0 srpgc 96 129 0 129 27 27 0 1 0 8 0 sosppl 168 197 0 196 36 35 1 1 0 8 0 sockpl 480 52197 0 52159 1074 1061 13 38 0 8 8 mcl64k 65536 26 0 0 3 0 3 3 0 8 0 mcl16k 16384 17 0 0 3 1 2 3 0 8 0 mcl12k 12288 33 0 0 2 0 2 2 0 8 0 mcl9k 9216 17 0 0 2 0 2 2 0 8 0 mcl8k 8192 33 0 0 4 1 3 3 0 8 0 mcl4k 4096 39 0 0 3 0 3 3 0 8 0 mcl2k2 2112 11 0 0 1 0 1 1 0 8 0 mcl2k 2048 557 0 0 30 9 21 26 0 8 0 mtagpl 96 1376 0 0 12 0 12 12 0 8 0 mbufpl 256 6033 0 0 304 0 304 304 0 8 0 bufpl 288 41254 0 34943 454 0 454 454 0 8 0 anonpl 24 6311095 0 6281440 459 274 185 227 0 186 1 amapchunkpl 152 688954 0 687937 145 102 43 54 0 158 0 amappl16 200 61259 0 60157 219 155 64 72 0 8 0 amappl15 192 2673 0 2673 8 8 0 1 0 8 0 amappl14 184 1932 0 1930 6 5 1 1 0 8 0 amappl13 176 6247 0 6243 1 0 1 1 0 8 0 amappl12 168 1421 0 1417 1 0 1 1 0 8 0 amappl11 160 2364 0 2350 1 0 1 1 0 8 0 amappl10 152 2352 0 2344 1 0 1 1 0 8 0 amappl9 144 1815 0 1811 1 0 1 1 0 8 0 amappl8 136 6428 0 6304 5 0 5 5 0 8 0 amappl7 128 4513 0 4493 1 0 1 1 0 8 0 amappl6 120 2111 0 2081 2 0 2 2 0 8 0 amappl5 112 18645 0 18625 1 0 1 1 0 8 0 amappl4 104 7041 0 7013 1 0 1 1 0 8 0 amappl3 96 5823 0 5806 1 0 1 1 0 8 0 amappl2 88 8461 0 8400 9 7 2 2 0 8 0 amappl1 80 401770 0 401271 14 2 12 13 0 8 0 amappl 88 273270 0 272946 9 1 8 8 0 92 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 137 0 7 3 0 3 3 0 8 0 uaddrrnd 24 22700 0 22464 2 0 2 2 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 22700 0 22464 2 0 2 2 0 8 0 vmmpekpl 168 147174 0 147111 7 3 4 4 0 8 0 vmmpepl 168 2087802 0 2083698 849 644 205 213 0 357 13 vmsppl 368 22699 0 22464 22 0 22 22 0 8 0 rwobjpl 56 486667 0 478200 167 46 121 123 0 8 1 pdppl 4096 45408 0 45142 369 101 268 270 0 8 2 pvpl 32 10898878 0 10874766 708 505 203 295 0 265 3 pmappl 248 22699 0 22464 15 0 15 15 0 8 0 extentpl 40 57 0 38 1 0 1 1 0 8 0 phpool 112 2020 0 647 41 1 40 40 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff824818ff) at panic+0x177 sys/kern/subr_prf.c:202 ufs_lookup() at ufs_lookup+0x174c ufs_dirbad sys/ufs/ufs/ufs_lookup.c:609 [inline] ufs_lookup() at ufs_lookup+0x174c sys/ufs/ufs/ufs_lookup.c:444 VOP_LOOKUP(fffffd806f559658,ffff8000211dc758,ffff8000211dc788) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff8000211dc728) at vfs_lookup+0x6e5 sys/kern/vfs_lookup.c:561 namei(ffff8000211dc728) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff8000211dc728,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff8000211937a8,ffffff9c,7f7ffffe66a0,0,0,ffff8000211dc910) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff8000211dc980) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000211dc980) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe6690, count: -10 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffff800020d38ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 acpicpu_idle() at acpicpu_idle+0x312 sys/dev/acpi/acpicpu.c:1206 sched_idle(ffff800020d38ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178 end trace frame: 0x0, count: 10 ddb{1}> trace x86_ipi_db(ffff800020d38ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 acpicpu_idle() at acpicpu_idle+0x312 sys/dev/acpi/acpicpu.c:1206 sched_idle(ffff800020d38ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178 end trace frame: 0x0, count: -5