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

8316113: Infinite permission checking loop in java/net/spi/InetAddressResolverProvider/RuntimePermissionTest #15681

Closed

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Sep 12, 2023

See the bug for stack traces. This causes a very intermittent test failure: when we call for LOGGER.info from our custom security manager, it goes into formatter, which loads locale data, which causes class load, which goes back to this custom security manager, starting the loop again.

I think we get lucky most of the time to load the relevant classes outside this path. But sometimes, we don't get as lucky.

Additional testing:


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-8316113: Infinite permission checking loop in java/net/spi/InetAddressResolverProvider/RuntimePermissionTest (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 15681

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

Using diff file

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

Webrev

Link to Webrev Comment

@shipilev shipilev changed the title 8316113: Recursive permission checking loop in java/net/spi/InetAddressResolverProvider/RuntimePermissionTest 8316113: Infinite permission checking loop in java/net/spi/InetAddressResolverProvider/RuntimePermissionTest Sep 12, 2023
@bridgekeeper
Copy link

bridgekeeper bot commented Sep 12, 2023

👋 Welcome back shade! 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 Sep 12, 2023
@openjdk
Copy link

openjdk bot commented Sep 12, 2023

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

  • net

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 net net-dev@openjdk.org label Sep 12, 2023
@mlbridge
Copy link

mlbridge bot commented Sep 12, 2023

Webrevs

@jaikiran
Copy link
Member

The copyright year on the test file would need an update for 2023.

@openjdk
Copy link

openjdk bot commented Sep 12, 2023

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

8316113: Infinite permission checking loop in java/net/spi/InetAddressResolverProvider/RuntimePermissionTest

Reviewed-by: jpai, aefimov, dfuchs

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

  • fc3e826: 8314832: Few runtime/os tests ignore vm flags
  • 347beb2: 8315998: Remove dead ClassLoaderDataGraphKlassIteratorStatic
  • 50158f3: 8316002: Remove unnecessary seen_dead_loader in ClassLoaderDataGraph::do_unloading
  • 6f2684b: 8315948: JDK-8315818 broke Xcomp on libgraal
  • 8b4f9a8: 8315990: Amend problemlisted tests to proper position

Please see this link for an up-to-date comparison between the source branch of this pull request and 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 Sep 12, 2023
@dfuch
Copy link
Member

dfuch commented Sep 12, 2023

I am not sure why this test uses a Logger - possibly this could be simply replaced with System.err::println to avoid the issue? @AlekseiEfimov ?

@AlekseiEfimov
Copy link
Member

I am not sure why this test uses a Logger - possibly this could be simply replaced with System.err::println to avoid the issue? @AlekseiEfimov ?

Right, the Logger usages are not actually needed in this test - they can be replaced with System.err::println.

@shipilev
Copy link
Member Author

Right, the Logger usages are not actually needed in this test - they can be replaced with System.err::println.

OK, I removed the logger from this test. But I would like to keep the common branch free of any code to avoid any further accidents. See new commit.

Copy link
Member

@AlekseiEfimov AlekseiEfimov left a comment

Choose a reason for hiding this comment

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

Thanks for making the replacement. The changes look good to me.

Copy link
Member

@dfuch dfuch 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.

@shipilev
Copy link
Member Author

Thanks! I think I can integrate now, or do we want to wait for more reviews?

@dfuch
Copy link
Member

dfuch commented Sep 12, 2023

Thanks for asking @shipilev
@AlekseiEfimov is happy with the proposed changes so it's fine by me. Double check that the java/net/spi tests still pass before integrating but as far as I'm concerned you're good to go.

@shipilev
Copy link
Member Author

Thanks for asking @shipilev @AlekseiEfimov is happy with the proposed changes so it's fine by me. Double check that the java/net/spi tests still pass before integrating but as far as I'm concerned you're good to go.

Cool. java/net/spi tests work well. The test failure in GHA is not related and seem to already have an open bug.

@shipilev
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Sep 12, 2023

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

  • 1d702d2: 8313800: AArch64: SA stack walking code having trouble finding sender frame when invoking LambdaForms is involved
  • e084516: 8315968: Move java.util.Digits to jdk.internal.util and refactor to reduce duplication
  • d75d977: 8285447: StackWalker minimal batch size should be optimized for getCallerClass
  • fc3e826: 8314832: Few runtime/os tests ignore vm flags
  • 347beb2: 8315998: Remove dead ClassLoaderDataGraphKlassIteratorStatic
  • 50158f3: 8316002: Remove unnecessary seen_dead_loader in ClassLoaderDataGraph::do_unloading
  • 6f2684b: 8315948: JDK-8315818 broke Xcomp on libgraal
  • 8b4f9a8: 8315990: Amend problemlisted tests to proper position

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Sep 12, 2023

@shipilev Pushed as commit 947dee7.

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

@shipilev
Copy link
Member Author

/backport jdk21u

@openjdk
Copy link

openjdk bot commented Sep 13, 2023

@shipilev the backport was successfully created on the branch shipilev-backport-947dee7f in my personal fork of openjdk/jdk21u. To create a pull request with this backport targeting openjdk/jdk21u:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 947dee7f from the openjdk/jdk repository.

The commit being backported was authored by Aleksey Shipilev on 12 Sep 2023 and was reviewed by Jaikiran Pai, Aleksei Efimov and Daniel Fuchs.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk21u:

$ git fetch https://github.com/openjdk-bots/jdk21u.git shipilev-backport-947dee7f:shipilev-backport-947dee7f
$ git checkout shipilev-backport-947dee7f
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk21u.git shipilev-backport-947dee7f

@shipilev shipilev deleted the JDK-8316113-permission-checking-loop branch November 28, 2023 14:56
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 net net-dev@openjdk.org
4 participants