RFR: 8274524: SSLSocket.close() hangs if it is called during the ssl handshake [v4]

Xue-Lei Andrew Fan xuelei at openjdk.java.net
Wed Nov 10 17:31:34 UTC 2021


On Wed, 3 Nov 2021 17:02:40 GMT, Alexey Bakhtin <abakhtin at openjdk.org> wrote:

>> Please review the patch for JDK-8274524
>> 
>> The fix just adds locks around InputStream read and skip operations to prevent concurrent read from socket.
>> sun/security/ssl jtreg tests passed
>> api/javax_net/ssl/SSLSocket/setUseClientMode jck test passed
>
> Alexey Bakhtin has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix jcheck issues

Did you have a chance to analysis the potential deadlock issues between handshake lock, read lock, write lock and socket lock?  The locks used in SSLSocketImpl is complicated.  If I remember correctly, there are potential deadlock issues if the read/write locks are used during handshaking.  Did you have a dead lock stack for the bug?  Alternatively, it might be a direction to improve the close() code.

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

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



More information about the security-dev mailing list