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

JDK-8305993: Add handleSocketErrorWithMessage to extend nio Net.c exception message #13472

Closed
wants to merge 2 commits into from

Conversation

MBaesken
Copy link
Member

@MBaesken MBaesken commented Apr 14, 2023

Currently we get a rather strange exception in our jtreg tests :

java/nio/channels/DatagramChannel/AdaptorMulticasting.java

java.net.SocketException: Exec format error
at java.base/sun.nio.ch.Net.joinOrDrop4(Native Method)
at java.base/sun.nio.ch.Net.join4(Net.java:708)
at java.base/sun.nio.ch.DatagramChannelImpl.innerJoin(DatagramChannelImpl.java:1606)
at java.base/sun.nio.ch.DatagramChannelImpl.join(DatagramChannelImpl.java:1624)
at Promiscuous.test(Promiscuous.java:176)
at Promiscuous.main(Promiscuous.java:223)

The message could at least be improved, saying that setsockopt failed (plus providing the errno related text).
Example is seen on macOS btw. .


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-8305993: Add handleSocketErrorWithMessage to extend nio Net.c exception message

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 13472

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 14, 2023

👋 Welcome back mbaesken! 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 14, 2023
@openjdk
Copy link

openjdk bot commented Apr 14, 2023

@MBaesken 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 Apr 14, 2023
@mlbridge
Copy link

mlbridge bot commented Apr 14, 2023

Webrevs

@@ -571,6 +571,8 @@ Java_sun_nio_ch_Net_setIntOption0(JNIEnv *env, jclass clazz, jobject fdo,
}
}

jint handleSocketErrorWithMessage(JNIEnv *env, jint errorValue, const char* message);
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks okay but we should probably put the function prototype at the top rather in the middle of the JNI functions. I guess it can be static too.

@MBaesken
Copy link
Member Author

Hi Alan, thanks for the comment; I moved the function up in the file.

@AlanBateman
Copy link
Contributor

Hi Alan, thanks for the comment; I moved the function up in the file.

My comment was to actually to move the function prototype as the first iteration put it in the middle of the JNI functions, which looks very strange. Moving handleSocketErrorWithXXX to the top is okay, I can live with that.

@openjdk
Copy link

openjdk bot commented Apr 18, 2023

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

8305993: Add handleSocketErrorWithMessage to extend nio Net.c exception message

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

  • 3c7ab80: 8304054: Linux: NullPointerException from FontConfiguration.getVersion in case no fonts are installed
  • 3bba899: 8299592: Fix and reenable warnings in java.desktop native code compilation
  • 896207d: 8306077: Replace NEW_ARENA_ARRAY with NEW_RESOURCE_ARRAY when applicable in opto
  • 54f7b6c: 8301497: Replace NULL with nullptr in cpu/s390
  • 8ecb5df: 8305781: compiler/c2/irTests/TestVectorizationMultiInvar.java failed with "IRViolationException: There were one or multiple IR rule failures."
  • 49726ee: 8305690: [X86] Do not emit two REX prefixes in Assembler::prefix
  • 445ebef: 8305668: PPC: Non-Top Interpreted frames should be independent of ABI_ELFv2
  • e3ece36: 8303422: Use common functions to exit the VM for -Xshare:dump and CDS errors
  • bb1a7bb: 8305762: FileInputStream and FileOutputStream implSpec should be corrected or removed
  • 8858d54: 8305811: (bf) Improve performance of CharBuffer::append(CharSequence[,int,int])
  • ... and 30 more: https://git.openjdk.org/jdk/compare/12358e6c94bc96e618efc3ec5299a2cfe1b4669d...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 Apr 18, 2023
@MBaesken
Copy link
Member Author

Hi Alan, thanks for the review !

/integrate

@openjdk
Copy link

openjdk bot commented Apr 19, 2023

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

openjdk bot commented Apr 19, 2023

@MBaesken Pushed as commit ebba42a.

💡 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.

2 participants