-
Notifications
You must be signed in to change notification settings - Fork 111
[CLIENT-3915] Added suppressions for valgrind error noise #871
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
base: dev
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #871 +/- ##
==========================================
+ Coverage 82.45% 83.25% +0.80%
==========================================
Files 99 99
Lines 14496 14347 -149
==========================================
- Hits 11952 11945 -7
+ Misses 2544 2402 -142 ☔ 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added README.md file explaining the suppression workflow
Renamed suppression file Added script for extracting suppressions Removed valgrind-python.supp suppresisons
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Dominic, I left some suggestions and questions
| ``` | ||
|
|
||
| --error-limit=no: Disable the limit of the numbers errors that can be reported |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| --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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| --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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| --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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| --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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ## 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| print(f"Original number of suppressions: {total_blocks}") | |
| print(f"Number of suppressions (including duplicates): {total_blocks}") |
No description provided.