panic: ffs_valloc: dup alloc Stopped at db_enter+0x17: popq %rbp TID PID UID PRFLAGS PFLAGS CPU COMMAND *319400 50984 0 0x2 0 0K syz-executor 83473 76831 0 0x2 0 1 syz-executor db_enter() at db_enter+0x17 sys/arch/amd64/amd64/db_interface.c:457 panic(ffffffff84cc6280) at panic+0x296 sys/kern/subr_prf.c:198 ffs_inode_alloc(ffff800001825858,41c0,ffff800000119618,ffff800039eb6e60) at ffs_inode_alloc+0xd4b ufs_mkdir(ffff800039eb7120) at ufs_mkdir+0x2cd sys/ufs/ufs/ufs_vnops.c:1113 VOP_MKDIR(ffff800001806a50,ffff800039eb7330,ffff800039eb7360,ffff800039eb7220) at VOP_MKDIR+0x1f3 sys/kern/vfs_vops.c:394 domkdirat(ffff8000298b8a78,ffffff9c,7eb945257a10,1c0) at domkdirat+0x26f sys/kern/vfs_syscalls.c:3060 syscall(ffff800039eb75f0) at syscall+0x118e mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff800039eb75f0) at syscall+0x118e sys/arch/amd64/amd64/trap.c:804 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7eb9452579d0, count: 7 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: ffs_valloc: dup alloc ddb{0}> show kasan kasan: no report recorded this boot ddb{0}> trace db_enter() at db_enter+0x17 sys/arch/amd64/amd64/db_interface.c:457 panic(ffffffff84cc6280) at panic+0x296 sys/kern/subr_prf.c:198 ffs_inode_alloc(ffff800001825858,41c0,ffff800000119618,ffff800039eb6e60) at ffs_inode_alloc+0xd4b ufs_mkdir(ffff800039eb7120) at ufs_mkdir+0x2cd sys/ufs/ufs/ufs_vnops.c:1113 VOP_MKDIR(ffff800001806a50,ffff800039eb7330,ffff800039eb7360,ffff800039eb7220) at VOP_MKDIR+0x1f3 sys/kern/vfs_vops.c:394 domkdirat(ffff8000298b8a78,ffffff9c,7eb945257a10,1c0) at domkdirat+0x26f sys/kern/vfs_syscalls.c:3060 syscall(ffff800039eb75f0) at syscall+0x118e mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff800039eb75f0) at syscall+0x118e sys/arch/amd64/amd64/trap.c:804 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7eb9452579d0, count: -8 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800039eb6bd0 rbx 0xdfff908000000004 rdx 0 rcx 0xffffffff85117ff0 cpu_info_full_primary+0x1ff0 rax 0 r8 0xffffffff r9 0 r10 0xffff800039eb6950 r11 0xffffffff8180f6b0 x86_bus_space_io_read_1 r12 0xffffffff85118e0f cpu_info_full_primary+0x2e0f r13 0xffffffff85118c10 cpu_info_full_primary+0x2c10 r14 0x1ffff000073d6d84 r15 0x1 rip 0xffffffff82d3c837 db_enter+0x17 cs 0x8 rflags 0x246 rsp 0xffff800039eb6bd0 ss 0x10 db_enter+0x17: popq %rbp ddb{0}> show proc PROC (syz-executor) tid=319400 pid=50984 tcnt=1 stat=onproc flags process=2 proc=0 runpri=17, usrpri=50, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff8000298b8d10,0xffff8000298b8028 process=0xffff800029a7abb0 user=0xffff800039eac000, vmspace=0xffff80000184a5c0 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 62436 409033 54911 0 2 0 0 syz-executor 63590 329780 38189 0 2 0 0 syz-executor *50984 319400 40948 0 7 0x2 0 syz-executor 72642 95951 40948 0 2 0x2 0 syz-executor 32995 287455 17278 0 3 0x10 0x80 nanoslp syz-executor 32995 369095 17278 0 3 0x10 0x4000080 ttyout syz-executor 32995 379202 17278 0 3 0x10 0x4000080 fsleep syz-executor 9668 238839 76831 0 2 0 0 syz-executor 9668 416146 76831 0 3 0 0x4000080 ttyout syz-executor 9668 45189 76831 0 3 0 0x4000080 fsleep syz-executor 9668 150784 76831 0 3 0 0x4000080 fsleep syz-executor 58008 373239 27030 0 3 0x10 0x80 nanoslp syz-executor 58008 194945 27030 0 3 0x10 0x4000080 lockf syz-executor 58008 460474 27030 0 3 0x10 0x4000080 lockf syz-executor 58008 444605 27030 0 3 0x10 0x4000080 fsleep syz-executor 76831 83473 40948 0 7 0x2 0 syz-executor 16294 422464 1 0 3 0 0x80 ttyopn init 27030 80784 40948 0 3 0x2 0x80 nanoslp syz-executor 38189 262057 40948 0 2 0x2 0 syz-executor 54911 142556 40948 0 3 0x2 0x80 nanoslp syz-executor 2614 259427 40948 0 3 0x2 0x80 wait syz-executor 17278 283584 40948 0 3 0x2 0x80 nanoslp syz-executor 40948 94270 1 0 3 0x2 0x80 kqread syz-executor 10971 97580 69972 74 3 0x1100012 0x80 bpf pflogd 69972 334769 1 0 3 0 0x80 sbwait pflogd 16899 58990 0 0 3 0x14000 0x200 bored smr 97953 406295 0 0 2 0x14000 0x200 zerothread 46937 468237 0 0 3 0x14000 0x200 aiodoned aiodoned 40842 499544 0 0 3 0x14000 0x200 syncer update 68049 464237 0 0 3 0x14000 0x200 cleaner cleaner 69464 429061 0 0 3 0x14000 0x200 reaper reaper 15346 317458 0 0 3 0x14000 0x200 pgdaemon pagedaemon 38733 99359 0 0 3 0x14000 0x200 bored viomb 30319 64980 0 0 3 0x14000 0x40000200 acpi0 acpi0 76048 162595 0 0 3 0x14000 0x40000200 idle1 87673 213621 0 0 3 0x14000 0x200 bored softnet1 26799 94717 0 0 3 0x14000 0x200 bored softnet0 1075 100240 0 0 3 0x14000 0x200 smrbar systqmp 36671 123384 0 0 3 0x14000 0x200 bored systq 79342 109917 0 0 3 0x14000 0x200 tmoslp softclockmp 86357 136405 0 0 3 0x14000 0x40000200 tmoslp softclock 84249 292777 0 0 3 0x14000 0x40000200 idle0 1 443863 0 0 3 0x2 0x80 wait init 0 0 -1 0 3 0x10000 0x200 scheduler swapper ddb{0}> show all locks Process 50984 (syz-executor) thread 0xffff8000298b8a78 (319400) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff85e956c0) #0 witness_lock+0x534 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x534 sys/kern/subr_witness.c:1160 #1 __mp_acquire_count+0x58 sys/kern/kern_lock.c:-1 #2 mi_switch+0x73e sys/kern/sched_bsd.c:443 #3 sleep_finish+0x3dc sys/kern/kern_synch.c:369 #4 biowait+0xe6 sys/kern/vfs_bio.c:1110 #5 ffs_vget+0x508 sys/ufs/ffs/ffs_vfsops.c:1249 #6 ffs_inode_alloc+0x579 sys/ufs/ffs/ffs_alloc.c:393 #7 ufs_mkdir+0x2cd sys/ufs/ufs/ufs_vnops.c:1113 #8 VOP_MKDIR+0x1f3 sys/kern/vfs_vops.c:394 #9 domkdirat+0x26f sys/kern/vfs_syscalls.c:3060 #10 syscall+0x118e mi_syscall sys/sys/syscall_mi.h:176 [inline] #10 syscall+0x118e sys/arch/amd64/amd64/trap.c:804 #11 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xffff800001bbbdb8) #0 witness_lock+0x534 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x534 sys/kern/subr_witness.c:1160 #1 rw_do_enter_write+0x4e4 sys/kern/kern_rwlock.c:320 #2 rrw_enter+0xf5 sys/kern/kern_rwlock.c:621 #3 VOP_LOCK+0x186 sys/kern/vfs_vops.c:527 #4 ufs_ihashins+0xdc sys/ufs/ufs/ufs_ihash.c:152 #5 ffs_vget+0x2fc sys/ufs/ffs/ffs_vfsops.c:1232 #6 ffs_inode_alloc+0x579 sys/ufs/ffs/ffs_alloc.c:393 #7 ufs_mkdir+0x2cd sys/ufs/ufs/ufs_vnops.c:1113 #8 VOP_MKDIR+0x1f3 sys/kern/vfs_vops.c:394 #9 domkdirat+0x26f sys/kern/vfs_syscalls.c:3060 #10 syscall+0x118e mi_syscall sys/sys/syscall_mi.h:176 [inline] #10 syscall+0x118e sys/arch/amd64/amd64/trap.c:804 #11 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xffff8000018258f8) #0 witness_lock+0x534 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x534 sys/kern/subr_witness.c:1160 #1 rw_do_enter_write+0x4e4 sys/kern/kern_rwlock.c:320 #2 rrw_enter+0xf5 sys/kern/kern_rwlock.c:621 #3 VOP_LOCK+0x186 sys/kern/vfs_vops.c:527 #4 vn_lock+0xba sys/kern/vfs_vnops.c:576 #5 vfs_lookup+0x1da sys/kern/vfs_lookup.c:431 #6 namei+0xcba sys/kern/vfs_lookup.c:250 #7 domkdirat+0x15c sys/kern/vfs_syscalls.c:3045 #8 syscall+0x118e mi_syscall sys/sys/syscall_mi.h:176 [inline] #8 syscall+0x118e sys/arch/amd64/amd64/trap.c:804 #9 Xsyscall+0x128 Process 1075 (systqmp) thread 0xffff800045ffe298 (100240) shared rwlock systqmp r = 0 (0xffffffff85437738) #0 witness_lock+0x534 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x534 sys/kern/subr_witness.c:1160 #1 taskq_thread+0x1da sys/kern/kern_task.c:442 #2 proc_trampoline+0x10 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11054 12237K 12466K 166960K 12268 0 pcb 17 24K 24K 166960K 39 0 rtable 254 21K 29K 166960K 680 0 pf 37 23K 27K 166960K 83 0 ifaddr 44 12K 14K 166960K 96 0 ifgroup 60 2K 3K 166960K 120 0 sysctl 3 1K 13K 166960K 8 0 counters 72 43K 45K 166960K 106 0 ioctlops 4 3K 185K 166960K 1629 0 iov 0 0K 17K 166960K 36 0 mount 1 1K 1K 166960K 1 0 log 2 0K 0K 166960K 6 0 vnodes 1357 87K 93K 166960K 1734 0 UFS quota 1 36K 36K 166960K 1 0 UFS mount 5 44K 44K 166960K 5 0 shm 2 2K 6K 166960K 5 0 VM map 2 1K 1K 166960K 2 0 sem 17 1K 2K 166960K 23 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 405K 166960K 12472 0 file desc 17 57K 117K 166960K 446 0 sigio 0 0K 0K 166960K 1 0 proc 73 65K 196K 166960K 877 0 subproc 73 9K 13K 166960K 172 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 20K 20K 166960K 1 0 ip_moptions 0 0K 0K 166960K 1 0 in_multi 99 7K 8K 166960K 220 0 ether_multi 1 0K 0K 166960K 1 0 mrt 1 0K 0K 166960K 14 0 ISOFS mount 1 36K 36K 166960K 1 0 MSDOSFS mount 1 20K 20K 166960K 1 0 ttys 67 465K 465K 166960K 67 0 exec 162 40K 41K 166960K 704 0 fusefs mount 1 36K 36K 166960K 1 0 tdb 3 1K 1K 166960K 3 0 VM swap 14 124K 124K 166960K 15 0 UVM amap 447 198K 361K 166960K 5367 0 UVM aobj 7 4K 4K 166960K 7 0 pinsyscall 125 215K 381K 166960K 1905 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 7 0 NDP 21 1K 2K 166960K 66 0 temp 245 9331K 9472K 166960K 5780 0 kqueue 8 22K 84K 166960K 57 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 28 0 0 1 0 1 1 0 8 0 rtpcb 120 60 0 60 1 0 1 1 0 8 1 rtentry 176 232 0 144 6 0 6 6 0 8 1 unpcb 144 254 0 244 3 0 3 3 0 8 0 syncache 336 4 0 4 2 2 0 1 0 8 0 tcpcb 736 23 0 22 1 0 1 1 0 8 0 arp 136 40 0 26 1 0 1 1 0 8 0 inpcb 328 255 0 253 5 0 5 5 0 8 4 nd6 152 57 0 39 1 0 1 1 0 8 0 kcovpl 48 19 0 13 1 0 1 1 0 8 0 ppxss 1192 3 0 3 1 0 1 1 0 8 1 pffrag 232 1 0 0 1 0 1 1 0 482 0 pffrnode 88 1 0 0 1 0 1 1 0 8 0 pffrent 40 1 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 41 0 0 1 0 1 1 0 8 0 pfstkey 128 41 0 0 2 0 2 2 0 8 0 pfstate 448 41 0 0 5 0 5 5 0 8 0 pfrule 1360 89 0 84 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 939 0 528 29 0 29 29 0 8 0 art_table 40 940 0 528 5 0 5 5 0 8 0 art_node 32 232 0 133 1 0 1 1 0 8 0 sysvmsgpl 40 1 0 1 1 0 1 1 0 8 1 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 72 19 0 5 1 0 1 1 0 8 0 shmpl 120 4 0 1 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1942 0 449 94 0 94 94 0 8 0 ffsino 296 1942 0 449 115 0 115 115 0 8 0 nchpl 144 2342 0 592 65 0 65 65 0 8 0 rtmask 32 1 0 1 1 0 1 1 0 8 1 vnodes 216 2241 0 0 125 0 125 125 0 8 0 namei 1024 9911 0 9910 2 1 1 2 0 8 0 percpumem 16 69 0 20 1 0 1 1 0 8 0 kstatmem 264 59 0 36 2 0 2 2 0 8 0 scxspl 216 7952 0 7952 3 2 1 2 1 8 1 plimitpl 152 53 0 42 1 0 1 1 0 8 0 sigapl 424 737 0 701 7 1 6 7 0 8 1 knotepl 120 272 0 0 9 0 9 9 0 8 0 kqueuepl 224 84 0 81 1 0 1 1 0 8 0 pipepl 344 271 0 244 9 0 9 9 0 8 6 fdescpl 528 721 0 701 3 0 3 3 0 8 0 filepl 160 3513 0 3359 17 0 17 17 0 8 5 lockfpl 104 112 0 109 1 0 1 1 0 8 0 lockfspl 48 27 0 26 1 0 1 1 0 8 0 sessionpl 144 105 0 102 1 0 1 1 0 8 0 pgrppl 48 128 0 117 1 0 1 1 0 8 0 ucredpl 104 659 0 649 1 0 1 1 0 8 0 zombiepl 144 702 0 701 1 0 1 1 0 8 0 processpl 1240 737 0 701 5 1 4 5 0 8 0 procpl 664 1038 0 994 6 0 6 6 0 8 0 sockpl 752 573 0 561 8 0 8 8 0 8 4 mcl64k 65536 2 0 0 1 0 1 1 0 8 0 mcl9k128 9344 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 125 0 0 16 0 16 16 0 8 0 mcl2k 2048 17 0 0 3 0 3 3 0 8 0 mextrefs 64 18 0 0 1 0 1 1 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 267 0 0 17 0 17 17 0 8 0 bufpl 272 2671 0 90 173 0 173 173 0 8 0 anonpl 32 3672 0 0 30 0 30 30 0 222 0 amapchunkpl 152 15125 0 14797 22 0 22 22 0 158 4 amappl16 200 1718 0 1703 6 3 3 5 0 8 1 amappl15 192 6 0 6 2 2 0 1 0 8 0 amappl14 184 559 0 559 1 0 1 1 0 8 1 amappl13 176 142 0 140 1 0 1 1 0 8 0 amappl12 168 1016 0 999 2 0 2 2 0 8 0 amappl11 160 9 0 8 1 0 1 1 0 8 0 amappl10 152 66 0 62 1 0 1 1 0 8 0 amappl9 144 288 0 288 1 1 0 1 0 8 0 amappl8 136 136 0 135 1 0 1 1 0 8 0 amappl7 128 194 0 190 1 0 1 1 0 8 0 amappl6 120 212 0 212 1 0 1 1 0 8 1 amappl5 112 186 0 181 1 0 1 1 0 8 0 amappl4 104 339 0 332 1 0 1 1 0 8 0 amappl3 96 2996 0 2923 4 0 4 4 0 8 1 amappl2 88 504 0 492 2 0 2 2 0 8 0 amappl1 80 12219 0 12082 14 1 13 14 0 8 3 amappl 88 4464 0 4353 5 0 5 5 0 92 1 uvmvnodes 80 105 0 0 3 0 3 3 0 8 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 6 0 1 1 0 1 1 0 8 0 uaddrrnd 24 721 0 701 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 721 0 701 1 0 1 1 0 8 0 vmmpekpl 168 7993 0 7940 3 0 3 3 0 8 0 vmmpepl 168 54917 0 54068 87 0 87 87 0 357 39 vmsppl 488 720 0 701 5 0 5 5 0 8 1 rwobjpl 80 18250 0 17807 23 1 22 23 0 8 1 pdppl 4096 1450 0 1402 100 42 58 84 0 8 10 pvpl 32 10973 0 0 90 1 89 89 0 265 0 pmappl 256 720 0 701 3 0 3 3 0 8 0 extentpl 40 46 0 28 1 0 1 1 0 8 0 phpool 120 456 0 48 13 0 13 13 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x17 sys/arch/amd64/amd64/db_interface.c:457 panic(ffffffff84cc6280) at panic+0x296 sys/kern/subr_prf.c:198 ffs_inode_alloc(ffff800001825858,41c0,ffff800000119618,ffff800039eb6e60) at ffs_inode_alloc+0xd4b ufs_mkdir(ffff800039eb7120) at ufs_mkdir+0x2cd sys/ufs/ufs/ufs_vnops.c:1113 VOP_MKDIR(ffff800001806a50,ffff800039eb7330,ffff800039eb7360,ffff800039eb7220) at VOP_MKDIR+0x1f3 sys/kern/vfs_vops.c:394 domkdirat(ffff8000298b8a78,ffffff9c,7eb945257a10,1c0) at domkdirat+0x26f sys/kern/vfs_syscalls.c:3060 syscall(ffff800039eb75f0) at syscall+0x118e mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff800039eb75f0) at syscall+0x118e sys/arch/amd64/amd64/trap.c:804 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7eb9452579d0, count: -8 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1f: addq $0x8,%rsp x86_ipi_db(ffff800028f93ff0) at x86_ipi_db+0x1f sys/arch/amd64/amd64/db_interface.c:412 x86_ipi_handler() at x86_ipi_handler+0xfd sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff85e94ec0) at __mp_lock+0x272 __mp_lock_spin sys/kern/kern_lock.c:142 [inline] __mp_lock(ffffffff85e94ec0) at __mp_lock+0x272 sys/kern/kern_lock.c:173 syscall(ffff80002990e3c0) at syscall+0x10c1 mi_syscall sys/sys/syscall_mi.h:175 [inline] syscall(ffff80002990e3c0) at syscall+0x10c1 sys/arch/amd64/amd64/trap.c:804 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7b6e761bcc80, count: 9 ddb{1}>