Slurm: endpoint ports can collide with ephemeral readiness connections
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- bash, linux, python
- 領域
- backend, networking, testing
調査の方向性
Read packages/data-designer-slurm/src/data_designer/slurm/runtime/ports.py, preflight.py, and entrypoint.sh; trace port selection, reservation cleanup, and readiness polling. Start by reproducing the supplied socket-level MRE, then inspect related issue #868 and existing regression tests. Done means startup avoids the probe and listener race, with tests for overlapping ephemeral ranges, occupied ports, and preserved failure diagnostics.
索引モデルが issue の本文から書いたものです。
説明
Priority Level
High (Major functionality broken)
Describe the bug
Slurm's allocation-local port selection can overlap Linux's ephemeral TCP port range. A readiness probe issued before the logical endpoint binds can automatically select that endpoint's port as its own source port, connect to itself, and leave the port in TIME_WAIT. The endpoint then fails with EADDRINUSE, even though the earlier bind preflight succeeded and no other listener was needed.
Steps/Code to reproduce bug
Requirements: Linux with unprivileged user/network namespaces, Bash, Python 3, curl, and iproute2 (ip, ss). No Slurm, GPU, model, dataset, or DataDesigner installation is required for this socket-level MRE.
Save the following as repro.sh and run bash repro.sh. It changes sysctls only after entering a private network namespace. A synthetic one-port ephemeral range makes the source-port choice deterministic; it is not a suggested host configuration.
#!/usr/bin/env bash
set -euo pipefail
export MRE_PARENT_NETNS="$(readlink /proc/self/ns/net)"
export MRE_PYTHON="${MRE_PYTHON:-python3}"
unshare --user --map-root-user --net bash <<'SH'
set -euo pipefail
ip link set lo up
"$MRE_PYTHON" - <<'PY'
import errno
import os
import socket
import subprocess
from pathlib import Path
assert str(Path("/proc/self/ns/net").readlink()) != os.environ["MRE_PARENT_NETNS"]
settings = Path("/proc/sys/net/ipv4")
settings.joinpath("ip_local_reserved_ports").write_text("\n")
# Synthetic single-port range forces an otherwise intermittent source-port choice.
settings.joinpath("ip_local_port_range").write_text("10000 10000\n")
# Mirror the preflight bind-and-release before the endpoint starts.
with socket.socket() as reservation:
reservation.bind(("0.0.0.0", 10000))
print("Preflight bind succeeded; reservation released.", flush=True)
probe = subprocess.run(
["curl", "--noproxy", "*", "--fail", "--silent", "--show-error",
"--max-time", "1", "http://127.0.0.1:10000/health"],
capture_output=True, text=True,
)
print(probe.stderr.strip())
subprocess.run(["ss", "-tan", "( sport = :10000 )"], check=True)
with socket.socket() as listener:
listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
try:
listener.bind(("127.0.0.1", 10000))
except OSError as error:
assert error.errno == errno.EADDRINUSE
print(f"Endpoint bind failed: {error}")
else:
raise AssertionError("Expected EADDRINUSE after the readiness self-connection")
with socket.socket() as control:
control.bind(("127.0.0.1", 2000))
print("Control bind outside the synthetic ephemeral range succeeded.")
PY
SH
Observed:
- The preflight bind succeeds and releases its socket.
- Curl reports
Received HTTP/0.9 when not allowedafter connecting to itself. ssshowsTIME-WAITfrom127.0.0.1:10000to127.0.0.1:10000.- The subsequent endpoint bind raises
[Errno 98] Address already in use, including withSO_REUSEADDRenabled. - The control bind outside the synthetic ephemeral range succeeds.
Expected behavior
Endpoint startup should not allow readiness probes to consume the endpoint's own port. Allocation should account for the host's effective ephemeral/reserved port ranges, and startup should establish listener ownership before connection-based readiness polling can race it.
Agent Diagnostic / Prior Investigation
Affected code was verified at public commit 68c516f724ee1e0e3e3c5a965388a9610e587207. The public feat/slurm-execution branch still uses the same fixed-range allocation:
- Port selection:
10000 + min(SLURM_JOB_GPUS) * 256, without excluding the host ephemeral range. - Preflight: test-bind reservations are closed before startup.
- Startup ordering: servers become ready before endpoint processes start.
- Readiness polling: curl starts polling without first establishing that the endpoint owns its listening socket.
The unmodified DD proxy also reproduces the bind failure under the same forced-collision setup. The MRE establishes a failure mechanism and deliberately forces the timing/source-port choice; it does not measure its frequency under an ordinary host configuration.
Additional context
Related to #868. Regression coverage should include a probe before the listener binds, overlapping ephemeral/service ranges, and an already occupied port. Occupied-port failures should remain explicit and cleanup should preserve the failed attempt's diagnostics.
Checklist
- I reproduced this issue or provided a minimal example
- I searched the docs/issues myself, or had my agent do so
- If I used an agent, I included its diagnostics above
- 主要言語
- Python
- スター
- 2.4k
- フォーク
- 241
- 平均マージ
- 1日 1時間
- マージ済み PR(30日)
- 86
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA-NeMo/DataDesigner のほかの issue
-
enhancement triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NVIDIA-NeMo/DataDesigner#1110 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Local seed path containing a single quote breaks the DuckDB query再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
NVIDIA-NeMo/DataDesigner#1102 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Code validation repeats the first result for subsequent target columns対応中かも @edjson が 2 日前に担当しました。 オープンbug triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
NVIDIA-NeMo/DataDesigner#1092 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
enforce \from future import annotations` via ruff FA102 rule`対応中かも @chethanuk が 49 日前に担当しました。 オープンtask
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NVIDIA-NeMo/DataDesigner#760 ·
メンテナーはふだん 1 日以内に返信
-
Support image columns and media collection in multi-shard Slurm runs対応中かも @nabinchha が 1 日前に担当しました。 オープンenhancement
NVIDIA-NeMo/DataDesigner#1114 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
NVIDIA-NeMo/DataDesigner の issue をすべて見る
似ている issue
-
ai_p2 bug comp-datalake
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
ClickHouse/ClickHouse#128306 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
[bug] openlit: LLM spans from openlit 1.37+ get no OpenInference attributes, and cache and reasoning token counts are dropped対応中かも @sohom-cs が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
Arize-ai/openinference#4199 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
MichaelYcJo/SpecSeal#1192 ·