Memory Leak in colocate Mode During Rollout
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.5k
- Forks
- 1.3k
- Avg merge
- 5h 36m
- Merged PRs (30d)
- 22
Description
Hi, thanks for the great work on this framework!
I encountered a memory leak issue when using the colocate mode.
Specifically, memory usage in the non-rollout process increases after every rollout step, even though the rollout worker itself completes normally.
Observed Behavior:
-
Memory leak per step
-
In each training step, the memory usage of the colocated process grows by 4–5 GB.
This increase is cumulative and eventually leads to OOM after several steps.
destroy_process_groups() always enters the except branch
For every step, cleanup triggers:
logger.warning(
f"Process group already invalid/destroyed; skipping cleanup. Exception: {e}",
exc_info=True,
)
Any insights or pointers on debugging this would be greatly appreciated.
Thanks again for maintaining this project!
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 by reproducing the colocate-mode rollout and tracking memory in the non-rollout process across steps. Inspect destroy_process_groups() and its exception path, then verify that cleanup completes without cumulative memory growth or eventual OOM.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100