panic: ffs_valloc: dup alloc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *312260 37019 0 0x2 0 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8346895c) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffff2806d63fd00,41ed,fffff28007ffd7b8,ffff80002a8492f8) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80002a849360) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffff2806d5a1110,ffff80002a8494c0,ffff80002a8494f0,ffff80002a8493f0) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a736538,ffffff9c,78a5191f4830,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3063 syscall(ffff80002a849660) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a849660) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x78a5191f48d0, 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(ffffffff8346895c) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffff2806d63fd00,41ed,fffff28007ffd7b8,ffff80002a8492f8) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80002a849360) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffff2806d5a1110,ffff80002a8494c0,ffff80002a8494f0,ffff80002a8493f0) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a736538,ffffff9c,78a5191f4830,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3063 syscall(ffff80002a849660) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a849660) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x78a5191f48d0, count: -8 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a849080 rbx 0x6659 __ALIGN_SIZE+0x5659 rdx 0 rcx 0 rax 0xffff80002a736538 r8 0x101010101010101 r9 0x8080808080808080 r10 0x5fd8af9dddab8758 r11 0x2330b51205842019 r12 0 r13 0xfffff280678a2c00 r14 0 r15 0x1 rip 0xffffffff8117abc5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a849070 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=312260 pid=37019 tcnt=1 stat=onproc flags process=2 proc=0 runpri=17, usrpri=86, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a736f98,0xffff80002a736018 process=0xffff80002a79e890 user=0xffff80002a844000, vmspace=0xfffff28070663458 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 15277 285820 8693 0 2 0 syz-executor 15277 120169 8693 0 3 0x4000080 ttyin syz-executor 32423 404468 42584 0 2 0x1 syz-executor 32423 177021 42584 0 3 0x4000081 fsleep syz-executor 5235 375399 79477 0 3 0x80 nanoslp syz-executor 5235 76832 79477 0 3 0x4000080 sbwait syz-executor 5235 217386 79477 0 3 0x4000080 fsleep syz-executor 63617 219290 63716 0 2 0xc80 syz-executor 63617 115621 63716 0 3 0x4000080 fsleep syz-executor 63617 271098 63716 0 3 0x4000088 kqread syz-executor 63617 343091 63716 0 3 0x4000080 fsleep syz-executor 42584 153439 91289 0 3 0x82 nanoslp syz-executor 63716 157554 91289 0 2 0xc82 syz-executor *37019 312260 91289 0 7 0x2 syz-executor 79477 318924 91289 0 3 0x82 nanoslp syz-executor 8693 449240 91289 0 3 0x82 nanoslp syz-executor 91289 139435 62388 0 3 0x82 wait syz-executor 62388 358931 83900 0 3 0x10008a sigsusp ksh 83900 260134 94751 0 3 0x98 kqread sshd-session 94751 1097 97427 0 3 0x92 kqread sshd-session 1421 253763 1 0 3 0x100083 ttyin getty 97427 416558 1 0 3 0x88 kqread sshd 36504 56799 92698 73 2 0x1100090 syslogd 92698 486422 1 0 3 0x100082 sbwait syslogd 60943 97841 1 0 3 0x100080 kqread resolvd 80808 496478 42266 77 3 0x100092 kqread dhcpleased 36557 500587 42266 77 3 0x100092 kqread dhcpleased 42266 137966 1 0 3 0x80 kqread dhcpleased 54786 282025 0 0 3 0x14200 bored smr 32841 383574 0 0 2 0x14200 zerothread 45322 126073 0 0 3 0x14200 aiodoned aiodoned 91903 386632 0 0 3 0x14200 syncer update 49018 453152 0 0 3 0x14200 cleaner cleaner 13417 162077 0 0 3 0x14200 reaper reaper 28303 210239 0 0 3 0x14200 pgdaemon pagedaemon 43240 7346 0 0 3 0x14200 bored viomb 3841 109528 0 0 3 0x40014200 acpi0 acpi0 35542 463126 0 0 3 0x14200 bored softnet0 94030 118019 0 0 3 0x14200 bored systqmp 41198 214758 0 0 3 0x14200 bored systq 81224 73305 0 0 3 0x40014200 tmoslp softclock 76278 245479 0 0 3 0x40014200 idle0 1 87467 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 11029 12104K 12166K 166960K 12193 0 pcb 18 12K 12K 166960K 26 0 rtable 239 6K 6K 166960K 357 0 pf 31 13K 13K 166960K 31 0 ifaddr 42 7K 7K 166960K 44 0 ifgroup 50 2K 2K 166960K 50 0 sysctl 1 1K 9K 166960K 6 0 counters 33 17K 17K 166960K 33 0 ioctlops 0 0K 4K 166960K 234 0 iov 0 0K 8K 166960K 68 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1293 81K 81K 166960K 1372 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 3 0K 0K 166960K 4 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1734 201K 291K 166960K 11964 0 file desc 14 49K 89K 166960K 164 0 sigio 0 0K 0K 166960K 1 0 proc 60 59K 108K 166960K 498 0 subproc 72 4K 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 2 0 in_multi 99 7K 7K 166960K 99 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 55 254K 254K 166960K 55 0 exec 0 0K 1K 166960K 372 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 192 134K 142K 166960K 3091 0 UVM aobj 3 2K 2K 166960K 3 0 pinsyscall 35 70K 92K 166960K 1274 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 1 0K 0K 166960K 3 0 NDP 27 2K 2K 166960K 27 0 temp 35 9106K 13206K 166960K 5080 0 kqueue 14 22K 22K 166960K 27 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 39 0 35 1 0 1 1 0 8 0 rtentry 136 112 0 1 4 0 4 4 0 8 0 unpcb 144 52 0 35 1 0 1 1 0 8 0 syncache 336 4 0 4 1 0 1 1 0 8 1 tcpcb 736 11 0 7 1 0 1 1 0 8 0 arp 96 18 0 0 1 0 1 1 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 3 0 2 1 0 1 1 0 8 0 inpcb 328 146 0 137 7 0 7 7 0 8 6 nd6 112 25 0 0 1 0 1 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 454 0 0 29 0 29 29 0 8 0 art_table 40 455 0 0 5 0 5 5 0 8 0 art_node 32 112 0 11 1 0 1 1 0 8 0 semapl 72 2 0 1 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1603 0 142 92 0 92 92 0 8 0 ffsino 256 1636 0 175 92 0 92 92 0 8 0 nchpl 144 1842 0 148 63 0 63 63 0 8 0 vnodes 216 1731 0 0 97 0 97 97 0 8 0 namei 1024 5811 0 5810 2 0 2 2 0 8 1 kstatmem 264 23 0 0 2 0 2 2 0 8 0 scxspl 216 6327 0 6327 4 0 4 4 1 8 4 plimitpl 152 34 0 17 1 0 1 1 0 8 0 sigapl 424 462 0 423 6 0 6 6 0 8 1 knotepl 120 3480 0 3431 2 0 2 2 0 8 0 kqueuepl 184 24 0 14 1 0 1 1 0 8 0 pipepl 304 124 0 97 3 0 3 3 0 8 0 fdescpl 448 449 0 423 5 0 5 5 0 8 1 filepl 120 1795 0 1485 12 0 12 12 0 8 2 lockfpl 104 87 0 20 2 0 2 2 0 8 0 lockfspl 48 12 0 9 1 0 1 1 0 8 0 sessionpl 144 89 0 80 1 0 1 1 0 8 0 pgrppl 48 97 0 80 1 0 1 1 0 8 0 ucredpl 104 122 0 111 1 0 1 1 0 8 0 zombiepl 144 426 0 423 1 0 1 1 0 8 0 processpl 1152 462 0 423 4 0 4 4 0 8 0 procpl 664 510 0 464 5 0 5 5 0 8 0 sockpl 552 237 0 207 8 0 8 8 0 8 5 mcl64k 65536 5 0 4 1 0 1 1 0 8 0 mcl9k128 9344 65 0 65 1 0 1 1 0 8 1 mcl8k 8192 5 0 5 1 0 1 1 0 8 1 mcl4k 4096 2539 0 2483 15 0 15 15 0 8 7 mcl2k 2048 129 0 129 2 0 2 2 0 8 2 mextrefs 64 53 0 53 1 0 1 1 0 8 1 mtagpl 96 4 0 4 1 0 1 1 0 8 1 mbufpl 256 4589 0 4483 12 0 12 12 0 8 1 bufpl 272 2513 0 102 161 0 161 161 0 8 0 anonpl 24 87624 0 84732 21 0 21 21 0 187 0 amapchunkpl 152 8465 0 8074 19 0 19 19 0 158 1 amappl16 200 1409 0 1390 5 0 5 5 0 8 3 amappl15 192 5 0 5 1 0 1 1 0 8 1 amappl14 184 413 0 412 1 0 1 1 0 8 0 amappl13 176 142 0 132 1 0 1 1 0 8 0 amappl12 168 689 0 664 2 0 2 2 0 8 0 amappl11 160 26 0 26 1 0 1 1 0 8 1 amappl10 152 59 0 49 1 0 1 1 0 8 0 amappl9 144 282 0 282 1 0 1 1 0 8 1 amappl8 136 94 0 91 1 0 1 1 0 8 0 amappl7 128 138 0 127 1 0 1 1 0 8 0 amappl6 120 153 0 152 1 0 1 1 0 8 0 amappl5 112 107 0 98 1 0 1 1 0 8 0 amappl4 104 260 0 244 1 0 1 1 0 8 0 amappl3 96 1564 0 1474 3 0 3 3 0 8 0 amappl2 88 584 0 528 2 0 2 2 0 8 0 amappl1 80 10144 0 9614 13 0 13 13 0 8 0 amappl 88 2396 0 2264 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 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 449 0 423 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 449 0 423 1 0 1 1 0 8 0 vmmpekpl 168 5617 0 5578 2 0 2 2 0 8 0 vmmpepl 168 37705 0 36098 81 0 81 81 0 357 3 vmsppl 368 448 0 423 4 0 4 4 0 8 1 rwobjpl 40 13998 0 13093 11 0 11 11 0 8 0 pdppl 4096 904 0 846 92 14 78 78 0 8 20 pvpl 32 214179 0 206556 72 0 72 72 0 265 2 pmappl 216 448 0 423 2 0 2 2 0 8 0 extentpl 40 46 0 28 1 0 1 1 0 8 0 phpool 112 517 0 14 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(ffffffff8346895c) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffff2806d63fd00,41ed,fffff28007ffd7b8,ffff80002a8492f8) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80002a849360) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffff2806d5a1110,ffff80002a8494c0,ffff80002a8494f0,ffff80002a8493f0) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a736538,ffffff9c,78a5191f4830,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3063 syscall(ffff80002a849660) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a849660) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x78a5191f48d0, 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(ffffffff8346895c) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffff2806d63fd00,41ed,fffff28007ffd7b8,ffff80002a8492f8) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80002a849360) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffff2806d5a1110,ffff80002a8494c0,ffff80002a8494f0,ffff80002a8493f0) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a736538,ffffff9c,78a5191f4830,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3063 syscall(ffff80002a849660) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a849660) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x78a5191f48d0, count: -8