diff --git a/pkg/operator/health/aliveness_checker.go b/pkg/operator/health/aliveness_checker.go index 51da73225..992f6be63 100644 --- a/pkg/operator/health/aliveness_checker.go +++ b/pkg/operator/health/aliveness_checker.go @@ -1,7 +1,7 @@ package health import ( - "runtime/debug" + "runtime" "sync" "k8s.io/klog/v2" @@ -31,7 +31,11 @@ func (r *MultiAlivenessChecker) Alive() bool { for s, checker := range r.checkerMap { if !checker.Alive() { klog.Warningf("Controller [%s] didn't sync for a long time, declaring unhealthy and dumping stack", s) - debug.PrintStack() + // 12 mb should be enough for a full goroutine dump + buf := make([]byte, 1024*1024*12) + n := runtime.Stack(buf, true) + klog.Warningf("%s", buf[:n]) + return false } }