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

8292590: Product JVM crashes with FLAG_SET_XXX on non-product Flag #10072

Conversation

iklam
Copy link
Member

@iklam iklam commented Aug 29, 2022

The function FLAG_MEMBER_SETTER(name) is no longer declared for non-product flags (develop or notproduct) in a product build. If you use use FLAG_SET_XXX with such a flag in a product build, you'd get a C++ compile error.

This is validated by the change in arguments.cpp, which used to set the notproduct flag UseDebuggerErgo1 in product builds. Now this code must be put inside #ifndef PRODUCT


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-8292590: Product JVM crashes with FLAG_SET_XXX on non-product Flag

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10072

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 29, 2022

👋 Welcome back iklam! 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 Aug 29, 2022
@openjdk
Copy link

openjdk bot commented Aug 29, 2022

@iklam The following label will be automatically applied to this pull request:

  • hotspot-runtime

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 hotspot-runtime hotspot-runtime-dev@openjdk.org label Aug 29, 2022
@mlbridge
Copy link

mlbridge bot commented Aug 29, 2022

Webrevs

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

Hardly trivial as these macros are totally obscure to begin with :)

Where is the definition of what the arguments to ALL_FLAGS means? [Found it - allFlags.hpp]

It appears we have been handling develop and notproduct incorrectly.

Doesn't JVMFlagsEnum also need adjustment?

@iklam
Copy link
Member Author

iklam commented Aug 29, 2022

Hardly trivial as these macros are totally obscure to begin with :)

OK I removed the word "trivial" from the PR descroption.

Where is the definition of what the arguments to ALL_FLAGS means? [Found it - allFlags.hpp]

It appears we have been handling develop and notproduct incorrectly. Doesn't JVMFlagsEnum also need adjustment?

Yes, notproduct is not handled correctly. See JDK-8293045, due to which JVMFlagsEnum cannot be adjusted in this PR. That would need to be done as a part of JDK-8293045l.

@dholmes-ora
Copy link
Member

part of JDK-8293045l

There is an extra character at the end of that bug id which causes JBS to act very strangely.

I'm not clear why these issues are being separated out. We seem to have a general problem (that we have know about for a couple of years - ref the discussion in JDK-8236736) that notproduct flags are handled incorrectly throughout, so why not fix everything together?

@iklam
Copy link
Member Author

iklam commented Aug 30, 2022

I'm not clear why these issues are being separated out. We seem to have a general problem (that we have know about for a couple of years - ref the discussion in JDK-8236736) that notproduct flags are handled incorrectly throughout, so why not fix everything together?

I want to produce a simple fix for the crash issue, so that it could be backported if necessary.

Fixing the visibility issue of notproduct is quite involved and may affect many files (which read notproduct flags in product code).

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

Okay.

Thanks.

@openjdk
Copy link

openjdk bot commented Aug 30, 2022

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

8292590: Product JVM crashes with FLAG_SET_XXX on non-product Flag

Reviewed-by: dholmes, coleenp

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

  • 622be79: 8293090: Remove unused par_oop_since_save_marks_iterate_done
  • 3d0ab2b: 8292858: G1: Remove redundant check in G1FlushHumongousCandidateRemSets
  • 6e24827: 8292878: x86: Make scratch register usage explicit in assembler code
  • f5ebbf3: 8292657: Calling GetLocalXXX from virtual thread with thread parameter set to NULL returns carrier locals
  • 550e5d7: 4958071: (spec) confusing exception list for javax.crypto.Cipher.init(...) for
  • d3d2e66: 8293009: Remove unused field 'millisPerHour' in DateFormatSymbols
  • f3ebb42: 8293036: x86_64: Move Continuation-related stub methods to MacroAssembler
  • 1576f99: 8288759: GCC 12 fails to compile signature.cpp due to -Wstringop-overread
  • f285cea: 8293037: Remove DebuggerBase.writeBytes() and related code from SA
  • 343333a: 8293004: (fs) FileChannel.transferXXX use of copy_file_range needs fallback handling for ENOSYS
  • ... and 10 more: https://git.openjdk.org/jdk/compare/adb3d4f14af1974e7fc9461eb59f98131f0d33f7...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 Aug 30, 2022
Copy link
Contributor

@coleenp coleenp 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!

@iklam
Copy link
Member Author

iklam commented Aug 30, 2022

Thanks @dholmes-ora and @coleenp for the review!
/integrate

@openjdk
Copy link

openjdk bot commented Aug 30, 2022

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

  • 6335150: 6205692: (spec) javax.crypto.MacSpi.engineUpdate(ByteBuffer input): NPE should be specified
  • 622be79: 8293090: Remove unused par_oop_since_save_marks_iterate_done
  • 3d0ab2b: 8292858: G1: Remove redundant check in G1FlushHumongousCandidateRemSets
  • 6e24827: 8292878: x86: Make scratch register usage explicit in assembler code
  • f5ebbf3: 8292657: Calling GetLocalXXX from virtual thread with thread parameter set to NULL returns carrier locals
  • 550e5d7: 4958071: (spec) confusing exception list for javax.crypto.Cipher.init(...) for
  • d3d2e66: 8293009: Remove unused field 'millisPerHour' in DateFormatSymbols
  • f3ebb42: 8293036: x86_64: Move Continuation-related stub methods to MacroAssembler
  • 1576f99: 8288759: GCC 12 fails to compile signature.cpp due to -Wstringop-overread
  • f285cea: 8293037: Remove DebuggerBase.writeBytes() and related code from SA
  • ... and 11 more: https://git.openjdk.org/jdk/compare/adb3d4f14af1974e7fc9461eb59f98131f0d33f7...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Aug 30, 2022
@openjdk openjdk bot closed this Aug 30, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Aug 30, 2022
@openjdk
Copy link

openjdk bot commented Aug 30, 2022

@iklam Pushed as commit 1cf245d.

💡 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
hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants