panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *243165 14745 0 0 0 0 dhcpleased db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8245e8a7) 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(fffffd806ee43d58,ffff800021664f18,ffff800021664f48) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff800021664ee8) at vfs_lookup+0x6cc sys/kern/vfs_lookup.c:561 namei(ffff800021664ee8) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff800021664ee8,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff8000ffff9a48,ffffff9c,7f7ffffe6bc0,0,0,ffff8000216650d0) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff800021665140) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe6bb0, 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(ffffffff8245e8a7) 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(fffffd806ee43d58,ffff800021664f18,ffff800021664f48) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff800021664ee8) at vfs_lookup+0x6cc sys/kern/vfs_lookup.c:561 namei(ffff800021664ee8) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff800021664ee8,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff8000ffff9a48,ffffff9c,7f7ffffe6bc0,0,0,ffff8000216650d0) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff800021665140) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe6bb0, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000216649b0 rbx 0 rdx 0 rcx 0 rax 0xffff8000ffff9a48 r8 0x101010101010101 r9 0x8080808080808080 r10 0xca8ebf992e0f5ad1 r11 0x41c64f7e16cee05a r12 0 r13 0xfffffd80787833c0 r14 0 r15 0x1 rip 0xffffffff818aeb48 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000216649a0 ss 0 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (dhcpleased) pid=243165 stat=onproc flags process=0 proc=0 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff8548,0xffff8000ffff9278 process=0xffff800021641398 user=0xffff800021660000, vmspace=0xfffffd807f017660 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 27405 52361 18275 0 2 0 syz-executor.3 27405 174505 18275 0 3 0x4000080 fsleep syz-executor.3 2992 441105 619 0 3 0x80 nanoslp syz-executor.0 2992 151600 619 0 3 0x4000080 fsleep syz-executor.0 28030 341121 20751 0 2 0 syz-executor.1 28030 297583 20751 0 2 0x4000000 syz-executor.1 619 59300 7651 0 3 0x82 nanoslp syz-executor.0 18275 270343 7651 0 3 0x82 nanoslp syz-executor.3 20751 378175 7651 0 3 0x82 nanoslp syz-executor.1 21702 378990 7651 0 3 0x82 nanoslp syz-executor.2 81241 117426 1 0 3 0x100083 ttyin getty 58547 267737 0 0 3 0x14280 nfsidl nfsio 6329 75320 0 0 3 0x14280 nfsidl nfsio 18768 34304 0 0 3 0x14280 nfsidl nfsio 68661 104941 0 0 3 0x14280 nfsidl nfsio 67484 157919 0 0 3 0x14280 nfsidl nfsio 75156 208944 0 0 3 0x14280 nfsidl nfsio 80311 134240 0 0 3 0x14280 nfsidl nfsio 76193 131075 0 0 3 0x14280 nfsidl nfsio 69040 72227 0 0 3 0x14280 nfsidl nfsio 89144 357845 0 0 3 0x14280 nfsidl nfsio 86374 173404 0 0 3 0x14280 nfsidl nfsio 33270 249269 0 0 3 0x14280 nfsidl nfsio 97835 306366 0 0 3 0x14280 nfsidl nfsio 95350 278441 0 0 3 0x14280 nfsidl nfsio 6873 327609 0 0 3 0x14280 nfsidl nfsio 53405 121222 0 0 3 0x14280 nfsidl nfsio 62950 272797 0 0 3 0x14280 nfsidl nfsio 1511 508616 0 0 3 0x14280 nfsidl nfsio 70194 458342 0 0 3 0x14280 nfsidl nfsio 67160 492286 0 0 3 0x14280 nfsidl nfsio 75565 107314 0 0 3 0x14200 bored sosplice 7651 442689 99792 0 3 0x82 kqread syz-fuzzer 7651 93225 99792 0 3 0x4000082 thrsleep syz-fuzzer 7651 249679 99792 0 3 0x4000082 thrsleep syz-fuzzer 7651 48053 99792 0 3 0x4000082 thrsleep syz-fuzzer 7651 223776 99792 0 3 0x4000082 thrsleep syz-fuzzer 7651 309681 99792 0 3 0x4000082 thrsleep syz-fuzzer 7651 184259 99792 0 3 0x4000082 thrsleep syz-fuzzer 99792 28185 6087 0 3 0x10008a sigsusp ksh 6087 510471 74675 0 3 0x9a poll sshd 74675 116019 1 0 3 0x88 poll sshd 424 301873 71385 73 3 0x100090 kqread syslogd 71385 200523 1 0 3 0x100082 netio syslogd 5408 185813 1 0 3 0x100080 kqread resolvd 50325 126701 14745 77 3 0x100092 kqread dhcpleased 86330 281664 14745 77 3 0x100092 kqread dhcpleased *14745 243165 1 0 7 0 dhcpleased 3975 362928 0 0 3 0x14200 bored smr 49640 334072 0 0 2 0x14200 zerothread 87197 400347 0 0 3 0x14200 aiodoned aiodoned 87135 168794 0 0 3 0x14200 syncer update 93593 267182 0 0 3 0x14200 cleaner cleaner 13115 334681 0 0 3 0x14200 reaper reaper 43314 402183 0 0 3 0x14200 pgdaemon pagedaemon 2750 431544 0 0 3 0x14200 bored viomb 89698 195673 0 0 3 0x40014200 acpi0 acpi0 97456 412563 0 0 3 0x14200 bored softnet 6261 25303 0 0 3 0x14200 bored systqmp 82721 516803 0 0 3 0x14200 bored systq 56805 514749 0 0 3 0x40014200 bored softclock 70914 524105 0 0 3 0x40014200 idle0 1 332184 0 0 3 0x82 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 10197 6463K 7174K 78643K 31377 0 pcb 13 18K 21K 78643K 2374 0 rtable 150 13K 15K 78643K 7702 0 ifaddr 67 17K 18K 78643K 2450 0 sysctl 3 1K 1K 78643K 3 0 counters 24 17K 17K 78643K 234 0 ioctlops 0 0K 4K 78643K 4975 0 iov 0 0K 32K 78643K 1723 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1439 90K 91K 78643K 13261 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 138 0 VM map 2 0K 0K 78643K 2 0 sem 14 1K 1K 78643K 36 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 9 29K 41K 78643K 13053 0 sigio 0 0K 0K 78643K 2343 0 proc 66 55K 71K 78643K 3437 0 subproc 52 3K 4K 78643K 1248 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 647 0 in_multi 55 3K 4K 78643K 2097 0 ether_multi 1 0K 0K 78643K 202 0 mrt 1 0K 0K 78643K 48 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 5188 0 pfkey data 0 0K 1K 78643K 8 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 370 535K 543K 78643K 153854 0 UVM aobj 131 9K 9K 78643K 134 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 834 0 NDP 10 0K 1K 78643K 562 0 temp 108 4196K 4275K 78643K 158979 0 kqueue 10 14K 23K 78643K 595 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 950 0 947 10 9 1 3 0 8 0 rtentry 112 1762 0 1702 2 0 2 2 0 8 0 unpcb 136 12346 0 12333 116 115 1 8 0 8 0 syncache 296 49 0 49 14 14 0 1 0 8 0 tcpqe 32 38 28 38 7 7 0 1 0 8 0 tcpcb 736 6978 0 6966 237 225 12 14 0 8 10 arp 88 275 0 265 1 0 1 1 0 8 0 ipq 40 40 0 40 11 11 0 1 0 8 0 ipqe 40 1097 0 1097 11 11 0 1 0 8 0 inpcb 304 15722 0 15709 247 238 9 14 0 8 8 rttmr 72 18 0 18 5 5 0 1 0 8 0 ip6q 72 5 0 5 3 3 0 1 0 8 0 ip6af 40 8 0 8 2 2 0 1 0 8 0 nd6 48 446 0 433 1 0 1 1 0 8 0 pkpcb 40 67 0 67 14 14 0 1 0 8 0 kcovpl 48 96 0 92 1 0 1 1 0 8 0 ppxss 1152 50 0 50 12 12 0 1 0 8 0 pfstscr 40 6 0 6 1 1 0 1 0 8 0 pfrktable 1344 1338 0 1337 2 1 1 1 0 8 0 pftag 88 234 0 234 4 4 0 1 0 8 0 pfstkey 112 6 0 6 1 1 0 1 0 8 0 pfstate 320 3 0 3 1 1 0 1 0 8 0 pfrule 1360 246 0 173 8 1 7 7 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 7716 0 7441 46 28 18 19 0 8 0 art_table 32 7717 0 7441 4 1 3 3 0 8 0 art_node 16 1758 0 1707 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 15 2 1 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 22 0 10 1 0 1 1 0 8 0 shmpl 112 131 0 3 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 22362 0 20919 91 0 91 91 0 8 0 ffsino 240 22362 0 20919 86 0 86 86 0 8 0 nchpl 144 39227 0 38725 61 41 20 61 0 8 0 uvmvnodes 80 6247 0 0 128 0 128 128 0 8 0 vnodes 224 6247 0 0 368 0 368 368 0 8 0 namei 1024 163036 0 163035 11 10 1 1 0 8 0 vcpupl 1984 38 0 0 5 0 5 5 0 8 0 vmpool 528 223 0 185 7 4 3 3 0 8 0 pfiaddrpl 120 392 0 392 4 4 0 1 0 8 0 scsiplug 72 11 0 11 3 3 0 1 0 8 0 scxspl 216 127412 0 127412 33 32 1 8 0 8 1 plimitpl 152 1729 0 1719 1 0 1 1 0 8 0 sigapl 424 13011 0 12957 8 1 7 7 0 8 0 futexpl 64 133802 0 133800 14 13 1 1 0 8 0 knotepl 112 7858 0 7809 4 2 2 3 0 8 0 kqueuepl 184 2838 0 2830 49 48 1 4 0 8 0 pipepl 304 3549 0 3533 71 69 2 7 0 8 0 fdescpl 432 12975 0 12955 3 0 3 3 0 8 0 filepl 120 120318 0 120165 170 162 8 13 0 8 3 lockfpl 104 3607 0 3605 9 8 1 3 0 8 0 lockfspl 48 1025 0 1023 1 0 1 1 0 8 0 sessionpl 144 113 0 101 1 0 1 1 0 8 0 pgrppl 48 139 0 127 1 0 1 1 0 8 0 ucredpl 96 36543 0 36532 1 0 1 1 0 8 0 zombiepl 144 12957 0 12956 2 1 1 1 0 8 0 processpl 1000 13011 0 12956 8 0 8 8 0 8 0 procpl 672 32788 0 32724 50 43 7 8 0 8 1 sosppl 168 113 0 113 19 19 0 1 0 8 0 sockpl 448 29106 0 29077 566 552 14 30 0 8 10 mcl64k 65536 569 0 569 43 42 1 1 0 8 1 mcl16k 16384 119 0 119 34 33 1 1 0 8 1 mcl12k 12288 382 0 382 44 43 1 1 0 8 1 mcl9k 9216 198 0 198 39 39 0 1 0 8 0 mcl8k 8192 829 0 829 32 31 1 1 0 8 1 mcl4k 4096 1526 0 1526 25 24 1 1 0 8 1 mcl2k2 2112 105 0 105 44 43 1 1 0 8 1 mcl2k 2048 105479 0 105437 45 38 7 15 0 8 0 mtagpl 96 2079 0 2059 32 31 1 7 0 8 0 mbufpl 256 286578 0 286359 774 758 16 510 0 8 0 bufpl 288 28848 0 22449 459 0 459 459 0 8 0 anonpl 24 3648384 0 3631837 351 234 117 159 0 188 0 amapchunkpl 152 393480 0 392813 179 151 28 41 0 158 1 amappl16 200 37557 0 36875 214 177 37 53 0 8 1 amappl15 192 1616 0 1615 1 0 1 1 0 8 0 amappl14 184 1027 0 1026 1 0 1 1 0 8 0 amappl13 176 1593 0 1588 1 0 1 1 0 8 0 amappl12 168 715 0 714 1 0 1 1 0 8 0 amappl11 160 3255 0 3242 1 0 1 1 0 8 0 amappl10 152 2029 0 2021 1 0 1 1 0 8 0 amappl9 144 1649 0 1647 1 0 1 1 0 8 0 amappl8 136 3673 0 3602 3 0 3 3 0 8 0 amappl7 128 2154 0 2144 1 0 1 1 0 8 0 amappl6 120 1886 0 1864 1 0 1 1 0 8 0 amappl5 112 11372 0 11356 1 0 1 1 0 8 0 amappl4 104 8157 0 8130 1 0 1 1 0 8 0 amappl3 96 2169 0 2148 1 0 1 1 0 8 0 amappl2 88 2553 0 2503 2 0 2 2 0 8 0 amappl1 80 232262 0 231792 14 3 11 12 0 8 0 amappl 88 151917 0 151697 7 1 6 6 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 133 0 3 3 0 3 3 0 8 0 uaddrrnd 24 13198 0 13140 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 13198 0 13140 1 0 1 1 0 8 0 vmmpekpl 168 89736 0 89686 3 0 3 3 0 8 0 vmmpepl 168 1221930 0 1219714 541 423 118 137 0 357 8 vmsppl 272 13197 0 13140 5 1 4 4 0 8 0 rwobjpl 24 284091 0 276167 60 11 49 49 0 8 0 pdppl 4096 26403 0 26318 210 123 87 89 0 8 2 pvpl 32 6370556 0 6350159 615 429 186 275 0 265 0 pmappl 216 13197 0 13140 4 0 4 4 0 8 0 extentpl 40 57 0 38 1 0 1 1 0 8 0 phpool 112 2679 0 1868 40 14 26 37 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(ffffffff8245e8a7) 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(fffffd806ee43d58,ffff800021664f18,ffff800021664f48) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff800021664ee8) at vfs_lookup+0x6cc sys/kern/vfs_lookup.c:561 namei(ffff800021664ee8) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff800021664ee8,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff8000ffff9a48,ffffff9c,7f7ffffe6bc0,0,0,ffff8000216650d0) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff800021665140) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe6bb0, 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(ffffffff8245e8a7) 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(fffffd806ee43d58,ffff800021664f18,ffff800021664f48) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff800021664ee8) at vfs_lookup+0x6cc sys/kern/vfs_lookup.c:561 namei(ffff800021664ee8) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff800021664ee8,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff8000ffff9a48,ffffff9c,7f7ffffe6bc0,0,0,ffff8000216650d0) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff800021665140) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe6bb0, count: -10