panic: bad dir Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *276667 53002 0 0 0x4000000 0K syz-executor 121062 40055 0 0x14000 0x200 1 reaper db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff83036195) at panic+0x1e5 sys/kern/subr_prf.c:198 ufs_dirbadentry(ffff800035dac3d8,ffff800035dac3d8,bfdf737bbdbd5301) at ufs_dirbadentry VOP_LOOKUP(fffffd806bd77368,ffff800035dac778,ffff800035dac7a8) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff800035dac748) at vfs_lookup+0x8fa sys/kern/vfs_lookup.c:566 namei(ffff800035dac748) at namei+0x7aa sys/kern/vfs_lookup.c:250 vn_open(ffff800035dac748,41,0) at vn_open+0x13f sys/kern/vfs_vnops.c:140 doopenat(ffff8000ffff4538,ffffff9c,20000400,40,0,ffff800035dac8f0) at doopenat+0x31d sys/kern/vfs_syscalls.c:1123 syscall(ffff800035dac9a0) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:178 [inline] syscall(ffff800035dac9a0) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x19c25dbaed0, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic *cpu0: bad dir ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff83036195) at panic+0x1e5 sys/kern/subr_prf.c:198 ufs_dirbadentry(ffff800035dac3d8,ffff800035dac3d8,bfdf737bbdbd5301) at ufs_dirbadentry VOP_LOOKUP(fffffd806bd77368,ffff800035dac778,ffff800035dac7a8) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff800035dac748) at vfs_lookup+0x8fa sys/kern/vfs_lookup.c:566 namei(ffff800035dac748) at namei+0x7aa sys/kern/vfs_lookup.c:250 vn_open(ffff800035dac748,41,0) at vn_open+0x13f sys/kern/vfs_vnops.c:140 doopenat(ffff8000ffff4538,ffffff9c,20000400,40,0,ffff800035dac8f0) at doopenat+0x31d sys/kern/vfs_syscalls.c:1123 syscall(ffff800035dac9a0) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:178 [inline] syscall(ffff800035dac9a0) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x19c25dbaed0, count: -10 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800035dac200 rbx 0xffffffff83473dbf cpu_info_full_primary+0x2dbf rdx 0xffff80000128fec0 rcx 0xffff8000ffff4538 rax 0xffffffff83472ff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xc6b39e9333fd165d r11 0x81d99f9bbf943dd r12 0xffffffff83473bc0 cpu_info_full_primary+0x2bc0 r13 0 r14 0 r15 0x1 rip 0xffffffff817ca965 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800035dac1f0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=276667 pid=53002 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=17, usrpri=63, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff8000ffff6f50,0xffff800032d8b708 process=0xffff80003519db50 user=0xffff800035da7000, vmspace=0xfffffd806bdb2aa8 estcpu=36, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 95393 520974 71557 0 2 0x100000 sh 71557 472305 12107 0 3 0x10008a sigsusp sh 53002 311583 29939 0 2 0 syz-executor *53002 276667 29939 0 7 0x4000000 syz-executor 29939 506324 70566 0 2 0x482 syz-executor 12107 62704 70566 0 3 0x82 wait syz-executor 76936 379962 70566 0 2 0x482 syz-executor 97768 207783 70566 0 2 0x2 syz-executor 70566 63717 5070 0 3 0x82 wait syz-executor 5070 53889 72718 0 3 0x10008a sigsusp ksh 72718 301787 96575 0 3 0x98 kqread sshd-session 96575 315858 18574 0 3 0x92 kqread sshd-session 75263 41121 1 0 3 0x100083 ttyin getty 18574 165012 1 0 3 0x88 kqread sshd 51468 354094 35052 74 3 0x1100092 bpf pflogd 35052 503422 1 0 3 0x80 sbwait pflogd 16622 243947 45704 73 3 0x1100090 kqread syslogd 45704 308676 1 0 3 0x100082 sbwait syslogd 65201 481670 1 0 3 0x100080 kqread resolvd 74474 7339 71144 77 3 0x100092 kqread dhcpleased 78347 309792 71144 77 3 0x100092 kqread dhcpleased 71144 461807 1 0 3 0x80 kqread dhcpleased 62193 248875 0 0 3 0x14200 bored smr 35866 58497 0 0 2 0x14200 zerothread 41936 371815 0 0 3 0x14200 aiodoned aiodoned 20552 266768 0 0 3 0x14200 syncer update 42978 315449 0 0 3 0x14200 cleaner cleaner 40055 121062 0 0 7 0x14200 reaper 26577 135213 0 0 3 0x14200 pgdaemon pagedaemon 90868 374537 0 0 3 0x14200 bored viomb 51878 113502 0 0 3 0x40014200 acpi0 acpi0 59811 44444 0 0 3 0x40014200 idle1 66578 468167 0 0 3 0x14200 bored softnet3 67339 45890 0 0 3 0x14200 bored softnet2 29371 384871 0 0 3 0x14200 bored softnet1 82887 225902 0 0 3 0x14200 bored softnet0 9807 395292 0 0 3 0x14200 bored systqmp 43271 321593 0 0 3 0x14200 bored systq 4598 400239 0 0 3 0x14200 tmoslp softclockmp 29353 448560 0 0 3 0x40014200 tmoslp softclock 79841 283125 0 0 3 0x40014200 idle0 1 523209 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 53002 (syz-executor) thread 0xffff8000ffff4538 (276667) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff836331e0) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 __mp_acquire_count+0x58 #2 mi_switch+0x4b7 sys/kern/sched_bsd.c:441 #3 sleep_finish+0x2f2 sys/kern/kern_synch.c:425 #4 biowait+0xc1 sys/kern/vfs_bio.c:1246 #5 ffs_bufatoff+0x16f sys/ufs/ffs/ffs_subr.c:71 #6 ufs_lookup+0x548 sys/ufs/ufs/ufs_lookup.c:256 #7 VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 #8 vfs_lookup+0x8fa sys/kern/vfs_lookup.c:566 #9 namei+0x7aa sys/kern/vfs_lookup.c:250 #10 vn_open+0x13f sys/kern/vfs_vnops.c:140 #11 doopenat+0x31d sys/kern/vfs_syscalls.c:1123 #12 syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:178 [inline] #12 syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 #13 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd806bcb05f0) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 rw_enter+0x41b sys/kern/kern_rwlock.c:309 #2 rrw_enter+0xbe sys/kern/kern_rwlock.c:464 #3 VOP_LOCK+0xa6 sys/kern/vfs_vops.c:524 #4 vn_lock+0xa4 sys/kern/vfs_vnops.c:564 #5 vfs_lookup+0x109 sys/kern/vfs_lookup.c:418 #6 namei+0x7aa sys/kern/vfs_lookup.c:250 #7 vn_open+0x13f sys/kern/vfs_vnops.c:140 #8 doopenat+0x31d sys/kern/vfs_syscalls.c:1123 #9 syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:178 [inline] #9 syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 #10 Xsyscall+0x128 Process 97768 (syz-executor) thread 0xffff8000ffffca30 (207783) exclusive rrwlock inode r = 0 (0xfffffd806bcb0920) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 rw_enter+0x41b sys/kern/kern_rwlock.c:309 #2 rrw_enter+0xbe sys/kern/kern_rwlock.c:464 #3 VOP_LOCK+0xa6 sys/kern/vfs_vops.c:524 #4 ufs_ihashins+0x4f sys/ufs/ufs/ufs_ihash.c:169 #5 ffs_vget+0x187 sys/ufs/ffs/ffs_vfsops.c:1230 #6 ffs_inode_alloc+0x283 sys/ufs/ffs/ffs_alloc.c:393 #7 ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 #8 VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 #9 domkdirat+0x179 sys/kern/vfs_syscalls.c:3099 #10 syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:178 [inline] #10 syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 #11 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd806cd6b0a8) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 rw_enter+0x41b sys/kern/kern_rwlock.c:309 #2 rrw_enter+0xbe sys/kern/kern_rwlock.c:464 #3 VOP_LOCK+0xa6 sys/kern/vfs_vops.c:524 #4 vn_lock+0xa4 sys/kern/vfs_vnops.c:564 #5 vfs_lookup+0x109 sys/kern/vfs_lookup.c:418 #6 namei+0x7aa sys/kern/vfs_lookup.c:250 #7 domkdirat+0x8b sys/kern/vfs_syscalls.c:3084 #8 syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:178 [inline] #8 syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 #9 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10189 11180K 11180K 166960K 11270 0 pcb 17 12K 12K 166960K 17 0 rtable 232 6K 6K 166960K 342 0 pf 34 17K 18K 166960K 45 0 ifaddr 43 7K 7K 166960K 45 0 ifgroup 55 2K 2K 166960K 55 0 counters 64 36K 36K 166960K 64 0 ioctlops 0 0K 4K 166960K 1484 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1363 86K 86K 166960K 1393 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 1K 166960K 2 0 VM map 2 1K 1K 166960K 2 0 sem 2 0K 0K 166960K 2 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 13 45K 93K 166960K 136 0 proc 69 91K 128K 166960K 528 0 subproc 104 6K 6K 166960K 104 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 in_multi 99 7K 7K 166960K 99 0 ether_multi 1 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 49 228K 228K 166960K 49 0 exec 0 0K 1K 166960K 358 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 182 71K 76K 166960K 2774 0 UVM aobj 3 2K 2K 166960K 3 0 pinsyscall 38 76K 102K 166960K 1202 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 NDP 28 2K 2K 166960K 28 0 temp 34 6814K 6878K 166960K 3846 0 kqueue 13 20K 20K 166960K 22 0 SYN cache 2 16K 16K 166960K 2 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 24 0 0 1 0 1 1 0 8 0 rtpcb 120 32 0 29 1 0 1 1 0 8 0 rtentry 112 110 0 1 4 0 4 4 0 8 0 unpcb 144 40 0 22 1 0 1 1 0 8 0 syncache 336 3 0 3 1 0 1 1 0 8 1 tcpcb 808 8 0 4 1 0 1 1 0 8 0 arp 120 18 0 0 1 0 1 1 0 8 0 inpcb 336 66 0 59 1 0 1 1 0 8 0 nd6 136 23 0 0 1 0 1 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 pfosfp 40 1428 0 1005 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 17 0 0 1 0 1 1 0 8 0 pfstkey 128 17 0 0 1 0 1 1 0 8 0 pfstate 376 17 0 0 2 0 2 2 0 8 0 pfrule 1344 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 452 0 0 29 0 29 29 0 8 0 art_table 32 453 0 0 4 0 4 4 0 8 0 art_node 16 109 0 10 1 0 1 1 0 8 0 sysvmsgpl 40 1 0 1 1 0 1 1 0 8 1 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1563 0 61 95 0 95 95 0 8 0 ffsino 272 1563 0 61 101 0 101 101 0 8 0 nchpl 144 1747 0 57 63 0 63 63 0 8 0 uvmvnodes 80 1683 0 0 35 0 35 35 0 8 0 vnodes 216 1683 0 0 94 0 94 94 0 8 0 namei 1024 5337 0 5335 1 0 1 1 0 8 0 percpumem 16 46 0 0 1 0 1 1 0 8 0 kstatmem 264 24 0 0 2 0 2 2 0 8 0 scxspl 216 5085 0 5085 3 1 2 2 1 8 2 plimitpl 152 29 0 12 1 0 1 1 0 8 0 sigapl 424 434 0 388 8 1 7 7 0 8 0 futexpl 64 117 0 117 1 0 1 1 0 8 1 knotepl 120 50 0 0 2 0 2 2 0 8 0 kqueuepl 216 18 0 9 1 0 1 1 0 8 0 pipepl 320 105 0 78 3 0 3 3 0 8 0 fdescpl 496 416 0 389 5 0 5 5 0 8 0 filepl 152 1463 0 1226 10 0 10 10 0 8 0 lockfpl 104 14 0 12 1 0 1 1 0 8 0 lockfspl 48 6 0 4 1 0 1 1 0 8 0 sessionpl 144 22 0 13 1 0 1 1 0 8 0 pgrppl 48 30 0 13 1 0 1 1 0 8 0 ucredpl 104 67 0 54 1 0 1 1 0 8 0 zombiepl 144 393 0 388 1 0 1 1 0 8 0 processpl 1160 434 0 388 5 0 5 5 0 8 1 procpl 648 444 0 395 7 1 6 6 0 8 0 sockpl 664 138 0 110 3 0 3 3 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 149 0 0 19 0 19 19 0 8 0 mcl2k 2048 16 0 0 2 0 2 2 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 156 0 0 10 0 10 10 0 8 0 bufpl 280 2210 0 97 151 0 151 151 0 8 0 anonpl 24 87563 0 84613 24 0 24 24 0 185 3 amapchunkpl 152 8180 0 7853 20 0 20 20 0 158 0 amappl16 200 1452 0 1447 4 0 4 4 0 8 3 amappl15 192 8 0 7 1 0 1 1 0 8 0 amappl14 184 107 0 95 1 0 1 1 0 8 0 amappl13 176 20 0 20 1 0 1 1 0 8 1 amappl12 168 1048 0 1021 3 1 2 2 0 8 0 amappl11 160 48 0 34 1 0 1 1 0 8 0 amappl10 152 4 0 4 1 0 1 1 0 8 1 amappl9 144 141 0 140 1 0 1 1 0 8 0 amappl8 136 21 0 20 1 0 1 1 0 8 0 amappl7 128 102 0 90 1 0 1 1 0 8 0 amappl6 120 166 0 164 1 0 1 1 0 8 0 amappl5 112 131 0 119 1 0 1 1 0 8 0 amappl4 104 313 0 295 1 0 1 1 0 8 0 amappl3 96 1678 0 1616 3 0 3 3 0 8 0 amappl2 88 667 0 591 3 0 3 3 0 8 1 amappl1 80 7379 0 6820 14 0 14 14 0 8 1 amappl 88 2416 0 2295 4 0 4 4 0 92 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 416 0 389 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 416 0 389 1 0 1 1 0 8 0 vmmpekpl 168 4863 0 4823 2 0 2 2 0 8 0 vmmpepl 168 31853 0 30302 82 0 82 82 0 357 7 vmsppl 448 415 0 389 6 1 5 5 0 8 1 rwobjpl 56 13440 0 10900 39 0 39 39 0 8 1 pdppl 4096 839 0 778 97 12 85 85 0 8 24 pvpl 32 9007 0 0 73 0 73 73 0 265 0 pmappl 248 415 0 389 3 0 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 371 0 15 11 0 11 11 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff83036195) at panic+0x1e5 sys/kern/subr_prf.c:198 ufs_dirbadentry(ffff800035dac3d8,ffff800035dac3d8,bfdf737bbdbd5301) at ufs_dirbadentry VOP_LOOKUP(fffffd806bd77368,ffff800035dac778,ffff800035dac7a8) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff800035dac748) at vfs_lookup+0x8fa sys/kern/vfs_lookup.c:566 namei(ffff800035dac748) at namei+0x7aa sys/kern/vfs_lookup.c:250 vn_open(ffff800035dac748,41,0) at vn_open+0x13f sys/kern/vfs_vnops.c:140 doopenat(ffff8000ffff4538,ffffff9c,20000400,40,0,ffff800035dac8f0) at doopenat+0x31d sys/kern/vfs_syscalls.c:1123 syscall(ffff800035dac9a0) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:178 [inline] syscall(ffff800035dac9a0) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x19c25dbaed0, count: -10 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffff800029b7bff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x33 kd_curproc sys/dev/kcov.c:585 [inline] __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x33 sys/dev/kcov.c:153 __mp_lock(ffffffff83632fd8) at __mp_lock+0x1a3 __mp_lock_spin sys/kern/kern_lock.c:113 [inline] __mp_lock(ffffffff83632fd8) at __mp_lock+0x1a3 sys/kern/kern_lock.c:144 reaper(ffff800029fd8a28) at reaper+0x24b sys/kern/kern_exit.c:478 end trace frame: 0x0, count: 9 ddb{1}> trace x86_ipi_db(ffff800029b7bff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x33 kd_curproc sys/dev/kcov.c:585 [inline] __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x33 sys/dev/kcov.c:153 __mp_lock(ffffffff83632fd8) at __mp_lock+0x1a3 __mp_lock_spin sys/kern/kern_lock.c:113 [inline] __mp_lock(ffffffff83632fd8) at __mp_lock+0x1a3 sys/kern/kern_lock.c:144 reaper(ffff800029fd8a28) at reaper+0x24b sys/kern/kern_exit.c:478 end trace frame: 0x0, count: -6