Skip to content

Race deteced #8080

@zirain

Description

@zirain

xref: https://github.com/envoyproxy/gateway/actions/runs/21422260318/job/61683928039

WARNING: DATA RACE
Read at 0x00c002043e0b by goroutine 571:
  testing.(*common).destination()
      /opt/hostedtoolcache/go/1.25.6/x64/src/testing/testing.go:1049 +0x96
  testing.(*outputWriter).Write()
      /opt/hostedtoolcache/go/1.25.6/x64/src/testing/testing.go:1133 +0x9a
  go.uber.org/zap/zapcore.(*writerWrapper).Write()
      <autogenerated>:1 +0x6c
  go.uber.org/zap/zapcore.(*ioCore).Write()
      /home/runner/go/pkg/mod/go.uber.org/zap@v1.27.1/zapcore/core.go:99 +0x18d
  go.uber.org/zap/zapcore.(*CheckedEntry).Write()
      /home/runner/go/pkg/mod/go.uber.org/zap@v1.27.1/zapcore/entry.go:258 +0x1ec
  github.com/go-logr/zapr.(*zapLogger).Info()
      /home/runner/go/pkg/mod/github.com/go-logr/zapr@v1.3.0/zapr.go:201 +0xce
  github.com/go-logr/logr.Logger.Info()
      /home/runner/go/pkg/mod/github.com/go-logr/logr@v1.4.3/logr.go:280 +0x107
  github.com/envoyproxy/gateway/internal/provider/kubernetes.(*gatewayAPIReconciler).updateStatusFromSubscriptions.func6()
      /home/runner/work/gateway/gateway/internal/provider/kubernetes/status.go:252 +0x113

Previous write at 0x00c002043e0b by goroutine 545:
  testing.tRunner.func1()
      /opt/hostedtoolcache/go/1.25.6/x64/src/testing/testing.go:1921 +0x904
  runtime.deferreturn()
      /opt/hostedtoolcache/go/1.25.6/x64/src/runtime/panic.go:589 +0x5d
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.25.6/x64/src/testing/testing.go:1997 +0x44

Goroutine 571 (running) created at:
  github.com/envoyproxy/gateway/internal/provider/kubernetes.(*gatewayAPIReconciler).updateStatusFromSubscriptions()
      /home/runner/work/gateway/gateway/internal/provider/kubernetes/status.go:214 +0x399
  github.com/envoyproxy/gateway/internal/provider/kubernetes.NewOfflineGatewayAPIController()
      /home/runner/work/gateway/gateway/internal/provider/kubernetes/controller_offline.go:115 +0x13c6
  github.com/envoyproxy/gateway/internal/provider/file.New()
      /home/runner/work/gateway/gateway/internal/provider/file/file.go:59 +0x627
  github.com/envoyproxy/gateway/internal/provider/runner.(*Runner).createCustomResourceProvider()
      /home/runner/work/gateway/gateway/internal/provider/runner/runner.go:95 +0x18e
  github.com/envoyproxy/gateway/internal/provider/runner.(*Runner).Start()
      /home/runner/work/gateway/gateway/internal/provider/runner/runner.go:58 +0x594
  github.com/envoyproxy/gateway/internal/cmd.startRunner()
      /home/runner/work/gateway/gateway/internal/cmd/server.go:302 +0x1d1
  github.com/envoyproxy/gateway/internal/cmd.startRunners()
      /home/runner/work/gateway/gateway/internal/cmd/server.go:258 +0x1bdb
  github.com/envoyproxy/gateway/internal/cmd.testHook()
      /home/runner/work/gateway/gateway/internal/cmd/server_test.go:81 +0x3c
  github.com/envoyproxy/gateway/internal/envoygateway/config/loader.(*Loader).runHook.func1()
      /home/runner/work/gateway/gateway/internal/envoygateway/config/loader/configloader.go:129 +0x13d
  github.com/envoyproxy/gateway/internal/envoygateway/config/loader.(*Loader).runHook.gowrap1()
      /home/runner/work/gateway/gateway/internal/envoygateway/config/loader/configloader.go:135 +0x4f

Goroutine 545 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.25.6/x64/src/testing/testing.go:1997 +0x9d2
  testing.runTests.func1()
      /opt/hostedtoolcache/go/1.25.6/x64/src/testing/testing.go:2477 +0x85
  testing.tRunner()
      /opt/hostedtoolcache/go/1.25.6/x64/src/testing/testing.go:1934 +0x21c
  testing.runTests()
      /opt/hostedtoolcache/go/1.25.6/x64/src/testing/testing.go:2475 +0x96c
  testing.(*M).Run()
      /opt/hostedtoolcache/go/1.25.6/x64/src/testing/testing.go:2337 +0xed4
  main.main()
      _testmain.go:77 +0x164
==================
FAIL

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions