Skip to content
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

8282404: DrawStringWithInfiniteXform.java failed with "RuntimeException: drawString with InfiniteXform transform takes long time" #11179

Closed
wants to merge 3 commits into from

Conversation

prrace
Copy link
Contributor

@prrace prrace commented Nov 16, 2022

This test is not problem listed and has failed only once since (SFAIK) it was last updated a year ago so
this is just another small attempt to remove instability by increasing timeout, being really insistent about
making sure the "done=true" is propagated and adding some extra timing logging to help analyse any failures


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-8282404: DrawStringWithInfiniteXform.java failed with "RuntimeException: drawString with InfiniteXform transform takes long time"

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 11179

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 16, 2022

👋 Welcome back prr! 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 changed the title 8282404 8282404: DrawStringWithInfiniteXform.java failed with "RuntimeException: drawString with InfiniteXform transform takes long time" Nov 16, 2022
@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 16, 2022
@openjdk
Copy link

openjdk bot commented Nov 16, 2022

@prrace 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 Nov 16, 2022
@mlbridge
Copy link

mlbridge bot commented Nov 16, 2022

Webrevs

synchronized (DrawStringWithInfiniteXform.class) {
done = true;
timer.cancel();
}
System.out.println("Test passed");
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems timer.cancel() says "Terminates this timer, discarding any currently scheduled tasks." so it might disregard the "done" check been done in ScheduleTask resulting in false positive...
Should we do Thread.yield() instead?

Also, this test has many coding violations like l70, l79 where no space between operators,variables...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems timer.cancel() says "Terminates this timer, discarding any currently scheduled tasks."

Yes, that's the intention.

so it might disregard the "done" check been done in ScheduleTask resulting in false positive...

If we reach timer.cancel() before the timer fires off the task we don't need the task
canceling it means the test can exit immediately - not wait 20 or 30 seconds.

If it does fire because cancel is too slow, it will see "done==true"

So perhaps I'm not following your point ?

Should we do Thread.yield() instead?

No.

I'll tidy it up a bit more.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK. So, it means ScheduleTask should ideally never be executed if drawString with infinite transform takes lesser time < 30s, which is desirable and test can exit.

@openjdk
Copy link

openjdk bot commented Nov 17, 2022

@prrace 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:

8282404: DrawStringWithInfiniteXform.java failed with "RuntimeException: drawString with InfiniteXform transform takes long time"

Reviewed-by: psadhukhan, jdv

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 60 new commits pushed to 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 added the ready Pull request is ready to be integrated label Nov 17, 2022
float[] vals = new float[6];
for (int i=0;i<6;i++) vals[i]=Float.POSITIVE_INFINITY;
for (int i=0; i<6; i++) {
Copy link
Member

Choose a reason for hiding this comment

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

We can add proper indentation for operators before push, since we are updating at other places.

RuntimeException("drawString with InfiniteXform transform takes long time");
System.out.println("Task running at " + System.currentTimeMillis());
System.out.flush();
synchronized(DrawStringWithInfiniteXform.class) {
Copy link
Member

Choose a reason for hiding this comment

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

Nit

Suggested change
synchronized(DrawStringWithInfiniteXform.class) {
synchronized (DrawStringWithInfiniteXform.class) {

@prrace
Copy link
Contributor Author

prrace commented Nov 17, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Nov 17, 2022

Going to push as commit a53be20.
Since your change was applied there have been 60 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 Nov 17, 2022
@openjdk openjdk bot closed this Nov 17, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Nov 17, 2022
@openjdk
Copy link

openjdk bot commented Nov 17, 2022

@prrace Pushed as commit a53be20.

💡 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
client client-libs-dev@openjdk.org integrated Pull request has been integrated
4 participants