Skip to content

ready flag has an unsynchronized read/write across grpc/blob/http syncs #2004

Closed

Description

@toddbaert

The ready bool field in the grpc, blob, and http syncs is written in the sync goroutine (handleFlagSync / equivalent) and read in IsReady() with no synchronization; a data race under the Go memory model, though harmless in practice since it's a single-value write of true.

kubernetes_sync.go already uses atomic.Bool; we should align the others.

  • core/pkg/sync/grpc/grpc_sync.go
  • core/pkg/sync/blob/blob_sync.go
  • core/pkg/sync/http/http_sync.go

Straightforward swap (Load()/Store()); watch for copylocks since atomic.Bool is non-copyable (all three are used via pointers today, so low risk).

Follow-up from #1985.

Activity

  1. added a commit that references this issue on Jul 27, 2026
    317a7e0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions