panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *226846 68852 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(ffff8000149ee1b8,ffff8000149ee1b8,cc3c30a3a0b85567) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda4b0,ffff8000149ee260,ffff8000149ee220) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd8030612160,ffff8000ffff4bc8) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff6010,fffffd8030612160,50f) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff5c30,ffff8000149ee828,ffff8000149ee8f3) at unveil_add+0x46d unveil_add_traversed_vnodes sys/kern/kern_unveil.c:496 [inline] unveil_add(ffff8000ffff5c30,ffff8000149ee828,ffff8000149ee8f3) at unveil_add+0x46d sys/kern/kern_unveil.c:632 sys_unveil(ffff8000ffff5c30,ffff8000149ee968,ffff8000149ee9d0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149eea40) at syscall+0x511 Xsyscall(6,0,8,0,2,de3f5d83010) 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(ffff8000149ee1b8,ffff8000149ee1b8,cc3c30a3a0b85567) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda4b0,ffff8000149ee260,ffff8000149ee220) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd8030612160,ffff8000ffff4bc8) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff6010,fffffd8030612160,50f) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff5c30,ffff8000149ee828,ffff8000149ee8f3) at unveil_add+0x46d unveil_add_traversed_vnodes sys/kern/kern_unveil.c:496 [inline] unveil_add(ffff8000ffff5c30,ffff8000149ee828,ffff8000149ee8f3) at unveil_add+0x46d sys/kern/kern_unveil.c:632 sys_unveil(ffff8000ffff5c30,ffff8000149ee968,ffff8000149ee9d0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149eea40) at syscall+0x511 Xsyscall(6,0,8,0,2,de3f5d83010) at Xsyscall+0x128 end of kernel end trace frame: 0x3ae, count: -10 ddb> show registers rdi 0xffffffff81a73677 db_enter+0x17 rsi 0x3ccc __ALIGN_SIZE+0x2ccc rbp 0xffff8000149edfd0 rbx 0xffff8000149ee080 rdx 0x3ccd __ALIGN_SIZE+0x2ccd rcx 0xffff800000b94000 rax 0xffff800000b94000 r8 0xffff8000149edf90 r9 0x1 r10 0xffff80000097ffc0 r11 0xa0d5fe1c727b5b99 r12 0x3000000008 r13 0xffff8000149edfe0 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149edfc0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=226846 stat=onproc flags process=0 proc=4000000 pri=17, usrpri=60, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff4bc8,0xffffffff822b78f0 process=0xffff8000ffff6010 user=0xffff8000149e9000, vmspace=0xfffffd803f014318 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 68852 281729 97210 0 2 0 syz-executor.0 *68852 226846 97210 0 7 0x4000000 syz-executor.0 21455 304588 0 0 3 0x14200 bored sosplice 97210 251584 96499 0 3 0x82 nanosleep syz-executor.0 41492 207968 96499 0 2 0x2 syz-executor.1 96499 326395 73013 0 3 0x82 kqread syz-fuzzer 96499 510238 73013 0 3 0x4000082 thrsleep syz-fuzzer 96499 415266 73013 0 3 0x4000082 thrsleep syz-fuzzer 96499 491255 73013 0 3 0x4000082 thrsleep syz-fuzzer 96499 425563 73013 0 3 0x4000082 thrsleep syz-fuzzer 96499 484348 73013 0 3 0x4000082 thrsleep syz-fuzzer 96499 315744 73013 0 3 0x4000082 thrsleep syz-fuzzer 73013 507050 41543 0 3 0x10008a pause ksh 41543 315053 54761 0 3 0x92 select sshd 81802 367129 1 0 3 0x100083 ttyin getty 54761 86406 1 0 3 0x80 select sshd 71401 392628 87854 73 2 0x100090 syslogd 87854 344352 1 0 3 0x100082 netio syslogd 39743 100756 1 77 3 0x100090 poll dhclient 39630 235852 1 0 3 0x80 poll dhclient 1375 443322 0 0 2 0x14200 zerothread 27374 125451 0 0 3 0x14200 aiodoned aiodoned 76177 233956 0 0 3 0x14200 syncer update 66221 265404 0 0 3 0x14200 cleaner cleaner 52724 326652 0 0 3 0x14200 reaper reaper 67824 432116 0 0 3 0x14200 pgdaemon pagedaemon 43559 54547 0 0 3 0x14200 bored crynlk 12448 453544 0 0 3 0x14200 bored crypto 67198 214430 0 0 3 0x40014200 acpi0 acpi0 1480 258646 0 0 3 0x14200 bored softnet 68660 146358 0 0 3 0x14200 bored systqmp 53601 295558 0 0 3 0x14200 bored systq 57590 155857 0 0 3 0x40014200 bored softclock 99913 253065 0 0 3 0x40014200 idle0 96345 128695 0 0 3 0x14200 bored smr 1 255621 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 9477 6332K 6913K 78643K 11344 0 0 pcb 23 9K 10K 78643K 185 0 0 rtable 105 3K 3K 78643K 214 0 0 ifaddr 47 11K 11K 78643K 51 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 31 0 0 iov 0 0K 12K 78643K 42 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1200 75K 76K 78643K 1471 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 7 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 44 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 5 13K 25K 78643K 368 0 0 sigio 0 0K 0K 78643K 4 0 0 proc 43 46K 62K 78643K 303 0 0 subproc 64 65538K 69634K 78643K 68 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 34 0 0 in_multi 33 2K 2K 78643K 45 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 60 265K 265K 78643K 60 0 0 exec 0 0K 1K 78643K 211 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 82 20K 21K 78643K 1611 0 0 UVM aobj 14 2K 2K 78643K 16 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 10 0 0 NDP 9 0K 0K 78643K 14 0 0 temp 131 2706K 2834K 78643K 6227 0 0 kqueue 0 0K 0K 78643K 4 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 0 1 0 1 1 0 8 0 inpcbpl 280 151 0 144 1 0 1 1 0 8 0 plimitpl 152 32 0 25 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 8 0 8 1 1 0 1 0 8 0 tcpcb 544 51 0 47 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 189 0 0 12 0 12 12 0 8 0 art_table 32 190 0 0 2 0 2 2 0 8 0 art_node 16 44 0 4 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 2 1 0 1 1 0 8 0 semapl 112 42 0 32 1 0 1 1 0 8 0 shmpl 112 14 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1961 0 556 46 0 46 46 0 8 0 ffsino 240 1961 0 556 84 0 84 84 0 8 0 nchpl 144 2664 0 1033 61 0 61 61 0 8 0 uvmvnodes 72 2196 0 0 40 0 40 40 0 8 0 vnodes 200 2196 0 0 116 0 116 116 0 8 0 namei 1024 7418 0 7417 2 1 1 1 0 8 0 scxspl 192 16699 0 16699 12 10 2 7 0 8 2 sigapl 432 538 0 525 2 0 2 2 0 8 0 futexpl 56 5607 0 5607 1 0 1 1 0 8 1 knotepl 112 88 0 69 1 0 1 1 0 8 0 kqueuepl 104 71 0 69 1 0 1 1 0 8 0 pipepl 112 356 0 335 3 2 1 2 0 8 0 fdescpl 424 539 0 525 2 0 2 2 0 8 0 filepl 120 3001 0 2905 4 0 4 4 0 8 1 lockfpl 104 134 0 134 2 1 1 1 0 8 1 lockfspl 48 54 0 54 2 1 1 1 0 8 1 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 17 0 7 1 0 1 1 0 8 0 ucredpl 96 503 0 496 1 0 1 1 0 8 0 zombiepl 144 525 0 525 2 1 1 1 0 8 1 processpl 840 554 0 525 4 0 4 4 0 8 0 procpl 600 978 0 942 4 0 4 4 0 8 1 sosppl 128 3 0 3 1 1 0 1 0 8 0 sockpl 384 305 0 288 3 0 3 3 0 8 1 mcl64k 65536 5 0 5 3 2 1 1 0 8 1 mcl16k 16384 5 0 5 2 1 1 1 0 8 1 mcl12k 12288 3 0 3 2 2 0 1 0 8 0 mcl9k 9216 3 0 3 2 1 1 1 0 8 1 mcl8k 8192 7 0 7 2 1 1 1 0 8 1 mcl4k 4096 21 0 21 3 2 1 1 0 8 1 mcl2k2 2112 7 0 7 2 1 1 1 0 8 1 mcl2k 2048 58495 0 58446 15 8 7 12 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 96919 0 96832 11 4 7 10 0 8 0 bufpl 256 20558 0 17451 199 0 199 199 0 8 0 anonpl 16 56742 0 45814 62 1 61 61 0 62 16 amapchunkpl 152 2240 0 2113 8 2 6 7 0 158 0 amappl16 192 2418 0 1837 41 3 38 41 0 8 8 amappl14 176 200 0 197 2 1 1 1 0 8 0 amappl13 168 173 0 171 2 1 1 1 0 8 0 amappl12 160 11 0 11 1 1 0 1 0 8 0 amappl11 152 39 0 25 1 0 1 1 0 8 0 amappl10 144 63 0 62 2 1 1 1 0 8 0 amappl9 136 563 0 559 1 0 1 1 0 8 0 amappl8 128 129 0 113 1 0 1 1 0 8 0 amappl7 120 29 0 26 1 0 1 1 0 8 0 amappl6 112 54 0 46 1 0 1 1 0 8 0 amappl5 104 128 0 118 1 0 1 1 0 8 0 amappl4 96 882 0 853 2 1 1 2 0 8 0 amappl3 88 282 0 276 1 0 1 1 0 8 0 amappl2 80 3548 0 3494 2 0 2 2 0 8 0 amappl1 72 18482 0 18066 24 15 9 19 0 8 0 amappl 72 1212 0 1172 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 15 0 2 1 0 1 1 0 8 0 uaddrrnd 24 539 0 525 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 539 0 525 1 0 1 1 0 8 0 vmmpekpl 168 7713 0 7694 2 0 2 2 0 8 0 vmmpepl 168 63250 0 61731 101 23 78 80 0 357 10 vmsppl 264 538 0 525 2 1 1 2 0 8 0 pdppl 4096 1084 0 1050 6 1 5 6 0 8 0 pvpl 32 201701 0 187823 162 8 154 154 0 265 42 pmappl 200 538 0 525 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 346 0 22 10 0 10 10 0 8 0