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

Capture memory leak failures during tests #1188

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

peternied
Copy link
Member

@peternied peternied commented Dec 9, 2024

Description

Tests will automatically save memory dumps when out of memory issues
occur in java test cases. Updated CI to also pick these up for
troubleshooting as needed.

Issues Resolved

Testing

Ran a previous iteration with low memory cap and inspected the assets captured. Hprof file zip where the memory limit was artificially lowered to force OOMs, workflow link.

Check List

  • New functionality includes testing
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Tests will automatically save memory dumps when out of memory issues
occur in java test cases. Updated CI to also pick these up for
troubleshooting as needed.

Signed-off-by: Peter Nied <[email protected]>
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.91%. Comparing base (fc62f57) to head (35c77f9).
Report is 66 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1188      +/-   ##
============================================
- Coverage     80.93%   80.91%   -0.02%     
- Complexity     2995     2997       +2     
============================================
  Files           407      407              
  Lines         15241    15241              
  Branches       1021     1021              
============================================
- Hits          12336    12333       -3     
- Misses         2277     2284       +7     
+ Partials        628      624       -4     
Flag Coverage Δ
unittests 80.91% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@gregschohn gregschohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the test section, please point to the build that has the hprof files.
How long do we keep these (or any) artifacts for? If that window isn't very long, maybe some screen shots would be nice to show others.

11:07
How long do we keep those files (or any artifacts) around for?

@peternied
Copy link
Member Author

@gregschohn I've updated the description to include an example:

Ran a previous iteration with low memory cap and inspected the assets captured. Hprof file zip where the memory limit was artificially lowered to force OOMs, workflow link.


How long do we keep those files (or any artifacts) around for?

They are around for the default period 90 days - not intented to be long term shortage, but I'd expect more than enough for a one-off issue that we drive to resolution.

@gregschohn
Copy link
Collaborator

Thanks Peter! Visually, one can find the artifacts for these hprof files in a build's summary at the bottom in the artifacts section

image

Copy link
Collaborator

@gregschohn gregschohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Peter. This is great - this could benefit users running gradle themselves too.

@peternied peternied merged commit dfe90db into opensearch-project:main Dec 13, 2024
22 checks passed
@peternied peternied deleted the capture-memory-leaks branch December 13, 2024 15:49
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