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 of evicted stmt summary #56629

Closed
tiancaiamao opened this issue Oct 14, 2024 · 2 comments · Fixed by #56722
Closed

memory leak of evicted stmt summary #56629

tiancaiamao opened this issue Oct 14, 2024 · 2 comments · Fixed by #56722
Assignees
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. 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.4 impact/leak severity/moderate sig/transaction SIG:Transaction type/bug The issue is confirmed as a bug.

Comments

@tiancaiamao
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

The same script with #56619

After creating 2M users, change the script to "alter user ..." to update password for 2M users.

2. What did you expect to see? (Required)

No memory leak

3. What did you see instead (Required)

Take the heap profile after a while:

image

And after a long time later:

image

As you can see, the statement summary increase dramatically, this indicate a memory leak!

The test script execute 'alter user test%d ...' for 2M times, and the leaked object count is almost 2M:

image

4. What is your TiDB version? (Required)

master

@tiancaiamao tiancaiamao added the type/bug The issue is confirmed as a bug. label Oct 14, 2024
@tiancaiamao
Copy link
Contributor Author

Introduced by #24513

@crazycs520
Copy link
Contributor

This is not a memory leak, but it consumes more memory when there are many types of SQL.

@crazycs520 crazycs520 added affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. and removed may-affects-6.1 may-affects-6.5 may-affects-7.1 may-affects-7.5 may-affects-8.1 may-affects-5.4 This bug maybe affects 5.4.x versions. labels Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. 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.4 impact/leak severity/moderate sig/transaction SIG:Transaction type/bug The issue is confirmed as a bug.
Projects
None yet
3 participants