Closed bzhangyan11 closed 8 minutes ago
http watches unfortunately haven't gotten as much scrutiny as websocket watches, and this does indeed look like a deadlock in the current state of that code. Are you choosing to use http watches or is that happening for you?
Also this appears to be okhttp specific. You could try one of the other http clients instead.
http watches unfortunately haven't gotten as much scrutiny as websocket watches, and this does indeed look like a deadlock in the current state of that code. Are you choosing to use http watches or is that happening for you?
yes, i'm using http watches.
Previously,my service got stock with websocket(can't receive any events from apiserver),so i upgraded fabric8 from 5.X to 6.13.3 and chose http watches instead.
http watches unfortunately haven't gotten as much scrutiny as websocket watches, and this does indeed look like a deadlock in the current state of that code. Are you choosing to use http watches or is that happening for you?
and it seems that this issue only occurs in specific versions of the JDK. https://github.com/openjdk/jdk8u/blob/jdk8u332-ga/jdk/src/share/classes/sun/security/ssl/SSLSocketImpl.java#L935
works well in this version of SSLSocketImpl. https://github.com/openjdk/jdk/blob/jdk8-b120/jdk/src/share/classes/sun/security/ssl/SSLSocketImpl.java https://github.com/openjdk/jdk/blob/jdk8-b120/jdk/src/share/classes/sun/security/ssl/AppInputStream.java
@bzhangyan11 thanks for the additional context and links. The proposed pr should be safe regardless - our http client layer over okhttp attempts to make it appear as an async api, but it's actually blocking. We hadn't seen this blocking on close behavior before - which you are pointing out looks to even be JRE specific. So if you can't change your JRE, and you need to keep using http watches, the only other near term workaround is to use a different http client.
Describe the bug
My service couldn't receive any events from apiserver and I found some deadlocks in jstack.But i couldn't find the synchronizer 0x00000006c049ca40 which is held by "OkHttp Dispatcher"
https://github.com/openjdk/jdk8u/blob/jdk8u332-ga/jdk/src/share/classes/sun/security/ssl/SSLSocketImpl.java#L935
Fabric8 Kubernetes Client version
6.13.3
Steps to reproduce
I don't know how to reproduce it.
Expected behavior
no deadlock
Runtime
Kubernetes (vanilla)
Kubernetes API Server version
other (please specify in additional context)
Environment
Linux
Fabric8 Kubernetes Client Logs
No response
Additional context
No response