Skip to content
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

Data race in CacheController #320

Closed
DavidNix opened this issue Jul 2, 2023 · 0 comments · Fixed by #321
Closed

Data race in CacheController #320

DavidNix opened this issue Jul 2, 2023 · 0 comments · Fixed by #321
Assignees
Labels
bug Something isn't working

Comments

@DavidNix
Copy link
Contributor

DavidNix commented Jul 2, 2023

❯ stress ./cosmos.test
5s: 773 runs so far, 0 failures
10s: 1584 runs so far, 0 failures
15s: 2394 runs so far, 0 failures
20s: 3170 runs so far, 0 failures
25s: 3949 runs so far, 0 failures
30s: 4720 runs so far, 0 failures
35s: 5502 runs so far, 0 failures
40s: 6272 runs so far, 0 failures
45s: 7073 runs so far, 0 failures
50s: 7855 runs so far, 0 failures

/var/folders/gv/8y8kgtw10_37gt24l8br4nvc0000gn/T/go-stress-20230702T095941-2040175276
==================
WARNING: DATA RACE
Read at 0x00c0003cc518 by goroutine 69:
  github.com/strangelove-ventures/cosmos-operator/internal/cosmos.(*mockReader).List()
      /Users/davidnix/src/strangelove/cosmos-operator/internal/cosmos/cache_controller_test.go:65 +0x108
  github.com/strangelove-ventures/cosmos-operator/internal/cosmos.(*CacheController).listPods()
      /Users/davidnix/src/strangelove/cosmos-operator/internal/cosmos/cache_controller.go:173 +0x1f0
  github.com/strangelove-ventures/cosmos-operator/internal/cosmos.(*CacheController).collectFromPods.func1()
      /Users/davidnix/src/strangelove/cosmos-operator/internal/cosmos/cache_controller.go:186 +0x70
  github.com/strangelove-ventures/cosmos-operator/internal/cosmos.(*CacheController).collectFromPods()
      /Users/davidnix/src/strangelove/cosmos-operator/internal/cosmos/cache_controller.go:196 +0x130
  github.com/strangelove-ventures/cosmos-operator/internal/cosmos.(*CacheController).Reconcile.func1()
      /Users/davidnix/src/strangelove/cosmos-operator/internal/cosmos/cache_controller.go:144 +0xc4
  golang.org/x/sync/errgroup.(*Group).Go.func1()
      /Users/davidnix/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x6c

Previous write at 0x00c0003cc518 by goroutine 68:
  github.com/strangelove-ventures/cosmos-operator/internal/cosmos.TestCacheController_Reconcile.func2()
      /Users/davidnix/src/strangelove/cosmos-operator/internal/cosmos/cache_controller_test.go:159 +0x648
  testing.tRunner()
      /Users/davidnix/.local/share/rtx/installs/golang/1.20.4/go/src/testing/testing.go:1576 +0x188
  testing.(*T).Run.func1()
      /Users/davidnix/.local/share/rtx/installs/golang/1.20.4/go/src/testing/testing.go:1629 +0x40

Goroutine 69 (running) created at:
  golang.org/x/sync/errgroup.(*Group).Go()
      /Users/davidnix/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:72 +0x10c
  github.com/strangelove-ventures/cosmos-operator/internal/cosmos.(*CacheController).Reconcile()
      /Users/davidnix/src/strangelove/cosmos-operator/in
…
55s: 8660 runs so far, 1 failures (0.01%)
1m0s: 9451 runs so far, 1 failures (0.01%)
1m5s: 10234 runs so far, 1 failures (0.01%)
1m10s: 11016 runs so far, 1 failures (0.01%)
1m15s: 11813 runs so far, 1 failures (0.01%)
1m20s: 12613 runs so far, 1 failures (0.01%)
1m25s: 13401 runs so far, 1 failures (0.01%)
1m30s: 14182 runs so far, 1 failures (0.01%)
1m35s: 14962 runs so far, 1 failures (0.01%)
1m40s: 15753 runs so far, 1 failures (0.01%)
1m45s: 16551 runs so far, 1 failures (0.01%)
1m50s: 17321 runs so far, 1 failures (0.01%)
1m55s: 18119 runs so far, 1 failures (0.01%)
2m0s: 18903 runs so far, 1 failures (0.01%)
@DavidNix DavidNix added the bug Something isn't working label Jul 2, 2023
@DavidNix DavidNix self-assigned this Jul 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant