panic: ffs_valloc: dup alloc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *243262 42841 0 0x2 0 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830b1ca1) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806e7b82e0,41ed,fffffd807f7d7750,ffff80003760cd58) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff80003760cdc0) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd806c6bb020,ffff80003760cf20,ffff80003760cf50,ffff80003760ce50) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff80003761af50,ffffff9c,73e7f503c370,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3099 syscall(ffff80003760d0d0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x73e7f503c400, 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:437 panic(ffffffff830b1ca1) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806e7b82e0,41ed,fffffd807f7d7750,ffff80003760cd58) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff80003760cdc0) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd806c6bb020,ffff80003760cf20,ffff80003760cf50,ffff80003760ce50) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff80003761af50,ffffff9c,73e7f503c370,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3099 syscall(ffff80003760d0d0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x73e7f503c400, count: -8 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003760caf0 rbx 0xfffffd805e838d00 rdx 0 rcx 0 rax 0xffff80003761af50 r8 0 r9 0x8080808080808080 r10 0x8966689a24429e12 r11 0x64bac02ba3955a63 r12 0 r13 0xfffffd806c4d2690 r14 0 r15 0x1 rip 0xffffffff810b2dc5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003760cae0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=243262 pid=42841 tcnt=1 stat=onproc flags process=2 proc=0 runpri=50, usrpri=50, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80003761a7b8,0xffff80003761acd8 process=0xffff80002a492ae0 user=0xffff800037608000, vmspace=0xfffffd8077122970 estcpu=36, cpticks=0, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 7124 334766 55509 0 2 0x480 syz-executor 7124 256758 55509 0 3 0x4000080 fsleep syz-executor 7124 80646 55509 0 3 0x4000080 ttyout syz-executor 7124 431039 55509 0 3 0x4000080 fsleep syz-executor *42841 243262 17111 0 7 0x2 syz-executor 55509 155596 17111 0 2 0x482 syz-executor 90816 504929 0 0 3 0x14200 bored sosplice 17111 98980 68141 0 3 0x82 wait syz-executor 68141 368208 21088 0 3 0x10008a sigsusp ksh 21088 455503 36635 0 3 0x98 kqread sshd-session 36635 435128 60917 0 3 0x92 kqread sshd-session 91880 509210 1 0 3 0x100083 ttyin getty 60917 493301 1 0 3 0x88 kqread sshd 47817 328924 28161 73 3 0x1100090 kqread syslogd 28161 385466 1 0 3 0x100082 sbwait syslogd 60932 45151 1 0 3 0x100080 kqread resolvd 2219 162501 69356 77 3 0x100092 kqread dhcpleased 15345 66628 69356 77 3 0x100092 kqread dhcpleased 69356 421104 1 0 3 0x80 kqread dhcpleased 28640 424846 0 0 2 0x14200 smr 29077 329525 0 0 3 0x14200 pgzero zerothread 94209 510756 0 0 3 0x14200 aiodoned aiodoned 41308 224040 0 0 3 0x14200 syncer update 46254 391124 0 0 3 0x14200 cleaner cleaner 44623 206872 0 0 3 0x14200 reaper reaper 51885 5411 0 0 3 0x14200 pgdaemon pagedaemon 75179 330482 0 0 3 0x14200 bored viomb 86541 8835 0 0 3 0x40014200 acpi0 acpi0 58953 328970 0 0 3 0x14200 bored softnet3 9415 299484 0 0 3 0x14200 bored softnet2 4360 517324 0 0 3 0x14200 bored softnet1 55104 522930 0 0 3 0x14200 bored softnet0 70068 11609 0 0 3 0x14200 bored systqmp 5982 285021 0 0 3 0x14200 bored systq 27224 351509 0 0 3 0x40014200 tmoslp softclock 80039 496841 0 0 3 0x40014200 idle0 1 427114 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 10186 10029K 10156K 166960K 11422 0 pcb 17 12K 12K 166960K 45 0 rtable 218 7K 7K 166960K 954 0 pf 34 13K 14K 166960K 70 0 ifaddr 42 7K 7K 166960K 113 0 ifgroup 54 2K 2K 166960K 124 0 sysctl 2 0K 0K 166960K 2 0 counters 31 17K 17K 166960K 49 0 ioctlops 0 0K 2K 166960K 60 0 iov 0 0K 12K 166960K 9 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1365 86K 86K 166960K 1679 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 68K 76K 166960K 12 0 VM map 2 1K 1K 166960K 2 0 sem 9 0K 0K 166960K 10 0 dirhash 12 2K 2K 166960K 15 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 11 37K 97K 166960K 574 0 sigio 0 0K 0K 166960K 6 0 proc 58 59K 116K 166960K 953 0 subproc 104 6K 6K 166960K 312 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 38 0 in_multi 96 7K 7K 166960K 288 0 ether_multi 1 0K 0K 166960K 2 0 mrt 1 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 67 307K 307K 166960K 67 0 exec 0 0K 1K 166960K 572 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 171 70K 90K 166960K 5889 0 UVM aobj 10 2K 4K 166960K 13 0 pinsyscall 32 64K 96K 166960K 2013 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 14 0 NDP 18 0K 2K 166960K 78 0 temp 74 6816K 6882K 166960K 11206 0 kqueue 14 22K 31K 166960K 77 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 87 0 84 1 0 1 1 0 8 0 rtentry 112 338 0 239 5 1 4 4 0 8 1 unpcb 144 208 0 193 3 0 3 3 0 8 2 syncache 336 4 0 4 1 1 0 1 0 8 0 tcpcb 808 141 0 137 7 1 6 6 0 8 5 arp 88 67 0 49 1 0 1 1 0 8 0 ipq 40 3 0 0 1 0 1 1 0 8 0 ipqe 40 5 0 1 1 0 1 1 0 8 0 inpcb 336 418 0 411 2 0 2 2 0 8 1 nd6 104 74 0 50 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 0 1 1 0 8 1 kcovpl 48 24 0 16 1 0 1 1 0 8 0 ppxss 1072 1 0 1 1 0 1 1 0 8 1 pfstscr 40 11 0 11 2 1 1 1 0 8 1 pfstkey 128 7 0 7 2 1 1 1 0 8 1 pfstate 344 6 0 6 2 1 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1193 0 779 32 5 27 29 0 8 1 art_table 32 1194 0 779 4 0 4 4 0 8 0 art_node 16 337 0 248 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 1 2 1 1 1 0 8 0 semapl 112 8 0 1 1 0 1 1 0 8 0 shmpl 112 10 0 3 2 1 1 1 0 8 0 dirhash 1024 19 0 2 3 0 3 3 0 8 0 dino2pl 256 1893 0 369 96 0 96 96 0 8 0 ffsino 240 1898 0 374 90 0 90 90 0 8 0 nchpl 144 2372 0 681 63 0 63 63 0 8 0 uvmvnodes 80 2270 0 0 47 0 47 47 0 8 0 vnodes 216 2270 0 0 127 0 127 127 0 8 0 namei 1024 8675 0 8674 3 2 1 2 0 8 0 kstatmem 264 60 0 36 2 0 2 2 0 8 0 scxspl 216 14008 0 14008 10 2 8 8 1 8 8 plimitpl 152 82 0 65 1 0 1 1 0 8 0 sigapl 424 823 0 783 7 1 6 7 0 8 1 futexpl 64 3406 0 3404 1 0 1 1 0 8 0 knotepl 120 10459 0 10410 23 13 10 15 0 8 8 kqueuepl 184 83 0 73 1 0 1 1 0 8 0 pipepl 288 167 0 140 3 0 3 3 0 8 0 fdescpl 432 806 0 783 5 1 4 5 0 8 0 filepl 120 3045 0 2814 11 1 10 10 0 8 2 lockfpl 104 60 0 58 1 0 1 1 0 8 0 lockfspl 48 27 0 25 1 0 1 1 0 8 0 sessionpl 144 37 0 29 1 0 1 1 0 8 0 pgrppl 48 61 0 45 1 0 1 1 0 8 0 ucredpl 104 313 0 302 1 0 1 1 0 8 0 zombiepl 144 886 0 880 2 1 1 1 0 8 0 processpl 1096 823 0 783 4 0 4 4 0 8 0 procpl 648 1166 0 1123 7 1 6 6 0 8 1 sosppl 168 3 0 3 1 0 1 1 0 8 1 sockpl 504 720 0 695 11 1 10 10 0 8 6 mcl64k 65536 11 0 11 2 1 1 1 0 8 1 mcl16k 16384 5 0 5 2 1 1 1 0 8 1 mcl12k 12288 3 0 3 2 1 1 1 0 8 1 mcl8k 8192 21 0 21 2 1 1 1 0 8 1 mcl4k 4096 8 0 8 2 1 1 1 0 8 1 mcl2k2 2112 1 0 1 1 0 1 1 0 8 1 mcl2k 2048 6037 0 5946 29 13 16 28 0 8 3 mtagpl 96 6 0 6 2 1 1 1 0 8 1 mbufpl 256 10397 0 10274 19 0 19 19 0 8 2 bufpl 280 5682 0 89 400 0 400 400 0 8 0 anonpl 24 210001 0 207198 77 28 49 50 0 187 25 amapchunkpl 152 19451 0 19134 44 13 31 32 0 158 11 amappl16 200 5121 0 5114 6 4 2 5 0 8 1 amappl15 192 14 0 14 1 1 0 1 0 8 0 amappl14 184 179 0 169 1 0 1 1 0 8 0 amappl13 176 11 0 11 2 1 1 1 0 8 1 amappl12 168 1684 0 1661 3 1 2 3 0 8 0 amappl11 160 53 0 43 1 0 1 1 0 8 0 amappl10 152 10 0 10 1 1 0 1 0 8 0 amappl9 144 205 0 205 1 1 0 1 0 8 0 amappl8 136 22 0 21 1 0 1 1 0 8 0 amappl7 128 129 0 118 1 0 1 1 0 8 0 amappl6 120 335 0 334 1 0 1 1 0 8 0 amappl5 112 190 0 182 1 0 1 1 0 8 0 amappl4 104 332 0 316 1 0 1 1 0 8 0 amappl3 96 3491 0 3430 3 0 3 3 0 8 0 amappl2 88 1056 0 991 2 0 2 2 0 8 0 amappl1 80 9784 0 9266 13 1 12 13 0 8 0 amappl 88 5424 0 5306 6 1 5 5 0 92 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 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 12 0 3 1 0 1 1 0 8 0 uaddrrnd 24 806 0 783 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 806 0 783 1 0 1 1 0 8 0 vmmpekpl 168 8266 0 8209 3 0 3 3 0 8 0 vmmpepl 168 58826 0 57409 83 3 80 80 0 357 6 vmsppl 344 805 0 783 4 1 3 4 0 8 0 rwobjpl 24 23466 0 20400 20 0 20 20 0 8 0 pdppl 4096 1619 0 1566 117 46 71 83 0 8 18 pvpl 32 460760 0 452466 360 136 224 224 0 265 141 pmappl 216 805 0 783 3 1 2 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 425 0 75 11 0 11 11 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:437 panic(ffffffff830b1ca1) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806e7b82e0,41ed,fffffd807f7d7750,ffff80003760cd58) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff80003760cdc0) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd806c6bb020,ffff80003760cf20,ffff80003760cf50,ffff80003760ce50) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff80003761af50,ffffff9c,73e7f503c370,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3099 syscall(ffff80003760d0d0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x73e7f503c400, count: -8 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830b1ca1) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806e7b82e0,41ed,fffffd807f7d7750,ffff80003760cd58) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff80003760cdc0) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd806c6bb020,ffff80003760cf20,ffff80003760cf50,ffff80003760ce50) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff80003761af50,ffffff9c,73e7f503c370,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3099 syscall(ffff80003760d0d0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x73e7f503c400, count: -8