panic: ffs_valloc: dup alloc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *180427 36700 0 0x2 0 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830ab318) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806c6b86a0,41ed,fffffd807f7d7680,ffff80002a5618b8) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff80002a561920) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd806c6ae1e0,ffff80002a561a80,ffff80002a561ab0,ffff80002a5619b0) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a48ef40,ffffff9c,704ee33ea980,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3100 syscall(ffff80002a561c30) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x704ee33eaa10, 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:437 panic(ffffffff830ab318) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806c6b86a0,41ed,fffffd807f7d7680,ffff80002a5618b8) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff80002a561920) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd806c6ae1e0,ffff80002a561a80,ffff80002a561ab0,ffff80002a5619b0) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a48ef40,ffffff9c,704ee33ea980,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3100 syscall(ffff80002a561c30) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x704ee33eaa10, count: -8 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a561650 rbx 0xfffffd806c223300 rdx 0 rcx 0 rax 0xffff80002a48ef40 r8 0 r9 0x8080808080808080 r10 0xe9b4a9d4af8b96ef r11 0x3a5fe15fd8ecfeac r12 0 r13 0xfffffd807180e3c8 r14 0 r15 0x1 rip 0xffffffff81c57035 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a561640 ss 0 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=180427 pid=36700 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=0xffff80002a48e298,0xffff80002a48e020 process=0xffff80002a491e08 user=0xffff80002a55c000, vmspace=0xfffffd806f8f5008 estcpu=36, cpticks=1, pctcpu=0.1, user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 13524 162903 13580 0 2 0x40 syz-executor 52291 266782 81550 0 2 0 syz-executor 52291 206231 81550 0 3 0x4000080 fsleep syz-executor 78283 268745 77437 0 2 0 syz-executor 78283 478337 77437 0 3 0x4000080 kqsel syz-executor 78283 244443 77437 0 3 0x4000080 fsleep syz-executor 78283 101633 77437 0 3 0x4000080 fsleep syz-executor 91013 310547 66188 0 2 0x40 syz-executor 49152 246434 71813 0 2 0x2 sh 77437 380680 44 0 2 0x482 syz-executor 81550 8855 44 0 2 0x482 syz-executor *36700 180427 44 0 7 0x2 syz-executor 71813 326406 44 0 3 0x82 wait syz-executor 66188 106639 44 0 3 0x82 ppwait syz-executor 13580 387011 44 0 3 0x82 ppwait syz-executor 44 275821 98749 0 3 0x82 wait syz-executor 98749 232175 9383 0 3 0x10008a sigsusp ksh 9383 487677 44332 0 3 0x98 kqread sshd-session 44332 511172 56661 0 3 0x92 kqread sshd-session 90219 433182 1 0 3 0x100083 ttyin getty 56661 449281 1 0 3 0x88 kqread sshd 65906 445112 72643 73 2 0x1100090 syslogd 72643 270413 1 0 3 0x100082 sbwait syslogd 17246 61443 1 0 3 0x100080 kqread resolvd 56252 42591 89124 77 3 0x100092 kqread dhcpleased 38629 78231 89124 77 3 0x100092 kqread dhcpleased 89124 480266 1 0 3 0x80 kqread dhcpleased 17874 499971 0 0 3 0x14200 bored smr 15946 246981 0 0 2 0x14200 zerothread 9495 108034 0 0 3 0x14200 aiodoned aiodoned 61577 477526 0 0 3 0x14200 syncer update 36332 68607 0 0 3 0x14200 cleaner cleaner 34613 223552 0 0 3 0x14200 reaper reaper 32733 408457 0 0 3 0x14200 pgdaemon pagedaemon 29531 299139 0 0 3 0x14200 bored viomb 5044 384855 0 0 3 0x40014200 acpi0 acpi0 55592 349055 0 0 3 0x14200 bored softnet3 3878 229414 0 0 3 0x14200 bored softnet2 72777 143044 0 0 3 0x14200 bored softnet1 12522 388403 0 0 3 0x14200 bored softnet0 17485 335923 0 0 3 0x14200 bored systqmp 53650 157105 0 0 3 0x14200 bored systq 5678 89114 0 0 2 0x40014200 softclock 83288 476483 0 0 3 0x40014200 idle0 1 312630 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 10168 10145K 10146K 166960K 11247 0 pcb 17 12K 12K 166960K 19 0 rtable 230 6K 6K 166960K 336 0 pf 30 12K 12K 166960K 30 0 ifaddr 42 7K 7K 166960K 44 0 ifgroup 50 2K 2K 166960K 50 0 counters 30 17K 17K 166960K 30 0 ioctlops 0 0K 2K 166960K 30 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1364 86K 86K 166960K 1386 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 2 0K 0K 166960K 2 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 15 53K 93K 166960K 133 0 proc 55 58K 100K 166960K 470 0 subproc 104 6K 6K 166960K 104 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 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 340 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 183 71K 72K 166960K 2609 0 UVM aobj 3 2K 2K 166960K 3 0 pinsyscall 36 72K 98K 166960K 1143 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 NDP 27 2K 2K 166960K 27 0 temp 34 6802K 6866K 166960K 3597 0 kqueue 13 20K 20K 166960K 22 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 34 0 31 1 0 1 1 0 8 0 rtentry 112 109 0 1 4 0 4 4 0 8 0 unpcb 144 35 0 20 1 0 1 1 0 8 0 syncache 336 3 0 3 1 0 1 1 0 8 1 tcpcb 808 7 0 3 1 0 1 1 0 8 0 arp 88 18 0 0 1 0 1 1 0 8 0 inpcb 336 60 0 51 2 0 2 2 0 8 1 nd6 104 22 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 32 453 0 0 4 0 4 4 0 8 0 art_node 16 108 0 10 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1548 0 55 94 0 94 94 0 8 0 ffsino 240 1549 0 56 89 0 89 89 0 8 0 nchpl 144 1727 0 59 62 0 62 62 0 8 0 uvmvnodes 80 1664 0 0 34 0 34 34 0 8 0 vnodes 216 1664 0 0 93 0 93 93 0 8 0 namei 1024 5039 0 5038 2 0 2 2 0 8 1 kstatmem 264 22 0 0 2 0 2 2 0 8 0 scxspl 216 4876 0 4876 3 0 3 3 1 8 3 plimitpl 152 27 0 11 1 0 1 1 0 8 0 sigapl 424 413 0 370 6 0 6 6 0 8 0 futexpl 64 87 0 84 1 0 1 1 0 8 0 knotepl 120 2768 0 2721 2 0 2 2 0 8 0 kqueuepl 184 20 0 10 1 0 1 1 0 8 0 pipepl 288 103 0 76 2 0 2 2 0 8 0 fdescpl 432 397 0 370 5 0 5 5 0 8 1 filepl 120 1313 0 1077 8 0 8 8 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 21 0 13 1 0 1 1 0 8 0 pgrppl 48 29 0 13 1 0 1 1 0 8 0 ucredpl 104 51 0 40 1 0 1 1 0 8 0 zombiepl 144 372 0 370 1 0 1 1 0 8 0 processpl 1096 413 0 370 4 0 4 4 0 8 0 procpl 648 422 0 375 5 0 5 5 0 8 0 sockpl 504 129 0 102 4 0 4 4 0 8 0 mcl8k 8192 7 0 7 1 0 1 1 0 8 1 mcl4k 4096 3 0 3 1 0 1 1 0 8 1 mcl2k 2048 4787 0 4690 23 2 21 23 0 8 8 mtagpl 96 5 0 5 1 0 1 1 0 8 1 mbufpl 256 6252 0 6092 12 0 12 12 0 8 2 bufpl 280 2145 0 89 147 0 147 147 0 8 0 anonpl 24 141785 0 139022 24 0 24 24 0 187 3 amapchunkpl 152 8627 0 8270 18 0 18 18 0 158 1 amappl16 200 3901 0 3896 5 0 5 5 0 8 4 amappl15 192 12 0 12 1 0 1 1 0 8 1 amappl14 184 104 0 94 1 0 1 1 0 8 0 amappl13 176 33 0 32 1 0 1 1 0 8 0 amappl12 168 1004 0 980 3 0 3 3 0 8 1 amappl11 160 56 0 46 1 0 1 1 0 8 0 amappl10 152 26 0 25 1 0 1 1 0 8 0 amappl9 144 151 0 151 1 0 1 1 0 8 1 amappl8 136 45 0 44 1 0 1 1 0 8 0 amappl7 128 95 0 85 1 0 1 1 0 8 0 amappl6 120 169 0 167 1 0 1 1 0 8 0 amappl5 112 129 0 121 1 0 1 1 0 8 0 amappl4 104 283 0 267 1 0 1 1 0 8 0 amappl3 96 1702 0 1622 3 0 3 3 0 8 0 amappl2 88 580 0 528 2 0 2 2 0 8 0 amappl1 80 7426 0 6909 14 0 14 14 0 8 3 amappl 88 2279 0 2150 4 0 4 4 0 92 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 397 0 370 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 397 0 370 1 0 1 1 0 8 0 vmmpekpl 168 5241 0 5204 2 0 2 2 0 8 0 vmmpepl 168 33937 0 32388 78 0 78 78 0 357 5 vmsppl 344 396 0 370 4 0 4 4 0 8 1 rwobjpl 24 15950 0 13490 17 0 17 17 0 8 1 pdppl 4096 800 0 740 94 14 80 80 0 8 20 pvpl 32 252147 0 245076 74 0 74 74 0 265 8 pmappl 216 396 0 370 3 0 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 362 0 16 10 0 10 10 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:437 panic(ffffffff830ab318) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806c6b86a0,41ed,fffffd807f7d7680,ffff80002a5618b8) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff80002a561920) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd806c6ae1e0,ffff80002a561a80,ffff80002a561ab0,ffff80002a5619b0) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a48ef40,ffffff9c,704ee33ea980,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3100 syscall(ffff80002a561c30) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x704ee33eaa10, count: -8 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830ab318) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806c6b86a0,41ed,fffffd807f7d7680,ffff80002a5618b8) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff80002a561920) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd806c6ae1e0,ffff80002a561a80,ffff80002a561ab0,ffff80002a5619b0) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a48ef40,ffffff9c,704ee33ea980,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3100 syscall(ffff80002a561c30) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x704ee33eaa10, count: -8