panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *117663 27111 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(fffffd8076de3578,ffff8000211dc6d8,ffff8000211dc708) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff8000211dc6a8) at vfs_lookup+0x6e5 sys/kern/vfs_lookup.c:561 namei(ffff8000211dc6a8) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff8000211dc6a8,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff800021193a48,ffffff9c,7f7ffffe2720,0,0,ffff8000211dc890) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff8000211dc900) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000211dc900) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe2710, 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(fffffd8076de3578,ffff8000211dc6d8,ffff8000211dc708) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff8000211dc6a8) at vfs_lookup+0x6e5 sys/kern/vfs_lookup.c:561 namei(ffff8000211dc6a8) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff8000211dc6a8,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff800021193a48,ffffff9c,7f7ffffe2720,0,0,ffff8000211dc890) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff8000211dc900) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000211dc900) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe2710, count: -10 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff8000211dc160 rbx 0xffffffff82774bff cpu_info_full_primary+0x2bff rdx 0 rcx 0 rax 0xffff800021193a48 r8 0x101010101010101 r9 0x8080808080808080 r10 0x6fc41b654d969c30 r11 0xa277cba7a9477e36 r12 0xffffffff82774a00 cpu_info_full_primary+0x2a00 r13 0 r14 0 r15 0x1 rip 0xffffffff8207c658 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000211dc150 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (dhcpleased) pid=117663 stat=onproc flags process=0 proc=0 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800021192008,0xffff8000ffff7280 process=0xffff8000ffff8008 user=0xffff8000211d7000, vmspace=0xfffffd800858a8a0 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 34810 145845 28490 0 2 0 syz-executor.2 34810 193097 28490 0 2 0x4000000 syz-executor.2 63214 154094 16741 0 2 0 syz-executor.3 63214 283472 16741 0 3 0x4000080 fsleep syz-executor.3 31332 46068 60263 0 2 0 syz-executor.0 31332 46332 60263 0 2 0x4000000 syz-executor.0 16741 180179 71139 0 3 0x82 nanoslp syz-executor.3 28490 440653 71139 0 2 0x482 syz-executor.2 62117 499447 71139 0 3 0x82 nanoslp syz-executor.1 60263 413957 71139 0 3 0x82 nanoslp syz-executor.0 9115 286225 0 0 3 0x14200 bored sosplice 32805 223619 0 0 3 0x14280 nfsidl nfsio 445 278027 0 0 3 0x14280 nfsidl nfsio 44304 191262 0 0 3 0x14280 nfsidl nfsio 64551 176280 0 0 3 0x14280 nfsidl nfsio 51788 166368 0 0 3 0x14280 nfsidl nfsio 73722 279314 0 0 3 0x14280 nfsidl nfsio 48702 465954 0 0 3 0x14280 nfsidl nfsio 72952 127023 0 0 3 0x14280 nfsidl nfsio 18263 481426 0 0 3 0x14280 nfsidl nfsio 8102 245135 0 0 3 0x14280 nfsidl nfsio 72176 217500 0 0 3 0x14280 nfsidl nfsio 5945 490365 0 0 3 0x14280 nfsidl nfsio 84006 216663 0 0 3 0x14280 nfsidl nfsio 33042 431810 0 0 3 0x14280 nfsidl nfsio 17506 89517 0 0 3 0x14280 nfsidl nfsio 93840 25124 0 0 3 0x14280 nfsidl nfsio 89177 235361 0 0 3 0x14280 nfsidl nfsio 76974 186591 0 0 3 0x14280 nfsidl nfsio 11326 109516 0 0 3 0x14280 nfsidl nfsio 94782 412429 0 0 3 0x14280 nfsidl nfsio 71139 488393 8566 0 3 0x82 thrsleep syz-fuzzer 71139 394538 8566 0 3 0x4000082 thrsleep syz-fuzzer 71139 485811 8566 0 3 0x4000082 thrsleep syz-fuzzer 71139 20008 8566 0 3 0x4000082 kqread syz-fuzzer 71139 193188 8566 0 3 0x4000082 thrsleep syz-fuzzer 71139 391455 8566 0 3 0x4000082 thrsleep syz-fuzzer 71139 515454 8566 0 3 0x4000082 thrsleep syz-fuzzer 71139 475769 8566 0 3 0x4000082 thrsleep syz-fuzzer 71139 112369 8566 0 3 0x4000082 thrsleep syz-fuzzer 8566 53741 94291 0 3 0x10008a sigsusp ksh 94291 86198 84950 0 3 0x9a poll sshd 84950 253562 1 0 3 0x88 poll sshd 51802 197460 22603 74 3 0x100092 bpf pflogd 22603 345976 1 0 3 0x80 netio pflogd 9040 355414 65732 73 3 0x100090 kqread syslogd 65732 36073 1 0 3 0x100082 netio syslogd 60904 188408 1 0 3 0x100080 kqread resolvd 73396 428280 27111 77 3 0x100092 kqread dhcpleased 48202 156414 27111 77 3 0x100092 kqread dhcpleased *27111 117663 1 0 7 0 dhcpleased 6245 251058 0 0 3 0x14200 bored smr 38794 442871 0 0 2 0x14200 zerothread 88002 154902 0 0 3 0x14200 aiodoned aiodoned 13359 384069 0 0 3 0x14200 syncer update 72864 322042 0 0 3 0x14200 cleaner cleaner 46314 475611 0 0 3 0x14200 reaper reaper 1367 174312 0 0 3 0x14200 pgdaemon pagedaemon 52526 84547 0 0 3 0x14200 bored viomb 39139 182591 0 0 3 0x40014200 acpi0 acpi0 28793 149690 0 0 7 0x40014200 idle1 55262 41169 0 0 3 0x14200 bored softnet 55396 494848 0 0 3 0x14200 bored systqmp 89816 416031 0 0 3 0x14200 bored systq 95701 301217 0 0 3 0x40014200 bored softclock 59046 267527 0 0 3 0x40014200 idle0 1 191434 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 27111 (dhcpleased) thread 0xffff800021193a48 (117663) 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 (0xfffffd806f10f3d0) #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 10224 6520K 14712K 78643K 67614 0 pcb 13 24K 34K 78643K 6607 0 rtable 155 15K 16K 78643K 13913 0 ifaddr 72 22K 25K 78643K 2652 0 sysctl 3 1K 2K 78643K 8 0 counters 50 34K 35K 78643K 902 0 ioctlops 0 0K 8K 78643K 9680 0 iov 0 0K 28K 78643K 3248 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1686 106K 106K 78643K 20847 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 363 0 VM map 2 1K 1K 78643K 2 0 sem 17 16K 32K 78643K 2592 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 9 29K 49K 78643K 38413 0 sigio 0 0K 0K 78643K 428 0 proc 78 88K 112K 78643K 6548 0 subproc 52 6K 10K 78643K 2381 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 3491 0 in_multi 48 3K 4K 78643K 4921 0 ether_multi 1 0K 0K 78643K 667 0 mrt 2 0K 0K 78643K 155 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 271 1208K 1208K 78643K 271 0 exec 0 0K 2K 78643K 9233 0 pfkey data 0 0K 1K 78643K 14 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 685 1916K 1920K 78643K 478507 0 UVM aobj 131 8K 8K 78643K 137 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 2876 0 NDP 11 0K 1K 78643K 1015 0 temp 117 4214K 8310K 78643K 301548 0 kqueue 14 19K 25K 78643K 1637 0 SYN cache 2 16K 16K 78643K 2 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 3119 0 3116 45 44 1 5 0 8 0 rtentry 112 3186 0 3128 2 0 2 2 0 8 0 unpcb 136 19831 0 19814 209 206 3 10 0 8 2 syncache 296 100 0 100 32 32 0 1 0 8 0 tcpqe 32 120 312 120 4 4 0 1 0 8 0 tcpcb 736 15921 0 15917 445 442 3 21 0 8 2 arp 120 420 0 410 1 0 1 1 0 8 0 inpcb 304 69967 0 69958 559 553 6 17 0 8 5 rttmr 72 47 0 47 15 15 0 1 0 8 0 ip6q 72 6 0 6 2 2 0 1 0 8 0 ip6af 40 66 0 66 2 2 0 1 0 8 0 nd6 48 797 0 787 1 0 1 1 0 8 0 pkpcb 40 348 0 348 25 24 1 1 0 8 1 kcovpl 48 177 0 173 1 0 1 1 0 8 0 ppxss 1248 107 0 107 34 33 1 1 0 8 1 pffrag 232 225 0 224 24 23 1 1 0 482 0 pffrnode 88 225 0 224 24 23 1 1 0 8 0 pffrent 40 1442 0 1441 27 26 1 1 0 8 0 pfosfp 40 1428 0 1005 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfrktable 1344 38 0 34 1 0 1 1 0 8 0 pftag 88 7 0 3 1 0 1 1 0 8 0 pfstitem 24 34 0 32 1 0 1 1 0 8 0 pfstkey 112 34 0 32 1 0 1 1 0 8 0 pfstate 320 34 0 32 2 1 1 2 0 8 0 pfrule 1360 204 0 177 6 3 3 3 0 8 0 art_heap8 4096 8 0 7 7 6 1 4 0 8 0 art_heap4 256 14281 0 14053 70 55 15 20 0 8 0 art_table 32 14289 0 14060 7 4 3 3 0 8 0 art_node 16 3137 0 3088 1 0 1 1 0 8 0 sysvmsgpl 40 55 0 40 1 0 1 1 0 8 0 semupl 112 4 0 4 2 2 0 1 0 8 0 semapl 112 2586 0 2571 1 0 1 1 0 8 0 shmpl 112 134 0 6 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 51993 0 50466 96 0 96 96 0 8 0 ffsino 272 51993 0 50466 102 0 102 102 0 8 0 nchpl 144 102193 0 100590 61 0 61 61 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 364004 0 364003 10 9 1 2 0 8 0 percpumem 16 463 0 426 1 0 1 1 0 8 0 vcpupl 2048 396 0 0 50 0 50 50 0 8 0 vmpool 560 512 0 116 29 0 29 29 0 8 0 pfiaddrpl 120 15 0 7 1 0 1 1 0 8 0 scsiplug 72 37 0 37 9 9 0 1 0 8 0 scxspl 216 301706 0 301706 52 51 1 8 0 8 1 plimitpl 152 4270 0 4259 1 0 1 1 0 8 0 sigapl 424 38166 0 38109 7 0 7 7 0 8 0 futexpl 64 363075 0 363074 7 6 1 1 0 8 0 knotepl 112 329 0 0 4 0 4 4 0 8 0 kqueuepl 216 8109 0 8089 168 163 5 6 0 8 3 pipepl 336 7651 0 7635 173 171 2 7 0 8 0 fdescpl 496 38118 0 38097 5 2 3 4 0 8 0 filepl 152 284270 0 284114 417 403 14 19 0 8 8 lockfpl 104 10014 0 10012 22 21 1 2 0 8 0 lockfspl 48 2974 0 2972 1 0 1 1 0 8 0 sessionpl 144 193 0 180 1 0 1 1 0 8 0 pgrppl 48 209 0 196 1 0 1 1 0 8 0 ucredpl 96 39071 0 39057 1 0 1 1 0 8 0 zombiepl 144 38110 0 38108 2 1 1 1 0 8 0 processpl 1064 38166 0 38108 5 1 4 5 0 8 0 procpl 672 102035 0 101966 38 30 8 8 0 8 0 srpgc 96 222 0 222 41 41 0 1 0 8 0 sosppl 168 410 0 410 66 66 0 1 0 8 0 sockpl 480 93608 0 93578 1514 1502 12 45 0 8 8 mcl64k 65536 51 0 0 4 1 3 3 0 8 0 mcl16k 16384 21 0 0 3 1 2 3 0 8 0 mcl12k 12288 25 0 0 3 1 2 2 0 8 0 mcl9k 9216 33 0 0 2 0 2 2 0 8 0 mcl8k 8192 18 0 0 3 1 2 3 0 8 0 mcl4k 4096 56 0 0 5 2 3 3 0 8 0 mcl2k2 2112 17 0 0 2 0 2 2 0 8 0 mcl2k 2048 547 0 0 21 2 19 19 0 8 0 mtagpl 96 1775 0 0 9 1 8 8 0 8 0 mbufpl 256 2855 0 0 64 0 64 64 0 8 0 bufpl 288 64833 0 58547 454 0 454 454 0 8 0 anonpl 24 10793526 0 10758186 689 468 221 247 0 186 0 amapchunkpl 152 1194485 0 1193494 232 192 40 49 0 158 0 amappl16 200 105778 0 104256 341 255 86 94 0 8 0 amappl15 192 5118 0 5115 10 9 1 1 0 8 0 amappl14 184 3701 0 3699 2 1 1 1 0 8 0 amappl13 176 6230 0 6229 1 0 1 1 0 8 0 amappl12 168 5486 0 5479 1 0 1 1 0 8 0 amappl11 160 3956 0 3941 1 0 1 1 0 8 0 amappl10 152 5195 0 5184 1 0 1 1 0 8 0 amappl9 144 7285 0 7281 1 0 1 1 0 8 0 amappl8 136 7716 0 7588 7 2 5 5 0 8 0 amappl7 128 4706 0 4695 1 0 1 1 0 8 0 amappl6 120 8021 0 8001 1 0 1 1 0 8 0 amappl5 112 32976 0 32954 1 0 1 1 0 8 0 amappl4 104 12542 0 12514 1 0 1 1 0 8 0 amappl3 96 11261 0 11245 1 0 1 1 0 8 0 amappl2 88 10290 0 10215 5 3 2 2 0 8 0 amappl1 80 691468 0 690976 13 2 11 13 0 8 0 amappl 88 474491 0 474134 13 4 9 9 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 136 0 6 3 0 3 3 0 8 0 uaddrrnd 24 38630 0 38212 3 0 3 3 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 38630 0 38212 3 0 3 3 0 8 0 vmmpekpl 168 233756 0 233682 4 0 4 4 0 8 0 vmmpepl 168 3531183 0 3527107 1163 945 218 218 0 357 28 vmsppl 368 38629 0 38212 39 0 39 39 0 8 0 rwobjpl 56 845364 0 836433 215 88 127 130 0 8 0 pdppl 4096 77268 0 76820 628 178 450 452 0 8 2 pvpl 32 17977671 0 17954431 926 722 204 260 0 265 3 pmappl 248 38629 0 38212 27 0 27 27 0 8 0 extentpl 40 57 0 38 1 0 1 1 0 8 0 phpool 112 2186 0 873 42 4 38 39 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(fffffd8076de3578,ffff8000211dc6d8,ffff8000211dc708) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff8000211dc6a8) at vfs_lookup+0x6e5 sys/kern/vfs_lookup.c:561 namei(ffff8000211dc6a8) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff8000211dc6a8,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff800021193a48,ffffff9c,7f7ffffe2720,0,0,ffff8000211dc890) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff8000211dc900) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000211dc900) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe2710, 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}> tc No such command