RFR: 8254967: com.sun.net.HttpsServer spins on TLS session close

Daniel Fuchs dfuchs at openjdk.java.net
Mon Oct 19 16:32:16 UTC 2020


On Mon, 19 Oct 2020 15:50:32 GMT, Michael McMahon <michaelm at openjdk.org> wrote:

> This fixes a busy loop bug in the Http server which happens sometimes when an SSL connection is closed by the client.
> 
> There is no regression test as it is not easy to reproduce and the only effect is that one executor thread gets tied up.

Marked as reviewed by dfuchs (Reviewer).

src/jdk.httpserver/share/classes/sun/net/httpserver/SSLStreams.java line 445:

> 443:         } finally {
> 444:             handshaking.unlock();
> 445:         }

Ok. The expectation is that doClosure() only involves sending a close acknowedged and not receiving anything. This is
probably correct if doClosure() is called on reception of close_notify. In which case the change looks reasonable. I
also see that a further expectation is that cycles of NEED_WRAP/NEED_UNWRAP only happen during the handshake, which is
hopefully true.

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

PR: https://git.openjdk.java.net/jdk/pull/742


More information about the net-dev mailing list