Skip to content

8341024: [test] build/AbsPathsInImage.java fails with OOM when using ubsan-enabled binaries #21217

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

Closed
wants to merge 1 commit into from

Conversation

MBaesken
Copy link
Member

@MBaesken MBaesken commented Sep 27, 2024

The jtreg test build/AbsPathsInImage.java fails with OOM when using ubsan-enabled binaries (on Linux x86_64).
Reason seems to be that the ubsan-enabled binaries are much larger than 'normal' product binaries.
(for debug binaries the test is already disabled)
Error is :
java.lang.OutOfMemoryError: Java heap space
at java.base/java.nio.file.Files.read(Files.java:3242)
at java.base/java.nio.file.Files.readAllBytes(Files.java:3299)
at AbsPathsInImage.scanFile(AbsPathsInImage.java:181)
at AbsPathsInImage$1.visitFile(AbsPathsInImage.java:173)
at AbsPathsInImage$1.visitFile(AbsPathsInImage.java:153)
at java.base/java.nio.file.Files.walkFileTree(Files.java:2810)
at java.base/java.nio.file.Files.walkFileTree(Files.java:2881)
at AbsPathsInImage.scanFiles(AbsPathsInImage.java:153)
at AbsPathsInImage.main(AbsPathsInImage.java:119)
at java.base/java.lang.invoke.LambdaForm$DMH/0x00007fb6087003a8.invokeStatic(LambdaForm$DMH)
at java.base/java.lang.invoke.LambdaForm$MH/0x00007fb608a2f3d8.invoke(LambdaForm$MH)
at java.base/java.lang.invoke.Invokers$Holder.invokeExact_MT(Invokers$Holder)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(DirectMethodHandleAccessor.java:154)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:573)
at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
at java.base/java.lang.Thread.runWith(Thread.java:1589)
at java.base/java.lang.Thread.run(Thread.java:1576)

Especially the debuginfo file for libjvm.so gets HUGE, and needs a higher Xmx setting for this test.

At some later point in time, the test could be rewritten to use less memory when looking into the JDK image files.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8341024: [test] build/AbsPathsInImage.java fails with OOM when using ubsan-enabled binaries (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/21217/head:pull/21217
$ git checkout pull/21217

Update a local copy of the PR:
$ git checkout pull/21217
$ git pull https://git.openjdk.org/jdk.git pull/21217/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 21217

View PR using the GUI difftool:
$ git pr show -t 21217

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/21217.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 27, 2024

👋 Welcome back mbaesken! 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
Copy link

openjdk bot commented Sep 27, 2024

@MBaesken 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 details.

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

8341024: [test] build/AbsPathsInImage.java fails with OOM when using ubsan-enabled binaries

Reviewed-by: erikj

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 1 new commit pushed to the master branch:

  • 25e8929: 8340620: Fix -Wzero-as-null-pointer-constant warnings for CompressedOops

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 changed the title JDK-8341024: [test] build/AbsPathsInImage.java fails with OOM when using ubsan-enabled binaries 8341024: [test] build/AbsPathsInImage.java fails with OOM when using ubsan-enabled binaries Sep 27, 2024
@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 27, 2024
@openjdk
Copy link

openjdk bot commented Sep 27, 2024

@MBaesken The following label will be automatically applied to this pull request:

  • build

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the build build-dev@openjdk.org label Sep 27, 2024
@mlbridge
Copy link

mlbridge bot commented Sep 27, 2024

Webrevs

Copy link
Member

@erikj79 erikj79 left a comment

Choose a reason for hiding this comment

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

I took a quick look at why I chose to read the full files into memory instead of reading from a stream, and while that could be fixed, at least at first glance it seemed to get rather complicated. This seems like a pretty simple and quick workaround.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 27, 2024
@MBaesken
Copy link
Member Author

MBaesken commented Oct 1, 2024

Thanks for the review !

/integrate

@openjdk
Copy link

openjdk bot commented Oct 1, 2024

Going to push as commit 1b46fea.
Since your change was applied there have been 35 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 1, 2024
@openjdk openjdk bot closed this Oct 1, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 1, 2024
@openjdk
Copy link

openjdk bot commented Oct 1, 2024

@MBaesken Pushed as commit 1b46fea.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants