[CLIENT-3915] Added suppressions for valgrind error noise#871
[CLIENT-3915] Added suppressions for valgrind error noise#871DomPeliniAerospike wants to merge 4 commits intodevfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #871 +/- ##
=======================================
Coverage 83.31% 83.31%
=======================================
Files 99 99
Lines 14422 14422
=======================================
Hits 12016 12016
Misses 2406 2406 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
.github/workflows/valgrind.yml
Outdated
| if: ${{ inputs.massif }} | ||
|
|
||
| - run: echo VALGRIND_ARGS="--leak-check=full" >> $GITHUB_ENV | ||
| - run: echo VALGRIND_ARGS="--leak-check=full --gen-suppressions=all --suppressions=full_suite.supp --num-callers=350 " >> $GITHUB_ENV |
There was a problem hiding this comment.
Here, it might be helpful to comment explaining why we are setting --num-callers=350 and --gen-suppressions=all, for future reference
There was a problem hiding this comment.
Added README.md file explaining the suppression workflow
Renamed suppression file Added script for extracting suppressions Removed valgrind-python.supp suppresisons
|
|
||
| ``` | ||
|
|
||
| --error-limit=no: Disable the limit of the numbers errors that can be reported |
There was a problem hiding this comment.
| --error-limit=no: Disable the limit of the numbers errors that can be reported | |
| `--error-limit=no`: Disable the limit of the numbers errors that can be reported |
|
|
||
| --error-limit=no: Disable the limit of the numbers errors that can be reported | ||
|
|
||
| --leak-check=full: Show details for each individual memory error |
There was a problem hiding this comment.
| --leak-check=full: Show details for each individual memory error | |
| `--leak-check=full`: Show details for each individual memory error |
|
|
||
| --leak-check=full: Show details for each individual memory error | ||
|
|
||
| --gen-suppressions=all: generate suppressions blocks alongside all memory errors |
There was a problem hiding this comment.
| --gen-suppressions=all: generate suppressions blocks alongside all memory errors | |
| `--gen-suppressions=all`: generate suppressions blocks alongside all memory errors |
|
|
||
| --gen-suppressions=all: generate suppressions blocks alongside all memory errors | ||
|
|
||
| --num-callers=350: include 350 stack frames of context for each error and suppression. |
There was a problem hiding this comment.
| --num-callers=350: include 350 stack frames of context for each error and suppression. | |
| `--num-callers=350`: include 350 stack frames of context for each error and suppression. |
|
|
||
| Setting --num-callers=350 forces the total number of suppressions frames to be below 500 and avoids this error | ||
|
|
||
| ## 2. Download the results of the valgrind run step |
There was a problem hiding this comment.
| ## 2. Download the results of the valgrind run step | |
| ## 2. Download the logs for the valgrind job |
?
| total_blocks = 0 | ||
|
|
||
| # Matches the time stamp | ||
| ts_re = re.compile(r"^\d{4}-\d{2}-\d{2}T\S+\s+(.*)$") |
There was a problem hiding this comment.
| ts_re = re.compile(r"^\d{4}-\d{2}-\d{2}T\S+\s+(.*)$") | |
| timestamp_pattern = re.compile(r"^\d{4}-\d{2}-\d{2}T\S+\s+(.*)$") |
Might be better to rename ts_re to timestamp_pattern?
| line = raw_line.rstrip() | ||
|
|
||
| # Strip timestamp prefix if present | ||
| m = ts_re.match(line) |
There was a problem hiding this comment.
| m = ts_re.match(line) | |
| ts_match = ts_re.match(line) |
Rename m to ts_match?
| line = m.group(1) | ||
|
|
||
| if line.startswith("{"): | ||
| inside_block = True |
There was a problem hiding this comment.
| inside_block = True | |
| inside_suppressions_block = True |
| # Only keep if 2nd line matches required suppression name | ||
| REQUIRED = "<insert_a_suppression_name_here>" | ||
|
|
||
| if len(current_block) > 1 and current_block[1].strip() != REQUIRED: |
There was a problem hiding this comment.
If we pass in a suppressions file when running valgrind, and the suppressions file contains a block with a named suppression, in the logs does valgrind print a suppressions block with that name? I'm not sure when this condition would be true
| indented_block = "\n".join(lines) | ||
| f.write(indented_block + "\n\n") | ||
|
|
||
| print(f"Original number of suppressions: {total_blocks}") |
There was a problem hiding this comment.
| print(f"Original number of suppressions: {total_blocks}") | |
| print(f"Number of suppressions (including duplicates): {total_blocks}") |
|
Noticed the suppressions file is quite large: We might need to store this in Git LFS (large file storage) so it doesn't slow down git |
No description provided.