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

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

Open
1 of 17 tasks
jeremyje opened this issue Oct 4, 2024 · 0 comments · May be fixed by #32657
Open
1 of 17 tasks

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

jeremyje opened this issue Oct 4, 2024 · 0 comments · May be fixed by #32657

Comments

@jeremyje
Copy link
Contributor

jeremyje commented Oct 4, 2024

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/[email protected]/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/[email protected]/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/[email protected]/server.go:1688 +0x1208
google.golang.org/grpc.(*Server).handleStream(0xc000565a00, {0x29d4640, 0xc000494b60}, 0xc00167a7e0)
	/github/home/go/pkg/mod/google.golang.org/[email protected]/server.go:1809 +0xe3a
google.golang.org/grpc.(*Server).serveStreams.func2.1()
	/github/home/go/pkg/mod/google.golang.org/[email protected]/server.go:1029 +0x7f
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 1616
	/github/home/go/pkg/mod/google.golang.org/[email protected]/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant