RFR: 8189338: JMX RMI Remote Mbean server connection hangs if the server stops responding during a SSL Handshake

Stuart Marks smarks at openjdk.org
Tue Jan 3 19:35:50 UTC 2023


On Tue, 3 Jan 2023 13:35:32 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

> This patch introduces a time limit for establishing a secure connection to a RMI server.
> 
> The existing implementation uses the configured `sun.rmi.transport.tcp.handshakeTimeout` during RMI handshake only; there's no time limit for SSL handshake.
> With this patch, the configuration option `sun.rmi.transport.tcp.handshakeTimeout` is also used as a socket read timeout during the SSL handshake.
> 
> I modified the existing `HandshakeTimeout` test to verify both non-SSL and SSL connections; the test passes with my changes, fails without them.
> 
> Existing tier1-3 tests continue to pass.
> 
> While working on the patch I noticed that `conn.isReusable()` always returns true. I can remove all references to `isReusable` here or in another PR; it would simplify the code a bit.

Thanks for taking this long-standing bug. Changes look good.

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

Marked as reviewed by smarks (Reviewer).

PR: https://git.openjdk.org/jdk/pull/11829


More information about the core-libs-dev mailing list