rtpsw commented on PR #34392:
URL: https://github.com/apache/arrow/pull/34392#issuecomment-1501205568

   Coming back to this, I see [the same race 
condition](https://github.com/apache/arrow/pull/34392#issuecomment-1449560506) 
after merging main.
   
   One experiment I made is related to [this 
comment](https://github.com/apache/arrow/blob/311cc52d208034214c325983f416f2f847a2a015/cpp/src/arrow/acero/asof_join_node.cc#L186-L189):
   - When I add a lock over `mutex_` to `UnsyncFront`, I get the same results, 
including the race condition. This means that `UnsyncFront` is called safely 
per the comment, i.e., not called concurrently with `pop` or `try_pop`.
   - When  I add a lock over `mutex_` to `UnsyncSize`, I see a deadlock between 
one thread calling `AsofJoinNode::ProcessThread` -> `ConcurrentQueue::Pop and 
another calling `InputState::Push` -> `BackpressureConcurrentQueue::Push` -> 
`BackpressureConcurrentQueue::DoHandle` -> `ConcurrentQueue::UnsyncSize`. This 
isn't surprising, just shows that the comment does not apply to `UnsyncSize`.


-- 
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