Skip to content

JDK-8320113: [macos14] : ShapeNotSetSometimes.java fails intermittently on macOS 14 #17180

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 4 commits into from

Conversation

honkar-jdk
Copy link
Contributor

@honkar-jdk honkar-jdk commented Dec 21, 2023

ShapeNotSetSometimes.java fails intermittently on macOS 14. Following is a test stabilization fix for macOS 14. With the added delays ShapeNotSetSometimes.java passes on older versions of macOS as well as on macOS 14.1, 14.2.


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-8320113: [macos14] : ShapeNotSetSometimes.java fails intermittently on macOS 14 (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 17180

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 21, 2023

👋 Welcome back honkar! 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 Dec 21, 2023
@openjdk
Copy link

openjdk bot commented Dec 21, 2023

@honkar-jdk The following label will be automatically applied to this pull request:

  • client

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 client client-libs-dev@openjdk.org label Dec 21, 2023
@mlbridge
Copy link

mlbridge bot commented Dec 21, 2023

Webrevs

Copy link
Contributor

@DamonGuy DamonGuy left a comment

Choose a reason for hiding this comment

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

I tested this locally on my macOS 14.1.2 device and the test DID intermittently fail without the fix at different attempt #'s. But, with the updated test, the test is passing every time. Ran the test 10x and still passes. Stability fix looks good to me

@openjdk
Copy link

openjdk bot commented Dec 22, 2023

@honkar-jdk 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:

8320113: [macos14] : ShapeNotSetSometimes.java fails intermittently on macOS 14

Reviewed-by: dnguyen, azvegint, kizune

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 287 new commits pushed to the master branch:

  • 6997bfc: 8323154: C2: assert(cmp != nullptr && cmp->Opcode() == Op_Cmp(bt)) failed: no exit test
  • 16be388: 8322383: G1: Only preserve marks on objects that are actually moved
  • 0081d8c: 8324147: Serial: Remove generation::compute_new_size
  • 5f71419: 8322366: Add IEEE rounding mode corruption check to JNI checks
  • 0533022: 8222719: libperfstat on AIX - cleanup old API versions
  • 05dad67: 8295804: javax/swing/JFileChooser/JFileChooserSetLocationTest.java failed with "setLocation() is not working properly"
  • 9efdd24: 8324053: Use the blessed modifier order for sealed in java.base
  • 81df265: 8320458: Improve structural navigation in API documentation
  • a6c0b10: 8323684: TypeMirror.{getAnnotationsByType, getAnnotation} return uninformative results
  • 5c874c1: 8324161: validate-source fails after JDK-8275338
  • ... and 277 more: https://git.openjdk.org/jdk/compare/84c23792856c5c2374963d78a7a734a467bbb79b...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 Dec 22, 2023
Copy link
Member

@azuev-java azuev-java left a comment

Choose a reason for hiding this comment

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

Looks good

@honkar-jdk
Copy link
Contributor Author

honkar-jdk commented Dec 22, 2023

This test is failing intermittently on linux with the current fix. Running the test on all platforms with slightly different delay values.

@honkar-jdk
Copy link
Contributor Author

honkar-jdk commented Jan 12, 2024

This test is fails intermittently on linux with the current fix. Running the test on all platforms with slightly different delay values.

In this test colorCheck() is repeated for 50 iterations. In the rare event, color check fails at random attempt no. (and happens to pass on previous iterations (as shown below). To stabilize the test on various platforms and machines, the constraint that colorcheck() needs to pass for all the 50 iterations has been relaxed by allowing the test to continue until 3 failed attempts. The test throws RuntimeException after 3 failed attempts.

CI Testing with the stabilization fix looks good on all platforms including macOS 14.

Attempt 8
Checking 150, 130, java.awt.Color[r=255,g=255,b=255] should be java.awt.Color[r=255,g=255,b=255]
Checking 150, 20, java.awt.Color[r=0,g=255,b=0] should be java.awt.Color[r=0,g=255,b=0]
Checking 280, 120, java.awt.Color[r=0,g=255,b=0] should be java.awt.Color[r=0,g=255,b=0]
Checking 150, 250, java.awt.Color[r=0,g=255,b=0] should be java.awt.Color[r=0,g=255,b=0]
Checking 20, 120, java.awt.Color[r=0,g=255,b=0] should be java.awt.Color[r=0,g=255,b=0]
Checking 62, 62, java.awt.Color[r=0,g=244,b=0] should not be java.awt.Color[r=255,g=255,b=255]
Checking 240, 185, java.awt.Color[r=0,g=232,b=0] should not be java.awt.Color[r=255,g=255,b=255]

Attempt 9
Checking 150, 130, java.awt.Color[r=255,g=255,b=255] should be java.awt.Color[r=255,g=255,b=255]
Checking 150, 20, java.awt.Color[r=0,g=255,b=0] should be java.awt.Color[r=0,g=255,b=0]
Checking 280, 120, java.awt.Color[r=0,g=255,b=0] should be java.awt.Color[r=0,g=255,b=0]
Checking 150, 250, java.awt.Color[r=0,g=255,b=0] should be java.awt.Color[r=0,g=255,b=0]
Checking 20, 120, java.awt.Color[r=0,g=255,b=0] should be java.awt.Color[r=0,g=255,b=0]
Checking 62, 62, java.awt.Color[r=0,g=240,b=0] should not be java.awt.Color[r=255,g=255,b=255]
Checking 240, 185, java.awt.Color[r=0,g=228,b=0] should not be java.awt.Color[r=255,g=255,b=255]

Attempt 10
Checking 150, 130, java.awt.Color[r=0,g=255,b=0] should be java.awt.Color[r=255,g=255,b=255]
window.getX() = 220, window.getY() = 400 

Checking for transparency failed: point: 370, 530
actual java.awt.Color[r=0,g=255,b=0]
expected java.awt.Color[r=255,g=255,b=255]
java.lang.RuntimeException: Test failed. The shape has not been applied.
at ShapeNotSetSometimes.colorCheck(ShapeNotSetSometimes.java:185) 

@honkar-jdk
Copy link
Contributor Author

honkar-jdk commented Jan 12, 2024

@azuev-java @azvegint @DamonGuy Please re-review the updated test stabilization fix.

@@ -124,8 +125,9 @@ public void paint(Graphics g) {
public static void main(String[] args) throws Exception {
robot = new Robot();

for(int i = 0; i < 50; i++) {
for(int i = 1; i <= 50; i++) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
for(int i = 1; i <= 50; i++) {
for (int i = 1; i <= 50; i++) {

@bourgesl
Copy link
Contributor

Looks better, not an official reviewer

Copy link
Contributor

@DamonGuy DamonGuy left a comment

Choose a reason for hiding this comment

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

Tested the updated test changes. Still working as expected with 0 fails. Can I get some insight for the numOfFailedAttempts count being more or less than 3? Why is 3 significant?

@honkar-jdk
Copy link
Contributor Author

honkar-jdk commented Jan 16, 2024

Tested the updated test changes. Still working as expected with 0 fails. Can I get some insight for the numOfFailedAttempts count being more or less than 3? Why is 3 significant?

As explained here earlier, I'm unable to reproduce the intermittent issue on CI testing (as before on linux with the earlier fix) but taking into account that this is an intermittent issue, I believe a 3/50 failed attempts is less strict and prevents the test to fail instantly due to glitches during any given attempt. A 5 or 10 failed attempts might be relaxing the constraint too much hence 3 was chosen.

@azvegint
Copy link
Member

I found out from our offline discussion that it failed only on Linux and not on other platforms.

Since it's very intermittent failure, and the test hasn't been on the problem list since April, and there have been no reported incidents on Linux since then, I think we should not hide such failures behind additional attempts until we find out the cause.

I suggest adding some additional debugging information, such as saving a screenshot of what actually happened before the exception was thrown.

@honkar-jdk
Copy link
Contributor Author

Test updated according to @azvegint suggestions.

Copy link
Member

@azvegint azvegint left a comment

Choose a reason for hiding this comment

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

Test updated according to @azvegint suggestions.

Thank you!

@honkar-jdk
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Jan 19, 2024

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

  • 8700de6: 8322744: VirtualThread.notifyJvmtiDisableSuspend should be static
  • 6c0bebc: 8159927: Add a test to verify JMOD files created in the images do not have debug symbols
  • 437342b: 8323556: CDS archive space addresses should be randomized with ArchiveRelocationMode=1
  • 39005e2: 8324041: ModuleOption.java failed with update release versioning scheme
  • 2865afe: 8323685: PrintSystemDictionaryAtExit has mutex rank assert
  • 6997bfc: 8323154: C2: assert(cmp != nullptr && cmp->Opcode() == Op_Cmp(bt)) failed: no exit test
  • 16be388: 8322383: G1: Only preserve marks on objects that are actually moved
  • 0081d8c: 8324147: Serial: Remove generation::compute_new_size
  • 5f71419: 8322366: Add IEEE rounding mode corruption check to JNI checks
  • 0533022: 8222719: libperfstat on AIX - cleanup old API versions
  • ... and 282 more: https://git.openjdk.org/jdk/compare/84c23792856c5c2374963d78a7a734a467bbb79b...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jan 19, 2024

@honkar-jdk Pushed as commit f1b7335.

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

@honkar-jdk honkar-jdk deleted the Testfix_8320113 branch January 19, 2024 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client client-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

6 participants