panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *279534 63554 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(ffff8000149df328,ffff8000149df328,6b3b65c5c085fa37) at ufs_dirbadentry VOP_LOOKUP(fffffd803efd9708,ffff8000149df3d0,ffff8000149df390) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efd9708,ffff8000149c6720) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff7708,fffffd803efd9708,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000149c6720,ffff8000149df998,ffff8000149dfa63) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000149c6720,ffff8000149dfad0,ffff8000149dfb40) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149dfbb0) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffbc058,43ff7008ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbbfe0, 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(ffff8000149df328,ffff8000149df328,6b3b65c5c085fa37) at ufs_dirbadentry VOP_LOOKUP(fffffd803efd9708,ffff8000149df3d0,ffff8000149df390) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efd9708,ffff8000149c6720) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff7708,fffffd803efd9708,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000149c6720,ffff8000149df998,ffff8000149dfa63) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000149c6720,ffff8000149dfad0,ffff8000149dfb40) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149dfbb0) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffbc058,43ff7008ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbbfe0, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149df140 rbx 0xffff8000149df1f0 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149df100 r9 0x1 r10 0 r11 0x3b5b21f7f2f82fe1 r12 0x3000000008 r13 0xffff8000149df150 r14 0x100 r15 0x1 rip 0xffffffff811f14c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149df130 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (ifconfig) pid=279534 stat=onproc flags process=2 proc=0 pri=17, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff8000149c6978,0xffffffff822af360 process=0xffff8000ffff7708 user=0xffff8000149da000, vmspace=0xfffffd803f013948 estcpu=1, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *63554 279534 51010 0 7 0x2 ifconfig 51010 203071 9408 0 3 0x10008a pause sh 9408 449246 67816 0 3 0x82 wait syz-executor.1 81193 215496 1 0 3 0x100083 ttyin getty 42119 442284 0 0 3 0x14200 bored sosplice 67816 381683 12782 0 3 0x82 thrsleep syz-fuzzer 67816 291285 12782 0 3 0x4000082 thrsleep syz-fuzzer 67816 301580 12782 0 3 0x4000082 thrsleep syz-fuzzer 67816 354779 12782 0 3 0x4000082 thrsleep syz-fuzzer 67816 322085 12782 0 3 0x4000082 thrsleep syz-fuzzer 67816 130222 12782 0 3 0x4000082 kqread syz-fuzzer 67816 387359 12782 0 3 0x4000082 thrsleep syz-fuzzer 67816 335692 12782 0 3 0x4000082 thrsleep syz-fuzzer 12782 111134 39359 0 3 0x10008a pause ksh 39359 297346 81284 0 3 0x92 select sshd 81284 259425 1 0 3 0x80 select sshd 34157 120763 82875 73 2 0x100090 syslogd 82875 519842 1 0 3 0x100082 netio syslogd 88223 176417 1 77 3 0x100090 poll dhclient 94657 201053 1 0 3 0x80 poll dhclient 1810 240038 0 0 3 0x14200 pgzero zerothread 57660 226494 0 0 3 0x14200 aiodoned aiodoned 35835 372115 0 0 3 0x14200 syncer update 14234 405064 0 0 3 0x14200 cleaner cleaner 8619 465959 0 0 3 0x14200 reaper reaper 37225 38444 0 0 3 0x14200 pgdaemon pagedaemon 53911 522273 0 0 3 0x14200 bored crynlk 14294 137016 0 0 3 0x14200 bored crypto 43986 386723 0 0 3 0x40014200 acpi0 acpi0 61054 307643 0 0 3 0x14200 bored softnet 14470 189724 0 0 3 0x14200 bored systqmp 88394 367222 0 0 3 0x14200 bored systq 94561 271121 0 0 3 0x40014200 bored softclock 56603 222869 0 0 3 0x40014200 idle0 70837 38851 0 0 3 0x14200 bored smr 1 456007 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 9461 6321K 6957K 78643K 13357 0 0 pcb 23 9K 11K 78643K 599 0 0 rtable 64 2K 4K 78643K 932 0 0 ifaddr 33 9K 13K 78643K 252 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 44 0 0 iov 0 0K 24K 78643K 130 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1197 75K 76K 78643K 2424 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 22 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 165 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 5 13K 25K 78643K 1686 0 0 sigio 0 0K 0K 78643K 11 0 0 proc 43 46K 62K 78643K 775 0 0 subproc 34 34817K 69634K 78643K 476 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 36 0 0 in_multi 11 0K 2K 78643K 188 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 60 265K 265K 78643K 60 0 0 exec 0 0K 1K 78643K 369 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 72 12K 20K 78643K 4822 0 0 UVM aobj 32 2K 3K 78643K 40 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 38 0 0 NDP 6 0K 0K 78643K 80 0 0 temp 89 2700K 2829K 78643K 11444 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 28 0 26 1 0 1 1 0 8 0 inpcbpl 280 473 0 466 1 0 1 1 0 8 0 plimitpl 152 63 0 56 1 0 1 1 0 8 0 rtentry 112 166 0 144 2 0 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 117 0 113 1 0 1 1 0 8 0 nd6 48 39 0 39 1 0 1 1 0 8 1 ppxss 1128 35 0 35 4 3 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 704 0 608 13 0 13 13 0 8 7 art_table 32 705 0 608 2 0 2 2 0 8 1 art_node 16 165 0 145 1 0 1 1 0 8 0 semapl 112 163 0 153 1 0 1 1 0 8 0 shmpl 112 38 0 8 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 4009 0 2554 48 0 48 48 0 8 0 ffsino 240 4009 0 2554 86 0 86 86 0 8 0 nchpl 144 6177 0 4504 63 0 63 63 0 8 0 uvmvnodes 72 4853 0 0 89 0 89 89 0 8 0 vnodes 200 4853 0 0 256 0 256 256 0 8 0 namei 1024 16611 0 16610 2 1 1 1 0 8 0 scxspl 192 44847 0 44847 12 11 1 6 0 8 1 sigapl 432 1821 0 1808 2 0 2 2 0 8 0 futexpl 56 12406 0 12406 1 0 1 1 0 8 1 knotepl 112 491 0 472 1 0 1 1 0 8 0 kqueuepl 104 213 0 211 1 0 1 1 0 8 0 pipepl 112 584 0 569 3 2 1 2 0 8 0 fdescpl 424 1822 0 1808 2 0 2 2 0 8 0 filepl 120 6843 0 6770 7 3 4 5 0 8 1 lockfpl 104 320 0 320 5 4 1 1 0 8 1 lockfspl 48 132 0 132 5 4 1 1 0 8 1 sessionpl 112 30 0 20 1 0 1 1 0 8 0 pgrppl 48 30 0 20 1 0 1 1 0 8 0 ucredpl 96 937 0 930 1 0 1 1 0 8 0 zombiepl 144 1808 0 1807 2 1 1 1 0 8 0 processpl 840 1837 0 1807 4 0 4 4 0 8 0 procpl 600 3661 0 3624 4 0 4 4 0 8 0 sosppl 128 19 0 19 3 3 0 1 0 8 0 sockpl 384 1022 0 1005 8 5 3 4 0 8 1 mcl64k 65536 14 0 14 2 1 1 1 0 8 1 mcl12k 12288 38 0 38 2 2 0 1 0 8 0 mcl9k 9216 11 0 11 2 2 0 1 0 8 0 mcl8k 8192 4 0 4 1 1 0 1 0 8 0 mcl4k 4096 35 0 35 4 3 1 1 0 8 1 mcl2k2 2112 5 0 5 1 1 0 1 0 8 0 mcl2k 2048 15385 0 15354 16 11 5 11 0 8 0 mtagpl 80 7 0 7 2 2 0 1 0 8 0 mbufpl 256 45818 0 45781 15 7 8 11 0 8 2 bufpl 256 37809 0 34701 198 0 198 198 0 8 0 anonpl 16 149827 0 146824 34 5 29 29 0 62 14 amapchunkpl 152 8059 0 7969 6 1 5 5 0 158 0 amappl16 192 8843 0 8726 21 6 15 18 0 8 8 amappl15 184 120 0 120 2 2 0 1 0 8 0 amappl14 176 589 0 585 2 1 1 1 0 8 0 amappl13 168 322 0 322 3 2 1 1 0 8 1 amappl12 160 15 0 13 1 0 1 1 0 8 0 amappl11 152 182 0 168 1 0 1 1 0 8 0 amappl10 144 110 0 107 2 1 1 1 0 8 0 amappl9 136 693 0 690 1 0 1 1 0 8 0 amappl8 128 265 0 242 1 0 1 1 0 8 0 amappl7 120 80 0 74 1 0 1 1 0 8 0 amappl6 112 176 0 169 1 0 1 1 0 8 0 amappl5 104 284 0 273 1 0 1 1 0 8 0 amappl4 96 2305 0 2276 2 1 1 2 0 8 0 amappl3 88 660 0 650 1 0 1 1 0 8 0 amappl2 80 14156 0 14116 2 0 2 2 0 8 0 amappl1 72 42098 0 41671 25 15 10 19 0 8 0 amappl 72 4087 0 4058 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 39 0 8 1 0 1 1 0 8 0 uaddrrnd 24 1822 0 1808 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1822 0 1808 1 0 1 1 0 8 0 vmmpekpl 168 14584 0 14562 2 0 2 2 0 8 0 vmmpepl 168 184939 0 183967 102 45 57 72 0 357 7 vmsppl 264 1821 0 1808 3 2 1 2 0 8 0 pdppl 4096 3650 0 3616 7 2 5 6 0 8 0 pvpl 32 493051 0 487103 154 64 90 101 0 265 35 pmappl 200 1821 0 1808 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 351 0 28 10 0 10 10 0 8 0