Skip to content

Support custom image with race detector. Race condition fix. #2

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

Open
wants to merge 2 commits into
base: release-23.9
Choose a base branch
from

Conversation

willosa
Copy link

@willosa willosa commented Apr 4, 2024

Fix race condition with AddToSchema in ClusterPolicyController.init()

See issue: NVIDIA#689 (comment)

The write side stack trace from race detector:
WARNING: DATA RACE Write at 0x00c0000eb3b0 by goroutine 194: runtime.mapassign() /usr/local/go/src/runtime/map.go:579 +0x0 k8s.io/apimachinery/pkg/runtime.(*Scheme).AddKnownTypeWithName() /vendor/k8s.io/apimachinery/pkg/runtime/scheme.go:174 +0x357 k8s.io/apimachinery/pkg/runtime.(*Scheme).AddKnownTypes() /vendor/k8s.io/apimachinery/pkg/runtime/scheme.go:148 +0x205 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1.addKnownTypes() /vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/register.go:49 +0x7fe k8s.io/apimachinery/pkg/runtime.(*SchemeBuilder).AddToScheme() /vendor/k8s.io/apimachinery/pkg/runtime/scheme_builder.go:29 +0xa1 k8s.io/apimachinery/pkg/runtime.(*SchemeBuilder).AddToScheme-fm() <autogenerated>:1 +0x1f github.com/NVIDIA/gpu-operator/controllers.(*ClusterPolicyController).init() /controllers/state_manager.go:786 +0x663 github.com/NVIDIA/gpu-operator/controllers.(*ClusterPolicyReconciler).Reconcile() /controllers/clusterpolicy_controller.go:128 +0x6cb

willosa added 2 commits April 4, 2024 00:28
…d new image based on official image base. Add fix for add scheme race condition.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant