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, GMC did not detect it. #2226

Closed
swgzjhz opened this issue Mar 5, 2021 · 3 comments
Closed

Memory leak, GMC did not detect it. #2226

swgzjhz opened this issue Mar 5, 2021 · 3 comments
Assignees
Labels
Bug It might be a bug. TransByAI Translated by AI/GPT.
Milestone

Comments

@swgzjhz
Copy link

swgzjhz commented Mar 5, 2021

Description:
Compile and run 3.0-R3 using GMC, and finally found that there is no memory leak in gmc.log, but in fact it does exist.

Build SRS with GMC

./configure --with-gperf --with-gmc && make

Start SRS with GMC

env PPROF_PATH=./objs/pprof HEAPCHECK=normal ./objs/srs -c conf/console.conf 2>gmc.log

Or CTRL+C to stop gmc

killall -2 srs

To analysis memory leak

cat gmc.log

gmc.log content
WARNING: Perftools heap leak checker is active -- Performance may suffer
Thread finding failed with -1 errno=14
Thread finding callback was interrupted or crashed; can't fix this

Expectation:
To be able to use the gmc tool properly.

TRANS_BY_GPT3

@winlinvip winlinvip added the Bug It might be a bug. label Jun 16, 2021
@winlinvip winlinvip added this to the SRS 3.0 release milestone Jun 16, 2021
@winlinvip winlinvip self-assigned this Aug 21, 2021
@winlinvip winlinvip changed the title 利用GMC进行程序内存泄漏检测 内存泄漏,GMC没有检测出来 Aug 21, 2021
@winlinvip
Copy link
Member

winlinvip commented Nov 19, 2021

image

The tcmalloc version is too old. We are using version 2.1, which is from 2013, 8 years ago.

I tried heap-checker but still didn't receive any GMC messages, so it's definitely because the version is too old and it's not working anymore. We need to upgrade gperftools.

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Nov 19, 2021

The document has been updated. Make sure to maintain the markdown structure.

This article only describes the usage of the GPERF tool. For a complete performance analysis method, refer to SRS Performance (CPU) and Memory Optimization Tool Usage. Make sure to maintain the markdown structure.

Valgrind is a very useful memory and CPU analysis tool, and SRS already supports it. Make sure to maintain the markdown structure.

SRS has examples illustrating how to integrate and call gmc. Please refer to: research/gperftools/heap-checker

Make sure to maintain the markdown structure.

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Dec 26, 2021

Already updated gperftools to 2.9, but GMC still has some issues, refer to #2247.

So I have closed this issue for now, please follow up on #2247.

TRANS_BY_GPT3

@winlinvip winlinvip changed the title 内存泄漏,GMC没有检测出来 Memory leak, GMC did not detect it. Jul 28, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug It might be a bug. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

3 participants