panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *261479 88457 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(ffff8000149ea358,ffff8000149ea358,a5dd604d2e64c724) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda7d0,ffff8000149ea400,ffff8000149ea3c0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda7d0,ffff8000ffff5528) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff6358,fffffd803efda7d0,a5) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff4e20,ffff8000149ea9c8,ffff8000149eaa93) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff4e20,ffff8000149eab08,ffff8000149eab70) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149eabe0) at syscall+0x511 Xsyscall(6,0,8,0,2,9fec25a9010) 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(ffff8000149ea358,ffff8000149ea358,a5dd604d2e64c724) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda7d0,ffff8000149ea400,ffff8000149ea3c0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda7d0,ffff8000ffff5528) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff6358,fffffd803efda7d0,a5) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff4e20,ffff8000149ea9c8,ffff8000149eaa93) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff4e20,ffff8000149eab08,ffff8000149eab70) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149eabe0) at syscall+0x511 Xsyscall(6,0,8,0,2,9fec25a9010) at Xsyscall+0x128 end of kernel end trace frame: 0x3ae, count: -10 ddb> show registers rdi 0xffffffff81a73677 db_enter+0x17 rsi 0x1e16 __ALIGN_SIZE+0xe16 rbp 0xffff8000149ea170 rbx 0xffff8000149ea220 rdx 0x1e17 __ALIGN_SIZE+0xe17 rcx 0xffff800000b94000 rax 0xffff800000b94000 r8 0xffff8000149ea130 r9 0x1 r10 0xffff800001794940 r11 0xccca0c48384a0129 r12 0x3000000008 r13 0xffff8000149ea180 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149ea160 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=261479 stat=onproc flags process=0 proc=4000000 pri=17, usrpri=68, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff5528,0xffffffff822b78f0 process=0xffff8000ffff6358 user=0xffff8000149e5000, vmspace=0xfffffd803f014a50 estcpu=18, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 88457 391827 18094 0 2 0 syz-executor.0 *88457 261479 18094 0 7 0x4000000 syz-executor.0 18094 397889 60341 0 3 0x82 nanosleep syz-executor.0 1430 395179 0 0 3 0x14200 bored sosplice 45871 523255 60341 0 3 0x82 piperd syz-executor.1 60341 108535 65966 0 3 0x82 thrsleep syz-fuzzer 60341 443106 65966 0 2 0x4000482 syz-fuzzer 60341 102928 65966 0 3 0x4000082 thrsleep syz-fuzzer 60341 374123 65966 0 3 0x4000082 thrsleep syz-fuzzer 60341 168942 65966 0 3 0x4000082 thrsleep syz-fuzzer 60341 347393 65966 0 3 0x4000082 thrsleep syz-fuzzer 60341 354427 65966 0 3 0x4000082 thrsleep syz-fuzzer 60341 38900 65966 0 3 0x4000002 biowait syz-fuzzer 65966 126440 2205 0 3 0x10008a pause ksh 2205 38844 51406 0 3 0x92 select sshd 53288 100119 1 0 3 0x100083 ttyin getty 51406 242846 1 0 3 0x80 select sshd 41509 98840 33531 73 2 0x100090 syslogd 33531 474040 1 0 3 0x100082 netio syslogd 33616 368943 1 77 3 0x100090 poll dhclient 59068 433180 1 0 3 0x80 poll dhclient 59062 432996 0 0 2 0x14200 zerothread 25177 385627 0 0 3 0x14200 aiodoned aiodoned 70516 118080 0 0 3 0x14200 syncer update 3214 482617 0 0 3 0x14200 cleaner cleaner 89085 332890 0 0 3 0x14200 reaper reaper 79271 413604 0 0 3 0x14200 pgdaemon pagedaemon 61736 474255 0 0 3 0x14200 bored crynlk 37921 384 0 0 3 0x14200 bored crypto 94634 319182 0 0 3 0x40014200 acpi0 acpi0 39944 165347 0 0 3 0x14200 bored softnet 91787 172061 0 0 3 0x14200 bored systqmp 71261 275913 0 0 3 0x14200 bored systq 36635 159396 0 0 3 0x40014200 bored softclock 62654 408471 0 0 3 0x40014200 idle0 3933 246798 0 0 3 0x14200 bored smr 1 418075 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 9498 6346K 6715K 78643K 12199 0 0 pcb 23 9K 10K 78643K 317 0 0 rtable 108 3K 4K 78643K 404 0 0 ifaddr 55 12K 13K 78643K 113 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 40 0 0 iov 0 0K 16K 78643K 85 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1196 75K 76K 78643K 1810 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 12 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 1K 1K 78643K 102 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 5 13K 25K 78643K 687 0 0 sigio 0 0K 0K 78643K 4 0 0 proc 43 38K 62K 78643K 497 0 0 subproc 64 65538K 69634K 78643K 172 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 87 0 0 in_multi 33 2K 2K 78643K 93 0 0 ether_multi 1 0K 0K 78643K 8 0 0 mrt 0 0K 0K 78643K 4 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 78 344K 344K 78643K 78 0 0 exec 0 0K 1K 78643K 258 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 80 20K 38K 78643K 2487 0 0 UVM aobj 38 2K 2K 78643K 44 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 32 0 0 NDP 11 0K 0K 78643K 34 0 0 temp 153 2704K 2832K 78643K 7666 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 12 0 6 1 0 1 1 0 8 0 inpcbpl 280 334 0 327 1 0 1 1 0 8 0 plimitpl 152 50 0 43 1 0 1 1 0 8 0 rtentry 112 78 0 34 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 18 0 18 1 1 0 1 0 8 0 tcpcb 544 128 0 124 1 0 1 1 0 8 0 nd6 48 15 0 9 1 0 1 1 0 8 0 ppxss 1128 9 0 9 5 5 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 324 0 132 12 0 12 12 0 8 0 art_table 32 325 0 132 2 0 2 2 0 8 0 art_node 16 77 0 37 1 0 1 1 0 8 0 sysvmsgpl 40 3 0 0 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 98 0 88 1 0 1 1 0 8 0 shmpl 112 42 0 6 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2428 0 1004 47 0 47 47 0 8 0 ffsino 240 2428 0 1004 85 0 85 85 0 8 0 nchpl 144 3556 0 1919 61 0 61 61 0 8 0 uvmvnodes 72 2903 0 0 53 0 53 53 0 8 0 vnodes 200 2903 0 0 153 0 153 153 0 8 0 namei 1024 10259 0 10258 2 1 1 1 0 8 0 scsiplug 64 2 0 2 1 1 0 1 0 8 0 scxspl 192 21447 0 21444 10 9 1 6 0 8 0 sigapl 432 848 0 835 2 0 2 2 0 8 0 futexpl 56 11132 0 11132 1 0 1 1 0 8 1 knotepl 112 235 0 216 1 0 1 1 0 8 0 kqueuepl 104 177 0 175 1 0 1 1 0 8 0 pipepl 112 478 0 459 2 1 1 1 0 8 0 fdescpl 424 849 0 835 2 0 2 2 0 8 0 filepl 120 4769 0 4675 4 0 4 4 0 8 1 lockfpl 104 167 0 167 3 2 1 1 0 8 1 lockfspl 48 59 0 59 3 2 1 1 0 8 1 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 30 0 20 1 0 1 1 0 8 0 ucredpl 96 748 0 741 1 0 1 1 0 8 0 zombiepl 144 835 0 835 2 1 1 1 0 8 1 processpl 840 864 0 835 4 0 4 4 0 8 0 procpl 600 1693 0 1656 4 0 4 4 0 8 1 sosppl 128 5 0 5 1 1 0 1 0 8 0 sockpl 384 590 0 573 3 0 3 3 0 8 1 mcl64k 65536 25 0 25 3 2 1 1 0 8 1 mcl16k 16384 4 0 4 3 3 0 1 0 8 0 mcl12k 12288 8 0 8 3 3 0 1 0 8 0 mcl9k 9216 8 0 8 2 2 0 1 0 8 0 mcl8k 8192 11 0 11 2 1 1 1 0 8 1 mcl4k 4096 42 0 42 2 1 1 1 0 8 1 mcl2k2 2112 4 0 4 3 3 0 1 0 8 0 mcl2k 2048 58492 0 58451 15 9 6 11 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 98561 0 98505 11 5 6 9 0 8 0 bufpl 256 24164 0 21048 198 0 198 198 0 8 0 anonpl 16 97686 0 86541 70 14 56 61 0 62 6 amapchunkpl 152 4238 0 4129 18 13 5 15 0 158 0 amappl16 192 4245 0 3641 43 8 35 42 0 8 4 amappl15 184 8 0 7 1 0 1 1 0 8 0 amappl14 176 173 0 171 2 1 1 1 0 8 0 amappl13 168 14 0 14 1 1 0 1 0 8 0 amappl12 160 325 0 322 1 0 1 1 0 8 0 amappl11 152 57 0 42 1 0 1 1 0 8 0 amappl10 144 211 0 207 2 1 1 1 0 8 0 amappl9 136 611 0 608 1 0 1 1 0 8 0 amappl8 128 211 0 193 1 0 1 1 0 8 0 amappl7 120 175 0 169 1 0 1 1 0 8 0 amappl6 112 60 0 51 1 0 1 1 0 8 0 amappl5 104 509 0 498 1 0 1 1 0 8 0 amappl4 96 1049 0 1022 2 1 1 2 0 8 0 amappl3 88 258 0 252 1 0 1 1 0 8 0 amappl2 80 6208 0 6153 2 0 2 2 0 8 0 amappl1 72 24879 0 24461 24 14 10 19 0 8 0 amappl 72 1997 0 1961 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 43 0 6 1 0 1 1 0 8 0 uaddrrnd 24 849 0 835 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 849 0 835 1 0 1 1 0 8 0 vmmpekpl 168 9520 0 9503 1 0 1 1 0 8 0 vmmpepl 168 96867 0 95325 121 45 76 89 0 357 6 vmsppl 264 848 0 835 2 1 1 2 0 8 0 pdppl 4096 1704 0 1670 6 1 5 6 0 8 0 pvpl 32 331436 0 317274 216 36 180 207 0 265 62 pmappl 200 848 0 835 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 346 0 25 10 0 10 10 0 8 0