pytorch / pytorch/gloo

RDMA_FORK_ SAFE

Open
#340 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.5k
Forks
368
Avg merge
19h 32m
Merged PRs (30d)
3

Description

hi, I wrote a communication framework on our company's self-developed GPGPU, using the IB interface of GLOO. when using torch.utils.data.dataloader which forks many processes. I got following error:
gloo/transport/ibverbs/pair.cc:438] wc->status == IBV_WC_SUCCESS. 5 vs 0. Send for slot 0: Work Request Flushed Error
After debugging, I found that this problem was caused by fork's incomplete support for libibverbs.
https://www.rdmamojo.com/2012/05/24/ibv_fork_init/
I think we need to prompt users who are using the Infiniband interface to set the environment variable RDMA_FORK_SAFE or IBV_ FORK_SAFE, or call this interface when initializing IB like nccl (gloo/ibverbs/device. cc).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with gloo/ibverbs/device.cc and the failure reported in pair.cc, then read the linked RDMA fork-safety reference. Investigate the DataLoader fork scenario and determine whether fork support should be initialized during IB setup or users should be prompted to configure an environment variable. Done means the chosen behavior addresses the reported Work Request Flushed Error.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.