Skip to content

8286689: (se) Adjusting to select timeout after EINTR messed up after JDK-8286378 #8693

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

Conversation

jaikiran
Copy link
Member

@jaikiran jaikiran commented May 13, 2022

Can I please get a review which fixes a recent unintentional change that went in as part of #8642? The issue was caught here https://github.com/openjdk/jdk/pull/8642/files#r871994710 after the change was integrated.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (1 review required, with at least 1 reviewer)

Issue

  • JDK-8286689: (se) Adjusting to select timeout after EINTR messed up after JDK-8286378

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/8693/head:pull/8693
$ git checkout pull/8693

Update a local copy of the PR:
$ git checkout pull/8693
$ git pull https://git.openjdk.java.net/jdk pull/8693/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 8693

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/8693.diff

Sorry, something went wrong.

@bridgekeeper
Copy link

bridgekeeper bot commented May 13, 2022

👋 Welcome back jpai! 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 May 13, 2022
@openjdk
Copy link

openjdk bot commented May 13, 2022

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

  • nio

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 nio nio-dev@openjdk.org label May 13, 2022
@mlbridge
Copy link

mlbridge bot commented May 13, 2022

Webrevs

@AlanBateman
Copy link
Contributor

Thanks for jumping on this, can we update KQueueSelectImpl.doSelect too, this was missed by JDK-8286378, I assume because the test with the new compiler option was only done on one platform.

@jaikiran
Copy link
Member Author

jaikiran commented May 13, 2022

Hello Alan,

can we update KQueueSelectImpl.doSelect too, this was missed by JDK-8286378, I assume because the test with the new compiler option was only done on one platform.

In the case of KQueueSelectorImpl.doSelect(), the to is already a long, unlike in these 2 classes where it's an int. The to then gets passed to KQueue.poll(...) which expects a long timeout unlike in the above 2 classes where the to gets passed to methods which expect an int timeout. I believe that was the reason the compiler didn't complain in case of KQueueSelectorImpl.

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.

LGTM. I double checked and this seems the only two cases where the =- typo crept in.

@AlanBateman
Copy link
Contributor

In the case of KQueueSelectorImpl.doSelect(), the to is already a long, unlike in these 2 classes where it's an int. The to then gets passed to KQueue.poll(...) which expects a long timeout unlike in the above 2 classes where the to gets passed to methods which expect an int timeout. I believe that was the reason the compiler didn't complain in case of KQueueSelectorImpl.

Ah yes, I forgot it was a long here. Thanks for checking. However, part of my comment is that there is an inconsistency because KQueueSelectImpl.doSelect wasn't changed to use toMillis. We can create a separate PR to make these consistent if you don't want to include it here.

@openjdk
Copy link

openjdk bot commented May 13, 2022

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

8286689: (se) Adjusting to select timeout after EINTR messed up after JDK-8286378

Reviewed-by: dfuchs, alanb

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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 May 13, 2022
@jaikiran
Copy link
Member Author

However, part of my comment is that there is an inconsistency because KQueueSelectImpl.doSelect wasn't changed to use toMillis.

You are right. I was focusing too much on the casting and the LHS, that I didn't notice this API usage. I have now updated the PR to use toMillis. I ran a local build on my macOS to make sure this doesn't break anything obvious. Build went fine.

Copy link
Contributor

@AlanBateman AlanBateman 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 this.

@jaikiran
Copy link
Member Author

Thank you Alan and Daniel for the reviews.

@jaikiran
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented May 13, 2022

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

  • 6a1b098: 8278039: Code completion not woking after some statements such as "if" or "while"
  • 11fa03f: 8282160: JShell circularly-required classes cannot be defined

Your commit was automatically rebased without conflicts.

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

openjdk bot commented May 13, 2022

@jaikiran Pushed as commit 0be1f3e.

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

Successfully merging this pull request may close these issues.

None yet

3 participants