[jdk8u-dev] RFR: 8312065: Socket.connect does not timeout when profiling

Long Yang lyang at openjdk.org
Thu Apr 11 03:36:46 UTC 2024


On Thu, 21 Dec 2023 08:45:32 GMT, Long Yang <lyang at openjdk.org> wrote:

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

Gentle ping. I would be very grateful if anyone could help with the review.

-------------

PR Comment: https://git.openjdk.org/jdk8u-dev/pull/410#issuecomment-2048871517


More information about the jdk8u-dev mailing list