t8y2/dbx · error · RuntimeError
RSS probe exited early: {'; '.join(stderr_lines)}
Error message
RSS probe exited early: {'; '.join(stderr_lines)} What it means
measure_rss() starts the benchmark in 'hold' mode and reads its stdout, waiting for a JSON line with ready=true. If the process's stdout hits EOF while the process has already exited, it raises RuntimeError listing all stderr lines collected, i.e. the probe crashed before signaling readiness.
Source
Thrown at agents/drivers/iotdb/bench/run.py:151
env=environment | {"IOTDB_BENCH_MODE": "hold"},
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
stderr_lines: list[str] = []
def drain_stderr() -> None:
assert process.stderr is not None
stderr_lines.extend(line.rstrip() for line in process.stderr)
threading.Thread(target=drain_stderr, daemon=True).start()
try:
assert process.stdout is not None
deadline = time.monotonic() + env_float("BENCH_READY_TIMEOUT", 30.0)
while time.monotonic() < deadline:
line = process.stdout.readline()
if line == "" and process.poll() is not None:
raise RuntimeError(f"RSS probe exited early: {'; '.join(stderr_lines)}")
try:
payload = json.loads(line)
except json.JSONDecodeError:
continue
if payload.get("ready") is True:
break
else:
raise TimeoutError(f"RSS probe timed out: {'; '.join(stderr_lines)}")
time.sleep(0.2)
completed = subprocess.run(
["ps", "-o", "rss=", "-p", str(process.pid)],
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
check=True,
)
return float(completed.stdout.strip())
finally:View on GitHub (pinned to c0390bff16)
Solutions
- Read the stderr lines embedded in the RuntimeError for the crash reason
- Confirm the installed benchmark tool supports IOTDB_BENCH_MODE=hold
- Run the probe command manually with the same env to see the startup failure
- Check for port conflicts or missing dependencies that kill the process instantly
- Verify the probe writes readiness JSON to stdout before doing heavy work
Example fix
// before $ IOTDB_BENCH_MODE=hold ./bench # crashes: unknown mode -> RuntimeError: RSS probe exited early // after $ upgrade bench tool to a version supporting hold mode, then rerun measure_rss(...)
Defensive patterns
Strategy: try-catch
Validate before calling
def preflight_hold_mode(env: dict) -> None:
probe = subprocess.run(
["echo", "check"], env=env | {"IOTDB_BENCH_MODE": "hold"}, capture_output=True, text=True)
# on the real tool: run with a tiny workload and assert it starts without stderr
if probe.returncode != 0:
raise SystemExit(f"probe fails at startup: {probe.stderr}") Try / catch
try:
rss = measure_rss(command, environment)
except RuntimeError as e:
print(f"probe died at startup:\n{e}") # stderr lines are embedded
raise SystemExit(1) Prevention
- Confirm IOTDB_BENCH_MODE=hold is supported by the installed tool version before measuring
- Check for port conflicts and missing dependencies that crash the probe instantly
- Capture and read stderr at startup — the error message already joins all stderr lines
- Run the probe command manually once when setting up a new environment
When it happens
Trigger: The spawned RSS probe subprocess exits early (non-zero or zero) before emitting {"ready": true}: readline() returns "" and process.poll() is not None. Causes include bad arguments, crash at startup, missing IOTDB_BENCH_MODE support, or instant OOM.
Common situations: Probe binary crashes on startup; env var IOTDB_BENCH_MODE not supported by the installed tool version; port conflict killing the server immediately; stderr shows a Python/JVM traceback.
Related errors
- agent exited before ready
- agent exited during {method}
- agent exited before {method}
- agent exited before {method}
- timed out waiting for agent readiness
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/4a2dd4aad1d11b5e.
Report an issue: GitHub.