panic: bad dir Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *114447 35106 0 0 0x4000000 0K syz-executor 225324 99597 0 0x2 0x1 1 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8302e260) at panic+0x1e5 sys/kern/subr_prf.c:198 ufs_dirbadentry(ffff800033ba1e28,ffff800033ba1e28,fa636ab84ca02b6f) at ufs_dirbadentry VOP_LOOKUP(fffffd807784c998,ffff800033ba20a0,ffff800033ba20d0) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff800033ba2070) at vfs_lookup+0x8fa sys/kern/vfs_lookup.c:566 namei(ffff800033ba2070) at namei+0x7aa sys/kern/vfs_lookup.c:250 domknodat(ffff8000fffeea48,ffffff9c,20000280,1ffa,0) at domknodat+0xb4 sys/kern/vfs_syscalls.c:1576 syscall(ffff800033ba2270) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:178 [inline] syscall(ffff800033ba2270) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2d74aa27150, count: 6 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(ffffffff8302e260) at panic+0x1e5 sys/kern/subr_prf.c:198 ufs_dirbadentry(ffff800033ba1e28,ffff800033ba1e28,fa636ab84ca02b6f) at ufs_dirbadentry VOP_LOOKUP(fffffd807784c998,ffff800033ba20a0,ffff800033ba20d0) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff800033ba2070) at vfs_lookup+0x8fa sys/kern/vfs_lookup.c:566 namei(ffff800033ba2070) at namei+0x7aa sys/kern/vfs_lookup.c:250 domknodat(ffff8000fffeea48,ffffff9c,20000280,1ffa,0) at domknodat+0xb4 sys/kern/vfs_syscalls.c:1576 syscall(ffff800033ba2270) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:178 [inline] syscall(ffff800033ba2270) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2d74aa27150, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800033ba1c50 rbx 0xffffffff83505dbf cpu_info_full_primary+0x2dbf rdx 0xffff80000129cfc0 rcx 0xffff8000fffeea48 rax 0xffffffff83504ff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x44bccf44ab800fa7 r11 0x33bdbfd75703756b r12 0xffffffff83505bc0 cpu_info_full_primary+0x2bc0 r13 0 r14 0 r15 0x1 rip 0xffffffff823851f5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800033ba1c40 ss 0 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=114447 pid=35106 tcnt=2 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=0xffff8000fffeecd0,0xffff8000fffef1f0 process=0xffff8000ffff1b50 user=0xffff800033b9d000, vmspace=0xfffffd806bf36aa0 estcpu=36, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 8529 438078 33093 0 2 0 syz-executor 8529 497296 33093 0 3 0x4000080 fsleep syz-executor 35106 43434 63105 0 2 0 syz-executor *35106 114447 63105 0 7 0x4000000 syz-executor 55634 313052 23483 0 2 0x1000480 syz-executor 55634 378162 23483 0 3 0x5000000 smrbar syz-executor 55634 374588 23483 0 3 0x5000080 fsleep syz-executor 7381 277816 85979 0 3 0x80 nanoslp syz-executor 7381 429626 85979 0 3 0x4000080 ttyout syz-executor 7381 162683 85979 0 3 0x4000080 fsleep syz-executor 37014 304519 0 0 3 0x14200 bored sosplice 65815 381312 34816 0 3 0x100082 sbwait arp 34816 441634 70458 0 3 0x10008a sigsusp sh 70458 24373 82162 0 3 0x82 wait syz-executor 63105 323748 82162 0 2 0x482 syz-executor 99597 225324 82162 0 7 0x3 syz-executor 85979 73521 82162 0 3 0x82 nanoslp syz-executor 33093 375372 82162 0 2 0x482 syz-executor 23483 12570 82162 0 2 0x482 syz-executor 82162 439204 96283 0 3 0x82 wait syz-executor 96283 33647 54298 0 3 0x10008a sigsusp ksh 54298 441209 4635 0 3 0x98 kqread sshd-session 4635 60544 74646 0 3 0x92 kqread sshd-session 1540 96971 1 0 3 0x100083 ttyin getty 74646 386802 1 0 3 0x88 kqread sshd 26645 110623 60557 74 3 0x1100092 bpf pflogd 60557 134177 1 0 3 0x80 sbwait pflogd 67954 259770 81283 73 3 0x1100090 kqread syslogd 81283 406101 1 0 3 0x100082 sbwait syslogd 52815 326699 1 0 3 0x100080 kqread resolvd 23102 37012 45247 77 3 0x100092 kqread dhcpleased 58647 362374 45247 77 3 0x100092 kqread dhcpleased 45247 21311 1 0 3 0x80 kqread dhcpleased 43310 39675 0 0 3 0x14200 bored smr 43716 378838 0 0 2 0x14200 zerothread 14530 345195 0 0 3 0x14200 aiodoned aiodoned 44508 435909 0 0 3 0x14200 syncer update 48182 487162 0 0 3 0x14200 cleaner cleaner 11842 397685 0 0 3 0x14200 reaper reaper 77173 16826 0 0 3 0x14200 pgdaemon pagedaemon 84321 133835 0 0 3 0x14200 bored viomb 20618 41752 0 0 3 0x40014200 acpi0 acpi0 55179 337514 0 0 3 0x40014200 idle1 12638 398041 0 0 3 0x14200 bored softnet3 51285 423698 0 0 3 0x14200 bored softnet2 65057 288240 0 0 3 0x14200 bored softnet1 38231 400080 0 0 3 0x14200 bored softnet0 74279 250167 0 0 3 0x14200 bored systqmp 39139 29666 0 0 3 0x14200 bored systq 11295 329279 0 0 2 0x14200 softclockmp 12507 114294 0 0 3 0x40014200 tmoslp softclock 55020 424666 0 0 3 0x40014200 idle0 1 438465 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 35106 (syz-executor) thread 0xffff8000fffeea48 (114447) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8358f6c8) #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 domknodat+0xb4 sys/kern/vfs_syscalls.c:1576 #11 syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:178 [inline] #11 syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 #12 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd806bcb5b40) #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 domknodat+0xb4 sys/kern/vfs_syscalls.c:1576 #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 Process 55634 (syz-executor) thread 0xffff80002a056f50 (378162) exclusive rwlock clonelk r = 0 (0xffffffff8349e3b0) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 if_clone_destroy+0x67 #2 ifioctl+0x5c5 #3 sys_ioctl+0x67c #4 syscall+0xbb6 mi_syscall sys/sys/syscall_mi.h:178 [inline] #4 syscall+0xbb6 sys/arch/amd64/amd64/trap.c:577 #5 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10194 11121K 11512K 166960K 11687 0 pcb 17 12K 12K 166960K 30 0 rtable 196 5K 6K 166960K 341 0 pf 33 17K 18K 166960K 113 0 ifaddr 37 6K 7K 166960K 44 0 ifgroup 51 2K 2K 166960K 57 0 counters 62 36K 36K 166960K 66 0 ioctlops 0 0K 4K 166960K 1491 0 iov 0 0K 8K 166960K 5 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1460 92K 92K 166960K 1597 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 5 0K 0K 166960K 7 0 dirhash 12 2K 2K 166960K 18 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 16 57K 89K 166960K 259 0 sigio 0 0K 0K 166960K 3 0 proc 75 103K 128K 166960K 536 0 subproc 104 6K 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 17 0 in_multi 78 5K 6K 166960K 95 0 ether_multi 1 0K 0K 166960K 1 0 mrt 1 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 361 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 220 72K 73K 166960K 3971 0 UVM aobj 5 2K 2K 166960K 6 0 pinsyscall 42 84K 102K 166960K 1322 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 8 0 NDP 11 0K 1K 166960K 27 0 temp 37 6818K 6883K 166960K 8611 0 kqueue 13 20K 24K 166960K 36 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 37 0 33 1 0 1 1 0 8 0 rtentry 112 109 0 18 3 0 3 3 0 8 0 unpcb 144 314 0 296 4 0 4 4 0 8 3 syncache 336 3 0 3 2 1 1 1 0 8 1 tcpcb 808 28 0 22 1 0 1 1 0 8 0 arp 120 19 0 4 1 0 1 1 0 8 0 inpcb 336 219 0 211 7 0 7 7 0 8 6 nd6 136 21 0 3 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 0 1 1 0 8 1 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1168 1 0 1 1 0 1 1 0 8 1 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 26 0 0 1 0 1 1 0 8 0 pfstkey 128 28 0 2 1 0 1 1 0 8 0 pfstate 376 27 0 1 3 0 3 3 0 8 0 pfrule 1344 23 0 18 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 414 0 47 26 0 26 26 0 8 1 art_table 32 415 0 47 4 0 4 4 0 8 0 art_node 16 108 0 25 1 0 1 1 0 8 0 sysvmsgpl 40 1 0 0 1 0 1 1 0 8 0 semapl 112 3 0 0 1 0 1 1 0 8 0 shmpl 112 3 0 1 1 0 1 1 0 8 0 dirhash 1024 21 0 4 3 0 3 3 0 8 0 dino2pl 256 1800 0 300 95 0 95 95 0 8 0 ffsino 272 1800 0 300 101 0 101 101 0 8 0 nchpl 144 2147 0 465 63 0 63 63 0 8 0 uvmvnodes 80 2079 0 0 43 0 43 43 0 8 0 vnodes 216 2079 0 0 116 0 116 116 0 8 0 namei 1024 6879 0 6878 1 0 1 1 0 8 0 percpumem 16 47 0 2 1 0 1 1 0 8 0 kstatmem 264 26 0 4 2 0 2 2 0 8 0 scxspl 216 6623 0 6623 5 1 4 4 1 8 4 plimitpl 152 54 0 36 1 0 1 1 0 8 0 sigapl 424 559 0 509 7 0 7 7 0 8 0 futexpl 64 1858 0 1855 1 0 1 1 0 8 0 knotepl 120 295 0 0 9 0 9 9 0 8 0 kqueuepl 216 53 0 44 1 0 1 1 0 8 0 pipepl 320 115 0 88 3 0 3 3 0 8 0 fdescpl 496 540 0 510 5 0 5 5 0 8 0 filepl 152 2617 0 2372 15 0 15 15 0 8 5 lockfpl 104 48 0 46 1 0 1 1 0 8 0 lockfspl 48 20 0 18 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 248 0 234 1 0 1 1 0 8 0 zombiepl 144 512 0 509 1 0 1 1 0 8 0 processpl 1160 559 0 509 5 0 5 5 0 8 0 procpl 648 817 0 761 6 0 6 6 0 8 0 srpgc 96 5 0 5 1 0 1 1 0 8 1 sosppl 168 1 0 1 1 0 1 1 0 8 1 sockpl 664 574 0 544 12 1 11 12 0 8 8 mcl64k 65536 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 143 0 0 18 0 18 18 0 8 0 mcl2k 2048 27 0 0 4 0 4 4 0 8 0 mtagpl 96 8 0 0 1 0 1 1 0 8 0 mbufpl 256 195 0 0 13 0 13 13 0 8 0 bufpl 280 2400 0 97 165 0 165 165 0 8 0 anonpl 24 167063 0 163701 47 0 47 47 0 185 20 amapchunkpl 152 13230 0 12788 23 0 23 23 0 158 3 amappl16 200 4677 0 4660 19 5 14 14 0 8 12 amappl15 192 11 0 11 1 1 0 1 0 8 0 amappl14 184 115 0 102 1 0 1 1 0 8 0 amappl13 176 62 0 62 1 1 0 1 0 8 0 amappl12 168 1209 0 1178 4 1 3 3 0 8 1 amappl11 160 57 0 43 1 0 1 1 0 8 0 amappl10 152 12 0 11 1 0 1 1 0 8 0 amappl9 144 179 0 179 1 1 0 1 0 8 0 amappl8 136 23 0 21 1 0 1 1 0 8 0 amappl7 128 165 0 152 1 0 1 1 0 8 0 amappl6 120 262 0 259 1 0 1 1 0 8 0 amappl5 112 144 0 132 1 0 1 1 0 8 0 amappl4 104 319 0 299 1 0 1 1 0 8 0 amappl3 96 2304 0 2216 3 0 3 3 0 8 0 amappl2 88 808 0 723 2 0 2 2 0 8 0 amappl1 80 7810 0 7213 14 0 14 14 0 8 0 amappl 88 3604 0 3448 5 0 5 5 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 5 0 1 1 0 1 1 0 8 0 uaddrrnd 24 540 0 510 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 540 0 510 1 0 1 1 0 8 0 vmmpekpl 168 5890 0 5853 2 0 2 2 0 8 0 vmmpepl 168 42415 0 40634 95 0 95 95 0 357 10 vmsppl 448 539 0 510 6 1 5 5 0 8 0 rwobjpl 56 18479 0 15439 46 0 46 46 0 8 2 pdppl 4096 1087 0 1020 103 30 73 83 0 8 6 pvpl 32 14419 0 0 117 0 117 117 0 265 0 pmappl 248 539 0 510 3 0 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 387 0 34 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(ffffffff8302e260) at panic+0x1e5 sys/kern/subr_prf.c:198 ufs_dirbadentry(ffff800033ba1e28,ffff800033ba1e28,fa636ab84ca02b6f) at ufs_dirbadentry VOP_LOOKUP(fffffd807784c998,ffff800033ba20a0,ffff800033ba20d0) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff800033ba2070) at vfs_lookup+0x8fa sys/kern/vfs_lookup.c:566 namei(ffff800033ba2070) at namei+0x7aa sys/kern/vfs_lookup.c:250 domknodat(ffff8000fffeea48,ffffff9c,20000280,1ffa,0) at domknodat+0xb4 sys/kern/vfs_syscalls.c:1576 syscall(ffff800033ba2270) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:178 [inline] syscall(ffff800033ba2270) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2d74aa27150, count: -9 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+0x2c kd_curproc sys/dev/kcov.c:584 [inline] __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x2c sys/dev/kcov.c:153 __mp_lock(ffffffff8358f4c0) at __mp_lock+0x1a3 __mp_lock_spin sys/kern/kern_lock.c:113 [inline] __mp_lock(ffffffff8358f4c0) at __mp_lock+0x1a3 sys/kern/kern_lock.c:144 ktrpsig(ffff80002a0596e0,14,157f1c70760,0,0,ffff80002a0faa50) at ktrpsig+0x121 sys/kern/kern_ktrace.c:292 postsig(ffff80002a0596e0,14,ffff80002a0fab58) at postsig+0x3b3 sys/kern/kern_sig.c:1587 userret(ffff80002a0596e0) at userret+0x24e sys/kern/kern_sig.c:2034 syscall(ffff80002a0fac90) at syscall+0x9a7 mi_syscall_return sys/sys/syscall_mi.h:205 [inline] syscall(ffff80002a0fac90) at syscall+0x9a7 sys/arch/amd64/amd64/trap.c:598 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x76bf81e568b0, count: 5 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+0x2c kd_curproc sys/dev/kcov.c:584 [inline] __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x2c sys/dev/kcov.c:153 __mp_lock(ffffffff8358f4c0) at __mp_lock+0x1a3 __mp_lock_spin sys/kern/kern_lock.c:113 [inline] __mp_lock(ffffffff8358f4c0) at __mp_lock+0x1a3 sys/kern/kern_lock.c:144 ktrpsig(ffff80002a0596e0,14,157f1c70760,0,0,ffff80002a0faa50) at ktrpsig+0x121 sys/kern/kern_ktrace.c:292 postsig(ffff80002a0596e0,14,ffff80002a0fab58) at postsig+0x3b3 sys/kern/kern_sig.c:1587 userret(ffff80002a0596e0) at userret+0x24e sys/kern/kern_sig.c:2034 syscall(ffff80002a0fac90) at syscall+0x9a7 mi_syscall_return sys/sys/syscall_mi.h:205 [inline] syscall(ffff80002a0fac90) at syscall+0x9a7 sys/arch/amd64/amd64/trap.c:598 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x76bf81e568b0, count: -10