panic: ffs_valloc: dup alloc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *314618 25888 0 0x2 0 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83466ca9) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffff180795a1f00,41c0,fffff18007ffd6e8,ffff80003c8f9218) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80003c8f9280) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffff1807959f898,ffff80003c8f93e0,ffff80003c8f9410,ffff80003c8f9310) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80003c8fba10,ffffff9c,7b27f956ad90,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3062 syscall(ffff80003c8f9580) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c8f9580) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7b27f956ad50, 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(ffffffff83466ca9) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffff180795a1f00,41c0,fffff18007ffd6e8,ffff80003c8f9218) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80003c8f9280) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffff1807959f898,ffff80003c8f93e0,ffff80003c8f9410,ffff80003c8f9310) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80003c8fba10,ffffff9c,7b27f956ad90,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3062 syscall(ffff80003c8f9580) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c8f9580) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7b27f956ad50, count: -8 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003c8f8fa0 rbx 0x6672 __ALIGN_SIZE+0x5672 rdx 0 rcx 0 rax 0xffff80003c8fba10 r8 0x101010101010101 r9 0x8080808080808080 r10 0x9ce550a87e5c9d3 r11 0x8009da285e5b0e73 r12 0 r13 0xfffff1806a5e7600 r14 0 r15 0x1 rip 0xffffffff825c7385 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c8f8f90 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=314618 pid=25888 tcnt=1 stat=onproc flags process=2 proc=0 runpri=50, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a766d08,0xffffffff83a43938 process=0xffff800045ffa418 user=0xffff80003c8f4000, vmspace=0xfffff1806cfcfe70 estcpu=1, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *25888 314618 72751 0 7 0x2 syz-executor 19812 384972 19110 0 2 0xc80 syz-executor 19812 134941 19110 0 3 0x4000080 kqread syz-executor 19812 294077 19110 0 3 0x4000080 fsleep syz-executor 19812 483437 19110 0 3 0x4000080 fsleep syz-executor 2258 270358 0 0 3 0x14200 acct acct 7334 158760 72751 0 3 0x82 piperd syz-executor 19110 476813 72751 0 2 0xc82 syz-executor 13329 138205 72751 0 3 0x82 piperd syz-executor 72751 433069 63525 0 2 0x10000002 syz-executor 63525 15507 37482 0 3 0x10008a sigsusp ksh 37482 173537 84856 0 3 0x98 kqread sshd-session 84856 95826 7956 0 3 0x92 kqread sshd-session 53699 14116 1 0 3 0x100083 ttyin getty 7956 258794 1 0 3 0x88 kqread sshd 79330 256134 45867 73 3 0x1100090 kqread syslogd 45867 359925 1 0 3 0x100082 sbwait syslogd 513 57356 1 0 3 0x100080 kqread resolvd 38879 504008 87249 77 3 0x100092 kqread dhcpleased 21097 350444 87249 77 3 0x100092 kqread dhcpleased 87249 410308 1 0 3 0x80 kqread dhcpleased 11309 315058 0 0 3 0x14200 bored smr 81390 385295 0 0 2 0x14200 zerothread 52968 178276 0 0 3 0x14200 aiodoned aiodoned 41276 213785 0 0 3 0x14200 syncer update 46515 25049 0 0 3 0x14200 cleaner cleaner 2410 448187 0 0 3 0x14200 reaper reaper 57041 30004 0 0 3 0x14200 pgdaemon pagedaemon 50386 270130 0 0 3 0x14200 bored viomb 62426 302984 0 0 3 0x40014200 acpi0 acpi0 41194 270814 0 0 3 0x14200 bored softnet0 36091 206425 0 0 3 0x14200 smrbar systqmp 67490 136726 0 0 3 0x14200 bored systq 71664 183300 0 0 3 0x40014200 tmoslp softclock 25304 129683 0 0 3 0x40014200 idle0 1 370569 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 11022 12094K 12441K 166960K 12484 0 pcb 17 13K 13K 166960K 73 0 rtable 201 6K 7K 166960K 589 0 pf 27 12K 16K 166960K 61 0 ifaddr 34 6K 7K 166960K 79 0 ifgroup 42 1K 2K 166960K 88 0 sysctl 2 1K 9K 166960K 6 0 counters 31 17K 18K 166960K 47 0 ioctlops 0 0K 4K 166960K 131 0 iov 0 0K 12K 166960K 4 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1309 82K 83K 166960K 1688 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 8 0K 0K 166960K 9 0 dirhash 12 2K 2K 166960K 15 0 ACPI 1734 201K 291K 166960K 11964 0 file desc 10 30K 97K 166960K 425 0 sigio 0 0K 0K 166960K 2 0 proc 60 59K 116K 166960K 706 0 subproc 54 3K 5K 166960K 297 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 22 0 in_multi 77 5K 7K 166960K 182 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 15 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 49 228K 228K 166960K 49 0 exec 0 0K 1K 166960K 564 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 159 132K 159K 166960K 4873 0 UVM aobj 7 2K 2K 166960K 7 0 pinsyscall 31 62K 96K 166960K 1719 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 6 0 NDP 9 0K 1K 166960K 53 0 temp 32 9106K 9114K 166960K 14062 0 kqueue 13 20K 26K 166960K 51 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 56 0 53 1 0 1 1 0 8 0 rtentry 136 195 0 105 4 0 4 4 0 8 0 unpcb 144 371 0 356 6 0 6 6 0 8 5 syncache 336 5 0 5 1 0 1 1 0 8 1 tcpcb 736 74 0 67 4 0 4 4 0 8 3 arp 96 33 0 19 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 328 258 0 248 4 0 4 4 0 8 3 ip6q 72 3 0 1 1 0 1 1 0 8 0 ip6af 40 4 0 2 1 0 1 1 0 8 0 nd6 112 48 0 28 1 0 1 1 0 8 0 kcovpl 48 33 0 27 1 0 1 1 0 8 0 ppxss 1072 7 0 7 1 0 1 1 0 8 1 pfstscr 40 3 0 0 1 0 1 1 0 8 0 pfstitem 24 4 0 0 1 0 1 1 0 8 0 pfstkey 128 4 0 0 1 0 1 1 0 8 0 pfstate 384 2 0 0 1 0 1 1 0 8 0 pfrule 1360 2 0 2 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 799 0 372 30 0 30 30 0 8 2 art_table 40 800 0 372 5 0 5 5 0 8 0 art_node 32 194 0 112 1 0 1 1 0 8 0 sysvmsgpl 40 1 0 0 1 0 1 1 0 8 0 semapl 72 7 0 1 1 0 1 1 0 8 0 shmpl 112 4 0 0 1 0 1 1 0 8 0 dirhash 1024 19 0 2 3 0 3 3 0 8 0 dino2pl 256 1833 0 340 94 0 94 94 0 8 0 ffsino 256 1834 0 341 94 0 94 94 0 8 0 nchpl 144 2226 0 495 65 0 65 65 0 8 0 rtmask 32 2 0 2 1 0 1 1 0 8 1 vnodes 216 2209 0 0 123 0 123 123 0 8 0 namei 1024 7704 0 7703 2 0 2 2 0 8 1 kstatmem 264 47 0 28 2 0 2 2 0 8 0 scsiplug 72 1 0 1 1 0 1 1 0 8 1 scxspl 216 12152 0 12152 8 0 8 8 1 8 8 plimitpl 152 131 0 115 1 0 1 1 0 8 0 sigapl 424 674 0 637 6 0 6 6 0 8 1 knotepl 120 7208 0 7161 17 7 10 17 0 8 8 kqueuepl 184 59 0 49 1 0 1 1 0 8 0 pipepl 304 207 0 180 3 0 3 3 0 8 0 fdescpl 448 660 0 638 5 0 5 5 0 8 1 filepl 120 3110 0 2923 12 0 12 12 0 8 5 lockfpl 104 76 0 72 1 0 1 1 0 8 0 lockfspl 48 33 0 30 1 0 1 1 0 8 0 sessionpl 144 52 0 44 1 0 1 1 0 8 0 pgrppl 48 86 0 70 1 0 1 1 0 8 0 ucredpl 104 176 0 165 1 0 1 1 0 8 0 zombiepl 144 641 0 637 1 0 1 1 0 8 0 processpl 1152 674 0 637 4 0 4 4 0 8 0 procpl 664 901 0 861 5 0 5 5 0 8 1 sockpl 552 699 0 671 16 6 10 14 0 8 7 mcl64k 65536 5 0 5 1 0 1 1 0 8 1 mcl9k128 9344 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 4 0 4 1 0 1 1 0 8 1 mcl4k 4096 2669 0 2614 16 1 15 16 0 8 5 mcl2k 2048 369 0 367 1 0 1 1 0 8 0 mtagpl 96 6 0 6 1 0 1 1 0 8 1 mbufpl 256 6248 0 6131 12 0 12 12 0 8 0 bufpl 272 4962 0 102 324 0 324 324 0 8 0 anonpl 24 116973 0 114360 43 0 43 43 0 187 11 amapchunkpl 152 14687 0 14416 35 0 35 35 0 158 20 amappl16 200 2133 0 2116 17 3 14 14 0 8 10 amappl15 192 5 0 4 1 0 1 1 0 8 0 amappl14 184 496 0 495 1 0 1 1 0 8 0 amappl13 176 136 0 126 1 0 1 1 0 8 0 amappl12 168 955 0 935 2 0 2 2 0 8 0 amappl11 160 2 0 2 1 0 1 1 0 8 1 amappl10 152 61 0 51 1 0 1 1 0 8 0 amappl9 144 283 0 283 1 0 1 1 0 8 1 amappl8 136 124 0 123 1 0 1 1 0 8 0 amappl7 128 157 0 146 1 0 1 1 0 8 0 amappl6 120 215 0 214 1 0 1 1 0 8 0 amappl5 112 90 0 82 1 0 1 1 0 8 0 amappl4 104 282 0 266 1 0 1 1 0 8 0 amappl3 96 2592 0 2528 3 0 3 3 0 8 0 amappl2 88 677 0 622 2 0 2 2 0 8 0 amappl1 80 11658 0 11142 13 0 13 13 0 8 0 amappl 88 4015 0 3915 4 0 4 4 0 92 0 uvmvnodes 80 104 0 0 3 0 3 3 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 6 0 0 1 0 1 1 0 8 0 uaddrrnd 24 660 0 638 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 660 0 638 1 0 1 1 0 8 0 vmmpekpl 168 7505 0 7465 3 0 3 3 0 8 0 vmmpepl 168 51544 0 50164 87 0 87 87 0 357 8 vmsppl 368 659 0 638 4 0 4 4 0 8 1 rwobjpl 40 17597 0 16742 12 0 12 12 0 8 0 pdppl 4096 1326 0 1276 106 42 64 82 0 8 14 pvpl 32 300316 0 293633 111 0 111 111 0 265 20 pmappl 216 659 0 638 3 0 3 3 0 8 1 extentpl 40 46 0 28 1 0 1 1 0 8 0 phpool 112 703 0 43 19 0 19 19 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(ffffffff83466ca9) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffff180795a1f00,41c0,fffff18007ffd6e8,ffff80003c8f9218) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80003c8f9280) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffff1807959f898,ffff80003c8f93e0,ffff80003c8f9410,ffff80003c8f9310) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80003c8fba10,ffffff9c,7b27f956ad90,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3062 syscall(ffff80003c8f9580) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c8f9580) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7b27f956ad50, 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(ffffffff83466ca9) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffff180795a1f00,41c0,fffff18007ffd6e8,ffff80003c8f9218) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80003c8f9280) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffff1807959f898,ffff80003c8f93e0,ffff80003c8f9410,ffff80003c8f9310) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80003c8fba10,ffffff9c,7b27f956ad90,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3062 syscall(ffff80003c8f9580) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c8f9580) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7b27f956ad50, count: -8