panic: ffs_valloc: dup alloc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *416741 60135 0 0 0x4000000 0K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834331ec) at panic+0x1e5 sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd8069766278,204d,fffffd80097fd680,ffff80003c3c5e20) at ffs_inode_alloc+0x94e ufs_makeinode(204d,fffffd8067c9b0e8,ffff80003c3c6038,ffff80003c3c6068) at ufs_makeinode+0xcd sys/ufs/ufs/ufs_vnops.c:1732 ufs_mknod(ffff80003c3c5ee0) at ufs_mknod+0x5b sys/ufs/ufs/ufs_vnops.c:167 VOP_MKNOD(fffffd8067c9b0e8,ffff80003c3c6038,ffff80003c3c6068,ffff80003c3c5f68) at VOP_MKNOD+0x101 sys/kern/vfs_vops.c:121 domknodat(ffff80002a24e548,ffffff9c,200000000040,205f,2a02) at domknodat+0x469 sys/kern/vfs_syscalls.c:1659 syscall(ffff80003c3c6200) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c3c6200) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2f4f63a5750, 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}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834331ec) at panic+0x1e5 sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd8069766278,204d,fffffd80097fd680,ffff80003c3c5e20) at ffs_inode_alloc+0x94e ufs_makeinode(204d,fffffd8067c9b0e8,ffff80003c3c6038,ffff80003c3c6068) at ufs_makeinode+0xcd sys/ufs/ufs/ufs_vnops.c:1732 ufs_mknod(ffff80003c3c5ee0) at ufs_mknod+0x5b sys/ufs/ufs/ufs_vnops.c:167 VOP_MKNOD(fffffd8067c9b0e8,ffff80003c3c6038,ffff80003c3c6068,ffff80003c3c5f68) at VOP_MKNOD+0x101 sys/kern/vfs_vops.c:121 domknodat(ffff80002a24e548,ffffff9c,200000000040,205f,2a02) at domknodat+0x469 sys/kern/vfs_syscalls.c:1659 syscall(ffff80003c3c6200) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c3c6200) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2f4f63a5750, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c3c5bb0 rbx 0xffffffff838c8e07 cpu_info_full_primary+0x2e07 rdx 0 rcx 0xffff80002a24e548 rax 0xffffffff838c7ff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xe54d2c5bcc4c401f r11 0x41e38c657f361f46 r12 0xffffffff838c8c08 cpu_info_full_primary+0x2c08 r13 0 r14 0 r15 0x1 rip 0xffffffff81db9fa5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c3c5ba0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=416741 pid=60135 tcnt=3 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a24f770,0xffff80002a24ed20 process=0xffff8000fffec9b8 user=0xffff80003c3c1000, vmspace=0xfffffd800f8c3020 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 60135 49074 47756 0 2 0 syz-executor *60135 416741 47756 0 7 0x4000000 syz-executor 60135 125820 47756 0 3 0x4000080 fsleep syz-executor 37730 113217 33823 0 2 0xc80 syz-executor 37730 41313 33823 0 2 0x4000000 syz-executor 37730 170226 33823 0 2 0x4000000 syz-executor 37730 275847 33823 0 3 0x4000080 fsleep syz-executor 33163 206589 20906 0 3 0x80 nanoslp syz-executor 33163 282119 20906 0 3 0x4000000 smrbar syz-executor 33163 31525 20906 0 3 0x4000080 fsleep syz-executor 5629 281816 89942 0 2 0xc80 syz-executor 5629 19682 89942 0 3 0x4000080 kqread syz-executor 5629 426780 89942 0 3 0x4000080 fsleep syz-executor 47064 220788 71202 0 3 0x100082 sbwait arp 71202 65771 84797 0 3 0x10008a sigsusp sh 84797 34300 727 0 3 0x82 wait syz-executor 47756 115387 727 0 2 0xc82 syz-executor 33823 277386 727 0 2 0xc82 syz-executor 20906 75393 727 0 3 0x82 nanoslp syz-executor 89942 40372 727 0 2 0xc82 syz-executor 727 81237 387 0 2 0x2 syz-executor 387 11911 25863 0 3 0x10008a sigsusp ksh 25863 431400 55096 0 3 0x98 kqread sshd-session 55096 309541 9533 0 3 0x92 kqread sshd-session 6062 163210 1 0 3 0x100083 ttyin getty 9533 400634 1 0 3 0x88 kqread sshd 97652 251439 92541 74 3 0x1100092 bpf pflogd 92541 239472 1 0 3 0x80 sbwait pflogd 54691 325942 18781 73 3 0x1100090 kqread syslogd 18781 344608 1 0 3 0x100082 sbwait syslogd 55776 505161 1 0 3 0x100080 kqread resolvd 38914 355418 26183 77 3 0x100092 kqread dhcpleased 38705 173229 26183 77 3 0x100092 kqread dhcpleased 26183 65686 1 0 3 0x80 kqread dhcpleased 91039 432686 0 0 3 0x14200 bored smr 19241 74644 0 0 2 0x14200 zerothread 59466 217339 0 0 3 0x14200 aiodoned aiodoned 10444 416346 0 0 3 0x14200 syncer update 20141 401292 0 0 3 0x14200 cleaner cleaner 15391 20645 0 0 3 0x14200 reaper reaper 75946 125920 0 0 3 0x14200 pgdaemon pagedaemon 64117 470466 0 0 3 0x14200 bored viomb 3193 18746 0 0 3 0x40014200 acpi0 acpi0 57151 427661 0 0 3 0x40014200 idle1 95019 396203 0 0 3 0x14200 bored softnet1 22267 386158 0 0 3 0x14200 bored softnet0 35151 40622 0 0 3 0x14200 bored systqmp 53997 336540 0 0 3 0x14200 bored systq 75969 54615 0 0 2 0x14200 softclockmp 61137 58283 0 0 3 0x40014200 tmoslp softclock 74318 220639 0 0 3 0x40014200 idle0 1 297472 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 60135 (syz-executor) thread 0xffff80002a24e548 (416741) Process 33163 (syz-executor) thread 0xffff8000fffda028 (282119) ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11073 12223K 12354K 166960K 12413 0 pcb 17 14K 16K 166960K 131 0 rtable 213 7K 7K 166960K 390 0 pf 33 17K 24K 166960K 95 0 ifaddr 37 6K 7K 166960K 58 0 ifgroup 51 2K 2K 166960K 79 0 sysctl 1 1K 9K 166960K 5 0 counters 68 36K 37K 166960K 94 0 ioctlops 0 0K 4K 166960K 1538 0 iov 0 0K 16K 166960K 6 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1294 81K 82K 166960K 1592 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 5 0 VM map 2 1K 1K 166960K 2 0 sem 9 0K 0K 166960K 11 0 dirhash 12 2K 2K 166960K 15 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 15 53K 93K 166960K 344 0 sigio 0 0K 0K 166960K 1 0 proc 72 115K 147K 166960K 590 0 subproc 63 3K 4K 166960K 82 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 34 0 in_multi 78 5K 6K 166960K 109 0 ether_multi 1 0K 0K 166960K 3 0 mrt 0 0K 0K 166960K 5 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 85 387K 387K 166960K 85 0 exec 0 0K 1K 166960K 412 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 224 160K 204K 166960K 4853 0 UVM aobj 6 2K 2K 166960K 6 0 pinsyscall 41 82K 106K 166960K 1521 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 9 0 NDP 11 0K 1K 166960K 36 0 temp 36 9080K 9144K 166960K 11377 0 kqueue 17 28K 30K 166960K 71 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 26 0 0 1 0 1 1 0 8 0 rtpcb 120 45 0 40 1 0 1 1 0 8 0 rtentry 176 118 0 25 5 0 5 5 0 8 0 unpcb 144 126 0 109 2 0 2 2 0 8 1 syncache 336 5 0 5 1 0 1 1 0 8 1 tcpqe 32 1 0 1 1 0 1 1 0 8 1 tcpcb 736 47 0 42 2 0 2 2 0 8 1 arp 136 19 0 4 1 0 1 1 0 8 0 inpcb 328 293 0 284 7 0 7 7 0 8 6 nd6 152 24 0 6 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 0 1 1 0 8 1 kcovpl 48 9 0 2 1 0 1 1 0 8 0 ppxss 1192 9 0 9 1 0 1 1 0 8 1 pppxif 1576 2 0 2 1 0 1 1 0 8 1 pfstscr 40 1 0 0 1 0 1 1 0 8 0 pffrag 232 4 0 0 1 0 1 1 0 482 0 pffrnode 88 3 0 0 1 0 1 1 0 8 0 pffrent 40 4 0 0 1 0 1 1 0 8 0 pfosfp 40 1428 0 1428 5 0 5 5 0 8 5 pfosfpen 112 1428 0 1428 21 0 21 21 0 8 21 pfanchor 1288 2 0 0 1 0 1 1 0 8 0 pfstitem 24 29 0 0 1 0 1 1 0 8 0 pfstkey 128 29 0 0 1 0 1 1 0 8 0 pfstate 448 27 0 0 3 0 3 3 0 8 0 pfrule 1360 26 0 21 2 1 1 2 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 483 0 106 27 0 27 27 0 8 2 art_table 40 485 0 106 5 0 5 5 0 8 0 art_node 32 118 0 34 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 3 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 8 0 1 1 0 1 1 0 8 0 shmpl 112 3 0 0 1 0 1 1 0 8 0 dirhash 1024 19 0 2 3 0 3 3 0 8 0 dino2pl 256 1983 0 522 93 0 93 93 0 8 0 ffsino 296 1983 0 522 114 0 114 114 0 8 0 nchpl 144 2449 0 742 64 0 64 64 0 8 0 rtmask 32 2 0 2 1 0 1 1 0 8 1 vnodes 216 2166 0 0 121 0 121 121 0 8 0 namei 1024 7968 0 7967 2 0 2 2 0 8 1 percpumem 16 62 0 13 1 0 1 1 0 8 0 kstatmem 264 42 0 18 2 0 2 2 0 8 0 scsiplug 72 1 0 1 1 0 1 1 0 8 1 scxspl 216 8055 0 8055 11 3 8 8 1 8 8 plimitpl 152 57 0 40 1 0 1 1 0 8 0 sigapl 424 659 0 613 7 0 7 7 0 8 1 knotepl 120 545 0 0 17 0 17 17 0 8 0 kqueuepl 224 107 0 94 2 0 2 2 0 8 1 pipepl 344 139 0 112 3 0 3 3 0 8 0 fdescpl 528 643 0 614 3 0 3 3 0 8 0 filepl 160 3013 0 2811 13 0 13 13 0 8 3 lockfpl 104 76 0 74 1 0 1 1 0 8 0 lockfspl 48 32 0 30 1 0 1 1 0 8 0 sessionpl 144 31 0 22 1 0 1 1 0 8 0 pgrppl 48 41 0 24 1 0 1 1 0 8 0 ucredpl 104 512 0 499 1 0 1 1 0 8 0 zombiepl 144 616 0 613 1 0 1 1 0 8 0 processpl 1232 659 0 613 5 0 5 5 0 8 0 procpl 664 999 0 944 6 0 6 6 0 8 0 sockpl 752 468 0 437 10 0 10 10 0 8 6 mcl64k 65536 2 0 0 1 0 1 1 0 8 0 mcl16k 16384 3 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 118 0 0 15 0 15 15 0 8 0 mcl2k 2048 26 0 0 4 0 4 4 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 193 0 0 13 0 13 13 0 8 0 bufpl 280 2692 0 105 185 0 185 185 0 8 0 anonpl 32 8403 0 0 68 0 68 68 0 246 0 amapchunkpl 152 14824 0 14395 27 0 27 27 0 158 7 amappl16 200 2498 0 2478 15 5 10 14 0 8 8 amappl15 192 11 0 11 1 1 0 1 0 8 0 amappl14 184 437 0 435 1 0 1 1 0 8 0 amappl13 176 152 0 138 1 0 1 1 0 8 0 amappl12 168 898 0 870 2 0 2 2 0 8 0 amappl11 160 23 0 23 1 1 0 1 0 8 0 amappl10 152 72 0 58 1 0 1 1 0 8 0 amappl9 144 293 0 293 1 1 0 1 0 8 0 amappl8 136 120 0 118 1 0 1 1 0 8 0 amappl7 128 154 0 140 1 0 1 1 0 8 0 amappl6 120 171 0 168 1 0 1 1 0 8 0 amappl5 112 104 0 93 1 0 1 1 0 8 0 amappl4 104 302 0 281 1 0 1 1 0 8 0 amappl3 96 2805 0 2703 4 0 4 4 0 8 0 amappl2 88 556 0 492 2 0 2 2 0 8 0 amappl1 80 11201 0 10583 22 1 21 21 0 8 3 amappl 88 4080 0 3933 5 0 5 5 0 92 0 uvmvnodes 80 101 0 0 3 0 3 3 0 8 0 dma32768 32768 1 0 1 1 0 1 1 0 8 1 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 7 0 7 2 1 1 1 0 8 1 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 0 1 0 1 1 0 8 0 uaddrrnd 24 643 0 614 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 643 0 614 1 0 1 1 0 8 0 vmmpekpl 168 7157 0 7118 3 0 3 3 0 8 0 vmmpepl 168 49945 0 48145 120 0 120 120 0 357 32 vmsppl 488 642 0 613 5 0 5 5 0 8 0 rwobjpl 80 17307 0 16258 35 2 33 35 0 8 8 pdppl 4096 1293 0 1226 101 28 73 85 0 8 6 pvpl 32 18277 0 0 148 0 148 148 0 265 0 pmappl 256 642 0 613 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 278 0 31 8 0 8 8 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:438 panic(ffffffff834331ec) at panic+0x1e5 sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd8069766278,204d,fffffd80097fd680,ffff80003c3c5e20) at ffs_inode_alloc+0x94e ufs_makeinode(204d,fffffd8067c9b0e8,ffff80003c3c6038,ffff80003c3c6068) at ufs_makeinode+0xcd sys/ufs/ufs/ufs_vnops.c:1732 ufs_mknod(ffff80003c3c5ee0) at ufs_mknod+0x5b sys/ufs/ufs/ufs_vnops.c:167 VOP_MKNOD(fffffd8067c9b0e8,ffff80003c3c6038,ffff80003c3c6068,ffff80003c3c5f68) at VOP_MKNOD+0x101 sys/kern/vfs_vops.c:121 domknodat(ffff80002a24e548,ffffff9c,200000000040,205f,2a02) at domknodat+0x469 sys/kern/vfs_syscalls.c:1659 syscall(ffff80003c3c6200) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c3c6200) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2f4f63a5750, count: -9 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffff8000299adff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff83a93ac0) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:142 [inline] __mp_lock(ffffffff83a93ac0) at __mp_lock+0x192 sys/kern/kern_lock.c:173 exit1(ffff80002a24f240,1,0,1) at exit1+0x701 sys/kern/kern_exit.c:260 sys_exit(ffff80002a24f240,ffff80002a372790,ffff80002a3726e0) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80002a372790) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a372790) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x728e89962cd0, count: 7 ddb{1}> trace x86_ipi_db(ffff8000299adff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff83a93ac0) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:142 [inline] __mp_lock(ffffffff83a93ac0) at __mp_lock+0x192 sys/kern/kern_lock.c:173 exit1(ffff80002a24f240,1,0,1) at exit1+0x701 sys/kern/kern_exit.c:260 sys_exit(ffff80002a24f240,ffff80002a372790,ffff80002a3726e0) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80002a372790) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a372790) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x728e89962cd0, count: -8