You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a race condition in attempt_insert function at https://github.com/rapidsai/cudf/blob/branch-21.12/cpp/src/hash/concurrent_unordered_map.cuh#L291 . Since atomicCAS (by Thread T1) updates the key of a location before the payload is assigned to the hash table, another thread (T2) which is trying to insert the same key gets Sentinel (unused value) payload values as it observes that Key is updated, however either the payload store instruction is not yet issued or the value is not updated across all caches.
A possible fix is to check the payload for sentinel value when an attempt_insert returns that key already exists. A user supplied comparator can be used and insert can use strong load qualifier with sleep to get updated payload value before returning to thread T2.
Filing the bug for tracking and completeness sake, not sure if cuCollections will replace cuDF map implementation(s).
The text was updated successfully, but these errors were encountered:
This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.
This issue has been labeled inactive-90d due to no recent activity in the past 90 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.
There is a race condition in
attempt_insert
function at https://github.com/rapidsai/cudf/blob/branch-21.12/cpp/src/hash/concurrent_unordered_map.cuh#L291 . SinceatomicCAS
(by Thread T1) updates the key of a location before the payload is assigned to the hash table, another thread (T2) which is trying to insert the same key getsSentinel
(unused value) payload values as it observes that Key is updated, however either the payload store instruction is not yet issued or the value is not updated across all caches.A possible fix is to check the payload for sentinel value when an
attempt_insert
returns that key already exists. A user supplied comparator can be used andinsert
can use strong load qualifier with sleep to get updated payload value before returning to thread T2.Filing the bug for tracking and completeness sake, not sure if cuCollections will replace cuDF map implementation(s).
The text was updated successfully, but these errors were encountered: