panic: ffs_valloc: dup alloc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *494585 55819 0 0x2 0 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830aeb00) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806c3be008,41ed,fffffd807f7d7618,ffff80002bfd7618) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff80002bfd7680) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd806c4953a0,ffff80002bfd77e0,ffff80002bfd7810,ffff80002bfd7710) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a5b5968,ffffff9c,7260015f7ed0,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3099 syscall(ffff80002bfd7990) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7260015f7f60, 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(ffffffff830aeb00) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806c3be008,41ed,fffffd807f7d7618,ffff80002bfd7618) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff80002bfd7680) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd806c4953a0,ffff80002bfd77e0,ffff80002bfd7810,ffff80002bfd7710) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a5b5968,ffffff9c,7260015f7ed0,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3099 syscall(ffff80002bfd7990) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7260015f7f60, count: -8 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002bfd73b0 rbx 0xfffffd805f22f800 rdx 0 rcx 0 rax 0xffff80002a5b5968 r8 0x101010101010101 r9 0x8080808080808080 r10 0xabf1a1ce153a1637 r11 0xdd7ce49f6ffb8687 r12 0 r13 0xfffffd806919f4b0 r14 0 r15 0x1 rip 0xffffffff81301ee5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002bfd73a0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=494585 pid=55819 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=0xffff80002a5b5458,0xffff80003765ef70 process=0xffff8000ffff48a8 user=0xffff80002bfd2000, vmspace=0xfffffd806b7dad88 estcpu=36, cpticks=2, pctcpu=0.0, user=1, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 92512 362777 85747 0 2 0x480 syz-executor 92512 189930 85747 0 3 0x4000080 pipewr syz-executor 92512 192889 85747 0 3 0x4000080 fsleep syz-executor 72795 258703 83494 0 2 0x480 syz-executor 72795 497067 83494 0 3 0x4000080 piperd syz-executor 72795 427880 83494 0 3 0x4000080 fsleep syz-executor 77383 144833 31241 0 2 0x490 syz-executor 77383 285349 31241 0 3 0x4000090 kqsel syz-executor 77383 248548 31241 0 3 0x4000090 fsleep syz-executor 47800 473061 91407 0 3 0x80 nanoslp syz-executor 47800 500430 91407 0 3 0x4000080 ttyopn syz-executor 47800 167664 91407 0 3 0x4000080 fsleep syz-executor 47800 7484 91407 0 3 0x4000080 fsleep syz-executor *55819 494585 41422 0 7 0x2 syz-executor 85747 111377 41422 0 3 0x82 nanoslp syz-executor 91407 235878 41422 0 3 0x82 nanoslp syz-executor 31012 404996 41422 0 2 0x2 syz-executor 83494 174233 41422 0 3 0x82 nanoslp syz-executor 98585 305342 41422 0 2 0x2 syz-executor 31241 78922 41422 0 3 0x82 nanoslp syz-executor 58370 332038 0 0 3 0x14280 nfsidl nfsio 44719 37172 0 0 3 0x14280 nfsidl nfsio 74292 58605 0 0 3 0x14280 nfsidl nfsio 80905 146402 0 0 3 0x14280 nfsidl nfsio 19302 164982 0 0 3 0x14280 nfsidl nfsio 19835 393190 0 0 3 0x14280 nfsidl nfsio 42222 247267 0 0 3 0x14280 nfsidl nfsio 87909 409298 0 0 3 0x14280 nfsidl nfsio 39075 219383 0 0 3 0x14280 nfsidl nfsio 18958 173757 0 0 3 0x14280 nfsidl nfsio 48907 94659 0 0 3 0x14280 nfsidl nfsio 77763 157906 0 0 3 0x14280 nfsidl nfsio 51819 501797 0 0 3 0x14280 nfsidl nfsio 66684 348771 0 0 3 0x14280 nfsidl nfsio 28981 424688 0 0 3 0x14280 nfsidl nfsio 31540 32628 0 0 3 0x14280 nfsidl nfsio 76297 32102 0 0 3 0x14280 nfsidl nfsio 59051 309890 0 0 3 0x14280 nfsidl nfsio 632 334950 0 0 3 0x14280 nfsidl nfsio 27482 166886 0 0 3 0x14280 nfsidl nfsio 41422 411535 15156 0 3 0x82 wait syz-executor 15156 368688 73469 0 3 0x10008a sigsusp ksh 73469 332178 11626 0 3 0x98 kqread sshd-session 11626 368510 68176 0 3 0x92 kqread sshd-session 73701 98839 1 0 3 0x100083 ttyin getty 68176 14506 1 0 3 0x88 kqread sshd 52929 467840 3568 73 3 0x1100090 kqread syslogd 3568 221719 1 0 3 0x100082 sbwait syslogd 48671 221688 1 0 3 0x100080 kqread resolvd 71364 233857 37877 77 3 0x100092 kqread dhcpleased 6124 328892 37877 77 3 0x100092 kqread dhcpleased 37877 167085 1 0 3 0x80 kqread dhcpleased 54101 262443 0 0 3 0x14200 bored smr 83262 204554 0 0 2 0x14200 zerothread 16989 448568 0 0 3 0x14200 aiodoned aiodoned 97570 433916 0 0 3 0x14200 syncer update 49547 450550 0 0 3 0x14200 cleaner cleaner 22789 267518 0 0 3 0x14200 reaper reaper 58670 221709 0 0 3 0x14200 pgdaemon pagedaemon 55175 517461 0 0 3 0x14200 bored viomb 45061 74742 0 0 3 0x40014200 acpi0 acpi0 66074 317861 0 0 3 0x14200 bored softnet3 67409 5234 0 0 3 0x14200 bored softnet2 57158 214871 0 0 3 0x14200 bored softnet1 7319 227485 0 0 3 0x14200 bored softnet0 55414 450607 0 0 3 0x14200 bored systqmp 86187 267334 0 0 3 0x14200 bored systq 30810 345556 0 0 2 0x40014200 softclock 29995 8822 0 0 3 0x40014200 idle0 1 480785 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 10197 10219K 10342K 166960K 11660 0 pcb 17 13K 14K 166960K 89 0 rtable 235 6K 7K 166960K 1105 0 pf 30 12K 14K 166960K 87 0 ifaddr 42 7K 7K 166960K 122 0 ifgroup 50 2K 2K 166960K 143 0 sysctl 2 0K 0K 166960K 2 0 counters 30 17K 17K 166960K 55 0 ioctlops 0 0K 4K 166960K 67 0 iov 0 0K 14K 166960K 15 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1375 87K 87K 166960K 1719 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 7 0 VM map 2 1K 1K 166960K 2 0 sem 5 5K 5K 166960K 7 0 dirhash 12 2K 2K 166960K 18 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 14 49K 97K 166960K 580 0 sigio 0 0K 0K 166960K 7 0 proc 58 59K 124K 166960K 949 0 subproc 104 6K 6K 166960K 312 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 29 0 in_multi 99 7K 7K 166960K 292 0 ether_multi 1 0K 0K 166960K 2 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 67 307K 307K 166960K 67 0 exec 0 0K 1K 166960K 641 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 202 71K 90K 166960K 5731 0 UVM aobj 13 2K 4K 166960K 15 0 pinsyscall 35 70K 102K 166960K 2009 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 1 0K 0K 166960K 12 0 NDP 19 1K 2K 166960K 84 0 temp 52 6809K 6876K 166960K 28911 0 kqueue 13 20K 26K 166960K 52 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 144 0 141 3 0 3 3 0 8 2 rtentry 112 422 0 312 4 0 4 4 0 8 0 unpcb 144 178 0 157 2 0 2 2 0 8 1 syncache 336 3 0 3 1 0 1 1 0 8 1 tcpcb 808 60 0 55 1 0 1 1 0 8 0 arp 88 116 0 98 1 0 1 1 0 8 0 ipq 40 2 0 0 1 0 1 1 0 8 0 ipqe 40 5 0 3 1 0 1 1 0 8 0 inpcb 336 436 0 422 7 0 7 7 0 8 5 nd6 104 74 0 50 1 0 1 1 0 8 0 pkpcb 40 1 0 1 1 0 1 1 0 8 1 kcovpl 48 24 0 16 1 0 1 1 0 8 0 ppxss 1072 5 0 5 1 0 1 1 0 8 1 pfrktable 1344 1 0 1 1 0 1 1 0 8 1 pftag 88 2 0 2 1 0 1 1 0 8 1 pfrule 1344 2 0 2 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1237 0 778 29 0 29 29 0 8 0 art_table 32 1238 0 778 4 0 4 4 0 8 0 art_node 16 421 0 321 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 1 1 0 1 1 0 8 0 semapl 112 3 0 0 1 0 1 1 0 8 0 shmpl 112 12 0 2 1 0 1 1 0 8 0 dirhash 1024 21 0 4 3 0 3 3 0 8 0 dino2pl 256 1956 0 426 96 0 96 96 0 8 0 ffsino 240 1957 0 427 91 0 91 91 0 8 0 nchpl 144 2454 0 755 64 0 64 64 0 8 0 uvmvnodes 80 2352 0 0 48 0 48 48 0 8 0 vnodes 216 2352 0 0 131 0 131 131 0 8 0 namei 1024 9822 0 9821 2 0 2 2 0 8 1 kstatmem 264 72 0 50 2 0 2 2 0 8 0 scxspl 216 14636 0 14636 8 0 8 8 1 8 8 plimitpl 152 74 0 57 1 0 1 1 0 8 0 sigapl 424 846 0 784 8 0 8 8 0 8 0 futexpl 64 3483 0 3478 1 0 1 1 0 8 0 knotepl 120 10426 0 10379 17 7 10 17 0 8 8 kqueuepl 184 100 0 90 3 0 3 3 0 8 2 pipepl 288 172 0 143 3 0 3 3 0 8 0 fdescpl 432 809 0 783 5 0 5 5 0 8 1 filepl 120 3746 0 3481 11 0 11 11 0 8 2 lockfpl 104 78 0 73 1 0 1 1 0 8 0 lockfspl 48 35 0 30 1 0 1 1 0 8 0 sessionpl 144 37 0 29 1 0 1 1 0 8 0 pgrppl 48 66 0 50 1 0 1 1 0 8 0 ucredpl 104 219 0 207 1 0 1 1 0 8 0 zombiepl 144 785 0 784 1 0 1 1 0 8 0 processpl 1096 846 0 784 5 0 5 5 0 8 0 procpl 648 1184 0 1113 8 0 8 8 0 8 1 sockpl 504 766 0 728 13 1 12 13 0 8 6 mcl64k 65536 1 0 1 1 0 1 1 0 8 1 mcl16k 16384 2 0 2 1 0 1 1 0 8 1 mcl8k 8192 12 0 12 1 0 1 1 0 8 1 mcl4k 4096 3 0 3 1 0 1 1 0 8 1 mcl2k 2048 5882 0 5787 25 5 20 25 0 8 7 mtagpl 96 12 0 11 1 0 1 1 0 8 0 mbufpl 256 10386 0 10204 18 0 18 18 0 8 4 bufpl 280 5974 0 90 421 0 421 421 0 8 0 anonpl 24 168148 0 165065 50 0 50 50 0 187 28 amapchunkpl 152 18303 0 17890 33 0 33 33 0 158 13 amappl16 200 3464 0 3448 5 0 5 5 0 8 4 amappl15 192 39 0 38 1 0 1 1 0 8 0 amappl14 184 140 0 130 1 0 1 1 0 8 0 amappl13 176 10 0 10 1 0 1 1 0 8 1 amappl12 168 1668 0 1642 3 0 3 3 0 8 1 amappl11 160 42 0 32 1 0 1 1 0 8 0 amappl10 152 9 0 9 1 0 1 1 0 8 1 amappl9 144 136 0 136 1 0 1 1 0 8 1 amappl8 136 26 0 25 1 0 1 1 0 8 0 amappl7 128 207 0 197 1 0 1 1 0 8 0 amappl6 120 321 0 319 1 0 1 1 0 8 0 amappl5 112 190 0 182 1 0 1 1 0 8 0 amappl4 104 336 0 321 1 0 1 1 0 8 0 amappl3 96 3283 0 3202 3 0 3 3 0 8 0 amappl2 88 1048 0 981 2 0 2 2 0 8 0 amappl1 80 9718 0 9200 14 0 14 14 0 8 2 amappl 88 5267 0 5119 5 0 5 5 0 92 0 dma4096 4096 1 0 1 1 0 1 1 0 8 1 dma1024 1024 2 0 1 1 0 1 1 0 8 0 dma512 512 1 0 1 1 0 1 1 0 8 1 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 14 0 2 1 0 1 1 0 8 0 uaddrrnd 24 809 0 783 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 809 0 783 1 0 1 1 0 8 0 vmmpekpl 168 8081 0 8031 3 0 3 3 0 8 0 vmmpepl 168 56915 0 55333 81 0 81 81 0 357 3 vmsppl 344 808 0 783 4 0 4 4 0 8 1 rwobjpl 24 21535 0 18350 20 0 20 20 0 8 0 pdppl 4096 1624 0 1566 118 48 70 82 0 8 12 pvpl 32 411060 0 402046 222 0 222 222 0 265 137 pmappl 216 808 0 783 3 0 3 3 0 8 1 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 416 0 54 11 0 11 11 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(ffffffff830aeb00) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806c3be008,41ed,fffffd807f7d7618,ffff80002bfd7618) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff80002bfd7680) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd806c4953a0,ffff80002bfd77e0,ffff80002bfd7810,ffff80002bfd7710) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a5b5968,ffffff9c,7260015f7ed0,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3099 syscall(ffff80002bfd7990) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7260015f7f60, 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(ffffffff830aeb00) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806c3be008,41ed,fffffd807f7d7618,ffff80002bfd7618) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff80002bfd7680) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd806c4953a0,ffff80002bfd77e0,ffff80002bfd7810,ffff80002bfd7710) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a5b5968,ffffff9c,7260015f7ed0,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3099 syscall(ffff80002bfd7990) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7260015f7f60, count: -8