-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8358756: [s390x] Test StartupOutput.java crash due to CodeCache size #25741
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
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back amitkumar! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
@offamitkumar The following label will be automatically applied to this pull request:
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. |
Webrevs
|
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.
Thanks @offamitkumar.
The idea behind the PR that changed this is that it would check randomly around the amount of code cache that would be just enough for the compilers to start (or not). So, before that PR it would sometimes crash instead of terminating gently. Does adding 800k
to the initial code cache for s390 do that? Did you try before that PR (or temporarily reverting it) to see if it crashes?
@@ -62,7 +63,7 @@ public static void main(String[] args) throws Exception { | |||
|
|||
Process[] pr = new Process[200]; | |||
for (int i = 0; i < 200; i++) { | |||
int initialCodeCacheSizeInKb = 800 + rand.nextInt(400); | |||
int initialCodeCacheSizeInKb = 800 + rand.nextInt(400) + (Platform.isS390x() ? 800 : 0); |
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.
It is just a stylistic issue but I'd rather adapt the fist constant (800
) depending on the platform with something like:
int initialCodeCacheSizeInKb = minInitialSize + rand.nextInt(400);
and minInitialSize
set depending on the platform before the loop.
Just for my understanding. Even if test passes we still want to see this warning:
Before the PR, I don't test crashing or even producing this warning. Even with my changes same behaviour is going on. |
@offamitkumar this pull request can not be integrated into git checkout testfix
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
I tried to see the output from all thread, and modified the test a bit to verify that:
Above crash I got, once i modified the test case and then ran it: diff --git a/test/hotspot/jtreg/compiler/startup/StartupOutput.java b/test/hotspot/jtreg/compiler/startup/StartupOutput.java
index 68cfaece2a5..02f3437c27b 100644
--- a/test/hotspot/jtreg/compiler/startup/StartupOutput.java
+++ b/test/hotspot/jtreg/compiler/startup/StartupOutput.java
@@ -73,7 +73,7 @@ public static void main(String[] args) throws Exception {
for (int i = 0; i < 200; i++) {
out = new OutputAnalyzer(pr[i]);
// The VM should not crash but will probably fail with a "CodeCache is full. Compiler has been disabled." message
- out.stdoutShouldNotContain("# A fatal error");
+ out.stdoutShouldNotContain("CodeCache is full");
exitCode = out.getExitValue();
if (exitCode != 1 && exitCode != 0) {
throw new Exception("VM crashed with exit code " + exitCode); So I think compiler is bailing out with current changes. Please let me know if this is incorrect or any other question you have. |
The test passes with and without that message. When the randomly chosen amount of code cache is not enough to start the compiler(s) it should print that message, when it is enough to start both compilers, you don't see that message. |
What I wanted to verify with above expected crash is that current number are not enough for the compilers and we saw the output is containing that "Codecache is full" message. Now we can claim that this message is there in the log output and test passes successfully. |
There isn't enough initial cache present which can let the interpreter mode run freely. So before even we reach to the compiler phase and try to bail out, in case there isn't enough space left for the stub compilation, JVM crashes. Idea is to increase the Initial cache size and make it enough to run interpreter mode at least.
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25741/head:pull/25741
$ git checkout pull/25741
Update a local copy of the PR:
$ git checkout pull/25741
$ git pull https://git.openjdk.org/jdk.git pull/25741/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 25741
View PR using the GUI difftool:
$ git pr show -t 25741
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25741.diff
Using Webrev
Link to Webrev Comment