Skip to content

[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
devfrom
CLIENT-3915-add-suppression-that-ignores-all-possibly-lost-or-reachable-stack-traces-without-client-lines
Draft

[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
juliannguyen4 wants to merge 2 commits into
devfrom
CLIENT-3915-add-suppression-that-ignores-all-possibly-lost-or-reachable-stack-traces-without-client-lines

Conversation

@juliannguyen4

@juliannguyen4 juliannguyen4 commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

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 the python/cpython repo, 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

… 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-commenter

codecov-commenter commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.46%. Comparing base (5bc339b) to head (9a0ec45).
⚠️ Report is 3 commits behind head on dev.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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