gpt3_mcore_te_tp1_pp4_vp1 is failing on checkpoint saving
Describe the bug
gpt3_mcore_te_tp1_pp4_vp1 is failing on checkpoint saving. This test was passing earlier but now seems to be failing in the queue. Other tests are passing though, so seems unusual this would suddenly fail.
@NVIDIA/mcore-oncall
Steps/Code to reproduce bug
Run the functional test https://github.com/NVIDIA/Megatron-LM/actions/runs/23215938659/job/67480605188
9-task-1-0/0 [default0]:[Rank 0] (before save_checkpoint for iteration 50) memory (MB) | allocated: 725.47 | max allocated: 3536.48 | reserved: 854.00 | max reserved: 3602.00
9-task-1-0/0 [default0]:[2026-03-17 21:33:45.434098] saving checkpoint at iteration 50 to /opt/megatron-lm/artifacts_dir/checkpoints in torch_dist format
9-task-1-0/0 [default7]:Process ForkServerProcess-1:
9-task-1-0/0 [default7]:Traceback (most recent call last):
9-task-1-0/0 [default7]: File "/usr/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
9-task-1-0/0 [default7]: self.run()
9-task-1-0/0 [default7]: File "/usr/lib/python3.12/multiprocessing/process.py", line 108, in run
9-task-1-0/0 [default7]: self._target(*self._args, **self._kwargs)
9-task-1-0/0 [default7]: File "/usr/lib/python3.12/contextlib.py", line 81, in inner
9-task-1-0/0 [default7]: return func(*args, **kwds)
9-task-1-0/0 [default7]: ^^^^^^^^^^^^^^^^^^^
9-task-1-0/0 [default7]: File "/opt/megatron-lm/megatron/core/dist_checkpointing/strategies/async_utils.py", line 575, in async_loop
9-task-1-0/0 [default7]: item = queue.get()
9-task-1-0/0 [default7]: ^^^^^^^^^^^
9-task-1-0/0 [default7]: File "/usr/lib/python3.12/multiprocessing/queues.py", line 122, in get
9-task-1-0/0 [default7]: return _ForkingPickler.loads(res)
9-task-1-0/0 [default7]: ^^^^^^^^^^^^^^^^^^^^^^^^^^
9-task-1-0/0 [default7]: File "/usr/local/lib/python3.12/dist-packages/torch/multiprocessing/reductions.py", line 180, in rebuild_cuda_tensor
9-task-1-0/0 [default7]: storage = storage_cls._new_shared_cuda(
9-task-1-0/0 [default7]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9-task-1-0/0 [default7]: File "/usr/local/lib/python3.12/dist-packages/torch/storage.py", line 1464, in _new_shared_cuda
9-task-1-0/0 [default7]: return torch.UntypedStorage._new_shared_cuda(*args, **kwargs)
9-task-1-0/0 [default7]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9-task-1-0/0 [default7]:RuntimeError: pidfd_getfd: Operation not permitted
9-task-1-0/0 [default0]:Process ForkServerProcess-1:
9-task-1-0/0 [default0]:Traceback (most recent call last):
9-task-1-0/0 [default0]: File "/usr/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
9-task-1-0/0 [default0]: self.run()
9-task-1-0/0 [default0]: File "/usr/lib/python3.12/multiprocessing/process.py", line 108, in run
9-task-1-0/0 [default0]: self._target(*self._args, **self._kwargs)
9-task-1-0/0 [default0]: File "/usr/lib/python3.12/contextlib.py", line 81, in inner
9-task-1-0/0 [default0]: return func(*args, **kwds)
9-task-1-0/0 [default0]: ^^^^^^^^^^^^^^^^^^^
9-task-1-0/0 [default0]: File "/opt/megatron-lm/megatron/core/dist_checkpointing/strategies/async_utils.py", line 575, in async_loop
9-task-1-0/0 [default0]: item = queue.get()
9-task-1-0/0 [default0]: ^^^^^^^^^^^
9-task-1-0/0 [default0]: File "/usr/lib/python3.12/multiprocessing/queues.py", line 122, in get
9-task-1-0/0 [default0]: return _ForkingPickler.loads(res)
9-task-1-0/0 [default0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^
9-task-1-0/0 [default0]: File "/usr/local/lib/python3.12/dist-packages/torch/multiprocessing/reductions.py", line 180, in rebuild_cuda_tensor
9-task-1-0/0 [default0]: storage = storage_cls._new_shared_cuda(
9-task-1-0/0 [default0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9-task-1-0/0 [default0]: File "/usr/local/lib/python3.12/dist-packages/torch/storage.py", line 1464, in _new_shared_cuda
9-task-1-0/0 [default0]: return torch.UntypedStorage._new_shared_cuda(*args, **kwargs)
9-task-1-0/0 [default0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9-task-1-0/0 [default0]:RuntimeError: pidfd_getfd: Operation not permitted
A helpful guide on on how to craft a minimal bug report http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports.
Expected behavior
Test should pass
Additional context
Add any other context about the problem here.
@theothermike to review if Infra issue.
Hey! I may be able to help with this bug.
I build custom fixes for Python projects and automation systems.
If you'd like help resolving this issue quickly feel free to reach out.
Happy to take a look 👍
Looks like temporary/random isssue. We're not seeing this issue anymore in a recent pipelines.