[CLIENT-3915] Reduce the number of reported stack traces for leaks in the valgrind logs. This should make it easier to create a suppressions file that isn't too large.#1097
Draft
juliannguyen4 wants to merge 2 commits into
Conversation
… to save. When running Python with valgrind, PYTHONMALLOC=malloc, and the default suppressions file in python/cpython, most of the false positive leaks are possibly lost and a few are reachable. I believe memory leaks are more likely to happen in the Python client with definitely lost leaks; I don't think the client moves the pointer to heap allocated memory that much, which would lead to possibly lost leaks. Also I don't believe reachable leaks would usually lead to an out of memory error.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #1097 +/- ##
=======================================
Coverage 84.46% 84.46%
=======================================
Files 99 99
Lines 14088 14088
=======================================
Hits 11899 11899
Misses 2189 2189 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…nd suppressions file in this repo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Only show definite leaks to reduce the number of suppressions we need to save. When running
python3 -c "1"installed with valgrind,PYTHONMALLOC=malloc, and the default suppressions file in thepython/cpythonrepo, most of the false positive leaks are categorized as "possibly lost" and a few are "reachable". I believe memory leaks are more likely to happen in the Python client because of "definitely lost" leaks; I don't think that the client code usually moves pointers of heap allocated memory to point somewhere in between that section, which would lead to "possibly lost" leaks.I also don't believe reachable leaks would usually lead to an out of memory error.
There is an alternate PR for this ticket that attempts to create a suppressions file with all the "possibly lost" and "reachable" leaks found from running the dev tests, but that file is extremely large. #881
Extra changes
Always generate suppressions in case new ones needs to be added to the existing suppressions