panic: ffs_valloc: dup alloc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *144070 80137 0 0x2 0 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8346cc2b) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffb806d478300,41ed,fffffb8007ffd4e0,ffff80002a8a3738) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80002a8a37a0) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffb806d376dc0,ffff80002a8a3900,ffff80002a8a3930,ffff80002a8a3830) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a7362a0,ffffff9c,7c7533b340d0,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3063 syscall(ffff80002a8a3aa0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a8a3aa0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7c7533b34170, 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(ffffffff8346cc2b) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffb806d478300,41ed,fffffb8007ffd4e0,ffff80002a8a3738) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80002a8a37a0) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffb806d376dc0,ffff80002a8a3900,ffff80002a8a3930,ffff80002a8a3830) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a7362a0,ffffff9c,7c7533b340d0,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3063 syscall(ffff80002a8a3aa0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a8a3aa0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7c7533b34170, count: -8 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a8a34c0 rbx 0x6656 __ALIGN_SIZE+0x5656 rdx 0 rcx 0 rax 0xffff80002a7362a0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x4bbf48cc39277bbd r11 0x67f73e2552940002 r12 0 r13 0xfffffb806cb62800 r14 0 r15 0x1 rip 0xffffffff811115b5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a8a34b0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=144070 pid=80137 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=0xffff80002a736f98,0xffff80003c8fa2c8 process=0xffff80002a79fa90 user=0xffff80002a89e000, vmspace=0xfffffb80747e72e8 estcpu=18, cpticks=2, pctcpu=0.0, user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 44479 312627 94308 0 2 0 0 syz-executor 44479 107288 94308 0 2 0 0x4000000 syz-executor 43380 345284 6459 0 2 0x100000 0 sh 6459 24144 80303 0 3 0x100002 0x88 sigsusp sh *80137 144070 80498 0 7 0x2 0 syz-executor 876 185145 80498 0 2 0x2 0 syz-executor 62607 405003 80498 0 2 0x2 0 syz-executor 94308 432978 80498 0 3 0x2 0x80 nanoslp syz-executor 80303 290590 80498 0 3 0x2 0x80 wait syz-executor 80498 73387 9394 0 3 0x2 0x80 wait syz-executor 9394 37624 77418 0 3 0x100002 0x88 sigsusp ksh 77418 494732 24239 0 3 0x10 0x88 kqread sshd-session 24239 351798 55992 0 3 0x12 0x80 kqread sshd-session 34235 122644 1 0 3 0x100003 0x80 ttyin getty 55992 102203 1 0 3 0 0x88 kqread sshd 18246 228918 7893 73 3 0x1100010 0x80 kqread syslogd 7893 50122 1 0 3 0x100002 0x80 sbwait syslogd 94111 495373 1 0 3 0x100000 0x80 kqread resolvd 40218 223799 62837 77 3 0x100012 0x80 kqread dhcpleased 3547 309437 62837 77 3 0x100012 0x80 kqread dhcpleased 62837 364743 1 0 3 0 0x80 kqread dhcpleased 18796 417333 0 0 3 0x14000 0x200 bored smr 77284 406722 0 0 2 0x14000 0x200 zerothread 51234 305524 0 0 3 0x14000 0x200 aiodoned aiodoned 78600 38743 0 0 3 0x14000 0x200 syncer update 76067 183316 0 0 3 0x14000 0x200 cleaner cleaner 23883 170236 0 0 3 0x14000 0x200 reaper reaper 2115 173987 0 0 3 0x14000 0x200 pgdaemon pagedaemon 28916 233833 0 0 3 0x14000 0x200 bored viomb 61890 170727 0 0 3 0x14000 0x40000200 acpi0 acpi0 33428 24603 0 0 3 0x14000 0x200 bored softnet0 99358 69597 0 0 3 0x14000 0x200 smrbar systqmp 31536 208232 0 0 3 0x14000 0x200 bored systq 24346 456017 0 0 3 0x14000 0x40000200 tmoslp softclock 96643 239245 0 0 3 0x14000 0x40000200 idle0 1 218899 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 11027 12102K 12118K 166960K 12113 0 pcb 17 12K 12K 166960K 17 0 rtable 235 6K 6K 166960K 347 0 pf 30 12K 12K 166960K 30 0 ifaddr 42 7K 7K 166960K 44 0 ifgroup 50 2K 2K 166960K 50 0 sysctl 1 1K 9K 166960K 5 0 counters 33 17K 17K 166960K 33 0 ioctlops 0 0K 2K 166960K 30 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1288 81K 81K 166960K 1354 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 13 45K 97K 166960K 135 0 proc 61 67K 124K 166960K 499 0 subproc 72 4K 4K 166960K 72 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 in_multi 99 7K 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 25 122K 122K 166960K 25 0 exec 0 0K 1K 166960K 367 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 171 158K 166K 166960K 2884 0 UVM aobj 3 2K 2K 166960K 3 0 pinsyscall 34 68K 96K 166960K 1232 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 NDP 27 2K 2K 166960K 27 0 temp 33 9106K 9112K 166960K 3596 0 kqueue 13 20K 20K 166960K 25 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 35 0 32 1 0 1 1 0 8 0 rtentry 136 110 0 1 4 0 4 4 0 8 0 unpcb 144 37 0 22 1 0 1 1 0 8 0 syncache 336 4 0 4 1 0 1 1 0 8 1 tcpcb 736 8 0 4 1 0 1 1 0 8 0 arp 96 18 0 0 1 0 1 1 0 8 0 inpcb 328 58 0 51 2 0 2 2 0 8 1 nd6 112 23 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 452 0 0 29 0 29 29 0 8 0 art_table 40 453 0 0 5 0 5 5 0 8 0 art_node 32 110 0 4 1 0 1 1 0 8 0 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 1555 0 99 92 0 92 92 0 8 0 ffsino 256 1557 0 101 92 0 92 92 0 8 0 nchpl 144 1751 0 63 63 0 63 63 0 8 0 vnodes 216 1639 0 0 92 0 92 92 0 8 0 namei 1024 5148 0 5147 2 0 2 2 0 8 1 kstatmem 264 23 0 0 2 0 2 2 0 8 0 scxspl 216 5933 0 5933 4 0 4 4 1 8 4 plimitpl 152 29 0 13 1 0 1 1 0 8 0 sigapl 424 430 0 392 6 0 6 6 0 8 0 knotepl 120 2611 0 2564 2 0 2 2 0 8 0 kqueuepl 184 21 0 12 1 0 1 1 0 8 0 pipepl 304 122 0 95 3 0 3 3 0 8 0 fdescpl 448 417 0 392 5 0 5 5 0 8 0 filepl 120 1428 0 1226 7 0 7 7 0 8 0 lockfpl 104 6 0 4 1 0 1 1 0 8 0 lockfspl 48 4 0 2 1 0 1 1 0 8 0 sessionpl 144 23 0 15 1 0 1 1 0 8 0 pgrppl 48 31 0 15 1 0 1 1 0 8 0 ucredpl 104 79 0 68 1 0 1 1 0 8 0 zombiepl 144 395 0 392 1 0 1 1 0 8 0 processpl 1152 430 0 392 4 0 4 4 0 8 0 procpl 664 435 0 396 5 0 5 5 0 8 0 sockpl 552 130 0 105 3 0 3 3 0 8 1 mcl64k 65536 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 4 0 4 1 0 1 1 0 8 1 mcl4k 4096 2462 0 2411 14 0 14 14 0 8 6 mcl2k 2048 112 0 112 1 0 1 1 0 8 1 mextrefs 64 32 0 32 1 0 1 1 0 8 1 mtagpl 96 4 0 4 1 0 1 1 0 8 1 mbufpl 256 4109 0 4006 10 0 10 10 0 8 2 bufpl 272 2230 0 102 142 0 142 142 0 8 0 anonpl 24 73677 0 71005 20 0 20 20 0 187 0 amapchunkpl 152 7467 0 7162 15 0 15 15 0 158 0 amappl16 200 902 0 891 4 0 4 4 0 8 3 amappl15 192 7 0 7 1 0 1 1 0 8 1 amappl14 184 458 0 456 1 0 1 1 0 8 0 amappl13 176 113 0 103 1 0 1 1 0 8 0 amappl12 168 654 0 630 2 0 2 2 0 8 0 amappl11 160 8 0 8 1 0 1 1 0 8 1 amappl10 152 56 0 46 1 0 1 1 0 8 0 amappl9 144 280 0 280 1 0 1 1 0 8 1 amappl8 136 95 0 93 1 0 1 1 0 8 0 amappl7 128 181 0 170 1 0 1 1 0 8 0 amappl6 120 149 0 147 1 0 1 1 0 8 0 amappl5 112 91 0 84 1 0 1 1 0 8 0 amappl4 104 261 0 246 1 0 1 1 0 8 0 amappl3 96 1382 0 1312 3 0 3 3 0 8 0 amappl2 88 518 0 464 2 0 2 2 0 8 0 amappl1 80 10102 0 9578 13 0 13 13 0 8 0 amappl 88 2205 0 2097 3 0 3 3 0 92 0 uvmvnodes 80 95 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 417 0 392 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 417 0 392 1 0 1 1 0 8 0 vmmpekpl 168 5373 0 5335 2 0 2 2 0 8 0 vmmpepl 168 35439 0 33971 76 0 76 76 0 357 3 vmsppl 368 416 0 392 4 0 4 4 0 8 0 rwobjpl 40 13165 0 12295 11 0 11 11 0 8 0 pdppl 4096 840 0 784 96 14 82 82 0 8 26 pvpl 32 192090 0 185290 68 0 68 68 0 265 1 pmappl 216 416 0 392 3 0 3 3 0 8 0 extentpl 40 46 0 28 1 0 1 1 0 8 0 phpool 112 498 0 14 14 0 14 14 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(ffffffff8346cc2b) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffb806d478300,41ed,fffffb8007ffd4e0,ffff80002a8a3738) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80002a8a37a0) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffb806d376dc0,ffff80002a8a3900,ffff80002a8a3930,ffff80002a8a3830) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a7362a0,ffffff9c,7c7533b340d0,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3063 syscall(ffff80002a8a3aa0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a8a3aa0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7c7533b34170, 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(ffffffff8346cc2b) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffb806d478300,41ed,fffffb8007ffd4e0,ffff80002a8a3738) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80002a8a37a0) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffb806d376dc0,ffff80002a8a3900,ffff80002a8a3930,ffff80002a8a3830) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a7362a0,ffffff9c,7c7533b340d0,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3063 syscall(ffff80002a8a3aa0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a8a3aa0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7c7533b34170, count: -8