Code Review Request, JDK-8214418 HttpClient falls in running with 100% cpu usage after an error signalled on channel
Daniel Fuchs
daniel.fuchs at oracle.com
Fri Jan 11 11:45:44 UTC 2019
Hi Xuelei,
This is not my area of expertise - so I'm going to rephrase
what I understand (which may be wrong):
SSLEngineImpl.java:
This change makes sure that the SSLEngineResult::getStatus()
returns Status.CLOSED when closure has been initiated, even
if the engine is only half-closed at that time.
This allows the application to complete the closure by looking
at the state of the inbound/outbound.
TransportContext.java:
This change makes sure that the appropriate
HandshakeStatus is returned to allow the completion of the
closure: reading/sending the closure acknowledgement.
If my understanding is correct - then I think this change is good.
As far as I can see this is exactly what we are expecting in
the java.net.http HttpClient SSLFlowDelegate, so that looks good
to me!
As Chris mentioned, it would be good to have a deterministic test
to verify the behavior.
best regards,
-- daniel
On 22/12/2018 17:20, Xue-Lei Fan wrote:
> Hi,
>
> Could I get the update reviewed?
> http://cr.openjdk.java.net/~xuelei/8214418/webrev.00/
>
> The reproducing testing case passed with the update.
>
> The issue is caused by the handshake status "NEED_WRAP" while the
> connection is half-closed. An application may just call wrap() when the
> handshake status is "NEED_WRAP". For compatibility, I changed the
> handshake status from NEED_WRAP back to NOT_HANDSHAKING for inbound
> half-closed connection. An application can use
> SSLEngine.isOutboundDone() for the determination if SSLEngine.wrap()
> should be called.
>
> Thanks,
> Xuelei
>
>
More information about the security-dev
mailing list