Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
ghx-label-4
Description
In one of my query profile, I found an info string like this:
Runtime filters: All filters arrived. Waited 59s783ms. Maximum arrival delay: 15s296ms.
If all runtime filters arrived within 15s296ms, then it should not wait until 59s783ms to proceed.
Looking at runtime-filter.cc, It looks like there is a potential race condition in function RuntimeFilter::WaitForArrival().
bool RuntimeFilter::WaitForArrival(int32_t timeout_ms) const {
unique_lock<mutex> l(arrival_mutex_);
while (arrival_time_.Load() == 0)
return arrival_time_.Load() != 0;
}
Between checking arrival_time_.Load() and calling arrival_cv_.WaitFor(), arrival_cv_ might be already signaled by either RuntimeFilter::SetFilter() or RuntimeFilter::Cancel() because they do not acquire arrival_mutex_ first.
Attachments
Attachments
Issue Links
- is related to
-
IMPALA-5904 Enable ThreadSanitizer for Impala
- Open
- relates to
-
IMPALA-9611 Hang in HandoffToProbesAndWait() for multithreaded join build
- Resolved