jeremyje opened a new issue, #32656:
URL: https://github.com/apache/beam/issues/32656

   ### 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](https://github.com/apache/beam/blob/d84cfffd017342542cc1dc3e7ae30452a485e3b1/sdks/go/pkg/beam/runners/prism/internal/jobservices/server.go#L61C2-L61C10)
 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
   - [X] 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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to