panic: ffs_valloc: dup alloc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *511905 85362 0 0x2 0 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8346918e) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffff380777c9f00,41c0,fffff38007ffd000,ffff80002a850ce8) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80002a850d50) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffff380777c71d8,ffff80002a850eb0,ffff80002a850ee0,ffff80002a850de0) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002f0b02c0,ffffff9c,6f945756f770,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3063 syscall(ffff80002a851050) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a851050) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6f945756f730, 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(ffffffff8346918e) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffff380777c9f00,41c0,fffff38007ffd000,ffff80002a850ce8) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80002a850d50) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffff380777c71d8,ffff80002a850eb0,ffff80002a850ee0,ffff80002a850de0) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002f0b02c0,ffffff9c,6f945756f770,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3063 syscall(ffff80002a851050) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a851050) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6f945756f730, count: -8 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a850a70 rbx 0x665d __ALIGN_SIZE+0x565d rdx 0 rcx 0 rax 0xffff80002f0b02c0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x1ecf55d176a30090 r11 0x4fb6a8b702c9cfc9 r12 0 r13 0xfffff380709df400 r14 0 r15 0x1 rip 0xffffffff816108f5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a850a60 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=511905 pid=85362 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=0xffff80002f0b0558,0xffff80002f0b0800 process=0xffff800045ffb618 user=0xffff80002a84c000, vmspace=0xfffff3807cef1188 estcpu=2, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 50807 461974 12643 0 2 0 0 syz-executor *85362 511905 49306 0 7 0x2 0 syz-executor 56300 258922 58870 0 3 0 0x80 nanoslp syz-executor 56300 325194 58870 0 3 0 0x4000080 sbwait syz-executor 56300 271711 58870 0 3 0 0x4000080 fsleep syz-executor 66388 353593 45343 0 3 0 0x80 nanoslp syz-executor 66388 429167 45343 0 3 0 0x4000080 kqsel syz-executor 66388 98747 45343 0 3 0 0x4000080 fsleep syz-executor 72504 499349 0 0 3 0x14000 0x200 acct acct 47048 511240 2286 0 3 0 0x80 nanoslp syz-executor 47048 46768 2286 0 3 0 0x4000080 fifor syz-executor 47048 194246 2286 0 3 0 0x4000080 fsleep syz-executor 67618 212309 26642 0 3 0 0x80 nanoslp syz-executor 67618 18502 26642 0 3 0 0x4000080 pipewr syz-executor 67618 482884 26642 0 3 0 0x4000080 pipewr syz-executor 67618 284816 26642 0 3 0 0x4000080 fsleep syz-executor 58870 224194 49306 0 3 0x2 0x80 nanoslp syz-executor 26642 29937 49306 0 3 0x2 0x80 nanoslp syz-executor 45343 95123 49306 0 3 0x2 0x80 nanoslp syz-executor 60974 226063 49306 0 3 0x2 0x80 piperd syz-executor 12643 460748 49306 0 3 0x2 0x80 nanoslp syz-executor 2286 340303 49306 0 3 0x2 0x80 nanoslp syz-executor 49306 227402 59586 0 2 0x2 0 syz-executor 59586 476474 30812 0 3 0x100002 0x88 sigsusp ksh 30812 81927 17537 0 3 0x10 0x88 kqread sshd-session 17537 267997 36755 0 3 0x12 0x80 kqread sshd-session 57169 347677 1 0 3 0x100003 0x80 ttyin getty 36755 312647 1 0 3 0 0x88 kqread sshd 84088 227958 85998 73 3 0x1100010 0x80 kqread syslogd 85998 412306 1 0 3 0x100002 0x80 sbwait syslogd 2618 248333 1 0 3 0x100000 0x80 kqread resolvd 75748 473985 93970 77 3 0x100012 0x80 kqread dhcpleased 64313 376058 93970 77 3 0x100012 0x80 kqread dhcpleased 93970 329007 1 0 3 0 0x80 kqread dhcpleased 60239 231905 0 0 3 0x14000 0x200 bored smr 31856 273540 0 0 2 0x14000 0x200 zerothread 41279 283679 0 0 3 0x14000 0x200 aiodoned aiodoned 36675 108485 0 0 3 0x14000 0x200 syncer update 81208 276480 0 0 3 0x14000 0x200 cleaner cleaner 30303 66676 0 0 3 0x14000 0x200 reaper reaper 16206 513803 0 0 3 0x14000 0x200 pgdaemon pagedaemon 33941 109864 0 0 3 0x14000 0x200 bored viomb 38142 134721 0 0 3 0x14000 0x40000200 acpi0 acpi0 28147 341383 0 0 3 0x14000 0x200 bored softnet0 48123 507857 0 0 3 0x14000 0x200 smrbar systqmp 24900 153813 0 0 3 0x14000 0x200 bored systq 13154 309643 0 0 3 0x14000 0x40000200 tmoslp softclock 91848 360179 0 0 3 0x14000 0x40000200 idle0 1 444743 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 11022 12100K 12302K 166960K 12141 0 pcb 19 12K 12K 166960K 22 0 rtable 179 4K 6K 166960K 355 0 pf 27 12K 13K 166960K 33 0 ifaddr 32 5K 7K 166960K 45 0 ifgroup 42 1K 2K 166960K 52 0 sysctl 1 1K 9K 166960K 6 0 counters 31 17K 17K 166960K 34 0 ioctlops 0 0K 2K 166960K 42 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1293 81K 82K 166960K 1387 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 3 0K 0K 166960K 3 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1734 201K 291K 166960K 11964 0 file desc 14 46K 93K 166960K 167 0 sigio 0 0K 0K 166960K 1 0 proc 59 59K 91K 166960K 500 0 subproc 54 3K 4K 166960K 81 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 4 0 in_multi 67 5K 7K 166960K 99 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 43 201K 201K 166960K 43 0 exec 0 0K 1K 166960K 373 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 191 133K 158K 166960K 3159 0 UVM aobj 3 2K 2K 166960K 3 0 pinsyscall 35 70K 94K 166960K 1279 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 NDP 19 1K 2K 166960K 28 0 temp 27 9101K 9108K 166960K 3700 0 kqueue 13 20K 24K 166960K 33 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 40 0 36 1 0 1 1 0 8 0 rtentry 136 111 0 30 4 0 4 4 0 8 0 unpcb 144 53 0 34 1 0 1 1 0 8 0 syncache 336 4 0 4 1 0 1 1 0 8 1 tcpcb 736 13 0 9 1 0 1 1 0 8 0 arp 96 18 0 4 1 0 1 1 0 8 0 ipq 40 2 0 0 1 0 1 1 0 8 0 ipqe 40 2 0 0 1 0 1 1 0 8 0 inpcb 328 76 0 67 2 0 2 2 0 8 0 nd6 112 24 0 9 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 0 1 1 0 8 1 kcovpl 48 9 0 3 1 0 1 1 0 8 0 ppxss 1072 1 0 1 1 0 1 1 0 8 1 pfstscr 40 2 0 2 1 0 1 1 0 8 1 pfstkey 128 2 0 2 1 0 1 1 0 8 1 pfstate 384 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 453 0 84 29 0 29 29 0 8 2 art_table 40 454 0 84 5 0 5 5 0 8 0 art_node 32 111 0 37 1 0 1 1 0 8 0 sysvmsgpl 40 1 0 1 1 0 1 1 0 8 1 semapl 72 1 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1610 0 148 92 0 92 92 0 8 0 ffsino 256 1610 0 148 92 0 92 92 0 8 0 nchpl 144 1845 0 149 64 0 64 64 0 8 0 vnodes 216 1714 0 0 96 0 96 96 0 8 0 namei 1024 5573 0 5572 1 0 1 1 0 8 0 kstatmem 264 25 0 6 2 0 2 2 0 8 0 scxspl 216 6424 0 6424 4 0 4 4 1 8 4 plimitpl 152 34 0 17 1 0 1 1 0 8 0 sigapl 424 464 0 423 6 0 6 6 0 8 1 knotepl 120 3552 0 3505 9 0 9 9 0 8 7 kqueuepl 184 33 0 22 1 0 1 1 0 8 0 pipepl 304 197 0 169 8 0 8 8 0 8 5 fdescpl 448 450 0 424 5 0 5 5 0 8 1 filepl 120 1772 0 1577 11 0 11 11 0 8 4 lockfpl 104 27 0 24 1 0 1 1 0 8 0 lockfspl 48 15 0 12 1 0 1 1 0 8 0 sessionpl 144 58 0 50 1 0 1 1 0 8 0 pgrppl 48 68 0 52 1 0 1 1 0 8 0 ucredpl 104 110 0 99 1 0 1 1 0 8 0 zombiepl 144 424 0 423 1 0 1 1 0 8 0 processpl 1152 464 0 423 4 0 4 4 0 8 0 procpl 664 513 0 463 6 0 6 6 0 8 0 sockpl 552 171 0 139 3 0 3 3 0 8 0 mcl64k 65536 2 0 1 1 0 1 1 0 8 0 mcl8k 8192 4 0 4 1 0 1 1 0 8 1 mcl4k 4096 2542 0 2491 15 0 15 15 0 8 8 mcl2k 2048 153 0 144 2 0 2 2 0 8 0 mextrefs 64 58 0 50 1 0 1 1 0 8 0 mtagpl 96 6 0 5 1 0 1 1 0 8 0 mbufpl 256 4535 0 4379 10 0 10 10 0 8 0 bufpl 272 2417 0 102 155 0 155 155 0 8 0 anonpl 24 77222 0 74361 23 0 23 23 0 187 1 amapchunkpl 152 8401 0 8024 21 0 21 21 0 158 2 amappl16 200 973 0 956 4 0 4 4 0 8 2 amappl15 192 1 0 1 1 0 1 1 0 8 1 amappl14 184 410 0 409 1 0 1 1 0 8 0 amappl13 176 118 0 107 1 0 1 1 0 8 0 amappl12 168 743 0 720 2 0 2 2 0 8 0 amappl11 160 5 0 5 1 0 1 1 0 8 1 amappl10 152 76 0 66 1 0 1 1 0 8 0 amappl9 144 271 0 271 1 0 1 1 0 8 1 amappl8 136 102 0 101 1 0 1 1 0 8 0 amappl7 128 160 0 149 1 0 1 1 0 8 0 amappl6 120 151 0 150 1 0 1 1 0 8 0 amappl5 112 97 0 90 1 0 1 1 0 8 0 amappl4 104 264 0 247 1 0 1 1 0 8 0 amappl3 96 1554 0 1467 3 0 3 3 0 8 0 amappl2 88 534 0 482 2 0 2 2 0 8 0 amappl1 80 10172 0 9645 13 0 13 13 0 8 1 amappl 88 2459 0 2327 4 0 4 4 0 92 0 uvmvnodes 80 96 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 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 450 0 424 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 450 0 424 1 0 1 1 0 8 0 vmmpekpl 168 5904 0 5864 2 0 2 2 0 8 0 vmmpepl 168 37448 0 35866 81 0 81 81 0 357 2 vmsppl 368 449 0 424 4 0 4 4 0 8 1 rwobjpl 40 13556 0 12679 11 0 11 11 0 8 0 pdppl 4096 906 0 848 94 16 78 80 0 8 20 pvpl 32 204966 0 197351 84 0 84 84 0 265 10 pmappl 216 449 0 424 3 0 3 3 0 8 0 extentpl 40 46 0 28 1 0 1 1 0 8 0 phpool 112 510 0 16 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(ffffffff8346918e) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffff380777c9f00,41c0,fffff38007ffd000,ffff80002a850ce8) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80002a850d50) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffff380777c71d8,ffff80002a850eb0,ffff80002a850ee0,ffff80002a850de0) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002f0b02c0,ffffff9c,6f945756f770,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3063 syscall(ffff80002a851050) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a851050) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6f945756f730, 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(ffffffff8346918e) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffff380777c9f00,41c0,fffff38007ffd000,ffff80002a850ce8) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80002a850d50) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffff380777c71d8,ffff80002a850eb0,ffff80002a850ee0,ffff80002a850de0) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002f0b02c0,ffffff9c,6f945756f770,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3063 syscall(ffff80002a851050) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a851050) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6f945756f730, count: -8