panic: ffs_valloc: dup alloc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 95882 96698 0 0x2 0 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8349e8dc) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffff2806d2c7b00,41ed,fffff28007ffd478,ffff80003c9a7968) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80003c9a79d0) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffff2806d3b0210,ffff80003c9a7b30,ffff80003c9a7b60,ffff80003c9a7a60) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a74c2a8,ffffff9c,7238dd3b3790,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3060 syscall(ffff80003c9a7cd0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c9a7cd0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7238dd3b3830, 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(ffffffff8349e8dc) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffff2806d2c7b00,41ed,fffff28007ffd478,ffff80003c9a7968) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80003c9a79d0) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffff2806d3b0210,ffff80003c9a7b30,ffff80003c9a7b60,ffff80003c9a7a60) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a74c2a8,ffffff9c,7238dd3b3790,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3060 syscall(ffff80003c9a7cd0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c9a7cd0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7238dd3b3830, count: -8 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003c9a76f0 rbx 0x6a40 __ALIGN_SIZE+0x5a40 rdx 0 rcx 0 rax 0xffff80002a74c2a8 r8 0x101010101010101 r9 0x8080808080808080 r10 0x4db28f7ecfb9f6f r11 0x198b7da297652c28 r12 0 r13 0xfffff28073f66600 r14 0 r15 0x1 rip 0xffffffff8296a3f5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c9a76e0 ss 0 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=95882 pid=96698 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=0xffff80002a74c010,0xffff80002a800d38 process=0xffff8000388cb1f0 user=0xffff80003c9a2000, vmspace=0xfffff28073f16a18 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 68784 130311 31678 0 2 0x100002 0 sh 62775 255060 2007 0 3 0x2 0x80 piperd syz-executor 71441 312745 2007 0 3 0x2 0x80 piperd syz-executor 31678 345900 2007 0 3 0x2 0x80 wait syz-executor 30873 286275 2007 0 3 0x2 0x80 piperd syz-executor *96698 95882 2007 0 7 0x2 0 syz-executor 77578 94204 1 0 3 0 0x80 nanoslp init 19578 520312 2007 0 3 0x2 0x80 piperd syz-executor 94433 442388 0 0 3 0x14000 0x280 nfsidl nfsio 87700 520685 0 0 3 0x14000 0x280 nfsidl nfsio 6782 277517 0 0 3 0x14000 0x280 nfsidl nfsio 7960 303659 0 0 3 0x14000 0x280 nfsidl nfsio 75777 418820 0 0 3 0x14000 0x280 nfsidl nfsio 32768 372320 0 0 3 0x14000 0x280 nfsidl nfsio 75129 19607 0 0 3 0x14000 0x280 nfsidl nfsio 13856 382344 0 0 3 0x14000 0x280 nfsidl nfsio 33535 181329 0 0 3 0x14000 0x280 nfsidl nfsio 81138 479938 0 0 3 0x14000 0x280 nfsidl nfsio 86445 38106 0 0 3 0x14000 0x280 nfsidl nfsio 67282 30337 0 0 3 0x14000 0x280 nfsidl nfsio 36627 451849 0 0 3 0x14000 0x280 nfsidl nfsio 72663 187501 0 0 3 0x14000 0x280 nfsidl nfsio 5307 350756 0 0 3 0x14000 0x280 nfsidl nfsio 67134 88215 0 0 3 0x14000 0x280 nfsidl nfsio 45034 213021 0 0 3 0x14000 0x280 nfsidl nfsio 62147 448641 0 0 3 0x14000 0x280 nfsidl nfsio 38566 200077 0 0 3 0x14000 0x280 nfsidl nfsio 7423 32569 0 0 3 0x14000 0x280 nfsidl nfsio 42134 129119 0 0 3 0x14000 0x200 acct acct 35846 82465 2007 0 3 0x2 0x80 nanoslp syz-executor 2007 443114 1 0 3 0x2 0x80 nanoslp syz-executor 95513 261187 0 0 3 0x14000 0x200 bored smr 72551 307867 0 0 2 0x14000 0x200 zerothread 87904 116356 0 0 3 0x14000 0x200 aiodoned aiodoned 90622 302715 0 0 3 0x14000 0x200 syncer update 46621 506603 0 0 3 0x14000 0x200 cleaner cleaner 60621 452329 0 0 3 0x14000 0x200 reaper reaper 78738 234370 0 0 3 0x14000 0x200 pgdaemon pagedaemon 86409 235331 0 0 3 0x14000 0x200 bored viomb 77598 23175 0 0 3 0x14000 0x40000200 acpi0 acpi0 63369 215391 0 0 3 0x14000 0x200 bored softnet0 61567 406348 0 0 3 0x14000 0x200 smrbar systqmp 27355 342949 0 0 3 0x14000 0x200 bored systq 60412 390078 0 0 3 0x14000 0x40000200 tmoslp softclock 42776 128866 0 0 3 0x14000 0x40000200 idle0 1 314895 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 11024 12098K 12202K 166960K 12408 0 pcb 17 12K 12K 166960K 34 0 rtable 187 6K 7K 166960K 1099 0 pf 31 13K 19K 166960K 101 0 ifaddr 36 6K 7K 166960K 152 0 ifgroup 48 2K 2K 166960K 160 0 sysctl 3 1K 9K 166960K 9 0 counters 33 17K 17K 166960K 64 0 ioctlops 0 0K 4K 166960K 84 0 iov 0 0K 13K 166960K 3 0 mount 1 1K 1K 166960K 1 0 log 1 0K 8K 166960K 7 0 vnodes 1291 81K 82K 166960K 1687 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 4 0 VM map 2 1K 1K 166960K 2 0 sem 27 0K 0K 166960K 73 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12472 0 file desc 10 37K 97K 166960K 613 0 sigio 0 0K 0K 166960K 4 0 proc 10 17K 91K 166960K 1237 0 subproc 63 3K 4K 166960K 306 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 12 0 in_multi 77 5K 6K 166960K 374 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 7 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 714 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 14 124K 124K 166960K 15 0 UVM amap 76 69K 163K 166960K 5896 0 UVM aobj 6 2K 6K 166960K 8 0 pinsyscall 12 24K 96K 166960K 2368 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 1 0 NDP 19 1K 2K 166960K 106 0 temp 29 9113K 9178K 166960K 10182 0 kqueue 1 2K 24K 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 90 0 90 1 0 1 1 0 8 1 rtentry 136 387 0 299 4 0 4 4 0 8 0 unpcb 144 347 0 347 10 2 8 10 0 8 8 syncache 336 5 0 5 1 0 1 1 0 8 1 tcpcb 736 31 0 30 1 0 1 1 0 8 0 arp 96 68 0 54 1 0 1 1 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 1 0 0 1 0 1 1 0 8 0 inpcb 328 230 0 229 2 0 2 2 0 8 1 ip6q 80 1 0 0 1 0 1 1 0 8 0 ip6af 40 1 0 0 1 0 1 1 0 8 0 nd6 112 100 0 82 1 0 1 1 0 8 0 pkpcb 40 5 0 5 1 0 1 1 0 8 1 kcovpl 48 34 0 27 1 0 1 1 0 8 0 ppxss 1072 5 0 4 1 0 1 1 0 8 0 pfanchor 1288 2 0 0 1 0 1 1 0 8 0 pfrule 1360 2 0 1 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1575 0 1158 34 5 29 32 0 8 2 art_table 40 1576 0 1158 6 0 6 6 0 8 0 art_node 32 387 0 293 1 0 1 1 0 8 0 semapl 72 71 0 46 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 1821 0 297 96 0 96 96 0 8 0 ffsino 256 1821 0 297 96 0 96 96 0 8 0 nchpl 144 2146 0 336 68 0 68 68 0 8 0 rtmask 32 2 0 2 1 0 1 1 0 8 1 vnodes 216 2178 0 0 121 0 121 121 0 8 0 namei 1024 11479 0 11478 4 0 4 4 0 8 3 vcpupl 3968 32 0 32 4 0 4 4 0 8 4 vmpool 808 2 0 2 1 0 1 1 0 8 1 kstatmem 264 81 0 58 2 0 2 2 0 8 0 scsiplug 72 1 0 1 1 0 1 1 0 8 1 scxspl 216 7471 0 7471 8 0 8 8 1 8 8 plimitpl 152 396 0 387 1 0 1 1 0 8 0 sigapl 424 871 0 824 8 0 8 8 0 8 1 knotepl 120 4852 0 4835 9 0 9 9 0 8 7 kqueuepl 184 49 0 48 1 0 1 1 0 8 0 pipepl 304 272 0 245 8 0 8 8 0 8 5 fdescpl 448 837 0 824 5 0 5 5 0 8 1 filepl 120 3587 0 3449 17 3 14 17 0 8 8 lockfpl 104 716 0 716 1 0 1 1 0 8 1 lockfspl 48 158 0 158 1 0 1 1 0 8 1 sessionpl 144 116 0 114 1 0 1 1 0 8 0 pgrppl 48 152 0 143 1 0 1 1 0 8 0 ucredpl 104 230 0 227 1 0 1 1 0 8 0 zombiepl 144 825 0 824 1 0 1 1 0 8 0 processpl 1160 871 0 824 5 0 5 5 0 8 0 procpl 664 1109 0 1062 7 0 7 7 0 8 0 sockpl 552 674 0 673 20 11 9 20 0 8 8 mcl64k 65536 3 0 3 1 0 1 1 0 8 1 mcl16k 16384 2 0 2 1 0 1 1 0 8 1 mcl12k 12288 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 16 0 16 1 0 1 1 0 8 1 mcl4k 4096 2669 0 2617 14 0 14 14 0 8 6 mcl2k 2048 299 0 296 1 0 1 1 0 8 0 mextrefs 64 103 0 102 1 0 1 1 0 8 0 mtagpl 96 4 0 4 1 0 1 1 0 8 1 mbufpl 256 6375 0 6252 11 0 11 11 0 8 1 bufpl 272 2587 0 86 167 0 167 167 0 8 0 anonpl 24 124997 0 124024 32 0 32 32 0 187 18 amapchunkpl 152 16351 0 16171 25 0 25 25 0 158 13 amappl16 200 1654 0 1651 5 0 5 5 0 8 3 amappl15 192 7 0 7 1 0 1 1 0 8 1 amappl14 184 704 0 703 1 0 1 1 0 8 0 amappl13 176 164 0 164 1 0 1 1 0 8 1 amappl12 168 1173 0 1162 2 0 2 2 0 8 0 amappl11 160 2 0 2 1 0 1 1 0 8 1 amappl10 152 59 0 59 1 0 1 1 0 8 1 amappl9 144 283 0 283 1 0 1 1 0 8 1 amappl8 136 225 0 225 1 0 1 1 0 8 1 amappl7 128 191 0 189 1 0 1 1 0 8 0 amappl6 120 266 0 265 1 0 1 1 0 8 0 amappl5 112 226 0 225 1 0 1 1 0 8 0 amappl4 104 342 0 340 1 0 1 1 0 8 0 amappl3 96 3224 0 3184 3 0 3 3 0 8 0 amappl2 88 538 0 530 2 0 2 2 0 8 0 amappl1 80 13602 0 13535 13 1 12 13 0 8 8 amappl 88 4781 0 4715 4 0 4 4 0 92 0 uvmvnodes 80 102 0 0 3 0 3 3 0 8 0 dma4096 4096 2 0 2 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 7 0 2 1 0 1 1 0 8 0 uaddrrnd 24 837 0 824 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 837 0 824 1 0 1 1 0 8 0 vmmpekpl 168 8429 0 8376 3 0 3 3 0 8 0 vmmpepl 168 62574 0 62118 79 0 79 79 0 357 43 vmsppl 368 836 0 824 4 0 4 4 0 8 1 rwobjpl 40 20341 0 20035 10 0 10 10 0 8 0 pdppl 4096 1684 0 1652 112 66 46 82 0 8 14 pvpl 32 339246 0 336626 96 0 96 96 0 265 61 pmappl 216 838 0 826 3 0 3 3 0 8 1 extentpl 40 46 0 28 1 0 1 1 0 8 0 phpool 112 558 0 71 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(ffffffff8349e8dc) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffff2806d2c7b00,41ed,fffff28007ffd478,ffff80003c9a7968) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80003c9a79d0) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffff2806d3b0210,ffff80003c9a7b30,ffff80003c9a7b60,ffff80003c9a7a60) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a74c2a8,ffffff9c,7238dd3b3790,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3060 syscall(ffff80003c9a7cd0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c9a7cd0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7238dd3b3830, count: -8 ddb>