mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-19 15:39:17 +00:00
Don't log the endpoint struct in PluginDisconnected() - it contains a gRPC client and logging it via reflection races with Close(). The logger walks the struct with reflection, reading gRPC internals, while Close() is modifying mutex state in the background. Removing the endpoint from the log avoids the race. The resourceName is already logged which is enough to identify which endpoint disconnected. This race becomes visible with gRPC v1.76.0+ due to timing changes in buffer handling and goroutine lifecycle during Close(). The ci-kubernetes-unit-dependencies job was hitting this ~10% of the time when testing with updated dependencies. CI failures: - https://storage.googleapis.com/kubernetes-ci-logs/logs/ci-kubernetes-unit-dependencies/2009065501396832256/build-log.txt - https://storage.googleapis.com/kubernetes-ci-logs/logs/ci-kubernetes-unit-dependencies/2008641956699181056/build-log.txt - https://storage.googleapis.com/kubernetes-ci-logs/logs/ci-kubernetes-unit-dependencies/2007491912692404224/build-log.txt - https://storage.googleapis.com/kubernetes-ci-logs/logs/ci-kubernetes-unit-dependencies/2007431281842851840/build-log.txt Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Davanum Srinivas <davanum@gmail.com>