panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 38751 41013 0 0 0 0K dhcpleased db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8248b22a) 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(fffffd8075a53818,ffff8000211dc668,ffff8000211dc698) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff8000211dc638) at vfs_lookup+0x6e5 sys/kern/vfs_lookup.c:561 namei(ffff8000211dc638) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff8000211dc638,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff800021193ce8,ffffff9c,7f7ffffe1a20,0,0,ffff8000211dc820) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff8000211dc890) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000211dc890) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe1a10, 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(ffffffff8248b22a) 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(fffffd8075a53818,ffff8000211dc668,ffff8000211dc698) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff8000211dc638) at vfs_lookup+0x6e5 sys/kern/vfs_lookup.c:561 namei(ffff8000211dc638) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff8000211dc638,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff800021193ce8,ffffff9c,7f7ffffe1a20,0,0,ffff8000211dc820) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff8000211dc890) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000211dc890) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe1a10, count: -10 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff8000211dc0f0 rbx 0xffffffff827d4bff cpu_info_full_primary+0x2bff rdx 0 rcx 0 rax 0xffff800021193ce8 r8 0 r9 0x8080808080808080 r10 0x648098b5a32d0cf6 r11 0x4793e6e671ac4936 r12 0xffffffff827d4a00 cpu_info_full_primary+0x2a00 r13 0 r14 0 r15 0x1 rip 0xffffffff819cff18 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000211dc0e0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (dhcpleased) pid=38751 stat=onproc flags process=0 proc=0 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800021192d28,0xffff8000ffff77c0 process=0xffff8000ffff90a8 user=0xffff8000211d7000, vmspace=0xfffffd800858a2e0 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 2291 426998 17618 0 3 0x80 nanoslp syz-executor.0 2291 236886 17618 0 3 0x4000080 fsleep syz-executor.0 766 152162 59787 0 3 0x80 nanoslp syz-executor.1 766 113440 59787 0 3 0x4000080 fsleep syz-executor.1 89593 304400 82017 0 2 0x3000 syz-executor.2 55029 447745 23805 0 3 0x80 nanoslp syz-executor.3 55029 192625 23805 0 3 0x4000080 fsleep syz-executor.3 23805 182702 67204 0 3 0x82 nanoslp syz-executor.3 59787 272595 67204 0 3 0x82 nanoslp syz-executor.1 82017 297683 67204 0 3 0x82 nanoslp syz-executor.2 17618 94394 67204 0 2 0x482 syz-executor.0 495 349777 1 0 3 0x100083 ttyopn getty 13147 492367 0 0 3 0x14200 bored sosplice 67204 252586 63686 0 3 0x82 thrsleep syz-fuzzer 67204 492052 63686 0 2 0x4000482 syz-fuzzer 67204 354908 63686 0 3 0x4000082 thrsleep syz-fuzzer 67204 360170 63686 0 3 0x4000082 kqread syz-fuzzer 67204 418997 63686 0 3 0x4000082 thrsleep syz-fuzzer 67204 114691 63686 0 3 0x4000082 thrsleep syz-fuzzer 67204 480947 63686 0 3 0x4000082 thrsleep syz-fuzzer 67204 315252 63686 0 3 0x4000082 thrsleep syz-fuzzer 67204 44050 63686 0 3 0x4000082 thrsleep syz-fuzzer 63686 445251 30652 0 3 0x10008a sigsusp ksh 30652 324461 85670 0 3 0x9a poll sshd 85670 12382 1 0 3 0x88 poll sshd 15516 308207 98314 74 3 0x100092 bpf pflogd 98314 27272 1 0 3 0x80 netio pflogd 10851 381934 58390 73 3 0x100090 kqread syslogd 58390 296823 1 0 3 0x100082 netio syslogd 17034 74515 1 0 3 0x100080 kqread resolvd 35198 131813 41013 77 3 0x100092 kqread dhcpleased 64267 10634 41013 77 3 0x100092 kqread dhcpleased *41013 38751 1 0 7 0 dhcpleased 80929 374942 0 0 3 0x14200 bored smr 42195 147301 0 0 2 0x14200 zerothread 63468 334170 0 0 3 0x14200 aiodoned aiodoned 75730 484596 0 0 3 0x14200 syncer update 68159 475828 0 0 3 0x14200 cleaner cleaner 70273 240352 0 0 3 0x14200 reaper reaper 28809 441442 0 0 3 0x14200 pgdaemon pagedaemon 17273 328450 0 0 3 0x14200 bored viomb 78397 274569 0 0 3 0x40014200 acpi0 acpi0 63346 314493 0 0 7 0x40014200 idle1 91901 400212 0 0 3 0x14200 bored softnet 13910 166283 0 0 3 0x14200 bored systqmp 34469 507276 0 0 3 0x14200 bored systq 3181 443029 0 0 3 0x40014200 bored softclock 37409 258112 0 0 3 0x40014200 idle0 1 230693 0 0 3 0x80082 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 41013 (dhcpleased) thread 0xffff800021193ce8 (38751) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8298db88) #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 (0xfffffd806f1054e0) #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 10216 6506K 7496K 78643K 46838 0 pcb 13 24K 26K 78643K 7498 0 rtable 237 43K 46K 78643K 12726 0 ifaddr 699 179K 180K 78643K 4298 0 sysctl 2 0K 0K 78643K 2 0 counters 50 34K 35K 78643K 964 0 ioctlops 0 0K 4K 78643K 91572 0 iov 0 0K 32K 78643K 5221 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1362 86K 86K 78643K 16291 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 557 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 1K 78643K 16013 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 10 33K 49K 78643K 90449 0 sigio 0 0K 0K 78643K 328 0 proc 72 87K 112K 78643K 4188 0 subproc 52 3K 3K 78643K 1519 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 2970 0 in_multi 33 2K 3K 78643K 3440 0 ether_multi 1 0K 0K 78643K 699 0 mrt 2 0K 0K 78643K 115 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 253 1129K 1129K 78643K 253 0 exec 0 0K 2K 78643K 5454 0 pfkey data 0 0K 0K 78643K 10 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 793 1153K 1154K 78643K 1098557 0 UVM aobj 131 4K 4K 78643K 131 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 15841 0 NDP 11 0K 1K 78643K 822 0 temp 156 4290K 8386K 78643K 377889 0 kqueue 10 14K 26K 78643K 1647 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 1232 0 1229 12 11 1 4 0 8 0 rtentry 112 3028 0 2989 2 0 2 2 0 8 0 unpcb 136 39766 0 39747 358 355 3 9 0 8 2 syncache 296 286 0 286 32 32 0 1 0 8 0 tcpqe 32 174 30 174 10 10 0 1 0 8 0 tcpcb 736 44185 0 44177 746 742 4 33 0 8 2 arp 120 283 0 274 1 0 1 1 0 8 0 inpcb 304 86415 0 86399 533 530 3 17 0 8 1 rttmr 72 35 0 35 9 9 0 1 0 8 0 ip6q 72 6 0 6 2 2 0 1 0 8 0 ip6af 40 18 0 18 2 2 0 1 0 8 0 nd6 48 481 0 476 1 0 1 1 0 8 0 pkpcb 40 63 0 63 16 16 0 1 0 8 0 kcovpl 48 116 0 112 1 0 1 1 0 8 0 ppxss 1248 247 0 246 9 8 1 1 0 8 0 pfstscr 40 34 0 34 7 7 0 1 0 8 0 pffrag 232 164 0 161 16 15 1 1 0 482 0 pffrnode 88 164 0 161 16 15 1 1 0 8 0 pffrent 40 1407 0 1404 16 15 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 pfrke_plain 168 26 0 24 4 3 1 1 0 8 0 pfrktable 1344 2428 0 2367 26 20 6 6 0 8 0 pftag 88 118 0 100 1 0 1 1 0 8 0 pfqueue 264 43 0 8 4 1 3 3 0 8 0 pfstitem 24 22735 0 22676 28 26 2 14 0 8 0 pfstkey 112 35719 0 35660 158 155 3 64 0 8 0 pfstate 320 18018 0 17987 245 242 3 93 0 8 0 pfsrctr 152 4 0 4 1 1 0 1 0 8 0 pfrule 1360 74661 0 71105 298 1 297 297 0 8 0 art_heap8 4096 2 0 1 2 1 1 2 0 8 0 art_heap4 256 9465 0 9298 48 32 16 20 0 8 0 art_table 32 9467 0 9299 5 2 3 3 0 8 0 art_node 16 2973 0 2939 1 0 1 1 0 8 0 sysvmsgpl 40 27 0 0 1 0 1 1 0 8 0 semupl 112 6 0 6 2 2 0 1 0 8 0 semapl 112 15517 0 15507 1 0 1 1 0 8 0 shmpl 112 128 0 0 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 101538 0 100070 92 0 92 92 0 8 0 ffsino 272 101538 0 100070 99 0 99 99 0 8 0 nchpl 144 209910 0 208316 61 0 61 61 0 8 0 rtmask 32 52 0 50 4 3 1 1 0 8 0 uvmvnodes 80 8909 0 0 182 0 182 182 0 8 0 vnodes 224 8909 0 0 525 0 525 525 0 8 0 namei 1024 639921 0 639920 6 5 1 1 0 8 0 percpumem 16 494 0 457 1 0 1 1 0 8 0 vcpupl 2048 150 0 1 19 0 19 19 0 8 0 vmpool 560 203 0 54 12 1 11 11 0 8 0 pfiaddrpl 120 1310 0 1196 8 4 4 4 0 8 0 scsiplug 72 13 0 13 5 5 0 1 0 8 0 scxspl 216 2581878 0 2581878 23 22 1 8 0 8 1 plimitpl 152 1963 0 1952 1 0 1 1 0 8 0 sigapl 424 90415 0 90377 12 6 6 7 0 8 0 futexpl 64 738238 0 738235 11 10 1 1 0 8 0 knotepl 112 122 0 0 3 0 3 3 0 8 0 kqueuepl 216 10391 0 10383 164 163 1 10 0 8 0 pipepl 336 8459 0 8441 180 178 2 7 0 8 0 fdescpl 496 90338 0 90315 7 4 3 4 0 8 0 filepl 152 457372 0 457205 615 605 10 18 0 8 3 lockfpl 104 7835 0 7833 12 11 1 2 0 8 0 lockfspl 48 2418 0 2416 1 0 1 1 0 8 0 sessionpl 144 133 0 120 1 0 1 1 0 8 0 pgrppl 48 245 0 232 1 0 1 1 0 8 0 ucredpl 96 36906 0 36894 1 0 1 1 0 8 0 zombiepl 144 90378 0 90377 1 0 1 1 0 8 0 processpl 1064 90415 0 90377 7 3 4 5 0 8 0 procpl 672 218366 0 218317 56 50 6 8 0 8 0 srpgc 96 127 0 127 28 28 0 1 0 8 0 sosppl 168 153 0 153 29 29 0 1 0 8 0 sockpl 480 127540 0 127502 2060 2048 12 34 0 8 7 mcl64k 65536 7 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 2 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 8 0 0 1 0 1 1 0 8 0 mcl4k 4096 2 0 0 1 0 1 1 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 1825 0 0 28 3 25 25 0 8 0 mtagpl 96 1723 0 0 27 18 9 15 0 8 0 mbufpl 256 4560 0 0 129 17 112 112 0 8 0 bufpl 288 153512 0 146568 637 35 602 637 0 8 0 anonpl 24 24067836 0 24050338 553 434 119 129 0 186 13 amapchunkpl 152 2618839 0 2618064 211 180 31 41 0 158 1 amappl16 200 226978 0 226429 299 269 30 42 0 8 1 amappl15 192 16862 0 16860 7 6 1 1 0 8 0 amappl14 184 19857 0 19849 1 0 1 1 0 8 0 amappl13 176 6075 0 6073 1 0 1 1 0 8 0 amappl12 168 3632 0 3624 1 0 1 1 0 8 0 amappl11 160 7182 0 7167 1 0 1 1 0 8 0 amappl10 152 18478 0 18457 1 0 1 1 0 8 0 amappl9 144 10353 0 10351 1 0 1 1 0 8 0 amappl8 136 18417 0 18040 15 1 14 14 0 8 0 amappl7 128 14982 0 14971 1 0 1 1 0 8 0 amappl6 120 10987 0 10952 20 18 2 2 0 8 0 amappl5 112 90704 0 90667 4 2 2 2 0 8 0 amappl4 104 24197 0 24156 2 0 2 2 0 8 0 amappl3 96 11597 0 11568 1 0 1 1 0 8 0 amappl2 88 11349 0 11282 19 17 2 2 0 8 0 amappl1 80 1551724 0 1551198 18 6 12 13 0 8 0 amappl 88 1095223 0 1094896 11 3 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 130 0 0 3 0 3 3 0 8 0 uaddrrnd 24 90541 0 90369 2 0 2 2 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 90541 0 90369 2 0 2 2 0 8 0 vmmpekpl 168 481818 0 481766 3 0 3 3 0 8 0 vmmpepl 168 7886834 0 7883961 839 710 129 160 0 357 1 vmsppl 368 90540 0 90369 18 2 16 16 0 8 0 rwobjpl 56 1807913 0 1796987 199 44 155 158 0 8 1 pdppl 4096 181090 0 180887 364 161 203 203 0 8 0 pvpl 32 41454815 0 41434485 1073 886 187 235 0 265 23 pmappl 248 90540 0 90369 11 0 11 11 0 8 0 extentpl 40 57 0 38 1 0 1 1 0 8 0 phpool 112 2676 0 1179 43 0 43 43 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(ffffffff8248b22a) 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(fffffd8075a53818,ffff8000211dc668,ffff8000211dc698) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff8000211dc638) at vfs_lookup+0x6e5 sys/kern/vfs_lookup.c:561 namei(ffff8000211dc638) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff8000211dc638,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff800021193ce8,ffffff9c,7f7ffffe1a20,0,0,ffff8000211dc820) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff8000211dc890) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000211dc890) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe1a10, 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