panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *349625 32258 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(ffff800014a33b88,ffff800014a33b88,1a9f7763ea57e587) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda708,ffff800014a33c30,ffff800014a33bf0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda708,ffff8000149ea018) 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(ffff8000149ea018,ffff800014a341f8,ffff800014a342c3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000149ea018,ffff800014a34330,ffff800014a343a0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800014a34410) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffe43b8,1f2300508ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe4340, 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(ffff800014a33b88,ffff800014a33b88,1a9f7763ea57e587) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda708,ffff800014a33c30,ffff800014a33bf0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda708,ffff8000149ea018) 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(ffff8000149ea018,ffff800014a341f8,ffff800014a342c3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000149ea018,ffff800014a34330,ffff800014a343a0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800014a34410) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffe43b8,1f2300508ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe4340, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014a339a0 rbx 0xffff800014a33a50 rdx 0x2 rcx 0 rax 0 r8 0xffff800014a33960 r9 0x1 r10 0 r11 0x6a9a36717ea127d1 r12 0x3000000008 r13 0xffff800014a339b0 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a33990 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (ifconfig) pid=349625 stat=onproc flags process=2 proc=0 pri=17, usrpri=52, nice=20 forw=0xffffffffffffffff, list=0xffff8000149eabd0,0xffffffff822b78f0 process=0xffff8000ffff73c0 user=0xffff800014a2f000, vmspace=0xfffffd803f014630 estcpu=2, cpticks=2, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *32258 349625 42785 0 7 0x2 ifconfig 42785 199718 96171 0 3 0x10008a pause sh 96171 355283 27393 0 3 0x82 wait syz-executor.0 15976 291221 8643 0 4 0x82000 syz-executor.1 15976 404683 8643 0 2 0x4082000 syz-executor.1 15976 486054 8643 0 3 0x4002000 suspend syz-executor.1 15976 477393 8643 0 3 0x4082000 vmmaplk syz-executor.1 15976 27593 8643 0 3 0x4082000 vmmaplk syz-executor.1 96088 450628 0 0 3 0x14200 bored sosplice 8643 351902 27393 0 2 0x482 syz-executor.1 27393 397167 49283 0 3 0x82 thrsleep syz-fuzzer 27393 510181 49283 0 3 0x4000082 thrsleep syz-fuzzer 27393 284016 49283 0 3 0x4000082 thrsleep syz-fuzzer 27393 253734 49283 0 3 0x4000082 thrsleep syz-fuzzer 27393 189327 49283 0 3 0x4000082 thrsleep syz-fuzzer 27393 242299 49283 0 3 0x4000082 kqread syz-fuzzer 27393 81260 49283 0 3 0x4000082 thrsleep syz-fuzzer 27393 124358 49283 0 3 0x4000082 thrsleep syz-fuzzer 49283 493846 21804 0 3 0x10008a pause ksh 21804 231523 73209 0 3 0x92 select sshd 58050 231511 1 0 3 0x100083 ttyin getty 73209 383095 1 0 3 0x80 select sshd 11904 221651 25927 73 2 0x100090 syslogd 25927 375101 1 0 3 0x100082 netio syslogd 39007 221060 1 77 3 0x100090 poll dhclient 12943 462971 1 0 3 0x80 poll dhclient 7221 182752 0 0 3 0x14200 pgzero zerothread 28898 313998 0 0 3 0x14200 aiodoned aiodoned 14446 486688 0 0 3 0x14200 syncer update 69885 241886 0 0 3 0x14200 cleaner cleaner 14790 78399 0 0 3 0x14200 reaper reaper 92557 483101 0 0 3 0x14200 pgdaemon pagedaemon 66437 220669 0 0 3 0x14200 bored crynlk 25054 166359 0 0 3 0x14200 bored crypto 50008 370303 0 0 3 0x40014200 acpi0 acpi0 15231 468483 0 0 3 0x14200 bored softnet 96675 70794 0 0 3 0x14200 bored systqmp 29182 382507 0 0 3 0x14200 bored systq 810 166866 0 0 3 0x40014200 bored softclock 80966 488338 0 0 3 0x40014200 idle0 40851 429586 0 0 3 0x14200 bored smr 1 50881 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 9478 6338K 6971K 78643K 12145 0 0 pcb 23 9K 10K 78643K 367 0 0 rtable 86 3K 4K 78643K 494 0 0 ifaddr 43 11K 13K 78643K 134 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 35 0 0 iov 0 0K 24K 78643K 84 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1196 75K 76K 78643K 1799 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 9 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 100 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 7 21K 25K 78643K 699 0 0 sigio 0 0K 0K 78643K 4 0 0 proc 43 46K 62K 78643K 526 0 0 subproc 66 67586K 69634K 78643K 238 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 64 0 0 in_multi 22 1K 2K 78643K 105 0 0 ether_multi 1 0K 0K 78643K 6 0 0 mrt 0 0K 0K 78643K 2 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 78 344K 344K 78643K 78 0 0 exec 0 0K 1K 78643K 267 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 87 21K 21K 78643K 2496 0 0 UVM aobj 30 2K 2K 78643K 34 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 32 0 0 NDP 8 0K 0K 78643K 41 0 0 temp 143 2710K 2839K 78643K 7845 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 14 0 10 1 0 1 1 0 8 0 inpcbpl 280 332 0 325 1 0 1 1 0 8 0 plimitpl 152 53 0 46 1 0 1 1 0 8 0 rtentry 112 89 0 56 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 8 0 8 1 1 0 1 0 8 0 tcpcb 544 116 0 112 1 0 1 1 0 8 0 nd6 48 18 0 15 1 0 1 1 0 8 0 ppxss 1128 15 0 15 3 3 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 374 0 229 12 0 12 12 0 8 1 art_table 32 375 0 229 2 0 2 2 0 8 0 art_node 16 88 0 58 1 0 1 1 0 8 0 sysvmsgpl 40 18 0 9 1 0 1 1 0 8 0 semapl 112 98 0 88 1 0 1 1 0 8 0 shmpl 112 32 0 4 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2409 0 989 46 0 46 46 0 8 0 ffsino 240 2409 0 989 84 0 84 84 0 8 0 nchpl 144 3515 0 1882 61 0 61 61 0 8 0 uvmvnodes 72 2877 0 0 53 0 53 53 0 8 0 vnodes 200 2877 0 0 152 0 152 152 0 8 0 namei 1024 10299 0 10298 2 1 1 1 0 8 0 scsiplug 64 2 0 2 2 2 0 1 0 8 0 scxspl 192 20659 0 20659 8 7 1 6 0 8 1 sigapl 432 854 0 839 2 0 2 2 0 8 0 futexpl 56 10385 0 10385 1 0 1 1 0 8 1 knotepl 112 234 0 213 1 0 1 1 0 8 0 kqueuepl 104 122 0 120 1 0 1 1 0 8 0 pipepl 112 450 0 431 2 1 1 1 0 8 0 fdescpl 424 855 0 839 2 0 2 2 0 8 0 filepl 120 4758 0 4659 4 0 4 4 0 8 1 lockfpl 104 248 0 248 2 1 1 1 0 8 1 lockfspl 48 72 0 72 2 1 1 1 0 8 1 sessionpl 112 22 0 12 1 0 1 1 0 8 0 pgrppl 48 24 0 14 1 0 1 1 0 8 0 ucredpl 96 726 0 719 1 0 1 1 0 8 0 zombiepl 144 839 0 839 2 1 1 1 0 8 1 processpl 840 870 0 839 4 0 4 4 0 8 0 procpl 600 1684 0 1642 4 0 4 4 0 8 0 sosppl 128 5 0 5 3 2 1 1 0 8 1 sockpl 384 636 0 619 3 0 3 3 0 8 1 mcl64k 65536 16 0 16 3 2 1 1 0 8 1 mcl16k 16384 4 0 4 3 2 1 1 0 8 1 mcl12k 12288 11 0 11 4 3 1 1 0 8 1 mcl9k 9216 4 0 4 2 2 0 1 0 8 0 mcl8k 8192 8 0 8 3 3 0 1 0 8 0 mcl4k 4096 42 0 42 2 1 1 1 0 8 1 mcl2k2 2112 8 0 8 4 3 1 1 0 8 1 mcl2k 2048 58478 0 58435 15 8 7 11 0 8 0 mtagpl 80 4 0 4 2 1 1 1 0 8 1 mbufpl 256 98820 0 98763 15 6 9 10 0 8 0 bufpl 256 23530 0 20421 198 0 198 198 0 8 0 anonpl 16 99075 0 86171 76 22 54 61 0 62 2 amapchunkpl 152 3887 0 3766 8 3 5 7 0 158 0 amappl16 192 4677 0 3833 67 24 43 43 0 8 0 amappl15 184 13 0 11 1 0 1 1 0 8 0 amappl14 176 61 0 59 2 1 1 1 0 8 0 amappl13 168 317 0 315 2 1 1 1 0 8 0 amappl12 160 168 0 167 1 0 1 1 0 8 0 amappl11 152 91 0 77 1 0 1 1 0 8 0 amappl10 144 83 0 82 2 1 1 1 0 8 0 amappl9 136 686 0 682 1 0 1 1 0 8 0 amappl8 128 249 0 232 1 0 1 1 0 8 0 amappl7 120 66 0 59 1 0 1 1 0 8 0 amappl6 112 84 0 77 1 0 1 1 0 8 0 amappl5 104 356 0 345 1 0 1 1 0 8 0 amappl4 96 1199 0 1172 2 1 1 2 0 8 0 amappl3 88 290 0 284 1 0 1 1 0 8 0 amappl2 80 6148 0 6094 2 0 2 2 0 8 0 amappl1 72 25083 0 24619 24 15 9 19 0 8 0 amappl 72 1973 0 1934 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 33 0 4 1 0 1 1 0 8 0 uaddrrnd 24 855 0 839 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 855 0 839 1 0 1 1 0 8 0 vmmpekpl 168 9568 0 9548 2 0 2 2 0 8 0 vmmpepl 168 96395 0 94547 140 35 105 105 0 357 24 vmsppl 264 854 0 839 2 1 1 2 0 8 0 pdppl 4096 1716 0 1678 6 1 5 6 0 8 0 pvpl 32 288379 0 270663 168 24 144 151 0 265 0 pmappl 200 854 0 839 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 350 0 26 10 0 10 10 0 8 0