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

8280963: Incorrect PrintFlags formatting on Windows #45

Closed

Conversation

akashche
Copy link
Contributor

@akashche akashche commented Apr 20, 2022

A fix to 8u-only Windows-specific problem with -XX:+PrintFlags* output.

Problem description on Stack Overflow by Andrei Pangin: https://stackoverflow.com/a/63309395

The problem was fixed in jdk9 as part of JDK-8042893, but this jdk9 change doesn't look like a good candidate for the 8u backport according to 8u Best Practices. Still the problem manifests itself as a customer-visible bug on Windows because people do use -XX:+PrintFlagsFinal to find out the actual flags picked up by JVM and can be confused by unexpected zeros in the output. Proposed patch cherry-picks the minimal change from JDK-8042893 commit.

Mailing list review: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2022-February/014532.html

Testing:

  • regression test is included with the proposed patch
  • checked that it builds on Windows 64-bit and 32-bit on VS2017 and VS2010
  • ran jtreg:hotspot/test/runtime on Windows and Linux

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-8280963: Incorrect PrintFlags formatting on Windows

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev pull/45/head:pull/45
$ git checkout pull/45

Update a local copy of the PR:
$ git checkout pull/45
$ git pull https://git.openjdk.org/jdk8u-dev pull/45/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 45

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/45.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 20, 2022

👋 Welcome back akasko! 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 Apr 20, 2022
@mlbridge
Copy link

mlbridge bot commented Apr 20, 2022

Webrevs

Copy link
Member

@gnu-andrew gnu-andrew left a comment

Choose a reason for hiding this comment

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

This mostly matches the changes to this file in JDK-8042893, but it doesn't remove the pragma

Can we include that change as well to make sure the code is now compiling without warnings?

Also, the PR needs to be rebased anyway to fix the GHA run on Linux (bad dependency issue now fixed by JDK-8284772). The Mac failure is more complicated (see #26) but is at least compiling the code before failing. Despite the title, this changes code shared by all platforms.

@akashche
Copy link
Contributor Author

Would it be better if I add a PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC change as a separate backport?

I understand that it is a part of the same original change, just the motivation behind the change is completely different from the format strings change that are included now. I am fine with doing it either way, just wanted to point out that the inclusion of pragma here may be confusing.

@akashche akashche force-pushed the 8280963-incorrect-print-flags-format branch from 5ef280c to a312b2c Compare May 13, 2022 17:34
@gnu-andrew
Copy link
Member

Would it be better if I add a PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC change as a separate backport?

I understand that it is a part of the same original change, just the motivation behind the change is completely different from the format strings change that are included now. I am fine with doing it either way, just wanted to point out that the inclusion of pragma here may be confusing.

Yes, that makes sense. We're already deviating from the original enhancement issue with this subset to fix a bug. Please file a bug and I'll approve this once the repository has transitioned to 8u352.

@gnu-andrew
Copy link
Member

I can approve this now once jdk8u-fix-request is added to the bug.

To clarify; I just meant the one PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC removal in the file being altered, not the rest of that huge patch. In theory, the changes mean that file should now compile without warnings and so the pragma is redundant. But this is something was can do under a separate bug.

@akashche
Copy link
Contributor Author

akashche commented Jun 7, 2022

Thanks for the review! I've added fix request label to the bug.

@gnu-andrew
Copy link
Member

Sorry for the delay, approved.

@akashche
Copy link
Contributor Author

Thanks for the approval! It is not clear whether macOS pre-submit check must pass for integrate command to work, will try it now.

@akashche
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Jun 14, 2022

@akashche This pull request has not yet been marked as ready for integration.

@akashche
Copy link
Contributor Author

Apparently PR needs to be "ready" for integrate to work, any hints what can I do for it to have a "ready" mark?

@jerboaa
Copy link
Contributor

jerboaa commented Jun 14, 2022

Apparently PR needs to be "ready" for integrate to work, any hints what can I do for it to have a "ready" mark?

It needs an actual "Approve" via the Review changes button. I don't see it here.

@gnu-andrew
Copy link
Member

Done. This would be simpler if the approval process was integrated with SKARA.

@openjdk
Copy link

openjdk bot commented Jun 15, 2022

@akashche This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

8280963: Incorrect PrintFlags formatting on Windows

Reviewed-by: andrew

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 13 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 Jun 15, 2022
@gnu-andrew
Copy link
Member

gnu-andrew commented Jun 15, 2022

Thanks for the approval! It is not clear whether macOS pre-submit check must pass for integrate command to work, will try it now.

The MacOS failure is unrelated and is already fixed in jdk8u-dev. You can confirm this by merging with 8u-dev yourself, but it's not really necessary.

@gnu-andrew
Copy link
Member

Specifically, "c5f96be: 8286989: Build failure on macOS after 8281814"

@akashche
Copy link
Contributor Author

Thanks for the clarification!

@akashche
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Jun 15, 2022

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

openjdk bot commented Jun 15, 2022

@akashche Pushed as commit 83e9095.

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

@akashche akashche deleted the 8280963-incorrect-print-flags-format branch June 15, 2022 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants