panic: ffs_valloc: dup alloc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *416392 1174 0 0x2 0 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8346edbe) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffb006fe01d00,41c0,fffffb0007ffd820,ffff80003c905618) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80003c905680) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffb006fdff898,ffff80003c9057e0,ffff80003c905810,ffff80003c905710) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002f0b0fa8,ffffff9c,7741b7888d90,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3063 syscall(ffff80003c905980) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c905980) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7741b7888d50, 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(ffffffff8346edbe) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffb006fe01d00,41c0,fffffb0007ffd820,ffff80003c905618) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80003c905680) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffb006fdff898,ffff80003c9057e0,ffff80003c905810,ffff80003c905710) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002f0b0fa8,ffffff9c,7741b7888d90,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3063 syscall(ffff80003c905980) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c905980) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7741b7888d50, count: -8 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003c9053a0 rbx 0x665b __ALIGN_SIZE+0x565b rdx 0 rcx 0 rax 0xffff80002f0b0fa8 r8 0x101010101010101 r9 0x8080808080808080 r10 0x71a574ff17ba2a33 r11 0x2b34bc1643a6f986 r12 0 r13 0xfffffb006d16d100 r14 0 r15 0x1 rip 0xffffffff832a51f5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c905390 ss 0 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=416392 pid=1174 tcnt=1 stat=onproc flags process=2 proc=0 runpri=17, usrpri=60, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002f0b0d10,0xffff80002f0b1a18 process=0xffff800045ffa418 user=0xffff80003c900000, vmspace=0xfffffb006d1488b0 estcpu=10, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 97379 121039 17355 0 2 0 0 syz-executor 49999 217286 43681 0 2 0 0 syz-executor 26713 110349 36801 0 2 0 0 syz-executor 92797 430470 80766 0 2 0 0 syz-executor * 1174 416392 3165 0 7 0x2 0 syz-executor 64441 104305 91349 0 3 0 0x80 nanoslp syz-executor 64441 64837 91349 0 3 0 0x4000080 netcon syz-executor 64441 472147 91349 0 3 0 0x4000080 fsleep syz-executor 64441 193207 91349 0 3 0 0x4000080 fsleep syz-executor 57248 343651 61262 0 3 0x10 0x80 nanoslp syz-executor 57248 153114 61262 0 3 0x10 0x4000080 kqpoll syz-executor 57248 22112 61262 0 3 0x10 0x4000080 kqpoll syz-executor 57248 200421 61262 0 3 0x10 0x4000080 fsleep syz-executor 17355 314821 3165 0 2 0x2 0 syz-executor 43681 477919 3165 0 2 0x2 0 syz-executor 87065 474808 3165 0 2 0x2 0 syz-executor 36801 133845 3165 0 3 0x2 0x80 nanoslp syz-executor 61262 286284 3165 0 3 0x2 0x80 nanoslp syz-executor 80766 163750 3165 0 3 0x2 0x80 nanoslp syz-executor 91349 260775 3165 0 3 0x2 0x80 nanoslp syz-executor 3165 467405 10519 0 3 0x2 0x80 kqread syz-executor 10519 438270 63542 0 3 0x100002 0x88 sigsusp ksh 63542 402260 55812 0 3 0x10 0x88 kqread sshd-session 55812 212433 87071 0 3 0x12 0x80 kqread sshd-session 61353 423284 1 0 3 0x100003 0x80 ttyin getty 87071 415997 1 0 3 0 0x88 kqread sshd 59631 260601 62629 73 3 0x1100010 0x80 kqread syslogd 62629 315116 1 0 3 0x100002 0x80 sbwait syslogd 78083 224831 1 0 3 0x100000 0x80 kqread resolvd 72068 369777 898 77 3 0x100012 0x80 kqread dhcpleased 4786 27504 898 77 3 0x100012 0x80 kqread dhcpleased 898 141231 1 0 3 0 0x80 kqread dhcpleased 2403 314207 0 0 3 0x14000 0x200 bored smr 63704 105133 0 0 2 0x14000 0x200 zerothread 72795 78646 0 0 3 0x14000 0x200 aiodoned aiodoned 42590 309897 0 0 3 0x14000 0x200 syncer update 73629 340619 0 0 3 0x14000 0x200 cleaner cleaner 501 411673 0 0 3 0x14000 0x200 reaper reaper 86214 354413 0 0 3 0x14000 0x200 pgdaemon pagedaemon 2225 327885 0 0 3 0x14000 0x200 bored viomb 89292 123393 0 0 3 0x14000 0x40000200 acpi0 acpi0 25356 200393 0 0 2 0x14000 0x200 softnet0 39988 272852 0 0 3 0x14000 0x200 smrbar systqmp 44818 418270 0 0 3 0x14000 0x200 bored systq 70039 204509 0 0 3 0x14000 0x40000200 tmoslp softclock 4708 111404 0 0 3 0x14000 0x40000200 idle0 1 107042 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 11025 12100K 13161K 166960K 12439 0 pcb 17 13K 14K 166960K 74 0 rtable 218 6K 7K 166960K 367 0 pf 29 12K 16K 166960K 44 0 ifaddr 38 6K 7K 166960K 47 0 ifgroup 46 2K 2K 166960K 59 0 sysctl 2 1K 9K 166960K 8 0 counters 32 17K 18K 166960K 36 0 ioctlops 0 0K 4K 166960K 40 0 iov 0 0K 16K 166960K 6 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1362 86K 86K 166960K 1474 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 7 0K 0K 166960K 11 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1734 201K 291K 166960K 11964 0 file desc 16 54K 93K 166960K 196 0 proc 58 59K 91K 166960K 499 0 subproc 63 3K 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 7 0 in_multi 88 6K 7K 166960K 100 0 ether_multi 1 0K 0K 166960K 1 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 49 228K 228K 166960K 49 0 exec 0 0K 1K 166960K 374 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 186 133K 159K 166960K 3392 0 UVM aobj 4 2K 2K 166960K 4 0 pinsyscall 37 74K 94K 166960K 1308 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 4 0 NDP 10 0K 2K 166960K 30 0 temp 32 9110K 9118K 166960K 3973 0 kqueue 13 20K 26K 166960K 34 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 42 0 39 1 0 1 1 0 8 0 rtentry 136 112 0 12 4 0 4 4 0 8 0 unpcb 144 127 0 112 3 0 3 3 0 8 2 syncache 336 5 0 5 1 0 1 1 0 8 1 tcpcb 736 24 0 19 1 0 1 1 0 8 0 arp 96 18 0 2 1 0 1 1 0 8 0 inpcb 328 135 0 126 4 0 4 4 0 8 3 nd6 112 25 0 3 1 0 1 1 0 8 0 kcovpl 48 8 0 1 1 0 1 1 0 8 0 ppxss 1072 2 0 2 1 0 1 1 0 8 1 pfstscr 40 2 0 0 1 0 1 1 0 8 0 pfrktable 1344 3 0 3 1 0 1 1 0 8 1 pfanchor 1288 1 0 1 1 0 1 1 0 8 1 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 128 2 0 0 1 0 1 1 0 8 0 pfstate 384 1 0 0 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 468 0 0 30 0 30 30 0 8 0 art_table 40 469 0 0 5 0 5 5 0 8 0 art_node 32 112 0 21 1 0 1 1 0 8 0 semapl 72 7 0 2 1 0 1 1 0 8 0 shmpl 112 1 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1666 0 207 92 0 92 92 0 8 0 ffsino 256 1666 0 207 92 0 92 92 0 8 0 nchpl 144 1937 0 250 64 0 64 64 0 8 0 vnodes 216 1843 0 0 103 0 103 103 0 8 0 namei 1024 5817 0 5815 1 0 1 1 0 8 0 pfiaddrpl 120 1 0 1 1 0 1 1 0 8 1 kstatmem 264 29 0 8 2 0 2 2 0 8 0 scxspl 216 6988 0 6988 3 0 3 3 1 8 3 plimitpl 152 65 0 49 1 0 1 1 0 8 0 sigapl 424 494 0 453 6 0 6 6 0 8 1 knotepl 120 4713 0 4666 10 0 10 10 0 8 8 kqueuepl 184 35 0 24 1 0 1 1 0 8 0 pipepl 304 131 0 103 3 0 3 3 0 8 0 fdescpl 448 481 0 453 5 0 5 5 0 8 1 filepl 120 1919 0 1718 10 0 10 10 0 8 2 lockfpl 104 20 0 18 1 0 1 1 0 8 0 lockfspl 48 11 0 9 1 0 1 1 0 8 0 sessionpl 144 25 0 17 1 0 1 1 0 8 0 pgrppl 48 35 0 19 1 0 1 1 0 8 0 ucredpl 104 116 0 104 1 0 1 1 0 8 0 zombiepl 144 453 0 453 1 0 1 1 0 8 1 processpl 1152 494 0 453 4 0 4 4 0 8 0 procpl 664 585 0 538 5 0 5 5 0 8 0 sockpl 552 309 0 282 7 0 7 7 0 8 4 mcl64k 65536 2 0 2 1 0 1 1 0 8 1 mcl8k 8192 4 0 4 1 0 1 1 0 8 1 mcl4k 4096 2570 0 2519 14 0 14 14 0 8 7 mcl2k 2048 174 0 171 1 0 1 1 0 8 0 mextrefs 64 55 0 53 1 0 1 1 0 8 0 mtagpl 96 4 0 4 1 0 1 1 0 8 1 mbufpl 256 5053 0 4910 18 0 18 18 0 8 8 bufpl 272 2610 0 104 168 0 168 168 0 8 0 anonpl 24 104033 0 101215 44 0 44 44 0 187 18 amapchunkpl 152 9626 0 9261 25 0 25 25 0 158 5 amappl16 200 2044 0 2029 14 2 12 14 0 8 8 amappl15 192 6 0 6 1 0 1 1 0 8 1 amappl14 184 416 0 415 1 0 1 1 0 8 0 amappl13 176 119 0 109 1 0 1 1 0 8 0 amappl12 168 716 0 693 2 0 2 2 0 8 0 amappl11 160 7 0 6 1 0 1 1 0 8 0 amappl10 152 98 0 88 1 0 1 1 0 8 0 amappl9 144 269 0 269 1 0 1 1 0 8 1 amappl8 136 96 0 94 1 0 1 1 0 8 0 amappl7 128 150 0 139 1 0 1 1 0 8 0 amappl6 120 151 0 150 1 0 1 1 0 8 0 amappl5 112 94 0 87 1 0 1 1 0 8 0 amappl4 104 280 0 264 1 0 1 1 0 8 0 amappl3 96 1738 0 1655 3 0 3 3 0 8 0 amappl2 88 540 0 486 2 0 2 2 0 8 0 amappl1 80 10484 0 9950 13 0 13 13 0 8 1 amappl 88 2688 0 2562 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 3 0 0 1 0 1 1 0 8 0 uaddrrnd 24 481 0 453 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 481 0 453 1 0 1 1 0 8 0 vmmpekpl 168 5858 0 5818 2 0 2 2 0 8 0 vmmpepl 168 40503 0 38869 89 0 89 89 0 357 10 vmsppl 368 480 0 453 4 0 4 4 0 8 1 rwobjpl 40 14980 0 14095 13 0 13 13 0 8 2 pdppl 4096 968 0 906 94 22 72 80 0 8 10 pvpl 32 241580 0 234272 106 0 106 106 0 265 21 pmappl 216 480 0 453 3 0 3 3 0 8 0 extentpl 40 46 0 28 1 0 1 1 0 8 0 phpool 112 531 0 22 15 0 15 15 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(ffffffff8346edbe) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffb006fe01d00,41c0,fffffb0007ffd820,ffff80003c905618) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80003c905680) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffb006fdff898,ffff80003c9057e0,ffff80003c905810,ffff80003c905710) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002f0b0fa8,ffffff9c,7741b7888d90,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3063 syscall(ffff80003c905980) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c905980) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7741b7888d50, 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(ffffffff8346edbe) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffb006fe01d00,41c0,fffffb0007ffd820,ffff80003c905618) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80003c905680) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffb006fdff898,ffff80003c9057e0,ffff80003c905810,ffff80003c905710) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002f0b0fa8,ffffff9c,7741b7888d90,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3063 syscall(ffff80003c905980) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c905980) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7741b7888d50, count: -8