SGLang multi-node: auto-negotiated dist_init port can collide with pre-allocated engine ports
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- python
- Ambito
- backend, distributed-systems, networking
Direzione di ricerca
Inizia in angelspec/inference/factory.py, in _prepare_sgl_engines, leggendo insieme Step 2 e Step 2.5, quindi segui SglEngine.init per confermare come vengono assegnati port e dist_init_addr. Assicurati che la porta dist-init negoziata automaticamente non possa sovrapporsi alle porte degli engine preallocate nel percorso SGLang multi-node, soprattutto quando il valore predefinito inizia da 10000.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
In _prepare_sgl_engines (angelspec/inference/factory.py), Step 2 picks a free port for dist_init_addr starting from the default start_port=10000:
https://github.com/Tencent/AngelSpec/blob/main/angelspec/inference/factory.py#L288-L295
ip, port = ray.get(
[head_engine.get_node_ip.remote(), head_engine.find_free_port.remote()],
timeout=120,
)
find_free_port only probes ports; it never reserves them. Step 2.5 then restarts its sequential allocation at the literal next_start = 10000 without accounting for the port just handed out:
https://github.com/Tencent/AngelSpec/blob/main/angelspec/inference/factory.py#L297-L309
next_start = 10000
for i in range(num_engines):
port = ray.get(engines[i].find_free_port.remote(start_port=next_start, consecutive=2), ...)
pre_allocated_ports[i] = port
next_start = port + 2
On a fresh node, Step 2 returns 10000 and Step 2.5 immediately hands engine 0 (which is the replica-0 head on the same node) ports 10000/10001. SglEngine.init then sets port=10000, nccl_port=10001, and dist_init_addr="<same-ip>:10000" — the head node is told to bind its server port and its dist-init TCPStore on the same port. The Step 2.5 comment says "allocate sequentially so engines on the same node never collide", but the Step 2 allocation is invisible to that sequencer.
The vLLM path avoids this by reusing the head's pre-allocated port as the dist-init port rather than drawing a second untracked port. Possible fixes: allocate the dist-init port from the same sequential allocator (e.g. run Step 2 after Step 2.5 using next_start, or advance next_start past the negotiated dist-init port). Only affects sglang_nnodes > 1 with auto-negotiated addr.
- Lingua principale
- Python
- Stelle
- 460
- Fork
- 40
- Merge medio
- 1h 4m
- PR unite (30g)
- 4
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Tencent/AngelSpec
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
Tutte le issue di Tencent/AngelSpec
Issue simili
-
ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
accepted
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
future-agi/future-agi#5070 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
juandresrodca/AdminForge#69 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
deepset-ai/haystack-integrations#817 ·
I maintainer di solito rispondono entro 12 giorni
-
[Bug]: test_remote_realpath_uses_argument_vector fails on Windows with Python 3.13+ (ntpath.isabs)Forse già presa @gouyu-hou l’ha presa oggi. Apertatriage/confirmed
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
agentscope-ai/agentscope#4397 ·
I maintainer di solito rispondono entro 2 giorni