panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *327484 37705 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(ffff800014a208a8,ffff800014a208a8,94269d356ab2ad4c) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda000,ffff800014a20950,ffff800014a20910) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda000,ffff8000149fe4c8) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff7078,fffffd803efda000,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000149fe4c8,ffff800014a20f18,ffff800014a20fe3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000149fe4c8,ffff800014a21050,ffff800014a210c0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800014a21130) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffd7338,5b827508ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd72c0, 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(ffff800014a208a8,ffff800014a208a8,94269d356ab2ad4c) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda000,ffff800014a20950,ffff800014a20910) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda000,ffff8000149fe4c8) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff7078,fffffd803efda000,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000149fe4c8,ffff800014a20f18,ffff800014a20fe3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000149fe4c8,ffff800014a21050,ffff800014a210c0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800014a21130) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffd7338,5b827508ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd72c0, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014a206c0 rbx 0xffff800014a20770 rdx 0x2 rcx 0 rax 0 r8 0xffff800014a20680 r9 0x1 r10 0 r11 0x80f42e62c633cdf3 r12 0x3000000008 r13 0xffff800014a206d0 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a206b0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (ifconfig) pid=327484 stat=onproc flags process=2 proc=0 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff5078,0xffffffff822b78f0 process=0xffff8000ffff7078 user=0xffff800014a1c000, vmspace=0xfffffd803f014528 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *37705 327484 72941 0 7 0x2 ifconfig 72941 229192 2285 0 3 0x10008a pause sh 2285 45383 28064 0 3 0x82 wait syz-executor.1 33827 417424 91957 0 3 0 vmmaplk syz-executor.0 33827 239754 91957 0 3 0x4000000 vmmaplk syz-executor.0 33827 162987 91957 0 2 0x4000000 syz-executor.0 33827 127790 91957 0 3 0x4000000 vmmaplk syz-executor.0 91957 389307 28064 0 2 0x482 syz-executor.0 28064 62626 24610 0 3 0x82 thrsleep syz-fuzzer 28064 504056 24610 0 3 0x4000082 thrsleep syz-fuzzer 28064 486070 24610 0 3 0x4000082 kqread syz-fuzzer 28064 117503 24610 0 3 0x4000082 thrsleep syz-fuzzer 28064 181552 24610 0 3 0x4000082 thrsleep syz-fuzzer 28064 116544 24610 0 3 0x4000082 thrsleep syz-fuzzer 28064 190127 24610 0 3 0x4000082 thrsleep syz-fuzzer 28064 386750 24610 0 3 0x4000082 thrsleep syz-fuzzer 24610 225160 7651 0 3 0x10008a pause ksh 7651 400895 6052 0 3 0x92 select sshd 1812 111180 1 0 3 0x100083 ttyin getty 6052 347326 1 0 3 0x80 select sshd 70053 24908 22561 73 2 0x100090 syslogd 22561 300137 1 0 3 0x100082 netio syslogd 91357 397313 1 77 3 0x100090 poll dhclient 45974 237027 1 0 3 0x80 poll dhclient 25054 297117 0 0 3 0x14200 pgzero zerothread 73056 127750 0 0 3 0x14200 aiodoned aiodoned 54371 276113 0 0 3 0x14200 syncer update 58657 179798 0 0 3 0x14200 cleaner cleaner 15708 116133 0 0 3 0x14200 reaper reaper 20971 180247 0 0 3 0x14200 pgdaemon pagedaemon 76375 420698 0 0 3 0x14200 bored crynlk 17402 165216 0 0 3 0x14200 bored crypto 44274 392298 0 0 3 0x40014200 acpi0 acpi0 60897 338809 0 0 3 0x14200 bored softnet 93608 352156 0 0 3 0x14200 bored systqmp 90286 521690 0 0 3 0x14200 bored systq 23217 399038 0 0 2 0x40014200 softclock 3044 17165 0 0 3 0x40014200 idle0 114 291589 0 0 3 0x14200 bored smr 1 178855 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 9436 6311K 6572K 78643K 10612 0 0 pcb 23 9K 10K 78643K 81 0 0 rtable 83 2K 3K 78643K 197 0 0 ifaddr 28 8K 9K 78643K 34 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 15 0 0 iov 0 0K 24K 78643K 10 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 1262 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 4 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 8 0K 0K 78643K 8 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 7 21K 25K 78643K 82 0 0 sigio 0 0K 0K 78643K 2 0 0 proc 42 46K 62K 78643K 289 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 6 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 48 212K 212K 78643K 48 0 0 exec 0 0K 1K 78643K 189 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 82 20K 20K 78643K 965 0 0 UVM aobj 6 2K 2K 78643K 6 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 NDP 4 0K 0K 78643K 9 0 0 temp 74 2696K 2762K 78643K 5379 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 52 0 45 1 0 1 1 0 8 0 plimitpl 152 17 0 10 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 14 0 10 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 semapl 112 6 0 0 1 0 1 1 0 8 0 shmpl 112 4 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1522 0 109 46 0 46 46 0 8 0 ffsino 240 1522 0 109 84 0 84 84 0 8 0 nchpl 144 1828 0 195 61 0 61 61 0 8 0 uvmvnodes 72 1601 0 0 30 0 30 30 0 8 0 vnodes 200 1601 0 0 85 0 85 85 0 8 0 namei 1024 4510 0 4509 2 1 1 1 0 8 0 scxspl 192 10898 0 10898 7 6 1 6 0 8 1 sigapl 432 249 0 234 2 0 2 2 0 8 0 futexpl 56 822 0 822 1 0 1 1 0 8 1 knotepl 112 77 0 56 1 0 1 1 0 8 0 kqueuepl 104 16 0 14 1 0 1 1 0 8 0 pipepl 112 154 0 135 2 1 1 1 0 8 0 fdescpl 424 250 0 234 2 0 2 2 0 8 0 filepl 120 1250 0 1153 4 0 4 4 0 8 1 lockfpl 104 16 0 16 2 1 1 1 0 8 1 lockfspl 48 8 0 8 2 1 1 1 0 8 1 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 22 0 12 1 0 1 1 0 8 0 ucredpl 96 102 0 95 1 0 1 1 0 8 0 zombiepl 144 234 0 234 3 2 1 1 0 8 1 processpl 840 264 0 234 4 0 4 4 0 8 0 procpl 600 342 0 302 4 0 4 4 0 8 0 sockpl 384 114 0 97 3 0 3 3 0 8 1 mcl4k 4096 11 0 11 2 1 1 1 0 8 1 mcl2k2 2112 2 0 2 1 0 1 1 0 8 1 mcl2k 2048 57470 0 57431 11 3 8 9 0 8 2 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 92763 0 92706 12 1 11 11 0 8 3 bufpl 256 17595 0 14482 198 0 198 198 0 8 0 anonpl 16 38436 0 25873 53 2 51 51 0 62 0 amapchunkpl 152 1120 0 981 7 1 6 6 0 158 0 amappl16 192 1166 0 368 41 0 41 41 0 8 0 amappl14 176 29 0 27 2 1 1 1 0 8 0 amappl13 168 50 0 48 2 1 1 1 0 8 0 amappl12 160 13 0 11 1 0 1 1 0 8 0 amappl11 152 41 0 26 1 0 1 1 0 8 0 amappl10 144 63 0 59 2 1 1 1 0 8 0 amappl9 136 565 0 561 1 0 1 1 0 8 0 amappl8 128 127 0 111 1 0 1 1 0 8 0 amappl7 120 33 0 28 1 0 1 1 0 8 0 amappl6 112 56 0 48 1 0 1 1 0 8 0 amappl5 104 141 0 131 1 0 1 1 0 8 0 amappl4 96 482 0 457 2 1 1 2 0 8 0 amappl3 88 118 0 111 1 0 1 1 0 8 0 amappl2 80 1048 0 995 3 1 2 2 0 8 0 amappl1 72 13828 0 13386 25 15 10 19 0 8 0 amappl 72 573 0 533 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 0 1 0 1 1 0 8 0 uaddrrnd 24 250 0 234 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 250 0 234 1 0 1 1 0 8 0 vmmpekpl 168 5919 0 5901 1 0 1 1 0 8 0 vmmpepl 168 34827 0 33054 116 17 99 99 0 357 21 vmsppl 264 249 0 234 2 0 2 2 0 8 1 pdppl 4096 506 0 468 6 0 6 6 0 8 1 pvpl 32 133256 0 117628 133 6 127 127 0 265 0 pmappl 200 249 0 234 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 334 0 8 10 0 10 10 0 8 0