RFR: 8360981: Remove use of Thread.stop in test/jdk/java/net/Socket/DeadlockTest.java

Alan Bateman alanb at openjdk.org
Sat Jul 26 14:31:55 UTC 2025


On Sat, 26 Jul 2025 09:04:09 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

> Can I please get a review of this test-only change which removes the use of `Thread.stop()` from the test? This addresses https://bugs.openjdk.org/browse/JDK-8360981.
> 
> The use of `Thread.stop()` `test/jdk/java/net/Socket/DeadlockTest.java` isn't necessary for what this test is currently testing. The commit in this PR removes that call and instead wait for the `Thread` to complete execution, by calling `Thread.join()` without any timeouts. If a genuine deadlock does happen, then the test will time out (on the `Thread.join()` call) and the jtreg infrastructure should then help get hold of the necessary thread dumps to identify the cause of the deadlock.
> 
> The test continues to pass with this change.

Marked as reviewed by alanb (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/26490#pullrequestreview-3058225350


More information about the net-dev mailing list