panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *245802 81463 0 0x2 0 0 ifconfig db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:212 ufs_dirbadentry(ffff8000149dc428,ffff8000149dc428,72ccd3bee8fa2c8f) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda708,ffff8000149dc4d0,ffff8000149dc490) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda708,ffff800014a0b9e0) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff73c0,fffffd803efda708,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff800014a0b9e0,ffff8000149dca98,ffff8000149dcb63) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff800014a0b9e0,ffff8000149dcbd0,ffff8000149dcc40) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149dccb0) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffe34c8,13a8f9308ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe3450, 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 bad dir ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:212 ufs_dirbadentry(ffff8000149dc428,ffff8000149dc428,72ccd3bee8fa2c8f) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda708,ffff8000149dc4d0,ffff8000149dc490) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda708,ffff800014a0b9e0) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff73c0,fffffd803efda708,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff800014a0b9e0,ffff8000149dca98,ffff8000149dcb63) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff800014a0b9e0,ffff8000149dcbd0,ffff8000149dcc40) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149dccb0) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffe34c8,13a8f9308ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe3450, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149dc240 rbx 0xffff8000149dc2f0 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149dc200 r9 0x1 r10 0 r11 0x2d7046eca94a95f2 r12 0x3000000008 r13 0xffff8000149dc250 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149dc230 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (ifconfig) pid=245802 stat=onproc flags process=2 proc=0 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800014a0a720,0xffffffff822b78f0 process=0xffff8000ffff73c0 user=0xffff8000149d7000, vmspace=0xfffffd803f014c60 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *81463 245802 8474 0 7 0x2 ifconfig 8474 23831 74353 0 3 0x10008a pause sh 74353 25692 94013 0 3 0x82 wait syz-executor.1 14416 228219 94013 0 3 0x82 piperd syz-executor.0 94718 196437 1 0 3 0x100083 ttyin getty 76182 239727 0 0 3 0x14200 bored sosplice 94013 416452 91059 0 3 0x82 thrsleep syz-fuzzer 94013 39907 91059 0 3 0x4000082 thrsleep syz-fuzzer 94013 418554 91059 0 3 0x4000082 thrsleep syz-fuzzer 94013 172265 91059 0 3 0x4000082 thrsleep syz-fuzzer 94013 485657 91059 0 3 0x4000082 thrsleep syz-fuzzer 94013 471743 91059 0 3 0x4000082 thrsleep syz-fuzzer 94013 281482 91059 0 3 0x4000082 thrsleep syz-fuzzer 94013 208941 91059 0 3 0x4000082 kqread syz-fuzzer 91059 408015 96618 0 3 0x10008a pause ksh 96618 337890 48095 0 3 0x92 select sshd 48095 384997 1 0 3 0x80 select sshd 52673 157358 28183 73 2 0x100090 syslogd 28183 59582 1 0 3 0x100082 netio syslogd 92383 179392 1 77 3 0x100090 poll dhclient 31758 274117 1 0 3 0x80 poll dhclient 95375 513845 0 0 3 0x14200 pgzero zerothread 87738 250747 0 0 3 0x14200 aiodoned aiodoned 41433 134299 0 0 3 0x14200 syncer update 58928 48337 0 0 3 0x14200 cleaner cleaner 87576 215578 0 0 3 0x14200 reaper reaper 9269 81863 0 0 3 0x14200 pgdaemon pagedaemon 29249 182716 0 0 3 0x14200 bored crynlk 68196 281633 0 0 3 0x14200 bored crypto 96109 229298 0 0 3 0x40014200 acpi0 acpi0 46464 484771 0 0 3 0x14200 bored softnet 65849 75803 0 0 3 0x14200 bored systqmp 57948 26671 0 0 3 0x14200 bored systq 25730 130336 0 0 3 0x40014200 bored softclock 30396 428803 0 0 3 0x40014200 idle0 62232 482282 0 0 3 0x14200 bored smr 1 248236 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 Kern Lim devbuf 9516 6352K 7491K 78643K 13542 0 0 pcb 23 9K 10K 78643K 604 0 0 rtable 86 3K 4K 78643K 770 0 0 ifaddr 58 13K 14K 78643K 201 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 72 0 0 iov 0 0K 16K 78643K 885 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1196 75K 75K 78643K 2369 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 22 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 180 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 25K 78643K 2125 0 0 sigio 0 0K 0K 78643K 18 0 0 proc 44 46K 62K 78643K 810 0 0 subproc 66 67586K 69634K 78643K 408 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 134 0 0 in_multi 22 1K 2K 78643K 169 0 0 ether_multi 1 0K 0K 78643K 7 0 0 mrt 0 0K 0K 78643K 5 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 72 318K 318K 78643K 72 0 0 exec 0 0K 1K 78643K 382 0 0 pfkey data 0 0K 0K 78643K 2 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 92 21K 22K 78643K 5614 0 0 UVM aobj 91 5K 5K 78643K 95 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 0K 78643K 49 0 0 NDP 13 0K 0K 78643K 66 0 0 temp 177 2711K 3347K 78643K 15043 0 0 kqueue 0 0K 0K 78643K 6 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 24 0 20 1 0 1 1 0 8 0 inpcbpl 280 556 0 549 1 0 1 1 0 8 0 plimitpl 152 76 0 69 1 0 1 1 0 8 0 rtentry 112 144 0 111 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 17 0 17 1 1 0 1 0 8 0 tcpcb 544 174 0 170 1 0 1 1 0 8 0 nd6 48 33 0 30 1 0 1 1 0 8 0 ppxss 1128 17 0 17 5 4 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 593 0 446 13 0 13 13 0 8 1 art_table 32 594 0 446 2 0 2 2 0 8 0 art_node 16 143 0 113 1 0 1 1 0 8 0 sysvmsgpl 40 25 0 22 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 176 0 166 1 0 1 1 0 8 0 shmpl 112 93 0 4 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 4483 0 3033 47 0 47 47 0 8 0 ffsino 240 4483 0 3033 86 0 86 86 0 8 0 nchpl 144 7647 0 5991 62 0 62 62 0 8 0 uvmvnodes 72 5369 0 0 98 0 98 98 0 8 0 vnodes 200 5369 0 0 283 0 283 283 0 8 0 namei 1024 21107 0 21106 2 1 1 1 0 8 0 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 62637 0 62637 13 12 1 6 0 8 1 sigapl 432 2267 0 2253 2 0 2 2 0 8 0 futexpl 56 25688 0 25688 1 0 1 1 0 8 1 knotepl 112 499 0 478 1 0 1 1 0 8 0 kqueuepl 104 304 0 302 1 0 1 1 0 8 0 pipepl 112 966 0 947 3 2 1 2 0 8 0 fdescpl 424 2268 0 2253 2 0 2 2 0 8 0 filepl 120 9954 0 9860 4 0 4 4 0 8 1 lockfpl 104 430 0 430 4 3 1 1 0 8 1 lockfspl 48 165 0 165 4 3 1 1 0 8 1 sessionpl 112 29 0 19 1 0 1 1 0 8 0 pgrppl 48 41 0 31 1 0 1 1 0 8 0 ucredpl 96 1215 0 1208 1 0 1 1 0 8 0 zombiepl 144 2253 0 2253 2 1 1 1 0 8 1 processpl 840 2283 0 2253 4 0 4 4 0 8 0 procpl 600 4530 0 4493 4 0 4 4 0 8 0 sosppl 128 15 0 15 4 4 0 1 0 8 0 sockpl 384 1066 0 1049 4 1 3 3 0 8 1 mcl64k 65536 35 0 35 8 7 1 1 0 8 1 mcl16k 16384 4 0 4 3 3 0 1 0 8 0 mcl12k 12288 22 0 22 8 7 1 1 0 8 1 mcl9k 9216 18 0 18 6 5 1 1 0 8 1 mcl8k 8192 14 0 14 6 5 1 1 0 8 1 mcl4k 4096 73 0 73 3 2 1 1 0 8 1 mcl2k2 2112 3 0 3 3 3 0 1 0 8 0 mcl2k 2048 60681 0 60646 15 10 5 9 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 108263 0 108213 16 9 7 10 0 8 1 bufpl 256 59051 0 55943 198 0 198 198 0 8 0 anonpl 16 205189 0 196443 70 22 48 55 0 62 1 amapchunkpl 152 9488 0 9368 12 5 7 10 0 158 0 amappl16 192 11499 0 10915 56 24 32 42 0 8 2 amappl15 184 199 0 199 2 2 0 1 0 8 0 amappl14 176 93 0 89 2 1 1 1 0 8 0 amappl13 168 1054 0 1051 1 0 1 1 0 8 0 amappl12 160 19 0 18 1 0 1 1 0 8 0 amappl11 152 292 0 277 1 0 1 1 0 8 0 amappl10 144 176 0 174 1 0 1 1 0 8 0 amappl9 136 683 0 678 1 0 1 1 0 8 0 amappl8 128 245 0 223 1 0 1 1 0 8 0 amappl7 120 161 0 155 1 0 1 1 0 8 0 amappl6 112 276 0 268 1 0 1 1 0 8 0 amappl5 104 202 0 190 1 0 1 1 0 8 0 amappl4 96 2775 0 2747 2 1 1 2 0 8 0 amappl3 88 168 0 163 1 0 1 1 0 8 0 amappl2 80 17880 0 17837 2 0 2 2 0 8 0 amappl1 72 47602 0 47171 24 15 9 19 0 8 0 amappl 72 4943 0 4904 1 0 1 1 0 75 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma64 64 259 0 259 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 17 0 17 1 1 0 1 0 8 0 aobjpl 64 94 0 4 2 0 2 2 0 8 0 uaddrrnd 24 2268 0 2253 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2268 0 2253 1 0 1 1 0 8 0 vmmpekpl 168 18046 0 18027 2 0 2 2 0 8 0 vmmpepl 168 227235 0 225749 157 68 89 89 0 357 15 vmsppl 264 2267 0 2253 2 1 1 2 0 8 0 pdppl 4096 4542 0 4506 6 1 5 6 0 8 0 pvpl 32 590027 0 578220 187 55 132 139 0 265 14 pmappl 200 2267 0 2253 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 363 0 40 10 0 10 10 0 8 0