[jdk8u-dev] RFR: 8312065: Socket.connect does not timeout when profiling
Long Yang
duke at openjdk.org
Thu Dec 21 08:51:03 UTC 2023
Hi,
This pull request contains the backport of [JDK-8312065](https://bugs.openjdk.org/browse/JDK-8312065), commit [1ce12c4](https://github.com/openjdk/jdk17u-dev/commit/1ce12c4f33d3d6905703d95df2574f4037dfd57d) from the [openjdk/jdk17u-dev](https://github.com/openjdk/jdk17u-dev) repository.
I added the test `B8312065.java`. The test will fail on the JDK8 without my fix, and it will pass on the JDK8 containing my fix.
This test relies on [libNativeThread](https://github.com/openjdk/jdk/blob/master/test/jdk/java/net/Socket/libNativeThread.c) to get the `OS thread ID` of the `Java threads`, and send signals to `OS threads`.
The `libNativeThread` was introduced to test the fix for [JDK-8237858](https://bugs.openjdk.org/browse/JDK-8237858). However, `JDK-8237858` only exists in Java 10 and above. There is no `JDK-8237858` problem on Java 8, so `JDK-8237858` cannot be backported to Java 8.
In order to use `libNativeThread`, I copied it to my backport.
I ran all the `jtreg` tests in `test/jdk/java/net/ServerSocket`,`test/jdk/java/net/Socket`,`test/jdk/java/net/SocketOption`,`test/jdk/java/net/ipv6` on my host, all passed.
Thanks!
-------------
Commit messages:
- 8312065: Socket.connect does not timeout as expected when profiling
Changes: https://git.openjdk.org/jdk8u-dev/pull/410/files
Webrev: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=410&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8312065
Stats: 327 lines in 7 files changed: 244 ins; 0 del; 83 mod
Patch: https://git.openjdk.org/jdk8u-dev/pull/410.diff
Fetch: git fetch https://git.openjdk.org/jdk8u-dev.git pull/410/head:pull/410
PR: https://git.openjdk.org/jdk8u-dev/pull/410
More information about the jdk8u-dev
mailing list