affaan-m/ECC · error · Error

The local Itô CLI terminated by signal

Error message

The local Itô CLI terminated by signal ${result.signal}.

What it means

invokeIto maps the child's termination to outcomes: numeric status is returned as-is, a spawn error is thrown, and if the process died from a POSIX signal (result.signal set, no status) the bridge throws naming the signal. This means the Itô CLI was killed externally rather than exiting normally.

Solutions

  1. Identify the signal in the message (e.g. SIGKILL suggests OOM/limits, SIGTERM suggests a timeout/killer) and address that cause.
  2. Check system logs (dmesg / journalctl) for oom-killer events; raise memory limits or reduce evals node count.
  3. Increase the enclosing CI/timeout budget (the bridge's own node-qualification timeout is 31 minutes) so nothing SIGTERMs the child mid-run.
  4. Re-run the command; transient external kills may simply succeed on retry.

Example fix

// before (CI kills after 10m)
- run: ecc ito evals --cluster c1 --live-sixtytwo --nodes n1 --config-dir cfg   # timeout: 10
// after
- run: ecc ito evals --cluster c1 --live-sixtytwo --nodes n1 --config-dir cfg   # timeout: 35
Defensive patterns

Strategy: retry

Validate before calling

const os = require('os');
if (os.freemem() < 512 * 1024 * 1024) console.warn('Low memory: Itô CLI may be OOM-killed');

Try / catch

try { await invokeIto(evalsArgs); } catch (e) {
  const m = e.message.match(/terminated by signal (\w+)/);
  if (m) { console.error(`Killed by ${m[1]}; check OOM/CI timeout, then retry`); }
  else throw e;
}

Prevention

When it happens

Trigger: Any ecc ito subcommand where the spawned CLI process receives SIGKILL/SIGTERM/SIGINT — e.g. OOM killer terminating the process, a supervisor timeout killing it, or a user Ctrl+C that lands on the child during a synchronous spawn window.

Common situations: Long-running `ecc ito evals` node qualification exceeding CI job timeouts; OOM on memory-constrained hosts; container runtime killing processes on shutdown; SIGKILL from cgroup memory limits.

Related errors


AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16). Data as JSON: /api/errors/b6a3ff9fbe98f1d6. Report an issue: GitHub.

Appendix: source

Thrown at scripts/ito.js:292

    encoding: "utf8",
    // Keep policy helpers immutable for callers, but give child-process
    // instrumentation its own mutable copy (for example NODE_V8_COVERAGE).
    env: { ...createSafeItoInvocationEnvironment(environment, args) },
    stdio: isDeviceLogin ? "inherit" : ["pipe", "pipe", "pipe"],
    maxBuffer: MAX_OUTPUT_BYTES,
    timeout: isNodeQualification ? NODE_QUALIFICATION_TIMEOUT_MS : undefined,
    shell: false,
    windowsHide: true,
  });

  if (result.stdout) process.stdout.write(result.stdout);
  if (result.stderr) process.stderr.write(result.stderr);
  if (result.error) {
    throw new Error(`The local Itô CLI could not be started: ${result.error.message}`);
  }
  if (typeof result.status === "number") return result.status;
  if (result.signal) {
    throw new Error(`The local Itô CLI terminated by signal ${result.signal}.`);
  }
  return 1;
}

function main(argv = process.argv.slice(2), environment = process.env) {
  try {
    const parsed = parseArgs(argv, environment);
    if (parsed.help) {
      showHelp();
      return 0;
    }
    const executable = resolveItoExecutable(environment);
    return invokeIto(executable, parsed.invocationArgs, environment);
  } catch (error) {
    console.error(`Error: ${error.message}`);
    return 1;
  }
}

View on GitHub (pinned to 8321021c54)