-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8283422: Create a new test for JDK-8254790 #7883
Conversation
👋 Welcome back serb! A progress list of the required criteria for merging this PR into |
@@ -43,6 +43,28 @@ | |||
* compiler.intrinsics.string.TestStringIntrinsics2 | |||
*/ | |||
|
|||
/* | |||
* @test id=LargeHeap |
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.
Is it useful to run all other tests in the TestStringIntrinsics2 using the large heap?
Webrevs
|
The test fails in our CI with:
|
@TobiHartmann Thank you for your feedback, the trace shows that the test fails to allocate the FILL_HEAP = new int[Integer.MAX_VALUE / 2]; when the heap is set to 5G. I can increase the "-mx" option, but probably the root cause of the OOM is something different, the "git actions" are green, the test is also green when I run it multiple times. Probably mach5 adds some additional options to the test execution? |
I think the root cause is simply that there is not enough memory available to the VM to allocate such a large object. Do you know why the issue is only reproducible with a large heap and only if the heap is filled? |
It has a "guard" jtreg tag "os.maxMemory > 5G" which should prevent execution of this test on small systems. I'll bump this requirement in the next revision of the test.
That's due to the nature of that bug
|
I have found the bug where some tests tried to allocate same huge amount of memory and fail: |
The test is updated:
|
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.
I agree with your proposed test configuration. Let me test it before approval.
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.
Testing results are good.
@mrserb 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:
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 49 new commits pushed to the
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 |
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.
Looks good to me too.
/integrate |
Going to push as commit ad83ec7.
Your commit was automatically rebased without conflicts. |
@mrserb Unknown command |
The JDK-8254790 initially was reported on macOS.
It was found by the "javax/xml/crypto/dsig/GenerationTests.java" test which for some reason worked fine on Linux/Windows most? of the time.
I tried to run that test on Linux/Windows many times on a few systems and it always pass. Also, I got the same result for the tier1...tier4 tests.
I have found that the easiest way to reproduce the crash is to pass the result of the string.indexOf to the str.charAt when the heap is big enough. The test below[1] trigger the crash 1000 time in a row on win/lin on systems I have tested.
I am not sure what is the best way to contribute to the test, should I create a stand-alone test like[1], or update an existing test as I did for the first version of this PR?
[1]:
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/7883/head:pull/7883
$ git checkout pull/7883
Update a local copy of the PR:
$ git checkout pull/7883
$ git pull https://git.openjdk.java.net/jdk pull/7883/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 7883
View PR using the GUI difftool:
$ git pr show -t 7883
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/7883.diff