Skip to content

[Bug]: Go Prism Runner Concurrent Map Mutations #32656

Closed

Description

@jeremyje

What happened?

There are race conditions in the Server of the prism runner's gRPC server in Go. Reads and writes to the artifacts variable within Server are not protected by a mutex. This means race detection will occasionally crash this logic because it's not thread safe.

Given the nature of this class. It's likely other variables are at risk of races as well.

fatal error: concurrent map writes

goroutine 1737 [running]:
github.com/apache/beam/sdks/v2/go/pkg/beam/runners/prism/internal/jobservices.(*Server).ReverseArtifactRetrievalService(0xc0001195c0, {0x29c74a0, 0xc000be4570})
	/github/home/go/pkg/mod/github.com/apache/beam/sdks/v2@v2.59.0/go/pkg/beam/runners/prism/internal/jobservices/artifact.go:87 +0x885
github.com/apache/beam/sdks/v2/go/pkg/beam/model/jobmanagement_v1._ArtifactStagingService_ReverseArtifactRetrievalService_Handler({0x2693b80?, 0xc0001195c0}, {0x29c06d0, 0xc000b321e0})
	/github/home/go/pkg/mod/github.com/apache/beam/sdks/v2@v2.59.0/go/pkg/beam/model/jobmanagement_v1/beam_artifact_api_grpc.pb.go:272 +0xd8
google.golang.org/grpc.(*Server).processStreamingRPC(0xc000565a00, {0x29bb248, 0xc000b138c0}, {0x29d4640, 0xc000494b60}, 0xc00167a7e0, 0xc000319c80, 0x4ced6a0, 0x0)
	/github/home/go/pkg/mod/google.golang.org/grpc@v1.67.1/server.go:1688 +0x1208
google.golang.org/grpc.(*Server).handleStream(0xc000565a00, {0x29d4640, 0xc000494b60}, 0xc00167a7e0)
	/github/home/go/pkg/mod/google.golang.org/grpc@v1.67.1/server.go:1809 +0xe3a
google.golang.org/grpc.(*Server).serveStreams.func2.1()
	/github/home/go/pkg/mod/google.golang.org/grpc@v1.67.1/server.go:1029 +0x7f
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 1616
	/github/home/go/pkg/mod/google.golang.org/grpc@v1.67.1/server.go:1040 +0x125

Issue Priority

Priority: 2 (default / most bugs should be filed as P2)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam YAML
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Infrastructure
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Samza Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner

Activity

  1. github-actions commented on Jul 2, 2025

    @github-actions
    Contributor

    This issue has been marked as stale due to 150 days of inactivity. It will be closed in 30 days if no further activity occurs. If you think that’s incorrect or this issue still needs to be addressed, please simply write any comment. If closed, you can reopen the issue at any time. Thank you for your contributions.

  2. github-actions commented on Aug 1, 2025

    @github-actions
    Contributor

    This issue has been closed due to lack of activity. If you think that is incorrect, you can reopen the issue at any time.

  3. waneal commented on Sep 11, 2026

    @waneal
    Contributor

    .reopen-issue

  4. waneal commented on Sep 11, 2026

    @waneal
    Contributor

    .take-issue

  5. added a commit that references this issue on Sep 21, 2026
    38f01c1
  6. added a commit that references this issue on Sep 21, 2026
    db063b8
  7. added this to the 2.78.0 Release milestone on Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions