-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
containerd 1.7.24 crash due to "fatal error: concurrent map iteration and map write" in CRI plugin #11302
Comments
Perhaps a short term fix would be to have containerd's portforward package |
#11306 will fix |
After doing some more research, this issue probably does not affect mainline or v2.x+. klog module has moved to using JSON encoder for the default formatter of non-default types (see kubernetes/klog@d731661). From a proof of concept https://go.dev/play/p/Xmg1mYMSWHF, maps without JSON annotation would not be iterated. Going down the rabbit hole, I do not really see implementations of |
As testing of this issue is difficult, I wrote a small program to reproduce the error and show the proposed fix will resolve the issue. See https://go.dev/play/p/_GaPVoSOr_7. Also slight correction of my earlier comment for JSON encoder. After further research, the JSON encoder can still exhibit the crash if the field is exported and not labeled with |
@austinvazquez I believe this is fixed by #11306? |
Yes thanks for reminding me. Closing. |
#11319 @djdongjin this pr should merge into 1.6.x |
Description
Similar to #7797, I have a report of containerd crash for a k8s workload on a recent build of containerd v1.7.24. From the stack trace, the issue stems from this line where HTTP stream handler connection (
h.conn
) (type interface) is provided as value toklog.ErrorS
which results in afmt.Sprintf("%+v", value)
on this line.All other references of
h.conn
are using%p
to avoid formatting of the connection.Steps to reproduce the issue
Describe the results you received and expected
Stack trace
What version of containerd are you using?
containerd v1.7.24
Any other relevant information
Although report is from containerd v1.7.24, containerd v1.6 is almost certainly affected. Currently unsure if containerd v2.0 is affected as the CRI plugin has been refactored to use
k8s.io/kubelet/pkg/cri/streaming/portforward
instead of instead.Show configuration if it is related to CRI plugin.
No response
The text was updated successfully, but these errors were encountered: