[Bugfix] Eliminate frontend ZMQ port TOCTOU with inherited listeners (#54113)
Signed-off-by: Bugen Zhao <i@bugenzhao.com> Co-authored-by: OpenAI Codex <codex@openai.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
OpenAI Codex
Claude Opus 5.5
parent
fb2ac82458
commit
f226af0e11
@@ -5,6 +5,8 @@ use std::collections::BTreeMap;
|
||||
use std::fs;
|
||||
use std::future::Future;
|
||||
use std::io;
|
||||
use std::os::fd::IntoRawFd;
|
||||
use std::os::unix::net::UnixListener;
|
||||
use std::pin::Pin;
|
||||
use std::sync::Arc;
|
||||
use std::task::{Context, Poll};
|
||||
@@ -2230,10 +2232,14 @@ async fn control_aggregates_multi_engine_capacity() {
|
||||
ready_1.world_size = 12;
|
||||
ready_1.data_parallel_rank = start_rank + 1;
|
||||
|
||||
let listener_fd = |address: &str| {
|
||||
let path = address.strip_prefix("ipc://").expect("IPC test endpoint");
|
||||
UnixListener::bind(path).expect("bind inherited test listener").into_raw_fd()
|
||||
};
|
||||
let client_config = EngineCoreClientConfig {
|
||||
transport_mode: TransportMode::Bootstrapped {
|
||||
input_address: input_address.clone(),
|
||||
output_address: output_address.clone(),
|
||||
input_listener_fd: listener_fd(&input_address),
|
||||
output_listener_fd: listener_fd(&output_address),
|
||||
engine_start_index: start_rank,
|
||||
engine_count: 2,
|
||||
data_parallel_size: global_size,
|
||||
|
||||
Reference in New Issue
Block a user