panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *213814 22819 0 0 0x4000000 0 syz-executor.0 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(ffff8000149da4e8,ffff8000149da4e8,75b6924c64a525da) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda4b0,ffff8000149da590,ffff8000149da550) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd8032ab9c08,ffff8000ffff5c30) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff7078,fffffd8032ab9c08,120) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff4970,ffff8000149dab58,ffff8000149dac23) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff4970,ffff8000149dac98,ffff8000149dad00) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149dad70) at syscall+0x511 Xsyscall(6,0,8,0,2,a2785905010) at Xsyscall+0x128 end of kernel end trace frame: 0x3ae, 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(ffff8000149da4e8,ffff8000149da4e8,75b6924c64a525da) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda4b0,ffff8000149da590,ffff8000149da550) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd8032ab9c08,ffff8000ffff5c30) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff7078,fffffd8032ab9c08,120) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff4970,ffff8000149dab58,ffff8000149dac23) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff4970,ffff8000149dac98,ffff8000149dad00) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149dad70) at syscall+0x511 Xsyscall(6,0,8,0,2,a2785905010) at Xsyscall+0x128 end of kernel end trace frame: 0x3ae, count: -10 ddb> show registers rdi 0xffffffff81a73677 db_enter+0x17 rsi 0x3138 __ALIGN_SIZE+0x2138 rbp 0xffff8000149da300 rbx 0xffff8000149da3b0 rdx 0x3139 __ALIGN_SIZE+0x2139 rcx 0xffff800001794000 rax 0xffff800001794000 r8 0xffff8000149da2c0 r9 0x1 r10 0xffff80000097f3c0 r11 0x4f10eab436788690 r12 0x3000000008 r13 0xffff8000149da310 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149da2f0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=213814 stat=onproc flags process=0 proc=4000000 pri=17, usrpri=52, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff5c30,0xffffffff822b78f0 process=0xffff8000ffff7078 user=0xffff8000149d5000, vmspace=0xfffffd803f014d68 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 22819 40214 74270 0 3 0x80 fsleep syz-executor.0 *22819 213814 74270 0 7 0x4000000 syz-executor.0 76100 201917 0 0 3 0x14200 bored sosplice 74270 357210 75994 0 3 0x82 nanosleep syz-executor.0 92029 183376 75994 0 2 0x2 syz-executor.1 75994 378311 58157 0 3 0x82 thrsleep syz-fuzzer 75994 352128 58157 0 3 0x4000082 nanosleep syz-fuzzer 75994 271251 58157 0 3 0x4000082 kqread syz-fuzzer 75994 253470 58157 0 3 0x4000082 thrsleep syz-fuzzer 75994 58246 58157 0 3 0x4000082 thrsleep syz-fuzzer 75994 99154 58157 0 3 0x4000082 thrsleep syz-fuzzer 75994 103231 58157 0 3 0x4000082 thrsleep syz-fuzzer 75994 397737 58157 0 3 0x4000082 thrsleep syz-fuzzer 58157 23217 28470 0 3 0x10008a pause ksh 28470 48069 65720 0 3 0x92 select sshd 17743 163948 1 0 3 0x100083 ttyin getty 65720 76535 1 0 3 0x80 select sshd 17397 169397 11698 73 2 0x100010 syslogd 11698 302397 1 0 3 0x100082 netio syslogd 97416 450338 1 77 3 0x100090 poll dhclient 45161 325681 1 0 3 0x80 poll dhclient 9309 508031 0 0 3 0x14200 pgzero zerothread 51150 492376 0 0 3 0x14200 aiodoned aiodoned 52137 144781 0 0 3 0x14200 syncer update 34614 18657 0 0 3 0x14200 cleaner cleaner 90323 312511 0 0 3 0x14200 reaper reaper 75177 236925 0 0 3 0x14200 pgdaemon pagedaemon 15901 265223 0 0 3 0x14200 bored crynlk 54165 350823 0 0 3 0x14200 bored crypto 97049 178135 0 0 3 0x40014200 acpi0 acpi0 22696 309176 0 0 3 0x14200 bored softnet 40591 51587 0 0 3 0x14200 bored systqmp 170 93194 0 0 3 0x14200 bored systq 44639 141714 0 0 3 0x40014200 bored softclock 73258 485090 0 0 3 0x40014200 idle0 39193 105550 0 0 3 0x14200 bored smr 1 154145 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 9514 6352K 6848K 78643K 13608 0 0 pcb 23 9K 10K 78643K 584 0 0 rtable 104 3K 3K 78643K 675 0 0 ifaddr 61 13K 14K 78643K 221 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 68 0 0 iov 0 0K 24K 78643K 419 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 76K 78643K 2640 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 29 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 205 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 5 13K 25K 78643K 2775 0 0 sigio 0 0K 0K 78643K 14 0 0 proc 44 46K 62K 78643K 682 0 0 subproc 64 65538K 69634K 78643K 272 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 135 0 0 in_multi 33 2K 2K 78643K 138 0 0 ether_multi 1 0K 0K 78643K 8 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 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 353 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 78 20K 24K 78643K 7924 0 0 UVM aobj 100 3K 4K 78643K 118 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 54 0 0 NDP 13 0K 0K 78643K 67 0 0 temp 177 2711K 2839K 78643K 12934 0 0 kqueue 0 0K 0K 78643K 9 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 18 0 12 1 0 1 1 0 8 0 inpcbpl 280 1509 0 1502 1 0 1 1 0 8 0 plimitpl 152 64 0 57 1 0 1 1 0 8 0 rtentry 112 109 0 67 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 198 0 194 1 0 1 1 0 8 0 nd6 48 22 0 18 1 0 1 1 0 8 0 ppxss 1128 24 0 24 12 11 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 451 0 264 12 0 12 12 0 8 0 art_table 32 452 0 264 2 0 2 2 0 8 0 art_node 16 108 0 70 1 0 1 1 0 8 0 sysvmsgpl 40 5 0 2 1 0 1 1 0 8 0 semapl 112 203 0 193 1 0 1 1 0 8 0 shmpl 112 116 0 18 4 1 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 5737 0 4287 47 0 47 47 0 8 0 ffsino 240 5737 0 4287 86 0 86 86 0 8 0 nchpl 144 9573 0 7917 62 0 62 62 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 25749 0 25748 2 1 1 1 0 8 0 scsiplug 64 3 0 3 3 3 0 1 0 8 0 scxspl 192 51176 0 51176 16 15 1 6 0 8 1 sigapl 432 2927 0 2914 2 0 2 2 0 8 0 futexpl 56 34414 0 34413 1 0 1 1 0 8 0 knotepl 112 582 0 563 1 0 1 1 0 8 0 kqueuepl 104 659 0 657 1 0 1 1 0 8 0 pipepl 112 1064 0 1045 3 2 1 2 0 8 0 fdescpl 424 2928 0 2914 2 0 2 2 0 8 0 filepl 120 12795 0 12700 10 6 4 4 0 8 1 lockfpl 104 1366 0 1366 17 16 1 1 0 8 1 lockfspl 48 398 0 398 17 16 1 1 0 8 1 sessionpl 112 23 0 13 1 0 1 1 0 8 0 pgrppl 48 37 0 27 1 0 1 1 0 8 0 ucredpl 96 1304 0 1297 1 0 1 1 0 8 0 zombiepl 144 2914 0 2914 2 1 1 1 0 8 1 processpl 840 2943 0 2914 4 0 4 4 0 8 0 procpl 600 7004 0 6967 6 2 4 4 0 8 1 sosppl 128 4 0 4 2 2 0 1 0 8 0 sockpl 384 2018 0 2001 18 15 3 3 0 8 1 mcl64k 65536 45 0 45 16 15 1 1 0 8 1 mcl16k 16384 3 0 3 3 3 0 1 0 8 0 mcl12k 12288 44 0 44 20 20 0 1 0 8 0 mcl9k 9216 15 0 15 13 12 1 1 0 8 1 mcl8k 8192 26 0 26 12 12 0 1 0 8 0 mcl4k 4096 83 0 83 21 20 1 1 0 8 1 mcl2k2 2112 6 0 6 6 5 1 1 0 8 1 mcl2k 2048 60190 0 60149 19 12 7 11 0 8 1 mtagpl 80 8 0 6 2 1 1 1 0 8 0 mbufpl 256 111732 0 111658 14 6 8 10 0 8 0 bufpl 256 38357 0 35250 198 0 198 198 0 8 0 anonpl 16 253357 0 242206 148 86 62 62 0 62 15 amapchunkpl 152 13070 0 12970 14 7 7 7 0 158 2 amappl16 192 14591 0 13973 127 88 39 44 0 8 8 amappl15 184 8 0 8 1 1 0 1 0 8 0 amappl14 176 327 0 326 2 1 1 1 0 8 0 amappl13 168 91 0 91 2 2 0 1 0 8 0 amappl12 160 21 0 19 1 0 1 1 0 8 0 amappl11 152 2032 0 2014 1 0 1 1 0 8 0 amappl10 144 409 0 407 2 1 1 1 0 8 0 amappl9 136 642 0 639 1 0 1 1 0 8 0 amappl8 128 175 0 162 1 0 1 1 0 8 0 amappl7 120 391 0 385 1 0 1 1 0 8 0 amappl6 112 2014 0 2006 1 0 1 1 0 8 0 amappl5 104 190 0 178 1 0 1 1 0 8 0 amappl4 96 2937 0 2911 2 1 1 2 0 8 0 amappl3 88 661 0 656 1 0 1 1 0 8 0 amappl2 80 24387 0 24332 2 0 2 2 0 8 0 amappl1 72 63337 0 62928 24 15 9 19 0 8 0 amappl 72 7338 0 7304 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 117 0 18 2 0 2 2 0 8 0 uaddrrnd 24 2928 0 2914 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2928 0 2914 1 0 1 1 0 8 0 vmmpekpl 168 22778 0 22760 2 1 1 2 0 8 0 vmmpepl 168 302426 0 300887 182 104 78 91 0 357 9 vmsppl 264 2927 0 2914 3 2 1 2 0 8 0 pdppl 4096 5862 0 5828 6 1 5 6 0 8 0 pvpl 32 706648 0 692499 336 184 152 153 0 265 37 pmappl 200 2927 0 2914 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 396 0 72 10 0 10 10 0 8 0