beam icon indicating copy to clipboard operation
beam copied to clipboard

[Java Harness] Improve heap dump support by configuring JVM to dump heap on OOM exceptions

Open scwhittle opened this issue 1 year ago • 6 comments

This configures the boot script to use JVM flags so that it dumps heaps to a directory that the MemoryMonitor will look in.

Other improvements are made to:

  • allow configuring remote upload location separately from tempLocation
  • add default-on support to gzip uploads to speed them up

These changes were tested with a manual dataflow test with a pipeline that leaked memory. I confirmed that files were successfully dumped by the JVM and then uploaded. Unzipping and loading the hprof files in VisualVM was successful in identifying the objects pinning memory and leading to OOMs.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • [ ] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • [ ] Update CHANGES.md with noteworthy changes.
  • [ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels Python tests Java tests Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

scwhittle avatar Oct 28 '24 12:10 scwhittle

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Dec 28 '24 12:12 github-actions[bot]

This pull request has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

github-actions[bot] avatar Jan 04 '25 12:01 github-actions[bot]

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

github-actions[bot] avatar Jun 12 '25 13:06 github-actions[bot]

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.

Project coverage is 54.49%. Comparing base (de76cfa) to head (5d3b011). Report is 26 commits behind head on master.

Files with missing lines Patch % Lines
sdks/java/container/boot.go 0.00% 7 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #32953      +/-   ##
============================================
- Coverage     54.50%   54.49%   -0.01%     
+ Complexity     1479     1470       -9     
============================================
  Files          1017     1017              
  Lines        160983   160780     -203     
  Branches       1079     1078       -1     
============================================
- Hits          87737    87614     -123     
+ Misses        71140    71056      -84     
- Partials       2106     2110       +4     
Flag Coverage Δ
go 28.20% <0.00%> (+<0.01%) :arrow_up:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Jun 13 '25 08:06 codecov[bot]

R: @Abacn

scwhittle avatar Jun 13 '25 12:06 scwhittle

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

github-actions[bot] avatar Jun 13 '25 12:06 github-actions[bot]

R: @kennknowles

scwhittle avatar Jun 17 '25 11:06 scwhittle

@kennknowles back to you . Sorry I rebased on accident and broke the diff view.

scwhittle avatar Jun 19 '25 12:06 scwhittle