panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *109780 4785 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(ffff8000149f8388,ffff8000149f8388,84549efd91723a72) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda898,ffff8000149f8430,ffff8000149f83f0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda898,ffff8000ffff9070) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff69e8,fffffd803efda898,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff9070,ffff8000149f89f8,ffff8000149f8ac3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff9070,ffff8000149f8b30,ffff8000149f8ba0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149f8c10) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffd9ce8,d4dd3b08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd9c70, 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(ffff8000149f8388,ffff8000149f8388,84549efd91723a72) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda898,ffff8000149f8430,ffff8000149f83f0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda898,ffff8000ffff9070) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff69e8,fffffd803efda898,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff9070,ffff8000149f89f8,ffff8000149f8ac3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff9070,ffff8000149f8b30,ffff8000149f8ba0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149f8c10) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffd9ce8,d4dd3b08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd9c70, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149f81a0 rbx 0xffff8000149f8250 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149f8160 r9 0x1 r10 0 r11 0xf4dd3cd457ac31e2 r12 0x3000000008 r13 0xffff8000149f81b0 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149f8190 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (ifconfig) pid=109780 stat=onproc flags process=2 proc=0 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff8bc0,0xffffffff822b78f0 process=0xffff8000ffff69e8 user=0xffff8000149f3000, 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 * 4785 109780 85876 0 7 0x2 ifconfig 85876 440795 27905 0 3 0x10008a pause sh 27905 272421 61953 0 3 0x82 wait syz-executor.1 52578 24610 61953 0 3 0x82 piperd syz-executor.0 61953 425019 20548 0 3 0x82 thrsleep syz-fuzzer 61953 291135 20548 0 3 0x4000082 nanosleep syz-fuzzer 61953 250713 20548 0 3 0x4000082 thrsleep syz-fuzzer 61953 177834 20548 0 3 0x4000082 thrsleep syz-fuzzer 61953 349008 20548 0 3 0x4000082 kqread syz-fuzzer 61953 64580 20548 0 3 0x4000082 thrsleep syz-fuzzer 61953 362216 20548 0 3 0x4000082 thrsleep syz-fuzzer 20548 41591 45010 0 3 0x10008a pause ksh 45010 237517 93839 0 3 0x92 select sshd 28208 72087 1 0 3 0x100083 ttyin getty 93839 47310 1 0 3 0x80 select sshd 96949 182999 75375 73 2 0x100090 syslogd 75375 484447 1 0 3 0x100082 netio syslogd 84070 495607 1 77 3 0x100090 poll dhclient 43433 305060 1 0 3 0x80 poll dhclient 4130 383575 0 0 3 0x14200 pgzero zerothread 60926 158674 0 0 3 0x14200 aiodoned aiodoned 83284 173976 0 0 3 0x14200 syncer update 91156 479300 0 0 3 0x14200 cleaner cleaner 14052 428748 0 0 3 0x14200 reaper reaper 13752 313668 0 0 3 0x14200 pgdaemon pagedaemon 94611 258415 0 0 3 0x14200 bored crynlk 53627 464599 0 0 3 0x14200 bored crypto 86950 227559 0 0 3 0x40014200 acpi0 acpi0 83289 144423 0 0 3 0x14200 bored softnet 39266 8407 0 0 3 0x14200 bored systqmp 50695 374226 0 0 3 0x14200 bored systq 24092 228235 0 0 3 0x40014200 bored softclock 82730 418723 0 0 3 0x40014200 idle0 70744 331627 0 0 3 0x14200 bored smr 1 78421 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 9479 6572K 14642K 78643K 10891 0 0 pcb 23 9K 9K 78643K 123 0 0 rtable 83 2K 3K 78643K 207 0 0 ifaddr 38 10K 11K 78643K 45 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 19 0 0 iov 0 0K 16K 78643K 12 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 76K 78643K 1336 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 1K 78643K 2 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 10 0K 0K 78643K 10 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 25K 78643K 154 0 0 sigio 0 0K 0K 78643K 8 0 0 proc 43 46K 62K 78643K 305 0 0 subproc 66 67586K 69634K 78643K 102 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 4 0 0 in_multi 22 1K 2K 78643K 33 0 0 ether_multi 1 0K 0K 78643K 1 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 42 185K 185K 78643K 42 0 0 exec 0 0K 1K 78643K 200 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 80 20K 20K 78643K 1119 0 0 UVM aobj 5 2K 2K 78643K 6 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 NDP 7 0K 0K 78643K 12 0 0 temp 98 2697K 2763K 78643K 5568 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 6 0 2 1 0 1 1 0 8 0 inpcbpl 280 72 0 65 1 0 1 1 0 8 0 plimitpl 152 20 0 13 1 0 1 1 0 8 0 rtentry 112 45 0 12 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 26 0 22 1 0 1 1 0 8 0 nd6 48 6 0 3 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 189 0 44 12 0 12 12 0 8 1 art_table 32 190 0 44 2 0 2 2 0 8 0 art_node 16 44 0 14 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 8 0 0 1 0 1 1 0 8 0 shmpl 112 4 0 1 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1628 0 219 46 0 46 46 0 8 0 ffsino 240 1628 0 219 84 0 84 84 0 8 0 nchpl 144 2034 0 406 61 0 61 61 0 8 0 uvmvnodes 72 1769 0 0 33 0 33 33 0 8 0 vnodes 200 1769 0 0 94 0 94 94 0 8 0 namei 1024 5330 0 5329 2 1 1 1 0 8 0 scxspl 192 12109 0 12109 7 6 1 6 0 8 1 sigapl 432 321 0 307 2 0 2 2 0 8 0 futexpl 56 1929 0 1929 1 0 1 1 0 8 1 knotepl 112 99 0 78 1 0 1 1 0 8 0 kqueuepl 104 24 0 22 1 0 1 1 0 8 0 pipepl 112 214 0 195 2 1 1 1 0 8 0 fdescpl 424 322 0 307 2 0 2 2 0 8 0 filepl 120 1711 0 1617 4 0 4 4 0 8 1 lockfpl 104 73 0 73 2 1 1 1 0 8 1 lockfspl 48 24 0 24 2 1 1 1 0 8 1 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 18 0 8 1 0 1 1 0 8 0 ucredpl 96 172 0 165 1 0 1 1 0 8 0 zombiepl 144 307 0 307 2 1 1 1 0 8 1 processpl 840 336 0 307 4 0 4 4 0 8 0 procpl 600 496 0 461 4 0 4 4 0 8 1 sockpl 384 168 0 151 3 0 3 3 0 8 1 mcl64k 65536 3 0 3 1 0 1 1 0 8 1 mcl16k 16384 1 0 1 1 0 1 1 0 8 1 mcl12k 12288 3 0 3 1 0 1 1 0 8 1 mcl9k 9216 4 0 4 1 0 1 1 0 8 1 mcl8k 8192 2 0 2 1 0 1 1 0 8 1 mcl4k 4096 14 0 14 2 1 1 1 0 8 1 mcl2k2 2112 3 0 3 1 1 0 1 0 8 0 mcl2k 2048 58156 0 58115 14 8 6 11 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 95301 0 95239 11 1 10 10 0 8 2 bufpl 256 17371 0 14261 198 0 198 198 0 8 0 anonpl 16 50401 0 41755 59 1 58 58 0 62 14 amapchunkpl 152 1524 0 1395 7 1 6 6 0 158 0 amappl16 192 1893 0 1340 42 2 40 40 0 8 9 amappl15 184 9 0 7 1 0 1 1 0 8 0 amappl14 176 32 0 28 2 1 1 1 0 8 0 amappl13 168 6 0 6 1 1 0 1 0 8 0 amappl12 160 6 0 5 1 0 1 1 0 8 0 amappl11 152 103 0 89 1 0 1 1 0 8 0 amappl10 144 121 0 119 1 0 1 1 0 8 0 amappl9 136 557 0 554 1 0 1 1 0 8 0 amappl8 128 127 0 111 1 0 1 1 0 8 0 amappl7 120 93 0 87 1 0 1 1 0 8 0 amappl6 112 102 0 97 1 0 1 1 0 8 0 amappl5 104 129 0 118 1 0 1 1 0 8 0 amappl4 96 524 0 498 2 1 1 2 0 8 0 amappl3 88 125 0 118 1 0 1 1 0 8 0 amappl2 80 1695 0 1652 2 0 2 2 0 8 0 amappl1 72 15263 0 14838 24 15 9 19 0 8 0 amappl 72 725 0 691 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 5 0 1 1 0 1 1 0 8 0 uaddrrnd 24 322 0 307 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 322 0 307 1 0 1 1 0 8 0 vmmpekpl 168 6365 0 6349 1 0 1 1 0 8 0 vmmpepl 168 43697 0 42264 112 13 99 99 0 357 30 vmsppl 264 321 0 307 2 1 1 2 0 8 0 pdppl 4096 650 0 614 6 1 5 6 0 8 0 pvpl 32 168518 0 156880 149 4 145 145 0 265 31 pmappl 200 321 0 307 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 339 0 14 10 0 10 10 0 8 0