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

fix memory leak in collector #84

Merged
merged 4 commits into from
Oct 28, 2021
Merged

Conversation

YangKeao
Copy link
Member

Signed-off-by: YangKeao yangkeao@chunibyo.icu

I don't know/remember why these Box:leaks exist in the Collector 😢, but they cause the memory leak described in #76 and tikv/tikv#11108 .

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
@YangKeao
Copy link
Member Author

It actually solves #76, the leak sanitizer will print nothing . But it will still lead to memory leak in tikv status server. I will find the problem 😠

@YangKeao
Copy link
Member Author

image

This is the grafana panel for TiKV. It seems that the memory leak has been successfully resolved by this PR. @crazycs520

@YangKeao YangKeao requested a review from BusyJay October 27, 2021 09:36
src/collector.rs Outdated Show resolved Hide resolved
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
@YangKeao YangKeao requested a review from BusyJay October 28, 2021 04:49
src/collector.rs Outdated Show resolved Hide resolved
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
@YangKeao YangKeao requested a review from BusyJay October 28, 2021 07:37
@YangKeao YangKeao merged commit f2f33a4 into tikv:master Oct 28, 2021
YangKeao added a commit that referenced this pull request Nov 1, 2021
* fix memory leak in collector

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

* use default for collector

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

* allow uninit assumed init

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

* use vector to initialize array

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
YangKeao added a commit that referenced this pull request Nov 1, 2021
* fix memory leak in collector

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

* use default for collector

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

* allow uninit assumed init

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

* use vector to initialize array

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
YangKeao added a commit that referenced this pull request Nov 1, 2021
* fix memory leak in collector

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

* use default for collector

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

* allow uninit assumed init

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

* use vector to initialize array

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
YangKeao added a commit that referenced this pull request Nov 25, 2021
* fix memory leak in collector

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

* use default for collector

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

* allow uninit assumed init

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

* use vector to initialize array

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
YangKeao added a commit to YangKeao/pprof-rs that referenced this pull request Feb 24, 2022
* fix memory leak in collector

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

* use default for collector

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

* allow uninit assumed init

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

* use vector to initialize array

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants