panic: ffs_valloc: dup alloc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 75139 82805 0 0 0x4000000 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(fffffd806c4ce960,4000,fffffd807f7d7548,ffff800030e21578) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff800030e215e0) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd8064e02e70,ffff800030e21740,ffff800030e21770,ffff800030e21670) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a4d0020,ffffff9c,20000000,0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3099 syscall(ffff800030e218f0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x397e7a10190, 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(fffffd806c4ce960,4000,fffffd807f7d7548,ffff800030e21578) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff800030e215e0) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd8064e02e70,ffff800030e21740,ffff800030e21770,ffff800030e21670) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a4d0020,ffffff9c,20000000,0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3099 syscall(ffff800030e218f0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x397e7a10190, count: -8 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800030e21310 rbx 0xfffffd806e552e00 rdx 0 rcx 0 rax 0xffff80002a4d0020 r8 0x101010101010101 r9 0x8080808080808080 r10 0xc45d37e3ab56cead r11 0xcfdd03d5999861aa r12 0 r13 0xfffffd806c4cee10 r14 0 r15 0x1 rip 0xffffffff810b2dc5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800030e21300 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=75139 pid=82805 tcnt=3 stat=onproc flags process=0 proc=4000000 runpri=17, usrpri=50, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a4d1460,0xffff80002a4d0cd8 process=0xffff80002f7f5138 user=0xffff800030e1c000, vmspace=0xfffffd806c27b418 estcpu=36, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 82805 8885 41140 0 2 0 syz-executor *82805 75139 41140 0 7 0x4000000 syz-executor 82805 488565 41140 0 3 0x4000000 inode syz-executor 83979 180994 12284 0 3 0x80 nanoslp syz-executor 83979 285518 12284 0 3 0x4000080 wsevent_read syz-executor 83979 386855 12284 0 3 0x4000080 fsleep syz-executor 35203 162914 61711 0 3 0x80 nanoslp syz-executor 35203 157685 61711 0 3 0x4000080 ttyout syz-executor 35203 330421 61711 0 3 0x4000080 fsleep syz-executor 41151 362726 19189 0 3 0x80 nanoslp syz-executor 41151 118579 19189 0 3 0x4000080 fsleep syz-executor 41151 19774 19189 0 3 0x4000080 lockf syz-executor 41151 210959 19189 0 3 0x4000080 fsleep syz-executor 83750 243487 0 0 3 0x14200 bored sosplice 32241 360506 93396 0 2 0x82 syz-executor 19189 238135 93396 0 3 0x82 nanoslp syz-executor 61711 86655 93396 0 3 0x82 nanoslp syz-executor 20647 345012 93396 0 3 0x82 wait syz-executor 12284 4599 93396 0 3 0x82 nanoslp syz-executor 41140 404994 93396 0 3 0x82 nanoslp syz-executor 93396 302265 11362 0 3 0x82 wait syz-executor 11362 328271 10503 0 3 0x10008a sigsusp ksh 10503 474251 35258 0 3 0x98 kqread sshd-session 35258 78501 24792 0 3 0x92 kqread sshd-session 70457 473005 1 0 3 0x100083 ttyin getty 24792 120782 1 0 3 0x88 kqread sshd 96076 32362 22521 73 3 0x1100090 kqread syslogd 22521 513064 1 0 3 0x100082 sbwait syslogd 76945 456046 1 0 3 0x100080 kqread resolvd 17020 94579 38059 77 3 0x100092 kqread dhcpleased 29949 153680 38059 77 3 0x100092 kqread dhcpleased 38059 112874 1 0 3 0x80 kqread dhcpleased 21886 3164 0 0 3 0x14200 bored smr 61962 198890 0 0 2 0x14200 zerothread 56743 225905 0 0 3 0x14200 aiodoned aiodoned 57301 129510 0 0 3 0x14200 syncer update 27026 399852 0 0 3 0x14200 cleaner cleaner 72065 331571 0 0 3 0x14200 reaper reaper 87487 162714 0 0 3 0x14200 pgdaemon pagedaemon 68865 7128 0 0 3 0x14200 bored viomb 76689 326793 0 0 3 0x40014200 acpi0 acpi0 3474 12958 0 0 3 0x14200 bored softnet3 30522 221297 0 0 3 0x14200 bored softnet2 2904 240747 0 0 3 0x14200 bored softnet1 48063 511460 0 0 3 0x14200 bored softnet0 40779 146347 0 0 3 0x14200 bored systqmp 61549 240955 0 0 3 0x14200 bored systq 77257 208833 0 0 3 0x40014200 tmoslp softclock 90781 331817 0 0 3 0x40014200 idle0 1 514098 0 0 3 0x80082 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 10179 10033K 10562K 166960K 11990 0 pcb 17 15K 16K 166960K 120 0 rtable 175 5K 7K 166960K 920 0 pf 28 12K 20K 166960K 80 0 ifaddr 34 6K 7K 166960K 124 0 ifgroup 42 1K 2K 166960K 126 0 sysctl 3 0K 0K 166960K 3 0 counters 28 17K 17K 166960K 51 0 ioctlops 0 0K 4K 166960K 77 0 iov 0 0K 16K 166960K 231 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1469 92K 92K 166960K 2007 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 3 5K 9K 166960K 9 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 18 0 dirhash 12 2K 2K 166960K 18 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 15 53K 93K 166960K 759 0 sigio 0 0K 0K 166960K 44 0 proc 58 59K 91K 166960K 978 0 subproc 104 6K 7K 166960K 377 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 56 0 in_multi 74 5K 7K 166960K 299 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 79 360K 360K 166960K 79 0 exec 0 0K 1K 166960K 685 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 208 72K 90K 166960K 7327 0 UVM aobj 77 3K 3K 166960K 80 0 pinsyscall 36 72K 94K 166960K 2224 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 2 0K 0K 166960K 22 0 NDP 11 0K 2K 166960K 82 0 temp 43 6804K 6869K 166960K 11847 0 kqueue 13 20K 32K 166960K 78 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 158 0 155 3 0 3 3 0 8 2 rtentry 112 315 0 236 4 0 4 4 0 8 0 unpcb 144 588 0 572 6 0 6 6 0 8 5 syncache 336 5 0 5 1 0 1 1 0 8 1 tcpcb 808 164 0 159 5 0 5 5 0 8 4 arp 88 58 0 43 1 0 1 1 0 8 0 ipq 40 3 0 1 1 0 1 1 0 8 0 ipqe 40 47 0 45 1 0 1 1 0 8 0 inpcb 336 793 0 784 13 4 9 13 0 8 8 nd6 104 76 0 58 1 0 1 1 0 8 0 kcovpl 48 29 0 21 1 0 1 1 0 8 0 ppxss 1072 4 0 4 1 0 1 1 0 8 1 pfstkey 128 2 0 2 1 0 1 1 0 8 1 pfstate 344 1 0 1 1 0 1 1 0 8 1 pfrule 1344 3 0 3 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1223 0 894 29 0 29 29 0 8 2 art_table 32 1224 0 894 4 0 4 4 0 8 0 art_node 16 314 0 244 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 1 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 16 0 6 1 0 1 1 0 8 0 shmpl 112 77 0 3 3 0 3 3 0 8 0 dirhash 1024 21 0 4 3 0 3 3 0 8 0 dino2pl 256 2202 0 672 97 0 97 97 0 8 0 ffsino 240 2202 0 672 91 0 91 91 0 8 0 nchpl 144 2929 0 1229 64 0 64 64 0 8 0 uvmvnodes 80 2869 0 0 59 0 59 59 0 8 0 vnodes 216 2869 0 0 160 0 160 160 0 8 0 namei 1024 10950 0 10948 2 0 2 2 0 8 1 kstatmem 264 64 0 46 2 0 2 2 0 8 0 scsiplug 72 1 0 1 1 0 1 1 0 8 1 scxspl 216 16347 0 16347 8 0 8 8 1 8 8 plimitpl 152 164 0 145 1 0 1 1 0 8 0 sigapl 424 999 0 954 6 0 6 6 0 8 0 futexpl 64 5745 0 5741 1 0 1 1 0 8 0 knotepl 120 16079 0 16032 17 7 10 17 0 8 8 kqueuepl 184 243 0 178 4 0 4 4 0 8 0 pipepl 288 196 0 168 3 0 3 3 0 8 0 fdescpl 432 981 0 954 5 0 5 5 0 8 1 filepl 120 5329 0 5019 14 0 14 14 0 8 4 lockfpl 104 185 0 180 1 0 1 1 0 8 0 lockfspl 48 86 0 82 1 0 1 1 0 8 0 sessionpl 144 38 0 30 1 0 1 1 0 8 0 pgrppl 48 71 0 55 1 0 1 1 0 8 0 ucredpl 104 438 0 425 1 0 1 1 0 8 0 zombiepl 144 958 0 954 1 0 1 1 0 8 0 processpl 1096 999 0 954 4 0 4 4 0 8 0 procpl 648 1571 0 1517 6 0 6 6 0 8 0 sosppl 168 4 0 4 1 0 1 1 0 8 1 sockpl 504 1545 0 1517 27 14 13 21 0 8 8 mcl64k 65536 4 0 4 1 0 1 1 0 8 1 mcl9k 9216 3 0 3 1 0 1 1 0 8 1 mcl8k 8192 18 0 18 1 0 1 1 0 8 1 mcl4k 4096 5 0 5 1 0 1 1 0 8 1 mcl2k2 2112 6 0 6 1 0 1 1 0 8 1 mcl2k 2048 6072 0 5978 25 5 20 25 0 8 4 mtagpl 96 10 0 9 1 0 1 1 0 8 0 mbufpl 256 15574 0 15409 24 2 22 24 0 8 4 bufpl 280 6033 0 89 425 0 425 425 0 8 0 anonpl 24 218244 0 214809 51 0 51 51 0 187 10 amapchunkpl 152 24025 0 23598 32 0 32 32 0 158 11 amappl16 200 5364 0 5326 14 0 14 14 0 8 8 amappl15 192 14 0 13 1 0 1 1 0 8 0 amappl14 184 143 0 133 1 0 1 1 0 8 0 amappl13 176 10 0 10 1 0 1 1 0 8 1 amappl12 168 1877 0 1850 2 0 2 2 0 8 0 amappl11 160 49 0 39 1 0 1 1 0 8 0 amappl10 152 13 0 13 1 0 1 1 0 8 1 amappl9 144 122 0 122 1 0 1 1 0 8 1 amappl8 136 26 0 25 1 0 1 1 0 8 0 amappl7 128 134 0 124 1 0 1 1 0 8 0 amappl6 120 332 0 331 1 0 1 1 0 8 0 amappl5 112 193 0 184 1 0 1 1 0 8 0 amappl4 104 336 0 319 1 0 1 1 0 8 0 amappl3 96 4372 0 4289 3 0 3 3 0 8 0 amappl2 88 1220 0 1151 2 0 2 2 0 8 0 amappl1 80 10298 0 9765 13 0 13 13 0 8 1 amappl 88 6837 0 6684 5 0 5 5 0 92 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 79 0 3 2 0 2 2 0 8 0 uaddrrnd 24 981 0 954 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 981 0 954 1 0 1 1 0 8 0 vmmpekpl 168 9479 0 9433 3 0 3 3 0 8 0 vmmpepl 168 68077 0 66401 92 0 92 92 0 357 10 vmsppl 344 980 0 954 4 0 4 4 0 8 1 rwobjpl 24 26051 0 22247 25 0 25 25 0 8 0 pdppl 4096 1969 0 1908 119 48 71 81 0 8 10 pvpl 32 513327 0 504090 222 0 222 222 0 265 115 pmappl 216 980 0 954 3 0 3 3 0 8 1 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 446 0 73 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(fffffd806c4ce960,4000,fffffd807f7d7548,ffff800030e21578) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff800030e215e0) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd8064e02e70,ffff800030e21740,ffff800030e21770,ffff800030e21670) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a4d0020,ffffff9c,20000000,0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3099 syscall(ffff800030e218f0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x397e7a10190, 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(fffffd806c4ce960,4000,fffffd807f7d7548,ffff800030e21578) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff800030e215e0) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd8064e02e70,ffff800030e21740,ffff800030e21770,ffff800030e21670) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a4d0020,ffffff9c,20000000,0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3099 syscall(ffff800030e218f0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x397e7a10190, count: -8