Skip to content

Memory leak of LoadPrivilegeLoop? #59403

@tiancaiamao

Description

@tiancaiamao

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Like #59400

I create 2M users, and the keep 10% of them active, then run

"set password for test = 'xxx'" for all the 2M users

then run

"alter user test%d failed_login_attempts 10" for all the 2M users

...

This time analyze the memory usage after the workload is gone.

I suspect there is a leak, after the workload gone, the memory usage is still there:

Image

As you can see the CPU is 0%, but at time 15:45, the memory usage is high.
And after a privilege full reload (the spike), the memory usage finally decreased.

Image

Here is the mem profile before and after the full reload:

after.pb.gz
before.pb.gz

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

The memory usage should reduce after the workload is gone like after.pb.gz

Image

3. What did you see instead (Required)

See before.pb.gz
Image

4. What is your TiDB version? (Required)

master?

commit 27365b47b27820152faf79395f6cf1b96eb3031f (HEAD -> master, origin/master, origin/HEAD)
Author: xzhangxian1008 <[email protected]>
Date:   Tue Feb 11 15:35:39 2025 +0800

    executor: fix the incorrect return when hash join encounters error (#59381)
    
    close pingcap/tidb#59377

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions