panic: bad dir Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 29455 33977 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82ffa5aa) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_dirbadentry(ffff8000376314e8,ffff8000376314e8,6ec087e136b42fa4) at ufs_dirbadentry VOP_LOOKUP(fffffd807d869be0,ffff8000376316b8,ffff8000376316e8) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff800037631688) at vfs_lookup+0x8e1 sys/kern/vfs_lookup.c:566 namei(ffff800037631688) at namei+0x7aa sys/kern/vfs_lookup.c:250 unp_connect(fffffd806d56e9f0,fffffd806ccf7a00,ffff80002a4d1bf8) at unp_connect+0x278 sys/kern/uipc_usrreq.c:868 sys_connect(ffff80002a4d1bf8,ffff800037631900,ffff800037631850) at sys_connect+0x344 sys/kern/uipc_syscalls.c:422 syscall(ffff800037631900) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa3a59ca6620, 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 *cpu0: bad dir ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82ffa5aa) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_dirbadentry(ffff8000376314e8,ffff8000376314e8,6ec087e136b42fa4) at ufs_dirbadentry VOP_LOOKUP(fffffd807d869be0,ffff8000376316b8,ffff8000376316e8) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff800037631688) at vfs_lookup+0x8e1 sys/kern/vfs_lookup.c:566 namei(ffff800037631688) at namei+0x7aa sys/kern/vfs_lookup.c:250 unp_connect(fffffd806d56e9f0,fffffd806ccf7a00,ffff80002a4d1bf8) at unp_connect+0x278 sys/kern/uipc_usrreq.c:868 sys_connect(ffff80002a4d1bf8,ffff800037631900,ffff800037631850) at sys_connect+0x344 sys/kern/uipc_syscalls.c:422 syscall(ffff800037631900) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa3a59ca6620, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800037631320 rbx 0 rdx 0 rcx 0 rax 0xffff80002a4d1bf8 r8 0x101010101010101 r9 0x8080808080808080 r10 0x5ae9eaf04b3ca1a6 r11 0x9b7c66f6ef0be279 r12 0 r13 0xfffffd807df2db48 r14 0 r15 0x1 rip 0xffffffff81e543d5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800037631310 ss 0 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=29455 pid=33977 tcnt=3 stat=onproc flags process=0 proc=4000000 runpri=17, usrpri=50, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a4d1970,0xffff80002a4d16f8 process=0xffff8000ffff5580 user=0xffff80003762c000, vmspace=0xfffffd806c224590 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 33977 39442 9953 0 3 0x80 nanoslp syz-executor *33977 29455 9953 0 7 0x4000000 syz-executor 33977 489944 9953 0 3 0x4000080 fsleep syz-executor 79636 444805 74531 0 2 0 syz-executor 79636 131444 74531 0 3 0x4000080 fsleep syz-executor 79636 170124 74531 0 2 0x4000000 syz-executor 28061 229823 84949 0 2 0 syz-executor 28061 268651 84949 0 3 0x4000080 fsleep syz-executor 90704 344861 56170 0 2 0 syz-executor 90704 230677 56170 0 3 0x4000080 fsleep syz-executor 30961 392241 0 0 3 0x14200 acct acct 55500 349384 1 0 3 0x100083 ttyin getty 72698 367653 0 0 3 0x14200 bored sosplice 14714 3447 53009 0 3 0x82 wait syz-executor 56170 463773 53009 0 3 0x82 nanoslp syz-executor 74531 475579 53009 0 3 0x82 nanoslp syz-executor 9953 338961 53009 0 3 0x82 nanoslp syz-executor 84949 267011 53009 0 3 0x82 nanoslp syz-executor 45147 420762 53009 0 3 0x82 wait syz-executor 53009 2725 87964 0 3 0x82 wait syz-executor 87964 442574 34224 0 3 0x10008a sigsusp ksh 34224 521780 30400 0 3 0x98 kqread sshd-session 30400 272117 27720 0 3 0x92 kqread sshd-session 27720 383460 1 0 3 0x88 kqread sshd 61923 95500 79854 73 3 0x1100090 kqread syslogd 79854 219256 1 0 3 0x100082 sbwait syslogd 39196 338429 1 0 3 0x100080 kqread resolvd 14409 227360 478 77 3 0x100092 kqread dhcpleased 1186 310525 478 77 3 0x100092 kqread dhcpleased 478 269041 1 0 3 0x80 kqread dhcpleased 1644 42925 0 0 3 0x14200 bored smr 50280 300259 0 0 2 0x14200 zerothread 19353 201857 0 0 3 0x14200 aiodoned aiodoned 96518 360357 0 0 3 0x14200 syncer update 10191 494737 0 0 3 0x14200 cleaner cleaner 27158 36171 0 0 3 0x14200 reaper reaper 22704 310190 0 0 3 0x14200 pgdaemon pagedaemon 23064 337931 0 0 3 0x14200 bored viomb 91304 466957 0 0 3 0x40014200 acpi0 acpi0 76184 37784 0 0 3 0x14200 bored softnet3 73503 314002 0 0 3 0x14200 bored softnet2 34570 184862 0 0 3 0x14200 bored softnet1 1676 209982 0 0 3 0x14200 bored softnet0 81797 310166 0 0 3 0x14200 bored systqmp 63227 271118 0 0 3 0x14200 bored systq 58646 317163 0 0 3 0x40014200 tmoslp softclock 1454 175414 0 0 3 0x40014200 idle0 1 513487 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 devbuf 10181 11106K 11368K 166960K 11461 0 pcb 17 12K 12K 166960K 59 0 rtable 192 7K 8K 166960K 401 0 pf 26 12K 14K 166960K 35 0 ifaddr 34 6K 7K 166960K 48 0 ifgroup 42 1K 2K 166960K 54 0 sysctl 2 0K 0K 166960K 2 0 counters 28 17K 17K 166960K 32 0 ioctlops 0 0K 2K 166960K 44 0 iov 0 0K 18K 166960K 19 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1426 90K 90K 166960K 1564 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 4 0 VM map 2 1K 1K 166960K 2 0 sem 7 0K 0K 166960K 7 0 dirhash 12 2K 2K 166960K 21 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 15 53K 93K 166960K 338 0 sigio 0 0K 0K 166960K 9 0 proc 60 59K 108K 166960K 504 0 subproc 91 5K 6K 166960K 104 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 96 0 in_multi 77 5K 7K 166960K 114 0 ether_multi 1 0K 0K 166960K 3 0 mrt 0 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 91 413K 413K 166960K 91 0 exec 0 0K 1K 166960K 379 0 fusefs mount 1 32K 32K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 213 64K 89K 166960K 4582 0 UVM aobj 6 2K 4K 166960K 8 0 pinsyscall 36 72K 95K 166960K 1355 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 11 0 NDP 10 0K 2K 166960K 31 0 temp 35 6806K 6872K 166960K 15673 0 kqueue 15 24K 26K 166960K 72 0 SYN cache 2 16K 16K 166960K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 149 0 146 3 0 3 3 0 8 2 rtentry 112 126 0 40 4 0 4 4 0 8 0 unpcb 144 218 0 138 3 0 3 3 0 8 0 syncache 336 3 0 3 1 0 1 1 0 8 1 tcpcb 808 58 0 54 1 0 1 1 0 8 0 arp 88 22 0 7 1 0 1 1 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 1 0 0 1 0 1 1 0 8 0 inpcb 336 433 0 425 7 0 7 7 0 8 6 nd6 104 27 0 10 1 0 1 1 0 8 0 kcovpl 48 8 0 1 1 0 1 1 0 8 0 ppxss 1072 2 0 2 1 0 1 1 0 8 1 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 502 0 143 31 0 31 31 0 8 4 art_table 32 504 0 143 5 0 5 5 0 8 1 art_node 16 125 0 46 1 0 1 1 0 8 0 semapl 112 5 0 0 1 0 1 1 0 8 0 shmpl 112 5 0 2 1 0 1 1 0 8 0 dirhash 1024 23 0 6 3 0 3 3 0 8 0 dino2pl 256 1921 0 426 95 0 95 95 0 8 0 ffsino 240 1921 0 426 89 0 89 89 0 8 0 nchpl 144 2424 0 746 63 0 63 63 0 8 0 uvmvnodes 80 2161 0 0 45 0 45 45 0 8 0 vnodes 216 2161 0 0 121 0 121 121 0 8 0 namei 1024 7613 0 7612 2 0 2 2 0 8 1 kstatmem 264 26 0 8 2 0 2 2 0 8 0 scsiplug 72 5 0 5 1 0 1 1 0 8 1 scxspl 216 7375 0 7375 8 0 8 8 1 8 8 plimitpl 152 125 0 109 1 0 1 1 0 8 0 sigapl 424 620 0 574 6 0 6 6 0 8 0 futexpl 64 3235 0 3231 1 0 1 1 0 8 0 knotepl 120 11058 0 11008 16 5 11 16 0 8 8 kqueuepl 184 78 0 67 1 0 1 1 0 8 0 pipepl 288 178 0 149 7 0 7 7 0 8 4 fdescpl 432 600 0 573 5 0 5 5 0 8 1 filepl 120 3316 0 3025 13 0 13 13 0 8 4 lockfpl 104 101 0 99 1 0 1 1 0 8 0 lockfspl 48 42 0 40 1 0 1 1 0 8 0 sessionpl 144 22 0 14 1 0 1 1 0 8 0 pgrppl 48 31 0 15 1 0 1 1 0 8 0 ucredpl 104 293 0 281 1 0 1 1 0 8 0 zombiepl 144 578 0 574 1 0 1 1 0 8 0 processpl 1096 620 0 574 4 0 4 4 0 8 0 procpl 648 929 0 877 6 0 6 6 0 8 0 sosppl 168 2 0 2 1 0 1 1 0 8 1 sockpl 504 802 0 712 14 1 13 13 0 8 1 mcl64k 65536 3 0 3 1 0 1 1 0 8 1 mcl12k 12288 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 11 0 11 1 0 1 1 0 8 1 mcl4k 4096 2837 0 2786 18 3 15 18 0 8 8 mcl2k 2048 392 0 388 6 0 6 6 0 8 4 mtagpl 96 19 0 8 1 0 1 1 0 8 0 mbufpl 256 6999 0 6874 24 1 23 24 0 8 7 bufpl 280 2635 0 96 182 0 182 182 0 8 0 anonpl 24 119428 0 116317 45 0 45 45 0 187 21 amapchunkpl 152 15243 0 14790 35 0 35 35 0 158 15 amappl16 200 2221 0 2197 22 8 14 14 0 8 12 amappl15 192 9 0 9 1 0 1 1 0 8 1 amappl14 184 106 0 96 1 0 1 1 0 8 0 amappl13 176 7 0 7 1 0 1 1 0 8 1 amappl12 168 1209 0 1182 2 0 2 2 0 8 0 amappl11 160 44 0 34 1 0 1 1 0 8 0 amappl10 152 24 0 24 1 0 1 1 0 8 1 amappl9 144 145 0 144 1 0 1 1 0 8 0 amappl8 136 25 0 24 1 0 1 1 0 8 0 amappl7 128 94 0 84 1 0 1 1 0 8 0 amappl6 120 172 0 171 1 0 1 1 0 8 0 amappl5 112 125 0 117 1 0 1 1 0 8 0 amappl4 104 275 0 260 1 0 1 1 0 8 0 amappl3 96 2841 0 2752 3 0 3 3 0 8 0 amappl2 88 854 0 777 2 0 2 2 0 8 0 amappl1 80 7836 0 7336 12 0 12 12 0 8 1 amappl 88 4205 0 4047 5 0 5 5 0 92 0 dma4096 4096 1 0 1 1 0 1 1 0 8 1 dma1024 1024 2 0 1 1 0 1 1 0 8 0 dma256 256 7 0 7 1 0 1 1 0 8 1 dma128 128 253 0 253 1 0 1 1 0 8 1 dma64 64 6 0 6 1 0 1 1 0 8 1 dma32 32 7 0 7 1 0 1 1 0 8 1 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 7 0 2 1 0 1 1 0 8 0 uaddrrnd 24 600 0 573 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 600 0 573 1 0 1 1 0 8 0 vmmpekpl 168 6305 0 6270 2 0 2 2 0 8 0 vmmpepl 168 42738 0 41096 89 0 89 89 0 357 11 vmsppl 352 599 0 573 4 0 4 4 0 8 1 rwobjpl 24 16602 0 13616 20 0 20 20 0 8 0 pdppl 4096 1207 0 1146 95 28 67 81 0 8 6 pvpl 32 282640 0 274196 111 0 111 111 0 265 34 pmappl 216 599 0 573 3 0 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 400 0 33 11 0 11 11 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82ffa5aa) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_dirbadentry(ffff8000376314e8,ffff8000376314e8,6ec087e136b42fa4) at ufs_dirbadentry VOP_LOOKUP(fffffd807d869be0,ffff8000376316b8,ffff8000376316e8) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff800037631688) at vfs_lookup+0x8e1 sys/kern/vfs_lookup.c:566 namei(ffff800037631688) at namei+0x7aa sys/kern/vfs_lookup.c:250 unp_connect(fffffd806d56e9f0,fffffd806ccf7a00,ffff80002a4d1bf8) at unp_connect+0x278 sys/kern/uipc_usrreq.c:868 sys_connect(ffff80002a4d1bf8,ffff800037631900,ffff800037631850) at sys_connect+0x344 sys/kern/uipc_syscalls.c:422 syscall(ffff800037631900) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa3a59ca6620, count: -10 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82ffa5aa) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_dirbadentry(ffff8000376314e8,ffff8000376314e8,6ec087e136b42fa4) at ufs_dirbadentry VOP_LOOKUP(fffffd807d869be0,ffff8000376316b8,ffff8000376316e8) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff800037631688) at vfs_lookup+0x8e1 sys/kern/vfs_lookup.c:566 namei(ffff800037631688) at namei+0x7aa sys/kern/vfs_lookup.c:250 unp_connect(fffffd806d56e9f0,fffffd806ccf7a00,ffff80002a4d1bf8) at unp_connect+0x278 sys/kern/uipc_usrreq.c:868 sys_connect(ffff80002a4d1bf8,ffff800037631900,ffff800037631850) at sys_connect+0x344 sys/kern/uipc_syscalls.c:422 syscall(ffff800037631900) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa3a59ca6620, count: -10