panic: ffs_valloc: dup alloc Stopped at db_enter+0x17: popq %rbp TID PID UID PRFLAGS PFLAGS CPU COMMAND 296792 62647 0 0 0 1 syz-executor *515119 62647 0 0 0x4000000 0K syz-executor db_enter() at db_enter+0x17 sys/arch/amd64/amd64/db_interface.c:457 panic(ffffffff847f1980) at panic+0x296 sys/kern/subr_prf.c:198 ffs_inode_alloc(ffff800001d03188,2000,ffff800000118548,ffff80003a2f9330) at ffs_inode_alloc+0xd4b ufs_makeinode(2000,ffff800001c16888,ffff80003a2f96d0,ffff80003a2f9700) at ufs_makeinode+0x1fc sys/ufs/ufs/ufs_vnops.c:1759 ufs_mknod(ffff80003a2f94a0) at ufs_mknod+0xd4 sys/ufs/ufs/ufs_vnops.c:167 VOP_MKNOD(ffff800001c16888,ffff80003a2f96d0,ffff80003a2f9700,ffff80003a2f95c0) at VOP_MKNOD+0x1f3 sys/kern/vfs_vops.c:121 domknodat(ffff800029852548,ffffff9c,200000000000,2000,5cc2) at domknodat+0x608 sys/kern/vfs_syscalls.c:1579 syscall(ffff80003a2f99b0) at syscall+0x118e mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003a2f99b0) at syscall+0x118e sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x60a43975360, 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: 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(ffffffff847f1980) at panic+0x296 sys/kern/subr_prf.c:198 ffs_inode_alloc(ffff800001d03188,2000,ffff800000118548,ffff80003a2f9330) at ffs_inode_alloc+0xd4b ufs_makeinode(2000,ffff800001c16888,ffff80003a2f96d0,ffff80003a2f9700) at ufs_makeinode+0x1fc sys/ufs/ufs/ufs_vnops.c:1759 ufs_mknod(ffff80003a2f94a0) at ufs_mknod+0xd4 sys/ufs/ufs/ufs_vnops.c:167 VOP_MKNOD(ffff800001c16888,ffff80003a2f96d0,ffff80003a2f9700,ffff80003a2f95c0) at VOP_MKNOD+0x1f3 sys/kern/vfs_vops.c:121 domknodat(ffff800029852548,ffffff9c,200000000000,2000,5cc2) at domknodat+0x608 sys/kern/vfs_syscalls.c:1579 syscall(ffff80003a2f99b0) at syscall+0x118e mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003a2f99b0) at syscall+0x118e sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x60a43975360, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80003a2f8f70 rbx 0xdfff908000000004 rdx 0 rcx 0xffffffff854efff0 cpu_info_full_primary+0x1ff0 rax 0xffff80000014ee80 r8 0xffffffff r9 0 r10 0xffff80003a2f8ed8 r11 0xffffffff81a373d0 x86_bus_space_io_read_1 r12 0xffffffff854f0e0f cpu_info_full_primary+0x2e0f r13 0xffffffff854f0c10 cpu_info_full_primary+0x2c10 r14 0x1ffff0000745f1f8 r15 0x1 rip 0xffffffff83ac31e7 db_enter+0x17 cs 0x8 rflags 0x246 rsp 0xffff80003a2f8f70 ss 0x10 db_enter+0x17: popq %rbp ddb{0}> show proc PROC (syz-executor) tid=515119 pid=62647 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=0xffff8000298527e0,0xffffffff8561fc60 process=0xffff800029a7e6d8 user=0xffff80003a2ee000, vmspace=0xffff800001bf77c8 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 15705 56165 95765 0 2 0 0 syz-executor 15705 218382 95765 0 3 0 0x4000080 fsleep syz-executor 62647 296792 21706 0 7 0 0 syz-executor *62647 515119 21706 0 7 0 0x4000000 syz-executor 12510 211202 82455 0 2 0x2 0 syz-executor 44152 354629 82455 0 2 0x2 0 syz-executor 67562 484459 61014 0 3 0x2 0 clonelk ifconfig 61014 389752 43624 0 3 0x100002 0x88 sigsusp sh 43624 170380 82455 0 3 0x2 0x80 wait syz-executor 95765 238227 82455 0 2 0x2 0 syz-executor 29521 33279 50505 0 3 0x100002 0x80 sbwait arp 50505 483210 45321 0 3 0x100002 0x88 sigsusp sh 45321 58524 82455 0 3 0x2 0x80 wait syz-executor 21706 235636 82455 0 3 0x2 0x80 nanoslp syz-executor 82455 91876 10807 0 3 0x2 0x80 wait syz-executor 10807 82702 24007 0 3 0x100002 0x88 sigsusp ksh 24007 491299 62062 0 3 0x10 0x88 kqread sshd-session 62062 341940 6655 0 3 0x12 0x80 kqread sshd-session 46797 279788 1 0 3 0x100003 0x80 ttyin getty 6655 12732 1 0 3 0 0x88 kqread sshd 68980 429425 75258 74 3 0x1100012 0x80 bpf pflogd 75258 109649 1 0 3 0 0x80 sbwait pflogd 29890 119651 75972 73 3 0x1100010 0x80 kqread syslogd 75972 122662 1 0 3 0x100002 0x80 sbwait syslogd-parent 61734 123469 1 0 3 0x100000 0x80 kqread resolvd 44927 38904 51285 77 3 0x100012 0x80 kqread dhcpleased 32374 364300 51285 77 3 0x100012 0x80 kqread dhcpleased 51285 411694 1 0 3 0 0x80 kqread dhcpleased 1885 354827 0 0 2 0x14000 0x40000200 smr 28256 460348 0 0 2 0x14000 0x200 zerothread 52642 520412 0 0 3 0x14000 0x200 aiodoned aiodoned 45256 62311 0 0 3 0x14000 0x200 syncer update 16372 110948 0 0 3 0x14000 0x200 cleaner cleaner 27947 28242 0 0 3 0x14000 0x200 reaper reaper 28687 311341 0 0 3 0x14000 0x200 pgdaemon pagedaemon 59554 191307 0 0 3 0x14000 0x200 bored viomb 87899 273346 0 0 3 0x14000 0x40000200 acpi0 acpi0 8459 10006 0 0 3 0x14000 0x40000200 idle1 55640 339661 0 0 3 0x14000 0x200 bored softnet1 49579 55446 0 0 3 0x14000 0x200 bored softnet0 41211 106276 0 0 3 0x14000 0x200 smrbar systqmp 13399 373225 0 0 3 0x14000 0x200 bored systq 91763 300895 0 0 3 0x14000 0x200 tmoslp softclockmp 26019 335456 0 0 3 0x14000 0x40000200 tmoslp softclock 67165 199516 0 0 3 0x14000 0x40000200 idle0 1 103986 0 0 3 0x2 0x80 wait init 0 0 -1 0 3 0x10000 0x200 scheduler swapper ddb{0}> show all locks Process 62647 (syz-executor) thread 0xffff800029852548 (515119) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff855aa2c0) #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_makeinode+0x1fc sys/ufs/ufs/ufs_vnops.c:1759 #8 ufs_mknod+0xd4 sys/ufs/ufs/ufs_vnops.c:167 #9 VOP_MKNOD+0x1f3 sys/kern/vfs_vops.c:121 #10 domknodat+0x608 sys/kern/vfs_syscalls.c:1579 #11 syscall+0x118e mi_syscall sys/sys/syscall_mi.h:176 [inline] #11 syscall+0x118e sys/arch/amd64/amd64/trap.c:791 #12 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xffff800001c807e8) #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_makeinode+0x1fc sys/ufs/ufs/ufs_vnops.c:1759 #8 ufs_mknod+0xd4 sys/ufs/ufs/ufs_vnops.c:167 #9 VOP_MKNOD+0x1f3 sys/kern/vfs_vops.c:121 #10 domknodat+0x608 sys/kern/vfs_syscalls.c:1579 #11 syscall+0x118e mi_syscall sys/sys/syscall_mi.h:176 [inline] #11 syscall+0x118e sys/arch/amd64/amd64/trap.c:791 #12 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xffff800001d03228) #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 domknodat+0x185 sys/kern/vfs_syscalls.c:1531 #8 syscall+0x118e mi_syscall sys/sys/syscall_mi.h:176 [inline] #8 syscall+0x118e sys/arch/amd64/amd64/trap.c:791 #9 Xsyscall+0x128 Process 41211 (systqmp) thread 0xffff800045ffe7c8 (106276) shared rwlock systqmp r = 0 (0xffffffff852225f8) #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 11068 12260K 12466K 166960K 12269 0 pcb 17 24K 24K 166960K 30 0 rtable 235 18K 27K 166960K 475 0 pf 37 23K 26K 166960K 58 0 ifaddr 42 11K 14K 166960K 66 0 ifgroup 60 2K 2K 166960K 80 0 sysctl 4 1K 13K 166960K 9 0 counters 72 43K 44K 166960K 82 0 ioctlops 5 5K 197K 166960K 1774 0 iov 0 0K 4K 166960K 2 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1404 90K 91K 166960K 1611 0 UFS quota 1 36K 36K 166960K 1 0 UFS mount 5 44K 44K 166960K 5 0 shm 2 2K 6K 166960K 4 0 VM map 2 1K 1K 166960K 2 0 sem 6 0K 0K 166960K 6 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 405K 166960K 12472 0 file desc 22 66K 117K 166960K 293 0 sigio 0 0K 0K 166960K 1 0 proc 123 146K 182K 166960K 706 0 subproc 84 10K 12K 166960K 129 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 20K 20K 166960K 1 0 ip_moptions 0 0K 0K 166960K 11 0 in_multi 89 6K 8K 166960K 144 0 ether_multi 1 0K 0K 166960K 1 0 mrt 1 0K 0K 166960K 6 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 27 6K 18K 166960K 456 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 530 319K 373K 166960K 4136 0 UVM aobj 3 4K 4K 166960K 4 0 pinsyscall 138 246K 383K 166960K 1554 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 4 0 NDP 19 0K 1K 166960K 42 0 temp 248 9310K 9473K 166960K 4271 0 kqueue 14 44K 84K 166960K 33 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 42 0 38 1 0 1 1 0 8 0 rtentry 176 160 0 89 5 0 5 5 0 8 0 unpcb 144 184 0 167 4 0 4 4 0 8 3 syncache 336 4 0 4 1 1 0 1 0 8 0 tcpcb 736 13 0 9 1 0 1 1 0 8 0 arp 136 28 0 16 1 0 1 1 0 8 0 inpcb 328 132 0 124 2 0 2 2 0 8 1 nd6 152 37 0 24 1 0 1 1 0 8 0 kcovpl 48 14 0 8 1 0 1 1 0 8 0 pffrent 40 59 0 59 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 32 0 0 1 0 1 1 0 8 0 pfstkey 128 32 0 0 2 0 2 2 0 8 0 pfstate 448 32 0 0 4 0 4 4 0 8 0 pfrule 1360 22 0 17 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 638 0 264 27 0 27 27 0 8 2 art_table 40 639 0 264 5 0 5 5 0 8 0 art_node 32 160 0 85 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 72 4 0 0 1 0 1 1 0 8 0 shmpl 120 1 0 1 1 0 1 1 0 8 1 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1816 0 327 94 0 94 94 0 8 0 ffsino 296 1816 0 327 115 0 115 115 0 8 0 nchpl 144 2121 0 399 64 0 64 64 0 8 0 vnodes 216 2020 0 0 113 0 113 113 0 8 0 namei 1024 8137 0 8136 2 1 1 2 0 8 0 percpumem 16 57 0 9 1 0 1 1 0 8 0 kstatmem 264 39 0 18 2 0 2 2 0 8 0 scxspl 216 7952 0 7952 3 2 1 2 1 8 1 plimitpl 152 45 0 28 1 0 1 1 0 8 0 sigapl 424 581 0 535 7 0 7 7 0 8 0 knotepl 120 63 0 0 2 0 2 2 0 8 0 kqueuepl 224 44 0 35 1 0 1 1 0 8 0 pipepl 344 162 0 135 3 0 3 3 0 8 0 fdescpl 528 565 0 535 3 0 3 3 0 8 0 filepl 160 2771 0 2581 14 0 14 14 0 8 4 lockfpl 104 28 0 26 1 0 1 1 0 8 0 lockfspl 48 13 0 11 1 0 1 1 0 8 0 sessionpl 144 34 0 25 1 0 1 1 0 8 0 pgrppl 48 50 0 33 1 0 1 1 0 8 0 ucredpl 104 528 0 515 1 0 1 1 0 8 0 zombiepl 144 537 0 535 1 0 1 1 0 8 0 processpl 1240 581 0 535 5 0 5 5 0 8 0 procpl 664 734 0 686 6 0 6 6 0 8 0 sockpl 752 359 0 330 10 0 10 10 0 8 6 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 125 0 0 16 0 16 16 0 8 0 mcl2k 2048 28 0 0 4 0 4 4 0 8 0 mextrefs 64 29 0 0 1 0 1 1 0 8 0 mtagpl 96 1 0 0 1 0 1 1 0 8 0 mbufpl 256 257 0 0 17 0 17 17 0 8 0 bufpl 272 2767 0 92 179 0 179 179 0 8 0 anonpl 32 3859 0 0 31 0 31 31 0 222 0 amapchunkpl 152 11705 0 11341 21 0 21 21 0 158 3 amappl16 200 2110 0 2100 6 3 3 5 0 8 2 amappl15 192 2 0 2 1 1 0 1 0 8 0 amappl14 184 474 0 471 1 0 1 1 0 8 0 amappl13 176 127 0 114 1 0 1 1 0 8 0 amappl12 168 835 0 807 2 0 2 2 0 8 0 amappl11 160 23 0 22 2 1 1 1 0 8 0 amappl10 152 67 0 55 1 0 1 1 0 8 0 amappl9 144 287 0 287 1 1 0 1 0 8 0 amappl8 136 112 0 109 1 0 1 1 0 8 0 amappl7 128 156 0 143 1 0 1 1 0 8 0 amappl6 120 146 0 143 1 0 1 1 0 8 0 amappl5 112 159 0 148 1 0 1 1 0 8 0 amappl4 104 304 0 284 1 0 1 1 0 8 0 amappl3 96 2257 0 2161 4 0 4 4 0 8 0 amappl2 88 471 0 412 2 0 2 2 0 8 0 amappl1 80 11268 0 10653 15 0 15 15 0 8 1 amappl 88 3352 0 3223 4 0 4 4 0 92 0 uvmvnodes 80 103 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 3 0 1 1 0 1 1 0 8 0 uaddrrnd 24 565 0 535 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 565 0 535 1 0 1 1 0 8 0 vmmpekpl 168 6466 0 6426 3 0 3 3 0 8 0 vmmpepl 168 45866 0 44141 88 1 87 88 0 357 6 vmsppl 488 564 0 535 6 1 5 5 0 8 0 rwobjpl 80 16529 0 15509 25 1 24 25 0 8 1 pdppl 4096 1138 0 1070 104 28 76 88 0 8 8 pvpl 32 10507 0 0 86 1 85 85 0 265 0 pmappl 256 564 0 535 4 1 3 3 0 8 0 extentpl 40 46 0 28 1 0 1 1 0 8 0 phpool 120 463 0 34 14 0 14 14 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(ffffffff847f1980) at panic+0x296 sys/kern/subr_prf.c:198 ffs_inode_alloc(ffff800001d03188,2000,ffff800000118548,ffff80003a2f9330) at ffs_inode_alloc+0xd4b ufs_makeinode(2000,ffff800001c16888,ffff80003a2f96d0,ffff80003a2f9700) at ufs_makeinode+0x1fc sys/ufs/ufs/ufs_vnops.c:1759 ufs_mknod(ffff80003a2f94a0) at ufs_mknod+0xd4 sys/ufs/ufs/ufs_vnops.c:167 VOP_MKNOD(ffff800001c16888,ffff80003a2f96d0,ffff80003a2f9700,ffff80003a2f95c0) at VOP_MKNOD+0x1f3 sys/kern/vfs_vops.c:121 domknodat(ffff800029852548,ffffff9c,200000000000,2000,5cc2) at domknodat+0x608 sys/kern/vfs_syscalls.c:1579 syscall(ffff80003a2f99b0) at syscall+0x118e mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003a2f99b0) at syscall+0x118e sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x60a43975360, count: -9 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 end of kernel end trace frame: 0x78bb7892fc60, count: 12 ddb{1}> trace 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 end of kernel end trace frame: 0x78bb7892fc60, count: -3