panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *291139 1809 60929 0x10 0x4000000 0 syz-executor.1 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(ffff800014a1c6b8,ffff800014a1c6b8,9f79741291b4c8fd) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda7d0,ffff800014a1c760,ffff800014a1c720) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda7d0,ffff8000ffff2e28) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff800014952360,fffffd803efda7d0,bc) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff39e0,ffff800014a1cd28,ffff800014a1cdf3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff39e0,ffff800014a1ce68,ffff800014a1ced0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800014a1cf40) at syscall+0x511 Xsyscall(6,0,8,0,2,c3588b9010) 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(ffff800014a1c6b8,ffff800014a1c6b8,9f79741291b4c8fd) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda7d0,ffff800014a1c760,ffff800014a1c720) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda7d0,ffff8000ffff2e28) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff800014952360,fffffd803efda7d0,bc) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff39e0,ffff800014a1cd28,ffff800014a1cdf3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff39e0,ffff800014a1ce68,ffff800014a1ced0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800014a1cf40) at syscall+0x511 Xsyscall(6,0,8,0,2,c3588b9010) at Xsyscall+0x128 end of kernel end trace frame: 0x3ae, count: -10 ddb> show registers rdi 0xffffffff81a73677 db_enter+0x17 rsi 0x2097 __ALIGN_SIZE+0x1097 rbp 0xffff800014a1c4d0 rbx 0xffff800014a1c580 rdx 0x2098 __ALIGN_SIZE+0x1098 rcx 0xffff800002b95000 rax 0xffff800002b95000 r8 0xffff800014a1c490 r9 0x1 r10 0xffff800001793140 r11 0xbac0ad60e136149 r12 0x3000000008 r13 0xffff800014a1c4e0 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a1c4c0 ss 0 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=291139 stat=onproc flags process=10 proc=4000000 pri=17, usrpri=58, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff2e28,0xffffffff822b78f0 process=0xffff800014952360 user=0xffff800014a17000, vmspace=0xfffffd803f014528 estcpu=16, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 1809 494069 1545 60929 2 0x10 syz-executor.1 * 1809 291139 1545 60929 7 0x4000010 syz-executor.1 33811 317402 74750 0 2 0 syz-executor.0 33811 20546 74750 0 3 0x4000080 netio syz-executor.0 74750 22837 40718 0 2 0x482 syz-executor.0 1545 125474 40718 0 3 0x82 nanosleep syz-executor.1 82460 126947 1 0 3 0x100083 ttyin getty 75872 520230 0 0 3 0x14200 bored sosplice 40718 203516 74379 0 3 0x82 thrsleep syz-fuzzer 40718 22482 74379 0 3 0x4000082 thrsleep syz-fuzzer 40718 139044 74379 0 3 0x4000082 kqread syz-fuzzer 40718 276474 74379 0 3 0x4000082 thrsleep syz-fuzzer 40718 216831 74379 0 3 0x4000082 thrsleep syz-fuzzer 40718 316893 74379 0 3 0x4000082 thrsleep syz-fuzzer 40718 312824 74379 0 3 0x4000082 thrsleep syz-fuzzer 40718 380376 74379 0 3 0x4000082 thrsleep syz-fuzzer 74379 93902 59229 0 3 0x10008a pause ksh 59229 70499 18585 0 3 0x92 select sshd 18585 407295 1 0 3 0x80 select sshd 78440 405041 64286 73 2 0x100090 syslogd 64286 451495 1 0 3 0x100082 netio syslogd 59159 265197 1 77 3 0x100090 poll dhclient 79971 433312 1 0 3 0x80 poll dhclient 91791 350067 0 0 2 0x14200 zerothread 77128 141906 0 0 3 0x14200 aiodoned aiodoned 91340 184107 0 0 3 0x14200 syncer update 47373 369673 0 0 3 0x14200 cleaner cleaner 76568 400528 0 0 3 0x14200 reaper reaper 46199 482306 0 0 3 0x14200 pgdaemon pagedaemon 99049 425344 0 0 3 0x14200 bored crynlk 12674 230594 0 0 3 0x14200 bored crypto 75956 413267 0 0 3 0x40014200 acpi0 acpi0 1532 46269 0 0 3 0x14200 bored softnet 77498 448024 0 0 3 0x14200 bored systqmp 18679 400718 0 0 3 0x14200 bored systq 86956 51974 0 0 3 0x40014200 bored softclock 5521 387677 0 0 3 0x40014200 idle0 52092 287595 0 0 3 0x14200 bored smr 1 515718 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 9521 6350K 14535K 78643K 13682 0 0 pcb 25 9K 11K 78643K 669 0 0 rtable 108 3K 4K 78643K 859 0 0 ifaddr 65 14K 15K 78643K 208 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 65 0 0 iov 0 0K 16K 78643K 178 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1195 75K 75K 78643K 2408 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 19 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 195 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 25K 78643K 1340 0 0 sigio 0 0K 0K 78643K 21 0 0 proc 42 38K 62K 78643K 890 0 0 subproc 64 65538K 69634K 78643K 480 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 70 0 0 in_multi 33 2K 2K 78643K 192 0 0 ether_multi 1 0K 0K 78643K 5 0 0 mrt 0 0K 0K 78643K 5 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 72 318K 318K 78643K 72 0 0 exec 0 0K 1K 78643K 418 0 0 pfkey data 0 0K 0K 78643K 2 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 81 20K 22K 78643K 4212 0 0 UVM aobj 46 4K 5K 78643K 62 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 59 0 0 NDP 14 0K 0K 78643K 71 0 0 temp 184 2711K 2839K 78643K 10882 0 0 kqueue 0 0K 0K 78643K 10 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 30 0 24 1 0 1 1 0 8 0 inpcbpl 280 505 0 498 1 0 1 1 0 8 0 plimitpl 152 83 0 76 1 0 1 1 0 8 0 rtentry 112 177 0 133 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 167 0 163 1 0 1 1 0 8 0 nd6 48 42 0 36 1 0 1 1 0 8 0 ppxss 1128 15 0 15 8 7 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 732 0 541 13 1 12 13 0 8 0 art_table 32 733 0 541 2 0 2 2 0 8 0 art_node 16 176 0 136 1 0 1 1 0 8 0 sysvmsgpl 40 9 0 4 1 0 1 1 0 8 0 semapl 112 193 0 183 1 0 1 1 0 8 0 shmpl 112 60 0 16 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3296 0 1841 49 1 48 48 0 8 0 ffsino 240 3296 0 1841 86 0 86 86 0 8 0 nchpl 144 5176 0 3499 64 1 63 63 0 8 0 uvmvnodes 72 4224 0 0 77 0 77 77 0 8 0 vnodes 200 4224 0 0 223 0 223 223 0 8 0 namei 1024 16230 0 16229 2 1 1 1 0 8 0 scsiplug 64 3 0 3 3 3 0 1 0 8 0 scxspl 192 29681 0 29681 13 12 1 6 0 8 1 sigapl 432 1475 0 1461 2 0 2 2 0 8 0 futexpl 56 19103 0 19103 1 0 1 1 0 8 1 knotepl 112 491 0 472 1 0 1 1 0 8 0 kqueuepl 104 266 0 264 1 0 1 1 0 8 0 pipepl 112 1016 0 997 5 4 1 2 0 8 0 fdescpl 424 1476 0 1461 2 0 2 2 0 8 0 filepl 120 8174 0 8077 6 2 4 6 0 8 1 lockfpl 104 394 0 394 2 1 1 1 0 8 1 lockfspl 48 139 0 139 2 1 1 1 0 8 1 sessionpl 112 30 0 20 1 0 1 1 0 8 0 pgrppl 48 46 0 36 1 0 1 1 0 8 0 ucredpl 96 1254 0 1246 1 0 1 1 0 8 0 zombiepl 144 1461 0 1461 2 1 1 1 0 8 1 processpl 840 1491 0 1461 4 0 4 4 0 8 0 procpl 600 3062 0 3023 4 0 4 4 0 8 0 sosppl 128 9 0 9 3 3 0 1 0 8 0 sockpl 384 1079 0 1060 5 2 3 4 0 8 1 mcl64k 65536 529 0 529 36 35 1 33 0 8 1 mcl16k 16384 5 0 5 4 4 0 1 0 8 0 mcl12k 12288 22 0 22 6 6 0 1 0 8 0 mcl9k 9216 19 0 19 7 7 0 1 0 8 0 mcl8k 8192 17 0 17 8 7 1 1 0 8 1 mcl4k 4096 73 0 73 5 4 1 1 0 8 1 mcl2k2 2112 8 0 8 6 6 0 1 0 8 0 mcl2k 2048 59409 0 59364 18 11 7 11 0 8 1 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 104655 0 104577 36 27 9 25 0 8 0 bufpl 256 30359 0 27252 198 0 198 198 0 8 0 anonpl 16 145722 0 136521 104 51 53 62 0 62 8 amapchunkpl 152 7610 0 7504 16 10 6 14 0 158 0 amappl16 192 6986 0 6375 76 33 43 43 0 8 11 amappl15 184 502 0 500 2 1 1 1 0 8 0 amappl14 176 393 0 391 2 1 1 1 0 8 0 amappl13 168 75 0 74 1 0 1 1 0 8 0 amappl12 160 73 0 72 1 0 1 1 0 8 0 amappl11 152 76 0 62 1 0 1 1 0 8 0 amappl10 144 151 0 144 1 0 1 1 0 8 0 amappl9 136 922 0 919 1 0 1 1 0 8 0 amappl8 128 436 0 421 1 0 1 1 0 8 0 amappl7 120 128 0 118 1 0 1 1 0 8 0 amappl6 112 54 0 47 1 0 1 1 0 8 0 amappl5 104 289 0 278 1 0 1 1 0 8 0 amappl4 96 1438 0 1405 2 1 1 2 0 8 0 amappl3 88 709 0 703 1 0 1 1 0 8 0 amappl2 80 11385 0 11321 2 0 2 2 0 8 0 amappl1 72 37869 0 37438 23 13 10 19 0 8 0 amappl 72 3483 0 3446 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 61 0 16 1 0 1 1 0 8 0 uaddrrnd 24 1476 0 1461 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1476 0 1461 1 0 1 1 0 8 0 vmmpekpl 168 14286 0 14269 2 0 2 2 0 8 0 vmmpepl 168 161016 0 159380 148 58 90 94 0 357 18 vmsppl 264 1475 0 1461 4 3 1 2 0 8 0 pdppl 4096 2958 0 2922 6 1 5 6 0 8 0 pvpl 32 490275 0 477948 252 111 141 218 0 265 26 pmappl 200 1475 0 1461 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 419 0 93 11 0 11 11 0 8 0