panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 50129 68068 0 0 0 0K dhcpleased db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8247c2e6) 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(fffffd806f76b8f8,ffff8000211dc9e8,ffff8000211dca18) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff8000211dc9b8) at vfs_lookup+0x6e5 sys/kern/vfs_lookup.c:561 namei(ffff8000211dc9b8) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff8000211dc9b8,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff800021193ce8,ffffff9c,7f7ffffcc600,0,0,ffff8000211dcba0) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff8000211dcc10) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000211dcc10) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcc5f0, 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(ffffffff8247c2e6) 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(fffffd806f76b8f8,ffff8000211dc9e8,ffff8000211dca18) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff8000211dc9b8) at vfs_lookup+0x6e5 sys/kern/vfs_lookup.c:561 namei(ffff8000211dc9b8) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff8000211dc9b8,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff800021193ce8,ffffff9c,7f7ffffcc600,0,0,ffff8000211dcba0) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff8000211dcc10) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000211dcc10) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcc5f0, count: -10 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff8000211dc470 rbx 0xffffffff827c9bff cpu_info_full_primary+0x2bff rdx 0 rcx 0 rax 0xffff800021193ce8 r8 0x101010101010101 r9 0x8080808080808080 r10 0x81e535731b0ded7e r11 0x53666898c2e2214c r12 0xffffffff827c9a00 cpu_info_full_primary+0x2a00 r13 0 r14 0 r15 0x1 rip 0xffffffff814d5088 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000211dc460 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (dhcpleased) pid=50129 stat=onproc flags process=0 proc=0 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000211922a8,0xffff8000ffff77c0 process=0xffff8000ffff8c80 user=0xffff8000211d7000, vmspace=0xfffffd807f0008a0 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 31355 11774 21001 0 2 0 syz-executor.1 31355 264475 21001 0 2 0x4000000 syz-executor.1 65060 351180 50705 0 2 0 syz-executor.0 65060 454846 50705 0 2 0x4000000 syz-executor.0 61512 281368 17537 0 3 0x80 nanoslp syz-executor.2 61512 492131 17537 0 3 0x4000080 lockf syz-executor.2 61512 178137 17537 0 3 0x4000080 fsleep syz-executor.2 17537 124055 21889 0 3 0x82 nanoslp syz-executor.2 50705 405478 21889 0 3 0x82 nanoslp syz-executor.0 21001 134525 21889 0 2 0x482 syz-executor.1 18125 195266 21889 0 3 0x82 nanoslp syz-executor.3 23019 246125 0 0 3 0x14200 acct acct 7892 49222 1 0 3 0x100083 ttyin getty 95737 250337 0 0 3 0x14200 bored sosplice 21889 152198 35859 0 3 0x82 thrsleep syz-fuzzer 21889 238863 35859 0 3 0x4000082 thrsleep syz-fuzzer 21889 258118 35859 0 3 0x4000082 kqread syz-fuzzer 21889 52972 35859 0 3 0x4000082 thrsleep syz-fuzzer 21889 40285 35859 0 3 0x4000082 thrsleep syz-fuzzer 21889 189750 35859 0 3 0x4000082 thrsleep syz-fuzzer 21889 343561 35859 0 3 0x4000082 thrsleep syz-fuzzer 21889 7786 35859 0 3 0x4000082 thrsleep syz-fuzzer 21889 59473 35859 0 3 0x4000082 thrsleep syz-fuzzer 21889 420252 35859 0 3 0x4000082 thrsleep syz-fuzzer 35859 311218 26855 0 3 0x10008a sigsusp ksh 26855 4206 16183 0 3 0x9a poll sshd 16183 523232 1 0 3 0x88 poll sshd 91190 279204 21650 74 3 0x100092 bpf pflogd 21650 119280 1 0 3 0x80 netio pflogd 6130 156290 86613 73 3 0x100090 kqread syslogd 86613 20370 1 0 3 0x100082 netio syslogd 95216 25539 1 0 3 0x100080 kqread resolvd 37363 340235 68068 77 3 0x100092 kqread dhcpleased 91622 469070 68068 77 3 0x100092 kqread dhcpleased *68068 50129 1 0 7 0 dhcpleased 73550 505399 0 0 3 0x14200 bored smr 76299 174560 0 0 2 0x14200 zerothread 89614 42579 0 0 3 0x14200 aiodoned aiodoned 45519 260799 0 0 3 0x14200 syncer update 5742 357908 0 0 3 0x14200 cleaner cleaner 94890 233525 0 0 3 0x14200 reaper reaper 65328 292975 0 0 3 0x14200 pgdaemon pagedaemon 97552 234427 0 0 3 0x14200 bored viomb 35650 248039 0 0 3 0x40014200 acpi0 acpi0 17851 5953 0 0 7 0x40014200 idle1 16083 210081 0 0 3 0x14200 bored softnet 92606 49578 0 0 3 0x14200 bored systqmp 50120 489695 0 0 3 0x14200 bored systq 72714 404284 0 0 2 0x40014200 softclock 24725 264126 0 0 3 0x40014200 idle0 1 268831 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 68068 (dhcpleased) thread 0xffff800021193ce8 (50129) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82995d68) #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 (0xfffffd806f10e700) #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 10225 6521K 7162K 78643K 58815 0 pcb 13 22K 26K 78643K 14159 0 rtable 199 35K 37K 78643K 13795 0 ifaddr 105 30K 31K 78643K 7354 0 sysctl 3 1K 3K 78643K 70 0 counters 50 34K 35K 78643K 786 0 ioctlops 0 0K 6K 78643K 17316 0 iov 0 0K 18K 78643K 3172 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1453 91K 92K 78643K 20562 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 294 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 6909 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 9 29K 49K 78643K 44272 0 sigio 0 0K 0K 78643K 211 0 proc 72 87K 111K 78643K 5121 0 subproc 52 3K 3K 78643K 1494 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 1948 0 in_multi 32 2K 4K 78643K 5778 0 ether_multi 1 0K 0K 78643K 480 0 mrt 1 0K 0K 78643K 174 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 265 1182K 1182K 78643K 265 0 exec 0 0K 2K 78643K 6706 0 pfkey data 0 0K 1K 78643K 26 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 775 2212K 2213K 78643K 535049 0 UVM aobj 131 4K 4K 78643K 142 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 4368 0 NDP 12 0K 1K 78643K 1486 0 temp 139 4250K 8310K 78643K 398016 0 kqueue 10 14K 24K 78643K 1975 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 2028 0 2025 26 25 1 3 0 8 0 rtentry 112 2795 0 2759 3 1 2 2 0 8 0 unpcb 136 23819 0 23804 257 256 1 9 0 8 0 syncache 296 53 0 53 15 15 0 1 0 8 0 tcpqe 32 159 0 159 4 4 0 2 0 8 0 tcpcb 736 16602 0 16598 460 451 9 20 0 8 8 arp 120 251 0 245 1 0 1 1 0 8 0 inpcb 304 55341 0 55332 538 529 9 16 0 8 8 rttmr 72 36 0 36 11 11 0 1 0 8 0 nd6 48 1264 0 1256 1 0 1 1 0 8 0 pkpcb 40 100 0 100 16 16 0 1 0 8 0 kcovpl 48 114 0 110 1 0 1 1 0 8 0 ppxss 1248 61 0 61 20 20 0 1 0 8 0 pfstscr 40 60 0 60 7 7 0 1 0 8 0 pffrag 232 2915 0 2915 19 18 1 3 0 482 1 pffrnode 88 1317 0 1317 17 16 1 1 0 8 1 pffrent 40 6721 0 6721 18 17 1 1 0 8 1 pfosfp 40 3586 0 3095 5 0 5 5 0 8 0 pfosfpen 112 3586 0 1585 58 0 58 58 0 8 0 pfrktable 1344 2945 0 2902 18 14 4 5 0 8 0 pftag 88 63 0 54 2 1 1 1 0 8 0 pfqueue 264 7 0 7 2 2 0 1 0 8 0 pfstitem 24 88 0 84 1 0 1 1 0 8 0 pfstkey 112 282 0 278 1 0 1 1 0 8 0 pfstate 320 181 0 177 2 1 1 2 0 8 0 pfsrctr 152 75 0 75 9 9 0 1 0 8 0 pfrule 1360 8607 0 7933 68 11 57 57 0 8 0 art_heap8 4096 8 0 6 6 4 2 3 0 8 0 art_heap4 256 15371 0 15197 87 76 11 20 0 8 0 art_table 32 15379 0 15203 8 6 2 3 0 8 0 art_node 16 2653 0 2623 1 0 1 1 0 8 0 sysvmsgpl 40 56 0 35 1 0 1 1 0 8 0 semapl 112 6907 0 6897 1 0 1 1 0 8 0 shmpl 112 139 0 11 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 59126 0 57621 95 0 95 95 0 8 0 ffsino 272 59126 0 57621 101 0 101 101 0 8 0 nchpl 144 131009 0 129407 61 0 61 61 0 8 0 uvmvnodes 80 7263 0 0 149 0 149 149 0 8 0 vnodes 224 7263 0 0 428 0 428 428 0 8 0 namei 1024 431799 0 431798 10 9 1 1 0 8 0 percpumem 16 405 0 368 1 0 1 1 0 8 0 vcpupl 2048 476 0 0 60 0 60 60 0 8 0 vmpool 560 512 0 36 34 0 34 34 0 8 0 pfiaddrpl 120 2566 0 2403 5 0 5 5 0 8 0 scxspl 216 373574 0 373574 22 21 1 8 0 8 1 plimitpl 152 3027 0 3016 1 0 1 1 0 8 0 sigapl 424 44225 0 44187 9 3 6 7 0 8 0 futexpl 64 454018 0 454017 12 11 1 1 0 8 0 knotepl 112 237 0 0 4 0 4 4 0 8 0 kqueuepl 216 10221 0 10210 180 179 1 8 0 8 0 pipepl 336 7459 0 7443 215 207 8 13 0 8 6 fdescpl 496 44168 0 44146 4 1 3 4 0 8 0 filepl 152 322759 0 322602 441 429 12 18 0 8 5 lockfpl 104 10125 0 10121 18 17 1 2 0 8 0 lockfspl 48 2920 0 2917 1 0 1 1 0 8 0 sessionpl 144 132 0 119 1 0 1 1 0 8 0 pgrppl 48 2450 0 2437 1 0 1 1 0 8 0 ucredpl 96 31219 0 31203 1 0 1 1 0 8 0 zombiepl 144 44187 0 44186 2 1 1 1 0 8 0 processpl 1064 44225 0 44186 5 1 4 4 0 8 0 procpl 672 108643 0 108591 47 41 6 8 0 8 0 srpgc 96 146 0 146 30 30 0 1 0 8 0 sosppl 168 237 0 237 45 45 0 1 0 8 0 sockpl 480 81409 0 81382 1394 1382 12 34 0 8 8 mcl64k 65536 17 0 0 3 0 3 3 0 8 0 mcl16k 16384 7 0 0 1 0 1 1 0 8 0 mcl12k 12288 7 0 0 1 0 1 1 0 8 0 mcl9k 9216 13 0 0 1 0 1 1 0 8 0 mcl8k 8192 88 0 0 10 3 7 7 0 8 0 mcl4k 4096 18 0 0 3 0 3 3 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 715 0 0 49 10 39 40 0 8 0 mtagpl 96 1703 0 0 14 3 11 12 0 8 0 mbufpl 256 11408 0 0 596 1 595 595 0 8 0 bufpl 288 68576 0 62161 520 11 509 520 0 8 0 anonpl 24 12038742 0 12011095 445 269 176 188 0 186 0 amapchunkpl 152 1294725 0 1293696 243 201 42 53 0 158 1 amappl16 200 114064 0 112815 351 284 67 79 0 8 0 amappl15 192 10561 0 10560 3 2 1 1 0 8 0 amappl14 184 3535 0 3533 10 9 1 1 0 8 0 amappl13 176 1889 0 1887 1 0 1 1 0 8 0 amappl12 168 2729 0 2726 1 0 1 1 0 8 0 amappl11 160 10754 0 10738 1 0 1 1 0 8 0 amappl10 152 4692 0 4685 1 0 1 1 0 8 0 amappl9 144 5578 0 5574 1 0 1 1 0 8 0 amappl8 136 9306 0 9167 5 0 5 5 0 8 0 amappl7 128 7077 0 7063 1 0 1 1 0 8 0 amappl6 120 5985 0 5952 7 5 2 2 0 8 0 amappl5 112 35503 0 35472 3 2 1 2 0 8 0 amappl4 104 25533 0 25501 1 0 1 1 0 8 0 amappl3 96 5756 0 5726 1 0 1 1 0 8 0 amappl2 88 5278 0 5223 3 1 2 2 0 8 0 amappl1 80 772355 0 771845 13 1 12 13 0 8 0 amappl 88 532129 0 531737 13 3 10 10 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 141 0 11 3 0 3 3 0 8 0 uaddrrnd 24 44680 0 44182 4 0 4 4 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 44680 0 44182 4 0 4 4 0 8 0 vmmpekpl 168 258325 0 258250 4 0 4 4 0 8 0 vmmpepl 168 3964163 0 3960331 1156 974 182 209 0 357 8 vmsppl 368 44679 0 44182 47 1 46 46 0 8 0 rwobjpl 56 906465 0 896660 196 57 139 142 0 8 0 pdppl 4096 89368 0 88840 670 140 530 531 0 8 2 pvpl 32 20447457 0 20423841 690 454 236 263 0 265 0 pmappl 248 44679 0 44182 32 0 32 32 0 8 0 extentpl 40 57 0 38 1 0 1 1 0 8 0 phpool 112 3007 0 926 60 0 60 60 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(ffffffff8247c2e6) 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(fffffd806f76b8f8,ffff8000211dc9e8,ffff8000211dca18) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff8000211dc9b8) at vfs_lookup+0x6e5 sys/kern/vfs_lookup.c:561 namei(ffff8000211dc9b8) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff8000211dc9b8,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff800021193ce8,ffffff9c,7f7ffffcc600,0,0,ffff8000211dcba0) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff8000211dcc10) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000211dcc10) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcc5f0, 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