panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *178435 99192 0 0 0 0 dhcpleased db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8245c02c) 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(fffffd806f424d50,ffff800021665038,ffff800021665068) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff800021665008) at vfs_lookup+0x6cc sys/kern/vfs_lookup.c:561 namei(ffff800021665008) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff800021665008,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff8000ffff97a8,ffffff9c,7f7ffffba7c0,0,0,ffff8000216651f0) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff800021665260) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffba7b0, 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(ffffffff8245c02c) 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(fffffd806f424d50,ffff800021665038,ffff800021665068) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff800021665008) at vfs_lookup+0x6cc sys/kern/vfs_lookup.c:561 namei(ffff800021665008) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff800021665008,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff8000ffff97a8,ffffff9c,7f7ffffba7c0,0,0,ffff8000216651f0) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff800021665260) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffba7b0, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800021664ad0 rbx 0 rdx 0 rcx 0 rax 0xffff8000ffff97a8 r8 0x101010101010101 r9 0x8080808080808080 r10 0xdd1c5bafabb007b9 r11 0x92bf39bf3988257c r12 0 r13 0xfffffd806f1b74b0 r14 0 r15 0x1 rip 0xffffffff817dbb78 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800021664ac0 ss 0 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (dhcpleased) pid=178435 stat=onproc flags process=0 proc=0 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff87e8,0xffff8000ffff8d38 process=0xffff800021641398 user=0xffff800021660000, vmspace=0xfffffd807f018330 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 74452 288586 43549 0 2 0 syz-executor.3 74452 507346 43549 0 2 0x4000000 syz-executor.3 40133 263828 81019 0 2 0 syz-executor.1 40133 434024 81019 0 2 0x4000000 syz-executor.1 75379 490245 20208 0 2 0 syz-executor.2 75379 491184 20208 0 3 0x4000080 fsleep syz-executor.2 23438 382814 69999 0 2 0 syz-executor.0 23438 154398 69999 0 3 0x4000080 netio syz-executor.0 69999 232577 33256 0 3 0x82 nanoslp syz-executor.0 43549 226601 33256 0 3 0x82 nanoslp syz-executor.3 81019 260683 33256 0 3 0x82 nanoslp syz-executor.1 15619 144886 1 0 3 0x100083 ttyin getty 20208 69644 33256 0 3 0x82 nanoslp syz-executor.2 32031 204881 0 0 3 0x14200 acct acct 93770 134948 0 0 3 0x14280 nfsidl nfsio 14800 429691 0 0 3 0x14280 nfsidl nfsio 75901 223169 0 0 3 0x14280 nfsidl nfsio 22164 178542 0 0 3 0x14280 nfsidl nfsio 3805 404592 0 0 3 0x14280 nfsidl nfsio 30917 496608 0 0 3 0x14280 nfsidl nfsio 92079 409772 0 0 3 0x14200 bored sosplice 33256 290544 29985 0 3 0x82 thrsleep syz-fuzzer 33256 522481 29985 0 3 0x4000082 thrsleep syz-fuzzer 33256 235584 29985 0 3 0x4000082 thrsleep syz-fuzzer 33256 124970 29985 0 3 0x4000082 thrsleep syz-fuzzer 33256 255307 29985 0 3 0x4000082 kqread syz-fuzzer 33256 405847 29985 0 3 0x4000082 thrsleep syz-fuzzer 33256 222802 29985 0 3 0x4000082 thrsleep syz-fuzzer 29985 513861 60411 0 3 0x10008a sigsusp ksh 60411 331604 85733 0 3 0x9a poll sshd 85733 38250 1 0 3 0x88 poll sshd 22263 2532 5863 73 3 0x100090 kqread syslogd 5863 354989 1 0 3 0x100082 netio syslogd 69549 516583 1 0 3 0x100080 kqread resolvd 89628 180666 99192 77 3 0x100092 kqread dhcpleased 27309 386212 99192 77 3 0x100092 kqread dhcpleased *99192 178435 1 0 7 0 dhcpleased 96809 276255 0 0 3 0x14200 bored smr 42132 256005 0 0 2 0x14200 zerothread 1768 522031 0 0 3 0x14200 aiodoned aiodoned 62447 294951 0 0 3 0x14200 syncer update 15822 3058 0 0 3 0x14200 cleaner cleaner 68012 280374 0 0 3 0x14200 reaper reaper 92120 64007 0 0 3 0x14200 pgdaemon pagedaemon 89684 482440 0 0 3 0x14200 bored viomb 35186 93945 0 0 3 0x40014200 acpi0 acpi0 24215 310329 0 0 3 0x14200 bored softnet 59200 486581 0 0 3 0x14200 bored systqmp 86238 116014 0 0 3 0x14200 bored systq 68587 148736 0 0 3 0x40014200 bored softclock 14764 163884 0 0 3 0x40014200 idle0 1 349143 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 10200 6471K 7268K 78643K 51413 0 pcb 13 24K 28K 78643K 4808 0 rtable 190 22K 23K 78643K 8947 0 ifaddr 81 25K 27K 78643K 2622 0 sysctl 2 0K 0K 78643K 2 0 counters 24 17K 17K 78643K 461 0 ioctlops 0 0K 4K 78643K 6930 0 iov 0 0K 32K 78643K 2726 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1402 88K 88K 78643K 17765 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 200 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 3888 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 10 33K 49K 78643K 25478 0 sigio 0 0K 0K 78643K 358 0 proc 74 56K 80K 78643K 6109 0 subproc 52 3K 4K 78643K 2412 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 1017 0 in_multi 55 3K 4K 78643K 3212 0 ether_multi 1 0K 0K 78643K 438 0 mrt 5 0K 0K 78643K 166 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 8193 0 pfkey data 0 0K 1K 78643K 12 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 429 644K 1282K 78643K 298730 0 UVM aobj 121 9K 9K 78643K 124 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 1802 0 NDP 10 0K 1K 78643K 869 0 temp 114 4214K 4461K 78643K 303505 0 kqueue 10 14K 24K 78643K 1184 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 2730 0 2727 45 44 1 5 0 8 0 rtentry 112 2678 0 2616 2 0 2 2 0 8 0 unpcb 136 63693 0 63678 367 363 4 10 0 8 3 syncache 296 39 0 39 11 11 0 1 0 8 0 tcpqe 32 61 0 61 9 9 0 1 0 8 0 tcpcb 736 11112 0 11073 387 378 9 19 0 8 5 arp 88 397 0 387 1 0 1 1 0 8 0 ipq 40 41 0 40 19 18 1 1 0 8 0 ipqe 40 527 0 526 19 18 1 1 0 8 0 inpcb 304 29599 0 29591 421 415 6 17 0 8 5 rttmr 72 22 0 22 7 7 0 1 0 8 0 ip6q 72 45 0 45 5 5 0 1 0 8 0 ip6af 40 96 0 96 5 5 0 1 0 8 0 nd6 48 631 0 618 1 0 1 1 0 8 0 pkpcb 40 103 0 103 16 16 0 1 0 8 0 kcovpl 48 184 0 180 1 0 1 1 0 8 0 ppxss 1152 74 0 74 23 22 1 1 0 8 1 pfstscr 40 3 0 3 1 1 0 1 0 8 0 pfrktable 1344 181 0 162 5 3 2 2 0 8 0 pftag 88 13 0 8 2 1 1 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 407 0 340 6 0 6 6 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 10455 0 10217 91 76 15 20 0 8 0 art_table 32 10456 0 10217 6 3 3 3 0 8 0 art_node 16 2410 0 2358 1 0 1 1 0 8 0 sysvmsgpl 40 38 0 23 1 0 1 1 0 8 0 semapl 112 3886 0 3876 1 0 1 1 0 8 0 shmpl 112 121 0 3 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 34864 0 33347 95 0 95 95 0 8 0 ffsino 240 34864 0 33347 90 0 90 90 0 8 0 nchpl 144 67375 0 66868 61 39 22 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 257052 0 257051 10 9 1 1 0 8 0 vcpupl 1984 153 0 1 19 0 19 19 0 8 0 vmpool 528 228 0 76 12 1 11 11 0 8 0 pfiaddrpl 120 182 0 66 6 2 4 4 0 8 0 scsiplug 72 16 0 16 5 5 0 1 0 8 0 scxspl 216 214133 0 214133 60 57 3 8 0 8 3 plimitpl 152 3380 0 3369 1 0 1 1 0 8 0 sigapl 424 25205 0 25163 10 4 6 7 0 8 0 futexpl 64 261609 0 261608 13 12 1 1 0 8 0 knotepl 112 14807 0 14758 8 6 2 4 0 8 0 kqueuepl 184 8283 0 8264 146 144 2 7 0 8 1 pipepl 304 4459 0 4443 107 105 2 7 0 8 0 fdescpl 432 25141 0 25120 3 0 3 3 0 8 0 filepl 120 233747 0 233595 360 353 7 14 0 8 1 lockfpl 104 8618 0 8615 20 19 1 4 0 8 0 lockfspl 48 2273 0 2270 1 0 1 1 0 8 0 sessionpl 144 206 0 194 1 0 1 1 0 8 0 pgrppl 48 408 0 396 1 0 1 1 0 8 0 ucredpl 96 27453 0 27442 1 0 1 1 0 8 0 zombiepl 144 25163 0 25163 3 2 1 1 0 8 1 processpl 1000 25205 0 25163 12 5 7 8 0 8 0 procpl 672 63211 0 63159 43 37 6 8 0 8 0 sosppl 168 257 0 257 41 41 0 1 0 8 0 sockpl 448 96147 0 96117 1902 1891 11 33 0 8 6 mcl64k 65536 996 0 996 71 70 1 1 0 8 1 mcl16k 16384 259 0 259 63 62 1 1 0 8 1 mcl12k 12288 773 0 773 69 68 1 1 0 8 1 mcl9k 9216 397 0 397 71 70 1 1 0 8 1 mcl8k 8192 1685 0 1685 55 54 1 1 0 8 1 mcl4k 4096 2836 0 2836 36 35 1 1 0 8 1 mcl2k2 2112 149 0 149 61 61 0 1 0 8 0 mcl2k 2048 130508 0 130464 47 40 7 15 0 8 0 mtagpl 96 4086 0 4004 43 39 4 8 0 8 0 mbufpl 256 414611 0 414257 668 640 28 201 0 8 0 bufpl 288 50318 0 43935 459 1 458 459 0 8 0 anonpl 24 7255141 0 7235136 489 352 137 167 0 188 0 amapchunkpl 152 979409 0 978695 3497 3469 28 656 0 158 0 amappl16 200 85815 0 84999 441 396 45 57 0 8 0 amappl15 192 5178 0 5176 6 5 1 1 0 8 0 amappl14 184 1591 0 1586 1 0 1 1 0 8 0 amappl13 176 4122 0 4121 1 0 1 1 0 8 0 amappl12 168 2354 0 2352 1 0 1 1 0 8 0 amappl11 160 4433 0 4421 1 0 1 1 0 8 0 amappl10 152 1786 0 1780 1 0 1 1 0 8 0 amappl9 144 3034 0 3030 1 0 1 1 0 8 0 amappl8 136 7258 0 7164 6 2 4 4 0 8 0 amappl7 128 4336 0 4323 1 0 1 1 0 8 0 amappl6 120 3836 0 3813 1 0 1 1 0 8 0 amappl5 112 19759 0 19742 1 0 1 1 0 8 0 amappl4 104 12691 0 12660 1 0 1 1 0 8 0 amappl3 96 5403 0 5384 1 0 1 1 0 8 0 amappl2 88 6949 0 6903 2 0 2 2 0 8 0 amappl1 80 449738 0 449253 24 13 11 12 0 8 0 amappl 88 295053 0 294806 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 123 0 3 3 0 3 3 0 8 0 uaddrrnd 24 25369 0 25196 2 0 2 2 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 25369 0 25196 2 0 2 2 0 8 0 vmmpekpl 168 162163 0 162111 3 0 3 3 0 8 0 vmmpepl 168 2386500 0 2383746 863 720 143 158 0 357 9 vmsppl 272 25368 0 25196 13 1 12 12 0 8 0 rwobjpl 24 558375 0 550284 68 18 50 51 0 8 0 pdppl 4096 50744 0 50544 379 179 200 208 0 8 0 pvpl 32 12540663 0 12518256 947 753 194 277 0 265 0 pmappl 216 25368 0 25196 10 0 10 10 0 8 0 extentpl 40 57 0 38 1 0 1 1 0 8 0 phpool 112 4379 0 3438 33 4 29 33 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(ffffffff8245c02c) 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(fffffd806f424d50,ffff800021665038,ffff800021665068) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff800021665008) at vfs_lookup+0x6cc sys/kern/vfs_lookup.c:561 namei(ffff800021665008) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff800021665008,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff8000ffff97a8,ffffff9c,7f7ffffba7c0,0,0,ffff8000216651f0) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff800021665260) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffba7b0, 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(ffffffff8245c02c) 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(fffffd806f424d50,ffff800021665038,ffff800021665068) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff800021665008) at vfs_lookup+0x6cc sys/kern/vfs_lookup.c:561 namei(ffff800021665008) at namei+0x36a sys/kern/vfs_lookup.c:245 vn_open(ffff800021665008,1,0) at vn_open+0x105 sys/kern/vfs_vnops.c:146 doopenat(ffff8000ffff97a8,ffffff9c,7f7ffffba7c0,0,0,ffff8000216651f0) at doopenat+0x26a sys/kern/vfs_syscalls.c:1128 syscall(ffff800021665260) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffba7b0, count: -10