mpanic: ffs_valloc: dup alloc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *326750 29059 0 0x2 0 1K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830e5d17) at panic+0x1e5 sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806bab4aa0,41ed,fffffd807f7d33a8,ffff80002a0ba0a8) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff80002a0ba110) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd805aadf7b8,ffff80002a0ba270,ffff80002a0ba2a0,ffff80002a0ba1a0) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff8000ffffca30,ffffff9c,74975d5c66c0,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3100 syscall(ffff80002a0ba420) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] syscall(ffff80002a0ba420) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x74975d5c6750, 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic *cpu1: ffs_valloc: dup alloc ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830e5d17) at panic+0x1e5 sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806bab4aa0,41ed,fffffd807f7d33a8,ffff80002a0ba0a8) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff80002a0ba110) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd805aadf7b8,ffff80002a0ba270,ffff80002a0ba2a0,ffff80002a0ba1a0) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff8000ffffca30,ffffff9c,74975d5c66c0,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3100 syscall(ffff80002a0ba420) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] syscall(ffff80002a0ba420) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x74975d5c6750, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80002a0b9e30 rbx 0xffff800029b7cd87 rdx 0 rcx 0xffff8000ffffca30 rax 0xffff800029b7bff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x139dc941feb534cb r11 0x195c97e4927e64ad r12 0xffff800029b7cb88 r13 0 r14 0 r15 0x1 rip 0xffffffff814ed725 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a0b9e20 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=326750 pid=29059 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=0xffff80002a05aa40,0xffff80002a05a2b8 process=0xffff8000ffff1fd8 user=0xffff80002a0b5000, vmspace=0xfffffd80694d88a8 estcpu=36, cpticks=0, pctcpu=0.99, user=0, sys=109, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 67077 439238 37771 0 3 0x80 fsleep syz-executor 67077 102618 37771 0 3 0x4000080 piperd syz-executor 67077 277483 37771 0 3 0x4000080 fsleep syz-executor 48944 17305 19933 0 3 0x80 fsleep syz-executor 48944 473113 19933 0 3 0x4000080 sbwait syz-executor 26406 23153 24682 0 3 0x80 fsleep syz-executor 26406 42033 24682 0 3 0x4000080 sbwait syz-executor 24682 256528 5772 0 3 0x82 nanoslp syz-executor 19933 129411 5772 0 3 0x82 nanoslp syz-executor *29059 326750 5772 0 7 0x2 syz-executor 37771 246097 5772 0 3 0x82 nanoslp syz-executor 18021 184475 1 0 3 0x100083 ttyin getty 99238 472565 0 0 3 0x14200 bored sosplice 34910 450157 0 0 3 0x14280 nfsidl nfsio 39208 40188 0 0 3 0x14280 nfsidl nfsio 79590 358403 0 0 3 0x14280 nfsidl nfsio 79674 478264 0 0 3 0x14280 nfsidl nfsio 99980 339402 0 0 3 0x14280 nfsidl nfsio 86051 116135 0 0 3 0x14280 nfsidl nfsio 1031 338189 0 0 3 0x14280 nfsidl nfsio 54268 32029 0 0 3 0x14280 nfsidl nfsio 47569 447665 0 0 3 0x14280 nfsidl nfsio 59900 500468 0 0 3 0x14280 nfsidl nfsio 30011 111947 0 0 3 0x14280 nfsidl nfsio 89007 228263 0 0 3 0x14280 nfsidl nfsio 36992 328047 0 0 3 0x14280 nfsidl nfsio 11979 329183 0 0 3 0x14280 nfsidl nfsio 84129 43706 0 0 3 0x14280 nfsidl nfsio 18283 399205 0 0 3 0x14280 nfsidl nfsio 2433 321724 0 0 3 0x14280 nfsidl nfsio 54392 488258 0 0 3 0x14280 nfsidl nfsio 43969 522906 0 0 3 0x14280 nfsidl nfsio 1502 179351 0 0 3 0x14280 nfsidl nfsio 5772 192996 61143 0 3 0x82 wait syz-executor 61143 491734 60737 0 3 0x10008a sigsusp ksh 60737 297381 68760 0 3 0x98 kqread sshd-session 68760 292474 29164 0 3 0x92 kqread sshd-session 29164 172456 1 0 3 0x88 kqread sshd 74477 275837 95936 74 3 0x1100092 bpf pflogd 95936 212427 1 0 3 0x80 sbwait pflogd 90782 223539 10185 73 3 0x1100090 kqread syslogd 10185 19973 1 0 3 0x100082 sbwait syslogd 18004 325814 1 0 3 0x100080 kqread resolvd 50208 156813 66480 77 3 0x100092 kqread dhcpleased 29019 193591 66480 77 3 0x100092 kqread dhcpleased 66480 163736 1 0 3 0x80 kqread dhcpleased 60306 229409 0 0 3 0x14200 bored smr 81649 349840 0 0 3 0x14200 pgzero zerothread 6956 359824 0 0 3 0x14200 aiodoned aiodoned 38227 409594 0 0 3 0x14200 syncer update 24760 97462 0 0 3 0x14200 cleaner cleaner 99569 188725 0 0 3 0x14200 reaper reaper 14643 305791 0 0 3 0x14200 pgdaemon pagedaemon 63087 40775 0 0 3 0x14200 bored viomb 94933 397658 0 0 3 0x40014200 acpi0 acpi0 21152 322696 0 0 3 0x40014200 idle1 86739 442349 0 0 3 0x14200 bored softnet3 23628 160872 0 0 3 0x14200 bored softnet2 60528 276308 0 0 3 0x14200 bored softnet1 68177 433370 0 0 3 0x14200 bored softnet0 40353 418154 0 0 3 0x14200 bored systqmp 80789 10496 0 0 3 0x14200 bored systq 83299 371684 0 0 3 0x14200 tmoslp softclockmp 54316 58278 0 0 3 0x40014200 tmoslp softclock 31120 299055 0 0 7 0x40014200 idle0 1 362840 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 29059 (syz-executor) thread 0xffff8000ffffca30 (326750) ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10213 10359K 14324K 166960K 12654 0 pcb 17 15K 17K 166960K 406 0 rtable 229 18K 19K 166960K 2687 0 pf 41 19K 27K 166960K 283 0 ifaddr 42 8K 8K 166960K 361 0 ifgroup 59 2K 2K 166960K 407 0 sysctl 4 1K 2K 166960K 9 0 counters 66 36K 37K 166960K 240 0 ioctlops 0 0K 4K 166960K 1829 0 iov 1 12K 20K 166960K 184 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1501 94K 95K 166960K 3472 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 13K 166960K 26 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 53 0 dirhash 15 2K 3K 166960K 39 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 13 45K 89K 166960K 2398 0 sigio 0 0K 0K 166960K 25 0 proc 70 91K 116K 166960K 2665 0 subproc 104 6K 7K 166960K 1053 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 146 0 in_multi 95 7K 7K 166960K 921 0 ether_multi 1 0K 0K 166960K 2 0 mrt 0 0K 0K 166960K 4 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 103 466K 466K 166960K 103 0 exec 0 0K 1K 166960K 1426 0 pfkey data 0 0K 0K 166960K 2 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 209 124K 144K 166960K 19453 0 UVM aobj 36 2K 2K 166960K 38 0 pinsyscall 38 76K 105K 166960K 5369 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 1K 166960K 77 0 NDP 13 0K 2K 166960K 263 0 temp 75 6824K 6904K 166960K 103071 0 kqueue 13 20K 32K 166960K 229 0 SYN cache 2 16K 16K 166960K 2 0 ddb{1}> 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 323 0 320 3 2 1 2 0 8 0 rtentry 112 945 0 848 4 1 3 4 0 8 0 unpcb 144 1636 0 1615 29 26 3 6 0 8 2 syncache 336 8 0 8 5 5 0 1 0 8 0 tcpqe 32 4 0 4 3 3 0 1 0 8 0 tcpcb 808 553 0 548 23 22 1 8 0 8 0 arp 120 167 0 151 1 0 1 1 0 8 0 inpcb 336 1947 0 1939 37 35 2 7 0 8 0 nd6 136 261 0 233 1 0 1 1 0 8 0 pkpcb 40 6 0 6 4 4 0 1 0 8 0 kcovpl 48 81 0 73 1 0 1 1 0 8 0 ppxss 1168 7 0 7 5 5 0 1 0 8 0 pfstscr 40 6 0 5 1 0 1 1 0 8 0 pffrag 232 7 0 4 2 1 1 1 0 482 0 pffrnode 88 7 0 4 2 1 1 1 0 8 0 pffrent 40 9 0 6 2 1 1 1 0 8 0 pfosfp 40 1429 0 1005 5 0 5 5 0 8 0 pfosfpen 112 1429 0 714 21 0 21 21 0 8 0 pfrktable 1344 17 0 10 1 0 1 1 0 8 0 pfanchor 1288 2 0 0 1 0 1 1 0 8 0 pftag 88 2 0 0 1 0 1 1 0 8 0 pfqueue 264 2 0 2 2 2 0 1 0 8 0 pfstitem 24 50 0 44 1 0 1 1 0 8 0 pfstkey 128 60 0 51 2 0 2 2 0 8 0 pfstate 376 52 0 48 4 2 2 4 0 8 0 pfrule 1344 69 0 48 2 0 2 2 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 3767 0 3342 34 7 27 29 0 8 0 art_table 32 3769 0 3342 4 0 4 4 0 8 0 art_node 16 943 0 857 1 0 1 1 0 8 0 sysvmsgpl 40 9 0 7 3 2 1 1 0 8 0 semapl 112 51 0 41 1 0 1 1 0 8 0 shmpl 112 35 0 2 1 0 1 1 0 8 0 dirhash 1024 35 0 16 3 0 3 3 0 8 0 dino2pl 256 3877 0 2223 104 0 104 104 0 8 0 ffsino 272 3878 0 2224 111 0 111 111 0 8 0 nchpl 144 5863 0 5211 65 40 25 65 0 8 0 uvmvnodes 80 5651 0 0 116 0 116 116 0 8 0 vnodes 216 5651 0 0 314 0 314 314 0 8 0 namei 1024 26264 0 26263 10 9 1 2 0 8 0 percpumem 16 134 0 87 1 0 1 1 0 8 0 vcpupl 3904 5 0 0 1 0 1 1 0 8 0 vmpool 696 7 0 2 2 1 1 1 0 8 0 pfiaddrpl 120 3 0 0 1 0 1 1 0 8 0 kstatmem 264 200 0 174 4 2 2 3 0 8 0 scsiplug 72 1 0 1 1 1 0 1 0 8 0 scxspl 216 54859 0 54859 18 17 1 8 1 8 1 plimitpl 152 399 0 382 1 0 1 1 0 8 0 sigapl 424 2574 0 2508 10 1 9 9 0 8 0 futexpl 64 23043 0 23039 9 8 1 1 0 8 0 knotepl 120 703 0 0 18 0 18 18 0 8 0 kqueuepl 216 634 0 625 11 10 1 5 0 8 0 pipepl 320 486 0 458 8 5 3 8 0 8 0 fdescpl 496 2533 0 2506 9 4 5 5 0 8 0 filepl 152 13422 0 13181 47 34 13 20 0 8 2 lockfpl 104 548 0 546 2 1 1 2 0 8 0 lockfspl 48 250 0 248 1 0 1 1 0 8 0 sessionpl 144 96 0 87 1 0 1 1 0 8 0 pgrppl 48 186 0 169 1 0 1 1 0 8 0 ucredpl 104 1729 0 1715 1 0 1 1 0 8 0 zombiepl 144 2512 0 2508 2 1 1 1 0 8 0 processpl 1160 2574 0 2508 7 1 6 6 0 8 0 procpl 648 4501 0 4431 9 1 8 8 0 8 0 srpgc 96 8 0 8 4 4 0 1 0 8 0 sosppl 168 3 0 3 3 3 0 1 0 8 0 sockpl 664 3928 0 3896 70 62 8 18 0 8 4 mcl64k 65536 4 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 1 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 9 0 0 2 0 2 2 0 8 0 mcl4k 4096 6 0 0 1 0 1 1 0 8 0 mcl2k 2048 274 0 0 32 2 30 32 0 8 0 mtagpl 96 7 0 0 1 0 1 1 0 8 0 mbufpl 256 528 0 0 24 0 24 24 0 8 0 bufpl 280 11252 0 3407 561 0 561 561 0 8 0 anonpl 24 379529 0 376283 78 31 47 59 0 185 7 amapchunkpl 152 61603 0 61216 55 29 26 33 0 158 5 amappl16 200 6781 0 6760 76 65 11 15 0 8 8 amappl15 192 9 0 9 1 1 0 1 0 8 0 amappl14 184 268 0 256 1 0 1 1 0 8 0 amappl13 176 4 0 4 1 1 0 1 0 8 0 amappl12 168 4360 0 4333 4 2 2 3 0 8 0 amappl11 160 79 0 65 1 0 1 1 0 8 0 amappl10 152 16 0 16 3 3 0 1 0 8 0 amappl9 144 176 0 175 2 1 1 1 0 8 0 amappl8 136 50 0 48 1 0 1 1 0 8 0 amappl7 128 263 0 251 1 0 1 1 0 8 0 amappl6 120 893 0 892 1 0 1 1 0 8 0 amappl5 112 428 0 416 1 0 1 1 0 8 0 amappl4 104 536 0 516 1 0 1 1 0 8 0 amappl3 96 11940 0 11845 5 1 4 4 0 8 0 amappl2 88 1647 0 1582 2 0 2 2 0 8 0 amappl1 80 18942 0 18375 17 4 13 15 0 8 0 amappl 88 18462 0 18320 6 1 5 5 0 92 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 2 0 1 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 37 0 2 1 0 1 1 0 8 0 uaddrrnd 24 2540 0 2508 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2540 0 2508 1 0 1 1 0 8 0 vmmpekpl 168 21745 0 21698 3 0 3 3 0 8 0 vmmpepl 168 158773 0 157097 143 48 95 97 0 357 11 vmsppl 440 2539 0 2508 7 2 5 5 0 8 0 rwobjpl 56 50489 0 43897 101 5 96 96 0 8 2 pdppl 4096 5087 0 5021 216 140 76 83 0 8 10 pvpl 32 29620 0 0 237 0 237 237 0 265 0 pmappl 248 2539 0 2508 3 0 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 614 0 227 12 0 12 12 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffffffff83449ff0) 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 __mp_lock(ffffffff835dd500) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:113 [inline] __mp_lock(ffffffff835dd500) at __mp_lock+0x192 sys/kern/kern_lock.c:144 intr_handler(ffff800029f95bd0,ffff800000069c00) at intr_handler+0xe1 sys/arch/amd64/amd64/intr.c:553 Xintr_ioapic_edge16_untramp() at Xintr_ioapic_edge16_untramp+0x18f acpicpu_idle() at acpicpu_idle+0x41e sys/dev/acpi/acpicpu.c:1219 sched_idle(ffffffff83449ff0) at sched_idle+0x558 sys/kern/kern_sched.c:182 end trace frame: 0x0, count: 7 ddb{0}> trace x86_ipi_db(ffffffff83449ff0) 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 __mp_lock(ffffffff835dd500) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:113 [inline] __mp_lock(ffffffff835dd500) at __mp_lock+0x192 sys/kern/kern_lock.c:144 intr_handler(ffff800029f95bd0,ffff800000069c00) at intr_handler+0xe1 sys/arch/amd64/amd64/intr.c:553 Xintr_ioapic_edge16_untramp() at Xintr_ioapic_edge16_untramp+0x18f acpicpu_idle() at acpicpu_idle+0x41e sys/dev/acpi/acpicpu.c:1219 sched_idle(ffffffff83449ff0) at sched_idle+0x558 sys/kern/kern_sched.c:182 end trace frame: 0x0, count: -8 ddb{0}> machine ddbcpu 1 Stopped at db_enter+0x25: addq $0x8,%rsp db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830e5d17) at panic+0x1e5 sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806bab4aa0,41ed,fffffd807f7d33a8,ffff80002a0ba0a8) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff80002a0ba110) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd805aadf7b8,ffff80002a0ba270,ffff80002a0ba2a0,ffff80002a0ba1a0) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff8000ffffca30,ffffff9c,74975d5c66c0,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3100 syscall(ffff80002a0ba420) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] syscall(ffff80002a0ba420) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x74975d5c6750, count: 7 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830e5d17) at panic+0x1e5 sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806bab4aa0,41ed,fffffd807f7d33a8,ffff80002a0ba0a8) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff80002a0ba110) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd805aadf7b8,ffff80002a0ba270,ffff80002a0ba2a0,ffff80002a0ba1a0) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff8000ffffca30,ffffff9c,74975d5c66c0,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3100 syscall(ffff80002a0ba420) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] syscall(ffff80002a0ba420) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x74975d5c6750, count: -8