Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak risk in session pool usage in stats sync load #59560

Closed
time-and-fate opened this issue Feb 15, 2025 · 1 comment · Fixed by #59546
Closed

Memory leak risk in session pool usage in stats sync load #59560

time-and-fate opened this issue Feb 15, 2025 · 1 comment · Fixed by #59546
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. impact/leak report/customer Customers have encountered this bug. severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@time-and-fate
Copy link
Member

Bug Report

The exact reproduction steps are still unknown. But we observed memory leaks in production clusters:

Image

The code in question is similar to what we met in #54022:

v7.5.3:

if err == nil { // only recycle when no error
sctx.GetSessionVars().StmtCtx.Priority = mysql.NoPriority
h.SPool().Put(se)
}

master:

if err == nil { // only recycle when no error
sctx.GetSessionVars().StmtCtx.Priority = mysql.NoPriority
s.statsHandle.SPool().Put(se)
}

@time-and-fate time-and-fate added severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug. labels Feb 15, 2025
@time-and-fate time-and-fate added affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. and removed may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 may-affects-7.5 may-affects-8.1 may-affects-8.5 labels Feb 15, 2025
@kennedy8312
Copy link

/impact leak

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. impact/leak report/customer Customers have encountered this bug. severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants