-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8307653: Adjust delay time and gc log argument in TestAbortOnVMOperationTimeout #13878
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
Conversation
👋 Welcome back gli! A progress list of the required criteria for merging this PR into |
Webrevs
|
// These should definitely pass: more than 3 minutes is enough for Serial to act. | ||
// The values are deliberately non-round to trip off periodic task granularity. | ||
for (int delay : new int[]{63423, 12388131}) { | ||
for (int delay : new int[]{183423}) { | ||
testWith(delay, true); | ||
} |
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.
With only one value there is no point having the loop. Why not just replace the shorter, failing, delay with the new longer one?
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.
With only one value there is no point having the loop
Good caught. I just obey the previous code style and forget to refactor it. Will fix it.
Why not just replace the shorter, failing, delay with the new longer one?
The longer one is useless actually. If the shorter one, 63423
previously, passed,
it means the gc time is less than 63423
. Then the longer one will always pass.
And jtreg would report time out
in seraval minutes normally,
so the longer time 12388131
is useless.
So I want to remove the longer one and just remain the shorter one.
* @summary Check abort on VM timeout is working | ||
* @requires vm.flagless | ||
* @library /test/lib | ||
* @modules java.base/jdk.internal.misc | ||
* java.management | ||
* @run driver TestAbortOnVMOperationTimeout | ||
* @run driver/timeout=600 TestAbortOnVMOperationTimeout |
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 this change really needed? Do you see timeouts without it?
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.
Yes, local env shows time out
. The jtreg's default timeout is 480s
, so I increase it to 600s
.
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.
Not quite. The default JTREG timeout is 120 seconds and the default timeoutFactor
value that we use is 4 for a total timeout value of 480 seconds. If your test runs
indicate the need for a total timeout value of 600 seconds, then you should use:
* @run driver/timeout=150
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 had tried @run driver/timeout=480
, but the test failed. Then I used timeout=600
, the test passed. So I set it to 600
.
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.
What is your environment's timeoutFactor value?
Also, how are you running the test?
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.
What is your environment's timeoutFactor value?
I haven't changed the default value. So it should be 4.
Also, how are you running the test?
I used the command make test Test=runtime/Safepoint/TestAbortOnVMOperationTimeout.java
.
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.
Please search your .jtr file for your run for the pattern: "test.timeout.factor"
and report the results here.
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 see the text -J-Dtest.timeout.factor=4.0
in the log.
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.
When you get a timeout with 'timeout=480', what 'elapsed time' values are in the '.jtr' file.
For my 'fastdebug' run, I see:
$ grep 'elapsed time' build/macosx-x86_64-normal-server-fastdebug/test-support/jtreg_open_test_hotspot_jtreg_runtime_Safepoint_TestAbortOnVMOperationTimeout_java/runtime/Safepoint/TestAbortOnVMOperationTimeout.jtr
elapsed time (seconds): 3.458
elapsed time (seconds): 3.455
elapsed time (seconds): 10.176
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 can't reproduce the failed test by using @run driver/timeout=480
now. The test passes locally now with timeout=480
. The elapsed time
values, which belong to the current passed test, are shown below.
elapsed time (seconds): 115.718
elapsed time (seconds): 115.699
elapsed time (seconds): 555.602
I try to recall my previous steps:
- The test failed locally with
@run driver
, withouttimeout
option. - I changed it to
@run driver/timeout=900
. It passed. - I changed it to
@run driver/timeout=480
. It failed. - I changed it to
@run driver/timeout=600
. It passed.
So I push the code with @run driver/timeout=600
.
Now I try @run driver/timeout=480
locally, it can't reproduce. So strange! Such intermittent fail may be related to JDK-8296819?
@@ -51,11 +51,9 @@ public static void main(String[] args) throws Exception { | |||
return; | |||
} | |||
|
|||
// These should definitely pass: more than a minute is enough for Serial to act. | |||
// These should definitely pass: more than 3 minutes is enough for Serial to act. |
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.
"These" is no longer accurate since this has been changed to test a single value.
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.
Fixed.
// The values are deliberately non-round to trip off periodic task granularity. | ||
for (int delay : new int[]{63423, 12388131}) { | ||
testWith(delay, true); | ||
} | ||
testWith(183423, true); |
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.
"The values are ..." is no longer accurate since this has been changed to test a single value.
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.
Fixed.
The proper way to address a slow piece of hardware is to use a larger timeoutFactor value. |
Got it. I will remove the |
BTW, my first experiment for JDK-8296819 would |
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 am okay with these changes.
I do worry that your slow dev board may expose a lot of internal timeout issues in tests - but tests should be using values modified by the timeoutFactor to compensate for slow systems where possible. Not sure how that would apply in the current case though.
@lgxbslgx 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 53 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 |
@dholmes-ora @dcubed-ojdk Thanks for the review. Integrating. |
Going to push as commit 4f355c3.
Your commit was automatically rebased without conflicts. |
Hi all,
This patch increases the delay time of the test
TestAbortOnVMOperationTimeout
so that it can pass on the low performance devices (such as my local riscv64 dev board).
And I adjust the gc log options to get more gc log message which is useful to
inspect the issue JDK-8296819.
Thanks for the review.
Best Regards,
-- Guoxiong
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/13878/head:pull/13878
$ git checkout pull/13878
Update a local copy of the PR:
$ git checkout pull/13878
$ git pull https://git.openjdk.org/jdk.git pull/13878/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 13878
View PR using the GUI difftool:
$ git pr show -t 13878
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/13878.diff
Webrev
Link to Webrev Comment