New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kubelet: Panic on portforward streams #102480
Comments
Hey @mikkeloscar, thank you for the report! 🙏 Uhh, thats unfortunate. The panic occurs there on L101: kubernetes/staging/src/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection.go Lines 98 to 104 in c6a2f08
It may be possible that something assigned |
With a quick look at the streaming code it's likely to be triggered by a timeout in waiting for streams: https://github.com/saschagrunert/kubernetes/blob/v1.19.11/pkg/kubelet/cri/streaming/portforward/httpstream.go#L141 If the above case is hit then it goes down to And then it attempts to remove the streams where at least one is So it probably makes sense to check for This theory lines up with our kubelet logs, where I can see this just before the panic (didn't notice before):
|
Thank you for the summary @mikkeloscar, working on a fix in #102489 |
/triage accepted |
@mikkeloscar do you use dockershim within your cluster? |
@saschagrunert Yes, we still use dockershim. |
Good, that's also why the panic happens within the kubelet. |
Just to make sure I understand the scope of this issue, this only affects things like |
Exactly 👍 |
What happened:
Since upgrading to Kubernetes v1.19.11 (from v1.19.10) we see occasional panics in kubelet related to portforward streams:
This issue seem to be introduced with #99839
What you expected to happen:
kubelet
should not panic and crash.How to reproduce it (as minimally and precisely as possible):
We have not been able to successfully force this to happen, but it has happened 41 times in the last 2 weeks across 7 clusters (~100 nodes).
Anything else we need to know?:
Environment:
kubectl version
):cat /etc/os-release
):uname -a
):/sig node
/cc @saschagrunert
The text was updated successfully, but these errors were encountered: