panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *115476 74254 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(ffff800014a0c2b8,ffff800014a0c2b8,d3a35479f0c9ed57) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda320,ffff800014a0c360,ffff800014a0c320) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda320,ffff8000ffff8710) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff7078,fffffd803efda320,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff8710,ffff800014a0c928,ffff800014a0c9f3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff8710,ffff800014a0ca60,ffff800014a0cad0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800014a0cb40) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffe0ec8,186ad508ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe0e50, 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(ffff800014a0c2b8,ffff800014a0c2b8,d3a35479f0c9ed57) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda320,ffff800014a0c360,ffff800014a0c320) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda320,ffff8000ffff8710) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff7078,fffffd803efda320,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff8710,ffff800014a0c928,ffff800014a0c9f3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff8710,ffff800014a0ca60,ffff800014a0cad0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800014a0cb40) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffe0ec8,186ad508ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe0e50, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014a0c0d0 rbx 0xffff800014a0c180 rdx 0x2 rcx 0 rax 0 r8 0xffff800014a0c090 r9 0x1 r10 0 r11 0xc42b256df18c52b5 r12 0x3000000008 r13 0xffff800014a0c0e0 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a0c0c0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (ifconfig) pid=115476 stat=onproc flags process=2 proc=0 pri=17, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff84b8,0xffffffff822b78f0 process=0xffff8000ffff7078 user=0xffff800014a07000, vmspace=0xfffffd803f014e70 estcpu=1, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *74254 115476 19451 0 7 0x2 ifconfig 19451 160812 85233 0 3 0x10008a pause sh 85233 141232 78983 0 3 0x82 wait syz-executor.1 37371 432772 78983 0 3 0x82 piperd syz-executor.0 78983 273016 11192 0 3 0x82 thrsleep syz-fuzzer 78983 417242 11192 0 3 0x4000082 thrsleep syz-fuzzer 78983 249139 11192 0 3 0x4000082 kqread syz-fuzzer 78983 292080 11192 0 3 0x4000082 thrsleep syz-fuzzer 78983 479475 11192 0 3 0x4000082 thrsleep syz-fuzzer 78983 486654 11192 0 3 0x4000082 thrsleep syz-fuzzer 78983 489859 11192 0 3 0x4000082 thrsleep syz-fuzzer 11192 370386 46698 0 3 0x10008a pause ksh 46698 74755 18363 0 3 0x92 select sshd 3852 396472 1 0 3 0x100083 ttyin getty 18363 342616 1 0 3 0x80 select sshd 12208 334541 29873 73 2 0x100090 syslogd 29873 332867 1 0 3 0x100082 netio syslogd 14465 496644 1 77 3 0x100090 poll dhclient 49550 229885 1 0 3 0x80 poll dhclient 32733 202858 0 0 3 0x14200 pgzero zerothread 48436 262307 0 0 3 0x14200 aiodoned aiodoned 59631 444274 0 0 3 0x14200 syncer update 54301 214769 0 0 3 0x14200 cleaner cleaner 44236 472286 0 0 3 0x14200 reaper reaper 83598 445482 0 0 3 0x14200 pgdaemon pagedaemon 87818 275004 0 0 3 0x14200 bored crynlk 26049 31262 0 0 3 0x14200 bored crypto 51565 443543 0 0 3 0x40014200 acpi0 acpi0 30093 86518 0 0 3 0x14200 bored softnet 54613 3119 0 0 3 0x14200 bored systqmp 48281 320382 0 0 3 0x14200 bored systq 78123 205409 0 0 3 0x40014200 bored softclock 47901 39625 0 0 3 0x40014200 idle0 25239 113986 0 0 3 0x14200 bored smr 1 168017 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 6310K 6441K 78643K 10574 0 0 pcb 23 9K 11K 78643K 81 0 0 rtable 83 2K 3K 78643K 198 0 0 ifaddr 28 8K 9K 78643K 34 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 17 0 0 iov 0 0K 16K 78643K 2 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 1235 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 4 0K 0K 78643K 4 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 25K 78643K 59 0 0 proc 43 46K 62K 78643K 295 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 in_multi 22 1K 2K 78643K 33 0 0 ether_multi 1 0K 0K 78643K 2 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 42 185K 185K 78643K 42 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 75 20K 20K 78643K 896 0 0 UVM aobj 4 2K 2K 78643K 4 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 76 2697K 2760K 78643K 5340 0 0 kqueue 0 0K 0K 78643K 2 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 42 0 35 1 0 1 1 0 8 0 plimitpl 152 15 0 8 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 tcpqe 32 15 0 15 1 0 1 1 0 8 1 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 187 0 44 12 0 12 12 0 8 1 art_table 32 188 0 44 2 0 2 2 0 8 0 art_node 16 44 0 14 1 0 1 1 0 8 0 semapl 112 2 0 0 1 0 1 1 0 8 0 shmpl 112 2 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1465 0 50 46 0 46 46 0 8 0 ffsino 240 1465 0 50 84 0 84 84 0 8 0 nchpl 144 1728 0 100 61 0 61 61 0 8 0 uvmvnodes 72 1533 0 0 28 0 28 28 0 8 0 vnodes 200 1533 0 0 81 0 81 81 0 8 0 namei 1024 4251 0 4250 2 1 1 1 0 8 0 scxspl 192 10364 0 10364 8 7 1 6 0 8 1 sigapl 432 226 0 212 2 0 2 2 0 8 0 futexpl 56 474 0 474 1 0 1 1 0 8 1 knotepl 112 73 0 52 1 0 1 1 0 8 0 kqueuepl 104 10 0 8 1 0 1 1 0 8 0 pipepl 112 154 0 135 2 1 1 1 0 8 0 fdescpl 424 227 0 212 2 0 2 2 0 8 0 filepl 120 1127 0 1033 4 0 4 4 0 8 1 lockfpl 104 17 0 17 2 1 1 1 0 8 1 lockfspl 48 7 0 7 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 72 0 65 1 0 1 1 0 8 0 zombiepl 144 212 0 212 2 1 1 1 0 8 1 processpl 840 241 0 212 4 0 4 4 0 8 0 procpl 600 277 0 242 4 0 4 4 0 8 1 sockpl 384 104 0 87 4 0 4 4 0 8 2 mcl9k 9216 1 0 1 1 0 1 1 0 8 1 mcl4k 4096 11 0 11 2 1 1 1 0 8 1 mcl2k 2048 57066 0 57024 14 2 12 12 0 8 5 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 92973 0 92916 12 1 11 11 0 8 2 bufpl 256 17269 0 14157 198 0 198 198 0 8 0 anonpl 16 37066 0 28422 62 2 60 60 0 62 14 amapchunkpl 152 1096 0 982 6 0 6 6 0 158 1 amappl16 192 1047 0 476 42 3 39 42 0 8 8 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 43 0 36 2 1 1 1 0 8 0 amappl13 168 14 0 14 1 0 1 1 0 8 1 amappl12 160 4 0 3 2 1 1 1 0 8 0 amappl11 152 43 0 29 1 0 1 1 0 8 0 amappl10 144 60 0 60 2 1 1 1 0 8 1 amappl9 136 555 0 551 1 0 1 1 0 8 0 amappl8 128 140 0 123 1 0 1 1 0 8 0 amappl7 120 33 0 28 1 0 1 1 0 8 0 amappl6 112 51 0 46 1 0 1 1 0 8 0 amappl5 104 149 0 139 1 0 1 1 0 8 0 amappl4 96 422 0 396 2 1 1 2 0 8 0 amappl3 88 121 0 112 1 0 1 1 0 8 0 amappl2 80 849 0 807 2 0 2 2 0 8 0 amappl1 72 13473 0 13038 25 11 14 19 0 8 4 amappl 72 507 0 473 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 3 0 0 1 0 1 1 0 8 0 uaddrrnd 24 227 0 212 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 227 0 212 1 0 1 1 0 8 0 vmmpekpl 168 5794 0 5773 2 0 2 2 0 8 0 vmmpepl 168 33323 0 31863 100 14 86 86 0 357 20 vmsppl 264 226 0 212 2 0 2 2 0 8 1 pdppl 4096 460 0 424 6 0 6 6 0 8 1 pvpl 32 131605 0 119999 153 5 148 148 0 265 33 pmappl 200 226 0 212 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 337 0 7 10 0 10 10 0 8 0