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

Long Yang lyang at openjdk.org
Fri May 30 06:35:53 UTC 2025


On Wed, 14 May 2025 19:44:43 GMT, Paul Hohensee <phh 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!
>
> Lgtm.

@phohensee I didn't see your approval. Is it because this pull request has been closed by bot. I've reopened it, would you try again ?

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

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


More information about the jdk8u-dev mailing list