NCCL data race
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 5.1k
- Forks
- 1.4k
- Avg merge
- 2h 3m
- Merged PRs (30d)
- 2
Description
When trying to run Sanitizer for NCCL porting code, facing data race between threads realted proxy, following code call path.
Thread-A
proxy.cc: ncclProxyProgress →
proxy.cc: progressOps →
net.cc: sendProxyProgress
sub->sendMhandle = resources->mhandles[args->protocol];
Thread-B
proxy.cc: ncclProxyService →
proxy.cc: proxyProgressAsync →
net.cc: sendProxyConnect
net_ib.cc: ncclIbRegMr →
net_ib.cc: ncclIbRegMrDmaBuf
mhandle = (void) mhandleWrapper;
I would like to know that, is NCCL thread safe? If so, what will be the cause for the data race? If not, is there any way to avoid it?
Best Regards.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported call paths in proxy.cc, net.cc, and net_ib.cc, especially ncclProxyProgress, progressOps, sendProxyProgress, ncclProxyService, proxyProgressAsync, sendProxyConnect, ncclIbRegMr, and ncclIbRegMrDmaBuf. Reproduce the NCCL porting-code run under Sanitizer and inspect the accesses to resources->mhandles and mhandleWrapper. Done means identifying whether the report is a real race and documenting or resolving the supported thread-safety behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- distributed-systems, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100