[Bug]: potential race condition in Google Cloud Dataflow Runner throws exception #29987
Closed
1 of 16 tasks
Labels
Milestone
What happened?
There is a potential race condition in the DataflowExecutionStateSampler that occurs in getProcessingDistributionsForWorkId when multiple threads are modifying the activeTrackersByWorkId map. In getProcessingDistributionsForWorkId, we check for the existence of the work id in the activeTrackersByWorkId map before retrieving the value from the map. If another thread removes the tracker from the map in-between us checking for its existence and actually grabbing the object, we will get a null tracker that then throws a NullPointerException when we try to access data on it.
A stack trace like so will be dumped:
The getProcessingDistributionsForWorkId method needs to be synchronized.
Issue Priority
Priority: 2 (default / most bugs should be filed as P2)
Issue Components
The text was updated successfully, but these errors were encountered: