feat(env): MC_TRANSFER_TIMEOUT=1800s default in setup_env + stack

Mooncake C++ batch_transfer_sync defaults to 30s timeout; on
saturated D scheduler threads doing LRU eviction, that fires as a
false positive and the SGLang hair-trigger in conn.py:1270
permanently blacklists the D's mooncake_session_id (E2 forensic in
docs/E1_E2_RESULTS_ZH.md §5c). Bump to 1800s in setup_env.sh and
mirror to subprocess env in stack.py so SGLang workers get it too.
30-min envelope still detects genuinely broken peers eventually.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
tim
2026-05-12 11:45:09 +08:00
parent 9a166ac43b
commit 905d671135
3 changed files with 20 additions and 0 deletions

View File

@@ -201,6 +201,14 @@ def _build_process_env(topology: SingleNodeTopology) -> dict[str, str]:
# Default to TCP when RDMA is not forced (e.g. loopback on same node)
env.setdefault("MOONCAKE_PROTOCOL", "tcp")
# Mooncake C++ batch_transfer_sync default timeout is 30 s, which can
# fire as a false positive when a saturated D scheduler thread is busy
# with LRU eviction (see docs/E1_E2_RESULTS_ZH.md §5c). Default to 1800 s
# so the hair-trigger blacklist in conn.py:1270 doesn't latch on
# transient stalls. Caller can override via shell env (setup_env.sh).
if topology.transfer_backend == "mooncake":
env.setdefault("MC_TRANSFER_TIMEOUT", "1800")
repo_root = Path(__file__).resolve().parents[2]
python_paths = [
str(repo_root / "src"),