panic: ffs_valloc: dup alloc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *447491 77791 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8346a6ca) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd006ca38c00,4000,fffffd0007ffd9c0,ffff800035cc2f48) at ffs_inode_alloc+0x94e ufs_mkdir(ffff800035cc2fb0) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd006cb66210,ffff800035cc3110,ffff800035cc3140,ffff800035cc3040) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a77c2b0,ffffff9c,200000000040,0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3062 syscall(ffff800035cc32b0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff800035cc32b0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5a70fdfe6f0, 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic *cpu0: ffs_valloc: dup alloc ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8346a6ca) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd006ca38c00,4000,fffffd0007ffd9c0,ffff800035cc2f48) at ffs_inode_alloc+0x94e ufs_mkdir(ffff800035cc2fb0) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd006cb66210,ffff800035cc3110,ffff800035cc3140,ffff800035cc3040) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a77c2b0,ffffff9c,200000000040,0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3062 syscall(ffff800035cc32b0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff800035cc32b0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5a70fdfe6f0, count: -8 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800035cc2cd0 rbx 0x6655 __ALIGN_SIZE+0x5655 rdx 0xffff8000015e7c40 rcx 0 rax 0xffff80002a77c2b0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xdc3ed199bb9ba0aa r11 0x70687a114b92efc9 r12 0 r13 0xfffffd006cbe1400 r14 0 r15 0x1 rip 0xffffffff82bedc35 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800035cc2cc0 ss 0 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=447491 pid=77791 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=17, usrpri=53, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a77d240,0xffff80002a77c028 process=0xffff800045ffb198 user=0xffff800035cbe000, vmspace=0xfffffd006cb55188 estcpu=3, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 57908 252770 5603 0 2 0 syz-executor 57908 365634 5603 0 3 0x4000080 fsleep syz-executor 41564 396127 79108 0 2 0 syz-executor 41564 43024 79108 0 3 0x4000080 fsleep syz-executor 28243 373543 64263 -1 2 0x10 syz-executor 28243 109581 64263 -1 3 0x4000090 sbwait syz-executor 28243 284174 64263 -1 3 0x4000090 kqread syz-executor 28243 393838 64263 -1 2 0x4000010 syz-executor 76177 383663 37350 0 3 0x80 nanoslp syz-executor 76177 328217 37350 0 3 0x4000080 kqsel syz-executor 76177 257610 37350 0 3 0x4000080 fsleep syz-executor 77791 437086 46752 0 2 0 syz-executor *77791 447491 46752 0 7 0x4000000 syz-executor 46752 120281 72113 0 3 0x82 nanoslp syz-executor 79108 76942 72113 0 3 0x82 nanoslp syz-executor 12016 51908 72113 0 2 0x2 syz-executor 5603 316465 72113 0 3 0x82 nanoslp syz-executor 37350 500363 72113 0 3 0x82 nanoslp syz-executor 64263 400642 72113 0 3 0x82 nanoslp syz-executor 72113 12115 30720 0 3 0x82 wait syz-executor 30720 402694 95906 0 3 0x10008a sigsusp ksh 95906 2528 80232 0 3 0x98 kqread sshd-session 80232 349529 95241 0 3 0x92 kqread sshd-session 51 15546 1 0 3 0x100083 ttyin getty 95241 150539 1 0 3 0x88 kqread sshd 89198 6716 42798 73 3 0x1100090 kqread syslogd 42798 203819 1 0 3 0x100082 sbwait syslogd 32276 95789 1 0 3 0x100080 kqread resolvd 66551 209859 2295 77 3 0x100092 kqread dhcpleased 43991 137585 2295 77 3 0x100092 kqread dhcpleased 2295 125158 1 0 3 0x80 kqread dhcpleased 38256 392452 0 0 3 0x14200 bored smr 51530 113557 0 0 2 0x14200 zerothread 87381 394515 0 0 3 0x14200 aiodoned aiodoned 43704 174087 0 0 3 0x14200 syncer update 14982 61629 0 0 3 0x14200 cleaner cleaner 43346 467654 0 0 3 0x14200 reaper reaper 52008 274198 0 0 3 0x14200 pgdaemon pagedaemon 32536 98267 0 0 3 0x14200 bored viomb 65418 3841 0 0 3 0x40014200 acpi0 acpi0 54335 343075 0 0 3 0x14200 bored softnet0 19320 397842 0 0 3 0x14200 bored systqmp 91016 389681 0 0 3 0x14200 bored systq 27267 280199 0 0 3 0x40014200 tmoslp softclock 53788 236782 0 0 3 0x40014200 idle0 1 24758 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11027 12099K 12232K 166960K 12133 0 pcb 19 12K 12K 166960K 23 0 rtable 237 6K 6K 166960K 353 0 pf 32 13K 13K 166960K 33 0 ifaddr 42 7K 7K 166960K 44 0 ifgroup 50 2K 2K 166960K 50 0 sysctl 1 1K 9K 166960K 6 0 counters 33 17K 17K 166960K 33 0 ioctlops 0 0K 4K 166960K 38 0 iov 0 0K 2K 166960K 1 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1293 81K 81K 166960K 1374 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 1K 166960K 2 0 VM map 2 1K 1K 166960K 2 0 sem 2 0K 0K 166960K 2 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 15 53K 97K 166960K 157 0 sigio 0 0K 0K 166960K 1 0 proc 59 59K 124K 166960K 501 0 subproc 72 4K 4K 166960K 72 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 2 0 in_multi 99 7K 7K 166960K 101 0 ether_multi 1 0K 0K 166960K 2 0 mrt 0 0K 0K 166960K 2 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 37 175K 175K 166960K 37 0 exec 0 0K 1K 166960K 365 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 196 150K 159K 166960K 3097 0 UVM aobj 3 2K 2K 166960K 3 0 pinsyscall 36 72K 96K 166960K 1257 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 NDP 27 2K 2K 166960K 27 0 temp 36 9106K 9110K 166960K 7085 0 kqueue 14 22K 22K 166960K 27 0 SYN cache 2 16K 16K 166960K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 36 0 33 1 0 1 1 0 8 0 rtentry 136 111 0 1 4 0 4 4 0 8 0 unpcb 144 146 0 125 3 0 3 3 0 8 1 syncache 336 4 0 4 1 0 1 1 0 8 1 tcpcb 736 13 0 9 1 0 1 1 0 8 0 arp 96 18 0 0 1 0 1 1 0 8 0 inpcb 328 74 0 65 2 0 2 2 0 8 1 nd6 112 24 0 0 1 0 1 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 pfstscr 40 6 0 2 1 0 1 1 0 8 0 pfstitem 24 4 0 0 1 0 1 1 0 8 0 pfstkey 128 6 0 2 1 0 1 1 0 8 0 pfstate 384 3 0 1 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 453 0 0 29 0 29 29 0 8 0 art_table 40 454 0 0 5 0 5 5 0 8 0 art_node 32 111 0 11 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1596 0 136 92 0 92 92 0 8 0 ffsino 256 1596 0 136 92 0 92 92 0 8 0 nchpl 144 1818 0 127 63 0 63 63 0 8 0 vnodes 216 1690 0 0 94 0 94 94 0 8 0 namei 1024 5562 0 5560 2 0 2 2 0 8 1 kstatmem 264 23 0 0 2 0 2 2 0 8 0 scxspl 216 6163 0 6163 4 0 4 4 1 8 4 plimitpl 152 30 0 14 1 0 1 1 0 8 0 sigapl 424 452 0 412 6 0 6 6 0 8 1 knotepl 120 3293 0 3245 2 0 2 2 0 8 0 kqueuepl 184 27 0 15 1 0 1 1 0 8 0 pipepl 304 123 0 96 3 0 3 3 0 8 0 fdescpl 448 439 0 412 5 0 5 5 0 8 1 filepl 120 1666 0 1448 8 0 8 8 0 8 0 lockfpl 104 8 0 6 1 0 1 1 0 8 0 lockfspl 48 5 0 3 1 0 1 1 0 8 0 sessionpl 144 25 0 16 1 0 1 1 0 8 0 pgrppl 48 33 0 16 1 0 1 1 0 8 0 ucredpl 104 91 0 79 1 0 1 1 0 8 0 zombiepl 144 414 0 412 1 0 1 1 0 8 0 processpl 1152 452 0 412 4 0 4 4 0 8 0 procpl 664 486 0 438 5 0 5 5 0 8 0 sockpl 552 259 0 226 5 0 5 5 0 8 2 mcl8k 8192 4 0 4 1 0 1 1 0 8 1 mcl4k 4096 2536 0 2487 14 0 14 14 0 8 7 mcl2k 2048 128 0 128 1 0 1 1 0 8 1 mtagpl 96 4 0 4 1 0 1 1 0 8 1 mbufpl 256 4331 0 4220 9 0 9 9 0 8 0 bufpl 272 2309 0 103 148 0 148 148 0 8 0 anonpl 24 90286 0 87322 44 0 44 44 0 187 21 amapchunkpl 152 8383 0 7989 19 0 19 19 0 158 0 amappl16 200 1678 0 1661 14 0 14 14 0 8 12 amappl15 192 3 0 3 1 0 1 1 0 8 1 amappl14 184 411 0 409 1 0 1 1 0 8 0 amappl13 176 116 0 106 1 0 1 1 0 8 0 amappl12 168 676 0 650 2 0 2 2 0 8 0 amappl11 160 7 0 7 1 0 1 1 0 8 1 amappl10 152 60 0 50 1 0 1 1 0 8 0 amappl9 144 274 0 274 1 0 1 1 0 8 1 amappl8 136 93 0 92 1 0 1 1 0 8 0 amappl7 128 142 0 131 1 0 1 1 0 8 0 amappl6 120 148 0 147 1 0 1 1 0 8 0 amappl5 112 89 0 82 1 0 1 1 0 8 0 amappl4 104 263 0 248 1 0 1 1 0 8 0 amappl3 96 1519 0 1425 3 0 3 3 0 8 0 amappl2 88 517 0 463 2 0 2 2 0 8 0 amappl1 80 10152 0 9619 13 0 13 13 0 8 1 amappl 88 2407 0 2273 4 0 4 4 0 92 0 uvmvnodes 80 97 0 0 2 0 2 2 0 8 0 dma4096 4096 1 0 1 1 0 1 1 0 8 1 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 0 1 1 0 8 1 dma128 128 253 0 253 1 0 1 1 0 8 1 dma64 64 6 0 6 1 0 1 1 0 8 1 dma32 32 7 0 7 1 0 1 1 0 8 1 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 439 0 412 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 439 0 412 1 0 1 1 0 8 0 vmmpekpl 168 5503 0 5476 2 0 2 2 0 8 0 vmmpepl 168 37303 0 35666 89 0 89 89 0 357 8 vmsppl 368 438 0 412 4 0 4 4 0 8 1 rwobjpl 40 14111 0 13212 12 0 12 12 0 8 0 pdppl 4096 884 0 824 96 14 82 82 0 8 22 pvpl 32 214784 0 206587 104 0 104 104 0 265 33 pmappl 216 438 0 412 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 502 0 14 14 0 14 14 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8346a6ca) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd006ca38c00,4000,fffffd0007ffd9c0,ffff800035cc2f48) at ffs_inode_alloc+0x94e ufs_mkdir(ffff800035cc2fb0) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd006cb66210,ffff800035cc3110,ffff800035cc3140,ffff800035cc3040) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a77c2b0,ffffff9c,200000000040,0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3062 syscall(ffff800035cc32b0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff800035cc32b0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5a70fdfe6f0, count: -8 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8346a6ca) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd006ca38c00,4000,fffffd0007ffd9c0,ffff800035cc2f48) at ffs_inode_alloc+0x94e ufs_mkdir(ffff800035cc2fb0) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd006cb66210,ffff800035cc3110,ffff800035cc3140,ffff800035cc3040) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a77c2b0,ffffff9c,200000000040,0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3062 syscall(ffff800035cc32b0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff800035cc32b0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5a70fdfe6f0, count: -8