Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Insert on concurrent_unordered_map for un-packable key-value pair type is broken #9317

Closed
chirayuG-nvidia opened this issue Sep 28, 2021 · 3 comments
Labels
bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. wontfix This will not be worked on

Comments

@chirayuG-nvidia
Copy link

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

@chirayuG-nvidia chirayuG-nvidia added Needs Triage Need team to review and classify bug Something isn't working labels Sep 28, 2021
@beckernick beckernick added libcudf Affects libcudf (C++/CUDA) code. and removed Needs Triage Need team to review and classify labels Oct 5, 2021
@github-actions
Copy link

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.

@github-actions
Copy link

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.

@vyasr vyasr added the wontfix This will not be worked on label Jul 25, 2022
@vyasr
Copy link
Contributor

vyasr commented Jul 25, 2022

We won't be fixing this in favor of #10401.

@vyasr vyasr closed this as completed Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants