Skip to content

Race in TestGracefulShutdown #23311

@crenshaw-dev

Description

@crenshaw-dev

https://github.com/argoproj/argo-cd/actions/runs/15496190591/job/43633603755

WARNING: DATA RACE
Read at 0x00c0006394e8 by goroutine 784:
  github.com/redis/go-redis/v9.(*hooksMixin).processHook()
      /home/runner/go/pkg/mod/github.com/redis/go-redis/v9@v9.8.0/redis.go:190 +0x44
  github.com/redis/go-redis/v9.(*Client).Process()
      /home/runner/go/pkg/mod/github.com/redis/go-redis/v9@v9.8.0/redis.go:709 +0x35
  github.com/redis/go-redis/v9.(*Client).Process-fm()
      <autogenerated>:1 +0x64
  github.com/redis/go-redis/v9.cmdable.Scan()
      /home/runner/go/pkg/mod/github.com/redis/go-redis/v9@v9.8.0/generic_commands.go:366 +0x44e
  github.com/argoproj/argo-cd/v3/util/session.(*userStateStorage).loadRevokedTokens()
      /home/runner/work/argo-cd/argo-cd/util/session/state.go:85 +0x4d
  github.com/argoproj/argo-cd/v3/util/session.(*userStateStorage).loadRevokedTokensSafe()
      /home/runner/work/argo-cd/argo-cd/util/session/state.go:75 +0x2e
  github.com/argoproj/argo-cd/v3/util/session.(*userStateStorage).Init.func1()
      /home/runner/work/argo-cd/argo-cd/util/session/state.go:45 +0x37

Previous write at 0x00c0006394e8 by goroutine 782:
  github.com/redis/go-redis/v9.(*hooksMixin).chain()
      /home/runner/go/pkg/mod/github.com/redis/go-redis/v9@v9.8.0/redis.go:127 +0x19b
  github.com/redis/go-redis/v9.(*hooksMixin).AddHook()
      /home/runner/go/pkg/mod/github.com/redis/go-redis/v9@v9.8.0/redis.go:117 +0x23c
  github.com/argoproj/argo-cd/v3/util/cache.CollectMetrics()
      /home/runner/work/argo-cd/argo-cd/util/cache/redis.go:210 +0xad
  github.com/argoproj/argo-cd/v3/server.(*ArgoCDServer).Run()
      /home/runner/work/argo-cd/argo-cd/server/server.go:568 +0x277
  github.com/argoproj/argo-cd/v3/server.TestGracefulShutdown.func1()
      /home/runner/work/argo-cd/argo-cd/server/server_test.go:463 +0xc4
  github.com/argoproj/argo-cd/v3/server.TestGracefulShutdown.gowrap1()
      /home/runner/work/argo-cd/argo-cd/server/server_test.go:465 +0x41

Goroutine 784 (running) created at:
  github.com/argoproj/argo-cd/v3/util/session.(*userStateStorage).Init()
      /home/runner/work/argo-cd/argo-cd/util/session/state.go:44 +0x1a4
  github.com/argoproj/argo-cd/v3/server.(*ArgoCDServer).Run()
      /home/runner/work/argo-cd/argo-cd/server/server.go:564 +0x164
  github.com/argoproj/argo-cd/v3/server.TestGracefulShutdown.func1()
      /home/runner/work/argo-cd/argo-cd/server/server_test.go:463 +0xc4
  github.com/argoproj/argo-cd/v3/server.TestGracefulShutdown.gowrap1()
      /home/runner/work/argo-cd/argo-cd/server/server_test.go:465 +0x41

Goroutine 782 (running) created at:
  github.com/argoproj/argo-cd/v3/server.TestGracefulShutdown()
      /home/runner/work/argo-cd/argo-cd/server/server_test.go:461 +0xe12
  testing.tRunner()
      /opt/hostedtoolcache/go/1.24.4/x64/src/testing/testing.go:1792 +0x225
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.24.4/x64/src/testing/testing.go:1851 +0x44

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions