panic: ffs_valloc: dup alloc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 42558 43504 0 0x2 0 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834a216c) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(ffffef00611eda00,41ed,ffffef0007ffd750,ffff800035cc13c8) at ffs_inode_alloc+0x94e ufs_mkdir(ffff800035cc1430) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1113 VOP_MKDIR(ffffef006d3c31e0,ffff800035cc1590,ffff800035cc15c0,ffff800035cc14c0) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a77afa8,ffffff9c,7ce5ae317e30,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3060 syscall(ffff800035cc1730) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff800035cc1730) at syscall+0x962 sys/arch/amd64/amd64/trap.c:804 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7ce5ae317ed0, 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> show kasan No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834a216c) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(ffffef00611eda00,41ed,ffffef0007ffd750,ffff800035cc13c8) at ffs_inode_alloc+0x94e ufs_mkdir(ffff800035cc1430) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1113 VOP_MKDIR(ffffef006d3c31e0,ffff800035cc1590,ffff800035cc15c0,ffff800035cc14c0) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a77afa8,ffffff9c,7ce5ae317e30,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3060 syscall(ffff800035cc1730) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff800035cc1730) at syscall+0x962 sys/arch/amd64/amd64/trap.c:804 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7ce5ae317ed0, count: -8 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800035cc1150 rbx 0x6a00 __ALIGN_SIZE+0x5a00 rdx 0 rcx 0 rax 0xffff80002a77afa8 r8 0x101010101010101 r9 0x8080808080808080 r10 0xf2fbd97ac7c18127 r11 0x9366af80350dd041 r12 0 r13 0xffffef00611ece00 r14 0 r15 0x1 rip 0xffffffff83148fd5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800035cc1140 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=42558 pid=43504 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=0xffff80002a77ba08,0xffff80003c8db260 process=0xffff800045ffb678 user=0xffff800035cbc000, vmspace=0xffffef006d059d08 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 76121 245681 9659 0 3 0x1000 0x2000 suspend syz-executor 76121 338858 9659 0 3 0x1000 0x4080000 smrbar syz-executor 87650 234361 20503 0 3 0 0x80 nanoslp syz-executor 87650 185962 20503 0 3 0 0x4000080 sbwait syz-executor 87650 248073 20503 0 3 0 0x4000080 fsleep syz-executor 87650 396468 20503 0 3 0 0x4000080 fsleep syz-executor *43504 42558 85022 0 7 0x2 0 syz-executor 11455 73220 28178 0 2 0 0xc80 syz-executor 11455 504990 28178 0 3 0 0x4000080 kqread syz-executor 11455 323460 28178 0 3 0 0x4000080 fsleep syz-executor 37271 347884 0 0 3 0x14000 0x200 acct acct 67043 233381 85022 0 3 0x2 0x80 piperd syz-executor 28178 252219 85022 0 2 0x2 0xc80 syz-executor 85020 510694 85022 0 3 0x2 0x80 piperd syz-executor 15337 455745 85022 0 3 0x2 0x80 piperd syz-executor 9659 371989 85022 0 2 0x2 0xc80 syz-executor 20503 338464 85022 0 3 0x2 0x80 nanoslp syz-executor 85022 361411 39136 0 3 0x2 0x80 wait syz-executor 39136 243595 10562 0 3 0x100002 0x88 sigsusp ksh 10562 121656 52343 0 3 0x10 0x88 kqread sshd-session 52343 287138 18773 0 3 0x12 0x80 kqread sshd-session 72829 430296 1 0 3 0x100003 0x80 ttyin getty 18773 488623 1 0 3 0 0x88 kqread sshd 13224 392499 83272 73 3 0x1100010 0x80 kqread syslogd 83272 162068 1 0 3 0x100002 0x80 sbwait syslogd-parent 87803 417076 1 0 3 0x100000 0x80 kqread resolvd 89852 457209 61860 77 3 0x100012 0x80 kqread dhcpleased 44374 305316 61860 77 3 0x100012 0x80 kqread dhcpleased 61860 213663 1 0 3 0 0x80 kqread dhcpleased 18653 253547 0 0 3 0x14000 0x200 bored smr 10550 206511 0 0 2 0x14000 0x200 zerothread 11923 370782 0 0 3 0x14000 0x200 aiodoned aiodoned 57700 109044 0 0 3 0x14000 0x200 syncer update 66920 277108 0 0 3 0x14000 0x200 cleaner cleaner 64860 396126 0 0 3 0x14000 0x200 reaper reaper 89031 406160 0 0 3 0x14000 0x200 pgdaemon pagedaemon 96042 259071 0 0 3 0x14000 0x200 bored viomb 64360 290808 0 0 3 0x14000 0x40000200 acpi0 acpi0 39562 426891 0 0 3 0x14000 0x200 bored softnet0 80958 256019 0 0 3 0x14000 0x200 smrbar systqmp 82634 388053 0 0 3 0x14000 0x200 bored systq 58489 304826 0 0 3 0x14000 0x40000200 tmoslp softclock 68161 479189 0 0 3 0x14000 0x40000200 idle0 1 158042 0 0 3 0x2 0x80 wait init 0 0 -1 0 3 0x10000 0x200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11035 12117K 12167K 166960K 12150 0 pcb 17 12K 12K 166960K 22 0 rtable 229 6K 7K 166960K 441 0 pf 33 13K 15K 166960K 45 0 ifaddr 43 7K 7K 166960K 61 0 ifgroup 52 2K 2K 166960K 68 0 sysctl 1 1K 9K 166960K 5 0 counters 34 17K 17K 166960K 39 0 ioctlops 0 0K 4K 166960K 78 0 iov 0 0K 1K 166960K 2 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1293 81K 81K 166960K 1420 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 3 0 VM map 2 1K 1K 166960K 2 0 sem 8 0K 0K 166960K 9 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12472 0 file desc 13 45K 97K 166960K 231 0 proc 61 59K 83K 166960K 589 0 subproc 72 4K 4K 166960K 99 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 5 0 in_multi 99 6K 6K 166960K 135 0 ether_multi 1 0K 0K 166960K 2 0 mrt 1 0K 0K 166960K 7 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 43 201K 201K 166960K 43 0 exec 0 0K 2K 166960K 418 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 185 125K 135K 166960K 3699 0 UVM aobj 6 2K 2K 166960K 6 0 pinsyscall 34 68K 96K 166960K 1403 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 7 0 NDP 18 0K 2K 166960K 39 0 temp 37 9114K 9178K 166960K 5828 0 kqueue 16 26K 30K 166960K 43 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 45 0 42 1 0 1 1 0 8 0 rtentry 136 146 0 35 4 0 4 4 0 8 0 unpcb 144 86 0 69 1 0 1 1 0 8 0 syncache 336 6 0 6 1 0 1 1 0 8 1 tcpcb 736 20 0 16 1 0 1 1 0 8 0 arp 96 24 0 6 1 0 1 1 0 8 0 inpcb 328 109 0 102 2 0 2 2 0 8 1 nd6 112 35 0 10 1 0 1 1 0 8 0 pkpcb 40 1 0 1 1 0 1 1 0 8 1 kcovpl 48 11 0 3 1 0 1 1 0 8 0 ppxss 1072 3 0 2 1 0 1 1 0 8 0 pfstscr 40 4 0 2 1 0 1 1 0 8 0 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 128 4 0 2 1 0 1 1 0 8 0 pfstate 384 2 0 1 1 0 1 1 0 8 0 pfrule 1360 1 0 1 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 592 0 134 32 0 32 32 0 8 3 art_table 40 593 0 134 6 0 6 6 0 8 0 art_node 32 146 0 43 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 72 6 0 0 1 0 1 1 0 8 0 shmpl 120 3 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1671 0 193 93 0 93 93 0 8 0 ffsino 256 1671 0 193 93 0 93 93 0 8 0 nchpl 144 1940 0 231 64 0 64 64 0 8 0 vnodes 216 1800 0 0 100 0 100 100 0 8 0 namei 1024 6751 0 6750 4 0 4 4 0 8 3 kstatmem 264 35 0 10 2 0 2 2 0 8 0 scsiplug 72 5 0 5 1 0 1 1 0 8 1 scxspl 216 8926 0 8926 8 0 8 8 1 8 8 plimitpl 152 42 0 26 1 0 1 1 0 8 0 sigapl 424 513 0 474 6 0 6 6 0 8 1 knotepl 120 4386 0 4089 10 0 10 10 0 8 0 kqueuepl 184 111 0 99 3 0 3 3 0 8 2 pipepl 304 135 0 108 3 0 3 3 0 8 0 fdescpl 448 499 0 474 5 0 5 5 0 8 1 filepl 120 1847 0 1638 8 0 8 8 0 8 0 lockfpl 104 29 0 27 1 0 1 1 0 8 0 lockfspl 48 13 0 11 1 0 1 1 0 8 0 sessionpl 144 27 0 19 1 0 1 1 0 8 0 pgrppl 48 38 0 22 1 0 1 1 0 8 0 ucredpl 104 123 0 112 1 0 1 1 0 8 0 zombiepl 144 476 0 474 1 0 1 1 0 8 0 processpl 1160 513 0 474 4 0 4 4 0 8 0 procpl 664 622 0 577 6 0 6 6 0 8 1 sockpl 552 241 0 214 4 0 4 4 0 8 1 mcl64k 65536 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 12 0 12 1 0 1 1 0 8 1 mcl4k 4096 2612 0 2551 14 0 14 14 0 8 6 mcl2k 2048 211 0 211 1 0 1 1 0 8 1 mextrefs 64 60 0 60 1 0 1 1 0 8 1 mtagpl 96 5 0 5 1 0 1 1 0 8 1 mbufpl 256 4961 0 4806 11 0 11 11 0 8 1 bufpl 272 3445 0 87 224 0 224 224 0 8 0 anonpl 24 88713 0 85928 42 0 42 42 0 187 12 amapchunkpl 152 10752 0 10388 36 0 36 36 0 158 18 amappl16 200 1381 0 1365 14 0 14 14 0 8 9 amappl15 192 4 0 4 1 0 1 1 0 8 1 amappl14 184 434 0 431 1 0 1 1 0 8 0 amappl13 176 119 0 109 1 0 1 1 0 8 0 amappl12 168 739 0 715 2 0 2 2 0 8 0 amappl11 160 3 0 3 1 0 1 1 0 8 1 amappl10 152 67 0 59 1 0 1 1 0 8 0 amappl9 144 281 0 281 1 0 1 1 0 8 1 amappl8 136 111 0 110 1 0 1 1 0 8 0 amappl7 128 141 0 131 1 0 1 1 0 8 0 amappl6 120 150 0 149 1 0 1 1 0 8 0 amappl5 112 137 0 131 1 0 1 1 0 8 0 amappl4 104 284 0 271 1 0 1 1 0 8 0 amappl3 96 1890 0 1804 4 0 4 4 0 8 1 amappl2 88 442 0 393 2 0 2 2 0 8 0 amappl1 80 10742 0 10213 13 0 13 13 0 8 1 amappl 88 2982 0 2855 5 0 5 5 0 92 1 uvmvnodes 80 100 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 5 0 0 1 0 1 1 0 8 0 uaddrrnd 24 499 0 474 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 499 0 474 1 0 1 1 0 8 0 vmmpekpl 168 5672 0 5622 3 0 3 3 0 8 0 vmmpepl 168 41210 0 39671 90 0 90 90 0 357 15 vmsppl 368 498 0 474 4 0 4 4 0 8 1 rwobjpl 40 14974 0 14083 13 0 13 13 0 8 0 pdppl 4096 1004 0 948 92 24 68 82 0 8 12 pvpl 32 229416 0 221971 103 0 103 103 0 265 17 pmappl 216 498 0 474 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 585 0 24 17 0 17 17 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(ffffffff834a216c) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(ffffef00611eda00,41ed,ffffef0007ffd750,ffff800035cc13c8) at ffs_inode_alloc+0x94e ufs_mkdir(ffff800035cc1430) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1113 VOP_MKDIR(ffffef006d3c31e0,ffff800035cc1590,ffff800035cc15c0,ffff800035cc14c0) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a77afa8,ffffff9c,7ce5ae317e30,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3060 syscall(ffff800035cc1730) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff800035cc1730) at syscall+0x962 sys/arch/amd64/amd64/trap.c:804 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7ce5ae317ed0, 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(ffffffff834a216c) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(ffffef00611eda00,41ed,ffffef0007ffd750,ffff800035cc13c8) at ffs_inode_alloc+0x94e ufs_mkdir(ffff800035cc1430) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1113 VOP_MKDIR(ffffef006d3c31e0,ffff800035cc1590,ffff800035cc15c0,ffff800035cc14c0) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a77afa8,ffffff9c,7ce5ae317e30,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3060 syscall(ffff800035cc1730) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff800035cc1730) at syscall+0x962 sys/arch/amd64/amd64/trap.c:804 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7ce5ae317ed0, count: -8