-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
11.0.10
-
x86_64
-
os_x
-
Verified
A DESCRIPTION OF THE PROBLEM :
Repro is here https://github.com/square/okhttp/pull/6554
Original bug report https://twitter.com/virus_dave/status/1358266888543997952
Using OkHttp on JDK 11 (not 8 or 14) hangs with presto client. Presto client main change is use of SocketChannelSocketFactory reported herehttps://github.com/prestodb/presto/issues/15705
The class above is to workaround another known issueJDK-8131133 related to IPv6
https://github.com/prestodb/presto/blob/master/presto-client/src/main/java/com/facebook/presto/client/SocketChannelSocketFactory.java
REGRESSION : Last worked in version 8u281
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Checkout this PR. Run the class https://github.com/square/okhttp/blob/73a9830ce95212571652f89d1bb46f3baa4bb0fa/okhttp/src/test/java/okhttp3/SocketChannelTest.kt
uncomment the assumption
assumeFalse(
socketMode is TlsInstance &&
socketMode.socketMode == Channel &&
socketMode.protocol == HTTP_2 &&
socketMode.tlsExtensionMode == STANDARD,
"failing for channel and h2"
)
Also can see SSL Debug via
// recordSslDebug = true
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Requests work without hanging
ACTUAL -
Requests timeout or hang hard, such that even closing the socket seems to hang.
---------- BEGIN SOURCE ----------
https://github.com/square/okhttp/pull/6554/files
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Drop down to HTTP/1.1, or avoid SocketChannel
FREQUENCY : always
Repro is here https://github.com/square/okhttp/pull/6554
Original bug report https://twitter.com/virus_dave/status/1358266888543997952
Using OkHttp on JDK 11 (not 8 or 14) hangs with presto client. Presto client main change is use of SocketChannelSocketFactory reported herehttps://github.com/prestodb/presto/issues/15705
The class above is to workaround another known issue
https://github.com/prestodb/presto/blob/master/presto-client/src/main/java/com/facebook/presto/client/SocketChannelSocketFactory.java
REGRESSION : Last worked in version 8u281
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Checkout this PR. Run the class https://github.com/square/okhttp/blob/73a9830ce95212571652f89d1bb46f3baa4bb0fa/okhttp/src/test/java/okhttp3/SocketChannelTest.kt
uncomment the assumption
assumeFalse(
socketMode is TlsInstance &&
socketMode.socketMode == Channel &&
socketMode.protocol == HTTP_2 &&
socketMode.tlsExtensionMode == STANDARD,
"failing for channel and h2"
)
Also can see SSL Debug via
// recordSslDebug = true
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Requests work without hanging
ACTUAL -
Requests timeout or hang hard, such that even closing the socket seems to hang.
---------- BEGIN SOURCE ----------
https://github.com/square/okhttp/pull/6554/files
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Drop down to HTTP/1.1, or avoid SocketChannel
FREQUENCY : always