panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *448236 85056 0 0 0 0 dhcpleased db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8245b8be) at panic+0x161 sys/kern/subr_prf.c:202 ufs_lookup() at ufs_lookup+0x1749 ufs_dirbad sys/ufs/ufs/ufs_lookup.c:609 [inline] ufs_lookup() at ufs_lookup+0x1749 sys/ufs/ufs/ufs_lookup.c:444 VOP_LOOKUP(fffffd806f128658,ffff800021664f88,ffff800021664fb8) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff800021664f58) at vfs_lookup+0x6cc sys/kern/vfs_lookup.c:561 namei(ffff800021664f58) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff800021664f58,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff8000ffff9a48,ffffff9c,7f7ffffe9dd0,0,0,ffff800021665140) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff8000216651b0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe9dc0, 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic *cpu0: bad dir ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8245b8be) at panic+0x161 sys/kern/subr_prf.c:202 ufs_lookup() at ufs_lookup+0x1749 ufs_dirbad sys/ufs/ufs/ufs_lookup.c:609 [inline] ufs_lookup() at ufs_lookup+0x1749 sys/ufs/ufs/ufs_lookup.c:444 VOP_LOOKUP(fffffd806f128658,ffff800021664f88,ffff800021664fb8) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff800021664f58) at vfs_lookup+0x6cc sys/kern/vfs_lookup.c:561 namei(ffff800021664f58) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff800021664f58,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff8000ffff9a48,ffffff9c,7f7ffffe9dd0,0,0,ffff800021665140) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff8000216651b0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe9dc0, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800021664a20 rbx 0 rdx 0 rcx 0 rax 0xffff8000ffff9a48 r8 0x101010101010101 r9 0x8080808080808080 r10 0xb9b7795016a3c2b r11 0x907c8dd28d89b95d r12 0 r13 0xfffffd806ef412d0 r14 0 r15 0x1 rip 0xffffffff816c3898 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800021664a10 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (dhcpleased) pid=448236 stat=onproc flags process=0 proc=0 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff87e8,0xffff8000ffff8fd8 process=0xffff800021641398 user=0xffff800021660000, vmspace=0xfffffd807f018110 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 83309 522864 9200 0 3 0x80 nanoslp syz-executor.0 83309 326612 9200 0 3 0x4000080 fsleep syz-executor.0 43514 220967 40006 0 3 0x80 nanoslp syz-executor.3 43514 398699 40006 0 3 0x4000080 poll syz-executor.3 43514 445485 40006 0 3 0x4000080 fsleep syz-executor.3 58020 213505 70119 0 3 0x80 nanoslp syz-executor.1 58020 237359 70119 0 3 0x4000080 kqsel syz-executor.1 58020 216871 70119 0 3 0x4000080 fsleep syz-executor.1 40006 500998 45375 0 3 0x82 nanoslp syz-executor.3 70119 71193 45375 0 3 0x82 nanoslp syz-executor.1 71315 184620 0 0 3 0x14200 acct acct 9200 125646 45375 0 3 0x82 nanoslp syz-executor.0 5982 431945 45375 0 3 0x82 nanoslp syz-executor.2 26391 7615 0 0 3 0x14280 nfsidl nfsio 39493 184095 0 0 3 0x14280 nfsidl nfsio 22374 271227 0 0 3 0x14280 nfsidl nfsio 8583 496264 0 0 3 0x14280 nfsidl nfsio 89635 7193 0 0 3 0x14280 nfsidl nfsio 66793 210469 0 0 3 0x14280 nfsidl nfsio 28578 77881 0 0 3 0x14280 nfsidl nfsio 29534 315471 0 0 3 0x14280 nfsidl nfsio 76889 426284 0 0 3 0x14280 nfsidl nfsio 10831 28279 0 0 3 0x14280 nfsidl nfsio 78953 101747 0 0 3 0x14280 nfsidl nfsio 64915 388769 0 0 3 0x14280 nfsidl nfsio 97640 162237 0 0 3 0x14280 nfsidl nfsio 10903 142343 0 0 3 0x14280 nfsidl nfsio 63919 253659 1 0 3 0x100083 ttyin getty 48283 406481 0 0 3 0x14280 nfsidl nfsio 76579 423088 0 0 3 0x14280 nfsidl nfsio 20821 175056 0 0 3 0x14280 nfsidl nfsio 78790 16539 0 0 3 0x14280 nfsidl nfsio 85839 368194 0 0 3 0x14280 nfsidl nfsio 33862 27079 0 0 3 0x14280 nfsidl nfsio 35764 494638 0 0 3 0x14200 bored sosplice 45375 445682 94944 0 3 0x82 kqread syz-fuzzer 45375 392960 94944 0 3 0x4000082 thrsleep syz-fuzzer 45375 267407 94944 0 3 0x4000082 thrsleep syz-fuzzer 45375 283787 94944 0 3 0x4000082 thrsleep syz-fuzzer 45375 216930 94944 0 3 0x4000082 thrsleep syz-fuzzer 45375 385639 94944 0 3 0x4000082 thrsleep syz-fuzzer 45375 124416 94944 0 3 0x4000082 thrsleep syz-fuzzer 94944 384263 78916 0 3 0x10008a sigsusp ksh 78916 478419 56149 0 3 0x9a poll sshd 56149 396986 1 0 3 0x88 poll sshd 34224 282712 44333 73 3 0x100090 kqread syslogd 44333 214208 1 0 3 0x100082 netio syslogd 97431 415567 1 0 3 0x100080 kqread resolvd 96877 311198 85056 77 3 0x100092 kqread dhcpleased 51278 56344 85056 77 3 0x100092 kqread dhcpleased *85056 448236 1 0 7 0 dhcpleased 29289 33548 0 0 3 0x14200 bored smr 47257 409319 0 0 2 0x14200 zerothread 97058 142680 0 0 3 0x14200 aiodoned aiodoned 85163 35177 0 0 3 0x14200 syncer update 85225 442372 0 0 3 0x14200 cleaner cleaner 97717 189217 0 0 3 0x14200 reaper reaper 33356 155176 0 0 3 0x14200 pgdaemon pagedaemon 85770 237989 0 0 3 0x14200 bored viomb 84271 447408 0 0 3 0x40014200 acpi0 acpi0 17029 471400 0 0 3 0x14200 bored softnet 16567 341115 0 0 3 0x14200 bored systqmp 9832 442789 0 0 3 0x14200 bored systq 59221 257519 0 0 3 0x40014200 bored softclock 48008 362759 0 0 3 0x40014200 idle0 1 114160 0 0 3 0x80082 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10206 6434K 7763K 78643K 161761 0 pcb 14 20K 25K 78643K 6453 0 rtable 227 31K 32K 78643K 12043 0 ifaddr 99 33K 40K 78643K 5043 0 sysctl 2 0K 1K 78643K 6 0 counters 25 17K 17K 78643K 595 0 ioctlops 0 0K 4K 78643K 9334 0 iov 0 0K 32K 78643K 4268 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1545 97K 97K 78643K 40534 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 259 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 4248 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 9 29K 45K 78643K 35515 0 sigio 0 0K 0K 78643K 650 0 proc 67 55K 79K 78643K 9057 0 subproc 52 6K 6K 78643K 3613 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 1 0K 0K 78643K 2242 0 in_multi 53 3K 4K 78643K 4716 0 ether_multi 2 0K 0K 78643K 623 0 mrt 1 0K 0K 78643K 99 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 277 1235K 1235K 78643K 277 0 exec 0 0K 2K 78643K 11474 0 pfkey data 0 0K 1K 78643K 9 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 549 1344K 1984K 78643K 414288 0 UVM aobj 131 4K 4K 78643K 137 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 2 0K 0K 78643K 2900 0 NDP 11 0K 1K 78643K 1193 0 temp 126 4226K 4469K 78643K 508561 0 kqueue 11 14K 22K 78643K 1672 0 SYN cache 2 16K 16K 78643K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 2735 0 2732 34 31 3 3 0 8 2 rtentry 112 3610 0 3547 3 1 2 3 0 8 0 unpcb 136 23483 0 23470 248 243 5 9 0 8 4 syncache 296 143 0 143 36 36 0 1 0 8 0 tcpqe 32 194 0 194 16 16 0 2 0 8 0 tcpcb 736 24253 0 24229 738 729 9 33 0 8 6 arp 88 600 0 588 1 0 1 1 0 8 0 ipq 40 189 0 188 25 24 1 1 0 8 0 ipqe 40 2301 0 2300 25 24 1 1 0 8 0 inpcb 304 48369 0 48358 594 585 9 16 0 8 8 rttmr 72 22 0 22 7 7 0 1 0 8 0 ip6q 72 1 0 1 1 1 0 1 0 8 0 nd6 48 928 0 918 1 0 1 1 0 8 0 pkpcb 40 153 0 153 30 29 1 1 0 8 1 kcovpl 48 275 0 271 1 0 1 1 0 8 0 ppxss 1152 134 0 134 37 36 1 1 0 8 1 pfstscr 40 146 0 145 1 0 1 1 0 8 0 pfosfp 40 4 0 3 1 0 1 1 0 8 0 pfosfpen 112 4 0 3 1 0 1 1 0 8 0 pfrke_plain 168 16 0 16 4 4 0 1 0 8 0 pfrktable 1344 359 0 324 18 15 3 4 0 8 0 pftag 88 223 0 208 1 0 1 1 0 8 0 pfqueue 264 4 0 4 1 1 0 1 0 8 0 pfstitem 24 76 0 74 1 0 1 1 0 8 0 pfstkey 112 292 0 290 1 0 1 1 0 8 0 pfstate 320 146 0 145 1 0 1 1 0 8 0 pfrule 1360 990 0 459 46 1 45 45 0 8 0 art_heap8 4096 3 0 2 3 2 1 2 0 8 0 art_heap4 256 14612 0 14339 83 64 19 21 0 8 0 art_table 32 14615 0 14341 5 2 3 3 0 8 0 art_node 16 3476 0 3423 1 0 1 1 0 8 0 sysvmsgpl 40 5 0 0 1 0 1 1 0 8 0 semapl 112 4246 0 4236 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 47237 0 45692 97 0 97 97 0 8 0 ffsino 240 47237 0 45692 92 0 92 92 0 8 0 nchpl 144 91287 0 89692 61 0 61 61 0 8 0 rtmask 32 32 0 32 4 4 0 1 0 8 0 uvmvnodes 80 7748 0 0 159 0 159 159 0 8 0 vnodes 224 7748 0 0 456 0 456 456 0 8 0 namei 1024 367796 0 367795 18 17 1 1 0 8 0 vcpupl 1984 194 0 0 25 0 25 25 0 8 0 vmpool 528 512 0 318 15 2 13 13 0 8 0 pfiaddrpl 120 563 0 239 10 0 10 10 0 8 0 scsiplug 72 40 0 40 14 14 0 1 0 8 0 scxspl 216 298198 0 298198 62 59 3 8 0 8 3 plimitpl 152 3832 0 3822 1 0 1 1 0 8 0 sigapl 424 34991 0 34936 12 5 7 7 0 8 0 futexpl 64 366156 0 366153 21 20 1 1 0 8 0 knotepl 112 27345 0 27296 13 11 2 4 0 8 0 kqueuepl 184 8530 0 8517 147 146 1 7 0 8 0 pipepl 304 7586 0 7569 196 194 2 11 0 8 0 fdescpl 432 34901 0 34881 3 0 3 3 0 8 0 filepl 120 269740 0 269579 445 436 9 15 0 8 3 lockfpl 104 10497 0 10495 20 19 1 2 0 8 0 lockfspl 48 2730 0 2728 1 0 1 1 0 8 0 sessionpl 144 293 0 281 1 0 1 1 0 8 0 pgrppl 48 442 0 430 1 0 1 1 0 8 0 ucredpl 96 35888 0 35872 1 0 1 1 0 8 0 zombiepl 144 34936 0 34935 3 2 1 1 0 8 0 processpl 1000 34991 0 34935 17 9 8 8 0 8 0 procpl 672 87305 0 87238 75 68 7 8 0 8 1 sosppl 168 373 0 373 66 65 1 1 0 8 1 sockpl 448 74887 0 74857 1295 1283 12 30 0 8 8 mcl64k 65536 1523 0 1523 91 90 1 1 0 8 1 mcl16k 16384 375 0 375 80 79 1 1 0 8 1 mcl12k 12288 1103 0 1103 93 92 1 1 0 8 1 mcl9k 9216 558 0 558 96 95 1 1 0 8 1 mcl8k 8192 2248 0 2247 80 79 1 1 0 8 0 mcl4k 4096 4296 0 4296 55 54 1 1 0 8 1 mcl2k2 2112 252 0 252 96 95 1 1 0 8 1 mcl2k 2048 152715 0 152602 111 95 16 25 0 8 1 mtagpl 96 34588 0 34253 213 204 9 21 0 8 0 mbufpl 256 585532 0 584668 2417 2362 55 606 0 8 0 bufpl 288 70217 0 62468 556 2 554 554 0 8 0 anonpl 24 9856354 0 9826455 751 560 191 219 0 188 0 amapchunkpl 152 1933044 0 1932363 4800 4771 29 656 0 158 1 amappl16 200 107882 0 106428 389 305 84 95 0 8 0 amappl15 192 6797 0 6795 13 12 1 1 0 8 0 amappl14 184 4457 0 4453 1 0 1 1 0 8 0 amappl13 176 4444 0 4441 1 0 1 1 0 8 0 amappl12 168 2556 0 2554 1 0 1 1 0 8 0 amappl11 160 4691 0 4681 1 0 1 1 0 8 0 amappl10 152 4244 0 4240 1 0 1 1 0 8 0 amappl9 144 5942 0 5938 1 0 1 1 0 8 0 amappl8 136 9334 0 9239 4 0 4 4 0 8 0 amappl7 128 5125 0 5113 1 0 1 1 0 8 0 amappl6 120 7289 0 7265 1 0 1 1 0 8 0 amappl5 112 30440 0 30424 1 0 1 1 0 8 0 amappl4 104 15528 0 15498 1 0 1 1 0 8 0 amappl3 96 7048 0 7032 1 0 1 1 0 8 0 amappl2 88 7104 0 7051 2 0 2 2 0 8 0 amappl1 80 614259 0 613786 13 2 11 12 0 8 0 amappl 88 409007 0 408730 8 1 7 7 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 35413 0 35199 3 1 2 2 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 35413 0 35199 3 1 2 2 0 8 0 vmmpekpl 168 221373 0 221316 3 0 3 3 0 8 0 vmmpepl 168 3311824 0 3308516 1153 978 175 181 0 357 19 vmsppl 272 35412 0 35199 19 4 15 15 0 8 0 rwobjpl 24 753609 0 743336 92 29 63 64 0 8 0 pdppl 4096 70832 0 70592 470 228 242 244 0 8 2 pvpl 32 16988621 0 16965849 1181 985 196 291 0 265 0 pmappl 216 35412 0 35199 14 2 12 12 0 8 0 extentpl 40 57 0 38 1 0 1 1 0 8 0 phpool 112 6257 0 5091 47 12 35 40 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8245b8be) at panic+0x161 sys/kern/subr_prf.c:202 ufs_lookup() at ufs_lookup+0x1749 ufs_dirbad sys/ufs/ufs/ufs_lookup.c:609 [inline] ufs_lookup() at ufs_lookup+0x1749 sys/ufs/ufs/ufs_lookup.c:444 VOP_LOOKUP(fffffd806f128658,ffff800021664f88,ffff800021664fb8) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff800021664f58) at vfs_lookup+0x6cc sys/kern/vfs_lookup.c:561 namei(ffff800021664f58) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff800021664f58,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff8000ffff9a48,ffffff9c,7f7ffffe9dd0,0,0,ffff800021665140) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff8000216651b0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe9dc0, count: -10 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8245b8be) at panic+0x161 sys/kern/subr_prf.c:202 ufs_lookup() at ufs_lookup+0x1749 ufs_dirbad sys/ufs/ufs/ufs_lookup.c:609 [inline] ufs_lookup() at ufs_lookup+0x1749 sys/ufs/ufs/ufs_lookup.c:444 VOP_LOOKUP(fffffd806f128658,ffff800021664f88,ffff800021664fb8) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff800021664f58) at vfs_lookup+0x6cc sys/kern/vfs_lookup.c:561 namei(ffff800021664f58) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff800021664f58,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff8000ffff9a48,ffffff9c,7f7ffffe9dd0,0,0,ffff800021665140) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff8000216651b0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe9dc0, count: -10