Summary:
The torchrun elastic agent logged ChildFailedError, then went silent
— never exited — until a manual kill, at which point twinfra spent ~1min
sending stop signals every second that the container ignored.
Root cause inside torch elastic: when workers wedge on a kernel resource
(NCCL/GPU/RDMA — Linux D-state) SIGKILL cannot reap them, and both
MultiprocessContext._close and SubprocessContext._close end in an unbounded
proc.join() / proc.wait(). The agent itself wedges on that join, so the
supervising launcher can never exit and MAST keeps the slot pinned.
Two changes here:
Bound the final
proc.join()(api.py:900) andproc.wait()(api.py:1054)
with the sametimeoutthe rest of_closealready honors. On timeout, log
the unkillable PID (with the SIGKILL signal name and advice that the host
may need recycling) and continue. The agent process can now exit even when
workers are unkillable.
Make the D-state detection added in the prior change actually escalate:
when_check_d_state_timeoutfires, set_remaining_restarts = 0before
returningUNHEALTHY. A D-state worker still holds GPU/NIC on the host, so
a fresh worker group on the same host would conflict; we want_invoke_run
to take the_stop_workers + returnbranch and exit immediately.
Caveat: this diff lets the supervisor exit cleanly. It does not free the
wedged worker processes on the host — those still need host recycling for the
GPUs to be reusable, since no userspace signal can unblock a process in true
D-state. The new error log surfaces the offending PIDs so oncall can recycle
the host explicitly.
Authored by Claude.
Test Plan:
New unit tests:
BoundedCloseTestintest/distributed/elastic/multiprocessing/api_test.py
covers bothMultiprocessContext._closeandSubprocessContext._close.
Each test mocks an unkillable process whoseis_alive/pollalways reports
alive and whosejoin/waithonor the timeout but never resolve. Asserts
_closereturns in <5s (two bounded joins of 1s each + epsilon) instead of
hanging forever.
Extended
LocalElasticAgentDStateTest::test_check_d_state_timeout_firesin
test/distributed/elastic/agent/server/test/local_elastic_agent_test.pyto
assert_remaining_restartsis set to 0 when the D-state timeout fires.
Reviewed By: d4l3k
Differential Revision: D105652547
Community-Analysen & Experten-Meinungen 0
Verwandte Story-Cluster & Quellen (Vektor-KI)
Ähnliche Beiträge
Auch interessante Nachrichten ciflow/trunk/185414: [torchelastic] handle d-state process (#185414)
Thematisch verwandte Begriffe: ciflowtrunk185414, torchelastic, handle, dstate · 6 Treffer
[webapps] Langflow 1.8.4 - Path Traversal to Remote Code Execution
[webapps] Langflow 1.10.0 - RCE
REVSTEALER ramps up: analysis of up-and-coming infostealer
Videos werden geladen ...
Beiträge werden geladen ...
Videos werden geladen ...
Beiträge werden geladen ...
Videos werden geladen ...
Beiträge werden geladen ...
Videos werden geladen ...
Beiträge werden geladen ...
Videos werden geladen ...
SOCIAL SHARE CARD GENERATOR