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

8253948: Memory leak in ImageFileReader #490

Closed
wants to merge 3 commits into from

Conversation

zhengyu123
Copy link
Contributor

@zhengyu123 zhengyu123 commented Oct 2, 2020

ImageFileReader allocates ImageModuleData in ImageFileReader::open(), but never free.

Also renamed module_data to _module_data to be consistent with other member variables.

Test:

  • tier1 on Linux x86_64

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/490/head:pull/490
$ git checkout pull/490

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 2, 2020

👋 Welcome back zgu! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 2, 2020
@openjdk
Copy link

openjdk bot commented Oct 2, 2020

@zhengyu123 To determine the appropriate audience for reviewing this pull request, one or more labels corresponding to different subsystems will normally be applied automatically. However, no automatic labelling rule matches the changes in this pull request. In order to have an "RFR" email sent to the correct mailing list, you will need to add one or more applicable labels manually using the /label pull request command.

Applicable Labels
  • 2d
  • awt
  • beans
  • build
  • compiler
  • core-libs
  • hotspot
  • hotspot-compiler
  • hotspot-gc
  • hotspot-jfr
  • hotspot-runtime
  • i18n
  • javadoc
  • jdk
  • jmx
  • kulla
  • net
  • nio
  • security
  • serviceability
  • shenandoah
  • sound
  • swing

@zhengyu123
Copy link
Contributor Author

/label add core-libs

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Oct 2, 2020
@openjdk
Copy link

openjdk bot commented Oct 2, 2020

@zhengyu123
The core-libs label was successfully added.

@mlbridge
Copy link

mlbridge bot commented Oct 2, 2020

Webrevs

@zhengyu123
Copy link
Contributor Author

/label add hotspot-runtime

ImageFileReader is also used in hotspot runtime

@openjdk openjdk bot added the hotspot-runtime hotspot-runtime-dev@openjdk.org label Oct 2, 2020
@openjdk
Copy link

openjdk bot commented Oct 2, 2020

@zhengyu123
The hotspot-runtime label was successfully added.

Copy link
Contributor

@AlanBateman AlanBateman left a comment

Choose a reason for hiding this comment

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

The jimage file is opened at startup and should never be closed. However the jrtfs provider (used by IDEs and other tools to access the resources in a target run-time image) may run into it so good to get it fixed.

Can you fix the formatting to use 4-space indentation consistently?

@AlanBateman
Copy link
Contributor

I should have been clearer. The indentation issues are with changed lines 375, 446-447, and 581.

@openjdk
Copy link

openjdk bot commented Oct 5, 2020

@zhengyu123 This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for more details.

After integration, the commit message for the final commit will be:

8253948: Memory leak in ImageFileReader

Reviewed-by: alanb

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 54 new commits pushed to the master branch:

  • 5d4a135: 8253842: [JVMCI] Allow implicit exception to dispatch to other address in jvmci compilers.
  • 289ae79: 8252998: ModuleWrapper.gmk doesn't consult include path
  • 9604ee8: 8248238: Implementation: JEP 388: Windows AArch64 Support
  • 1c2754b: 8253269: The CheckCommonColors test should provide more info on failure
  • d296708: 8253606: Need to add missed constructor to the SwingEventMonitor
  • 5810238: 8253945: Missed default constructor for StreamPrintServiceFactory.java
  • 123e786: 8239105: Add exception for expiring Digicert root certificates to VerifyCACerts test
  • 22f0916: 8253938: ZGC: Clean up argument names after JDK-8253030
  • 7778047: 8253736: Cleanup some of WorkArounds and usage thereof
  • 87d77eb: 8253879: Simplify redundant code in IndexBuilder
  • ... and 44 more: https://git.openjdk.java.net/jdk/compare/8cf8e463c623b3908befb0af289749b47a793267...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 5, 2020
@zhengyu123
Copy link
Contributor Author

/integrate

@openjdk openjdk bot closed this Oct 5, 2020
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 5, 2020
@openjdk
Copy link

openjdk bot commented Oct 5, 2020

@zhengyu123 Since your change was applied there have been 56 commits pushed to the master branch:

  • 65cab55: 8253971: ZGC: Flush mark stacks after processing concurrent roots
  • 19219a9: 8253960: Memory leak in Java_java_lang_ClassLoader_defineClass0()
  • 5d4a135: 8253842: [JVMCI] Allow implicit exception to dispatch to other address in jvmci compilers.
  • 289ae79: 8252998: ModuleWrapper.gmk doesn't consult include path
  • 9604ee8: 8248238: Implementation: JEP 388: Windows AArch64 Support
  • 1c2754b: 8253269: The CheckCommonColors test should provide more info on failure
  • d296708: 8253606: Need to add missed constructor to the SwingEventMonitor
  • 5810238: 8253945: Missed default constructor for StreamPrintServiceFactory.java
  • 123e786: 8239105: Add exception for expiring Digicert root certificates to VerifyCACerts test
  • 22f0916: 8253938: ZGC: Clean up argument names after JDK-8253030
  • ... and 46 more: https://git.openjdk.java.net/jdk/compare/8cf8e463c623b3908befb0af289749b47a793267...master

Your commit was automatically rebased without conflicts.

Pushed as commit 81dae70.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@zhengyu123 zhengyu123 deleted the JDK-8253948-jimage branch October 5, 2020 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants