panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *222298 49615 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(ffff8000149da588,ffff8000149da588,ec43ad60d428301) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda640,ffff8000149da630,ffff8000149da5f0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda640,ffff8000ffff99d0) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff7708,fffffd803efda640,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff99d0,ffff8000149dabf8,ffff8000149dacc3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff99d0,ffff8000149dad30,ffff8000149dada0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149dae10) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffe7a58,108d2cb08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe79e0, 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(ffff8000149da588,ffff8000149da588,ec43ad60d428301) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda640,ffff8000149da630,ffff8000149da5f0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda640,ffff8000ffff99d0) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff7708,fffffd803efda640,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff99d0,ffff8000149dabf8,ffff8000149dacc3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff99d0,ffff8000149dad30,ffff8000149dada0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149dae10) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffe7a58,108d2cb08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe79e0, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149da3a0 rbx 0xffff8000149da450 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149da360 r9 0x1 r10 0 r11 0xc7148783f8bca9ec r12 0x3000000008 r13 0xffff8000149da3b0 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149da390 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (ifconfig) pid=222298 stat=onproc flags process=2 proc=0 pri=17, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff8260,0xffffffff822b78f0 process=0xffff8000ffff7708 user=0xffff8000149d5000, vmspace=0xfffffd803f014840 estcpu=1, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *49615 222298 62929 0 7 0x2 ifconfig 62929 310626 47105 0 3 0x10008a pause sh 47105 335415 5046 0 3 0x82 wait syz-executor.0 5046 422616 66813 0 3 0x82 thrsleep syz-fuzzer 5046 3722 66813 0 3 0x4000082 thrsleep syz-fuzzer 5046 323597 66813 0 3 0x4000082 thrsleep syz-fuzzer 5046 103870 66813 0 3 0x4000082 thrsleep syz-fuzzer 5046 87497 66813 0 3 0x4000082 thrsleep syz-fuzzer 5046 431676 66813 0 3 0x4000082 kqread syz-fuzzer 5046 278438 66813 0 3 0x4000082 thrsleep syz-fuzzer 5046 470035 66813 0 3 0x4000082 thrsleep syz-fuzzer 66813 297350 2504 0 3 0x10008a pause ksh 2504 268320 91487 0 3 0x92 select sshd 60198 88110 1 0 3 0x100083 ttyin getty 91487 481155 1 0 3 0x80 select sshd 62162 162898 60868 73 2 0x100090 syslogd 60868 218916 1 0 3 0x100082 netio syslogd 38901 86298 1 77 3 0x100090 poll dhclient 9589 429207 1 0 3 0x80 poll dhclient 40251 88392 0 0 3 0x14200 pgzero zerothread 23910 448995 0 0 3 0x14200 aiodoned aiodoned 50947 396811 0 0 3 0x14200 syncer update 88415 477914 0 0 3 0x14200 cleaner cleaner 33288 236528 0 0 3 0x14200 reaper reaper 63351 189143 0 0 3 0x14200 pgdaemon pagedaemon 41281 391683 0 0 3 0x14200 bored crynlk 23195 450638 0 0 3 0x14200 bored crypto 74459 267801 0 0 3 0x40014200 acpi0 acpi0 31517 163455 0 0 3 0x14200 bored softnet 61995 374408 0 0 3 0x14200 bored systqmp 6606 520384 0 0 3 0x14200 bored systq 17862 57286 0 0 3 0x40014200 bored softclock 67940 388086 0 0 3 0x40014200 idle0 87376 202475 0 0 3 0x14200 bored smr 1 4614 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 9447 6312K 14510K 78643K 10772 0 0 pcb 23 9K 10K 78643K 130 0 0 rtable 64 2K 4K 78643K 250 0 0 ifaddr 30 8K 11K 78643K 66 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 23 0 0 iov 0 0K 12K 78643K 10 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1205 75K 76K 78643K 1297 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 3 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 14 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 5 13K 25K 78643K 135 0 0 sigio 0 0K 0K 78643K 2 0 0 proc 43 46K 62K 78643K 290 0 0 subproc 34 34817K 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 11 0K 2K 78643K 36 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 186 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 74 12K 20K 78643K 1105 0 0 UVM aobj 8 2K 2K 78643K 10 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 2 0 0 NDP 5 0K 0K 78643K 17 0 0 temp 72 2697K 2826K 78643K 5625 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 4 1 0 1 1 0 8 0 inpcbpl 280 74 0 67 1 0 1 1 0 8 0 plimitpl 152 17 0 11 1 0 1 1 0 8 0 rtentry 112 45 0 23 2 0 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 20 0 16 1 0 1 1 0 8 0 nd6 48 6 0 6 1 0 1 1 0 8 1 ppxss 1128 4 0 4 2 1 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 188 0 92 12 0 12 12 0 8 6 art_table 32 189 0 92 2 0 2 2 0 8 1 art_node 16 44 0 24 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 0 1 0 1 1 0 8 0 semapl 112 12 0 2 1 0 1 1 0 8 0 shmpl 112 8 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1593 0 177 46 0 46 46 0 8 0 ffsino 240 1593 0 177 84 0 84 84 0 8 0 nchpl 144 1975 0 344 61 0 61 61 0 8 0 uvmvnodes 72 1702 0 0 31 0 31 31 0 8 0 vnodes 200 1702 0 0 90 0 90 90 0 8 0 namei 1024 5036 0 5035 2 1 1 1 0 8 0 scxspl 192 11507 0 11507 8 7 1 6 0 8 1 sigapl 432 302 0 289 2 0 2 2 0 8 0 futexpl 56 1805 0 1805 1 0 1 1 0 8 1 knotepl 112 96 0 81 1 0 1 1 0 8 0 kqueuepl 104 28 0 26 1 0 1 1 0 8 0 pipepl 112 198 0 185 2 1 1 1 0 8 0 fdescpl 424 303 0 289 2 0 2 2 0 8 0 filepl 120 1592 0 1521 4 0 4 4 0 8 1 lockfpl 104 49 0 49 2 1 1 1 0 8 1 lockfspl 48 18 0 18 2 1 1 1 0 8 1 sessionpl 112 18 0 9 1 0 1 1 0 8 0 pgrppl 48 18 0 9 1 0 1 1 0 8 0 ucredpl 96 162 0 155 1 0 1 1 0 8 0 zombiepl 144 289 0 289 2 1 1 1 0 8 1 processpl 840 317 0 289 4 0 4 4 0 8 0 procpl 600 461 0 426 4 0 4 4 0 8 1 sockpl 384 171 0 154 3 0 3 3 0 8 1 mcl64k 65536 6 0 6 1 0 1 1 0 8 1 mcl12k 12288 2 0 2 1 0 1 1 0 8 1 mcl8k 8192 2 0 2 1 0 1 1 0 8 1 mcl4k 4096 15 0 15 2 1 1 1 0 8 1 mcl2k2 2112 2 0 2 1 0 1 1 0 8 1 mcl2k 2048 58131 0 58092 12 6 6 10 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 94991 0 94942 12 3 9 9 0 8 2 bufpl 256 17846 0 14731 198 1 197 198 0 8 0 anonpl 16 41744 0 33075 60 2 58 59 0 62 13 amapchunkpl 152 1409 0 1278 8 2 6 7 0 158 0 amappl16 192 1338 0 768 41 4 37 41 0 8 7 amappl14 176 32 0 29 2 1 1 1 0 8 0 amappl13 168 54 0 54 1 0 1 1 0 8 1 amappl12 160 16 0 14 1 0 1 1 0 8 0 amappl11 152 39 0 25 1 0 1 1 0 8 0 amappl10 144 108 0 107 1 0 1 1 0 8 0 amappl9 136 559 0 557 1 0 1 1 0 8 0 amappl8 128 127 0 111 1 0 1 1 0 8 0 amappl7 120 79 0 73 1 0 1 1 0 8 0 amappl6 112 49 0 43 1 0 1 1 0 8 0 amappl5 104 128 0 115 1 0 1 1 0 8 0 amappl4 96 500 0 474 2 1 1 2 0 8 0 amappl3 88 123 0 117 1 0 1 1 0 8 0 amappl2 80 1588 0 1547 2 0 2 2 0 8 1 amappl1 72 14855 0 14433 24 14 10 19 0 8 0 amappl 72 710 0 677 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 9 0 2 1 0 1 1 0 8 0 uaddrrnd 24 303 0 289 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 303 0 289 1 0 1 1 0 8 0 vmmpekpl 168 6221 0 6204 1 0 1 1 0 8 0 vmmpepl 168 40388 0 38975 104 20 84 84 0 357 20 vmsppl 264 302 0 289 2 1 1 2 0 8 0 pdppl 4096 612 0 578 6 1 5 6 0 8 0 pvpl 32 146331 0 134750 152 7 145 146 0 265 33 pmappl 200 302 0 289 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 337 0 15 10 0 10 10 0 8 0