Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-30068

"fatal error: concurrent map read and map write" on Scheme typeToGVK

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 4.15
    • None
    • Moderate
    • No
    • False
    • Hide

      None

      Show
      None

      Concurrent map access to scheme typeToGVK map between ObjectKinds and AddKnownTypeWithName

      https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_hypershift/3644/pull-ci-openshift-hypershift-release-4.15-e2e-aws/1762958091806052352/artifacts/e2e-aws/run-e2e/artifacts/TestCreateClusterProxy/namespaces/e2e-clusters-k6rqg-example-dgd7p/core/pods/logs/cloud-credential-operator-546bf684b8-cp7bk-cloud-credential-operator-previous.log
       

      time="2024-02-28T22:19:53Z" level=info msg="setting up client for manager"
      time="2024-02-28T22:19:53Z" level=info msg="generated leader election ID" id=c8765651-81fd-4cc9-8230-e8619d863599
      I0228 22:19:53.775780       1 leaderelection.go:250] attempting to acquire leader lease openshift-cloud-credential-operator/cloud-credential-operator-leader...
      I0228 22:19:53.889334       1 leaderelection.go:260] successfully acquired lease openshift-cloud-credential-operator/cloud-credential-operator-leader
      time="2024-02-28T22:19:53Z" level=info msg="became leader" id=c8765651-81fd-4cc9-8230-e8619d863599
      time="2024-02-28T22:19:53Z" level=info msg="checking prerequisites"
      time="2024-02-28T22:19:53Z" level=info msg="setting up scheme"
      fatal error: concurrent map read and map write
      
      goroutine 1 [running]:
      k8s.io/apimachinery/pkg/runtime.(*Scheme).ObjectKinds(0xc0002d5a40, {0x57784b0?, 0xc00053a780})
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go:263 +0xce
      k8s.io/apimachinery/pkg/runtime/serializer/json.(*Serializer).Decode(0xc0002d81e0, {0xc0007e2000, 0x309, 0x380}, 0x0, {0x57784b0, 0xc00053a780?})
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go:163 +0x436
      k8s.io/apimachinery/pkg/runtime.WithoutVersionDecoder.Decode({{0x57561a0?, 0xc0002d81e0?}}, {0xc0007e2000?, 0x0?, 0x0?}, 0x0?, {0x57784b0?, 0xc00053a780?})
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/apimachinery/pkg/runtime/helper.go:252 +0x55
      k8s.io/client-go/rest.Result.Into({{0xc0007e2000, 0x309, 0x380}, {0x0, 0x0, 0x0}, {0xc0007aa0a0, 0x10}, {0x0, 0x0}, ...}, ...)
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/client-go/rest/request.go:1373 +0xad
      k8s.io/client-go/kubernetes/typed/coordination/v1.(*leases).Get(0xc0009183a0, {0x5790488, 0xc0005683f0}, {0x513179c, 0x20}, {{{0x0, 0x0}, {0x0, 0x0}}, {0x0, ...}})
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/lease.go:79 +0x1d3
      k8s.io/client-go/tools/leaderelection/resourcelock.(*LeaseLock).Get(0xc000923d40, {0x5790488, 0xc0005683f0})
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/leaselock.go:42 +0x91
      k8s.io/client-go/tools/leaderelection.(*LeaderElector).tryAcquireOrRenew(0xc000923e60, {0x5790488, 0xc0005683f0})
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go:329 +0x17d
      k8s.io/client-go/tools/leaderelection.(*LeaderElector).renew.func1.1()
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go:275 +0x25
      k8s.io/apimachinery/pkg/util/wait.ConditionFunc.WithContext.func1({0x7fdab52aaa68, 0x18})
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:109 +0x1b
      k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext({0x57913d8?, 0xc000689080?}, 0xc000bbf628?)
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:154 +0x57
      k8s.io/apimachinery/pkg/util/wait.poll({0x57913d8, 0xc000689080}, 0x68?, 0x9b2385?, 0x7fdab52aaa68?)
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/apimachinery/pkg/util/wait/poll.go:245 +0x38
      k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext({0x57913d8, 0xc000689080}, 0x4138e7?, 0x20?)
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/apimachinery/pkg/util/wait/poll.go:200 +0x49
      k8s.io/apimachinery/pkg/util/wait.PollImmediateUntil(0x5790418?, 0xc000425090?, 0x41350a?)
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/apimachinery/pkg/util/wait/poll.go:187 +0x3f
      k8s.io/client-go/tools/leaderelection.(*LeaderElector).renew.func1()
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go:274 +0x10d
      k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0x30?)
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/apimachinery/pkg/util/wait/backoff.go:226 +0x3e
      k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0xc000689020?, {0x5756240, 0xc0005683c0}, 0x1, 0xc000689020)
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/apimachinery/pkg/util/wait/backoff.go:227 +0xb6
      k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc000425090?, 0x14f46b0400, 0x0, 0x60?, 0x20?)
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/apimachinery/pkg/util/wait/backoff.go:204 +0x89
      k8s.io/apimachinery/pkg/util/wait.Until(...)
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/apimachinery/pkg/util/wait/backoff.go:161
      k8s.io/client-go/tools/leaderelection.(*LeaderElector).renew(0xc000923e60, {0x5790418?, 0xc000424fa0?})
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go:271 +0x125
      k8s.io/client-go/tools/leaderelection.(*LeaderElector).Run(0xc000923e60, {0x5790418, 0xc0004056d0})
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go:214 +0x119
      k8s.io/client-go/tools/leaderelection.RunOrDie({0x5790418, 0xc0004056d0}, {{0x5794748, 0xc000923d40}, 0x53d1ac1000, 0x3edd410c00, 0x14f46b0400, {0xc000763f90, 0xc000183200, 0xc0008d57a0}, ...})
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go:228 +0x94
      github.com/openshift/cloud-credential-operator/pkg/cmd/operator.NewOperator.func1(0xc000be9b00?, {0x50d7d23?, 0x1?, 0x1?})
      	/go/src/github.com/openshift/cloud-credential-operator/pkg/cmd/operator/cmd.go:281 +0x908
      github.com/spf13/cobra.(*Command).execute(0xc000be9b00, {0xc000762870, 0x1, 0x1})
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/github.com/spf13/cobra/command.go:944 +0x847
      github.com/spf13/cobra.(*Command).ExecuteC(0xc000be9800)
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/github.com/spf13/cobra/command.go:1068 +0x3bd
      github.com/spf13/cobra.(*Command).Execute(...)
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/github.com/spf13/cobra/command.go:992
      main.main()
      	/go/src/github.com/openshift/cloud-credential-operator/cmd/cloud-credential-operator/main.go:48 +0x25a
      
      ...
      
      goroutine 85 [runnable]:
      k8s.io/apimachinery/pkg/runtime.(*Scheme).AddKnownTypeWithName(0xc0002d5a40, {{0x510aab9, 0x15}, {0x50d6c6e, 0x2}, {0x39eca5c, 0x16}}, {0x5775aa8?, 0xc00042b3b0})
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go:181 +0x38d
      k8s.io/apimachinery/pkg/runtime.(*Scheme).AddKnownTypes(0xc0002d5a40, {{0x510aab9?, 0x1c?}, {0x50d6c6e?, 0x2?}}, {0xc00054b0f0?, 0x2a, 0xc00054afd8?})
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go:148 +0x171
      github.com/openshift/api/operator/v1.addKnownTypes(0x505f200?)
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/github.com/openshift/api/operator/v1/register.go:34 +0x905
      k8s.io/apimachinery/pkg/runtime.(*SchemeBuilder).AddToScheme(...)
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/apimachinery/pkg/runtime/scheme_builder.go:29
      github.com/openshift/cloud-credential-operator/pkg/util.SetupScheme(0xc0008dc000?)
      	/go/src/github.com/openshift/cloud-credential-operator/pkg/util/scheme.go:22 +0xd8
      github.com/openshift/cloud-credential-operator/pkg/operator/platform.getClient({0x7ffd48e6faa0, 0x1a})
      	/go/src/github.com/openshift/cloud-credential-operator/pkg/operator/platform/platform.go:61 +0x170
      github.com/openshift/cloud-credential-operator/pkg/operator/platform.GetInfraStatusUsingKubeconfig({0x7ffd48e6faa0?, 0x4?})
      	/go/src/github.com/openshift/cloud-credential-operator/pkg/operator/platform/platform.go:17 +0x1e
      github.com/openshift/cloud-credential-operator/pkg/cmd/operator.NewOperator.func1.1({0x5790418, 0xc000424fa0})
      	/go/src/github.com/openshift/cloud-credential-operator/pkg/cmd/operator/cmd.go:117 +0x149
      github.com/openshift/cloud-credential-operator/pkg/cmd/operator.NewOperator.func1.3({0x5790418?, 0xc000424fa0?})
      	/go/src/github.com/openshift/cloud-credential-operator/pkg/cmd/operator/cmd.go:289 +0x27
      created by k8s.io/client-go/tools/leaderelection.(*LeaderElector).Run
      	/go/src/github.com/openshift/cloud-credential-operator/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go:213 +0x105
      

              Unassigned Unassigned
              sjenning Seth Jennings
              Jianping Shu Jianping Shu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: