nautechsystems/nautilus_trader · error
{}
Error message
{} What it means
abort_started_trader rolls back a trader that was partially started; any errors encountered while aborting are collected, joined with '; ', and returned as a single anyhow error. The message is entirely composed of the accumulated cleanup failures.
Source
Thrown at crates/live/src/node/mod.rs:2265
let mut errors = Vec::new();
if let Err(e) = controller_stop_result {
errors.push(format!("Failed to stop plug-in controllers: {e}"));
}
if let Err(e) = trader_stop_result {
errors.push(format!("Failed to stop trader: {e}"));
}
if let Err(e) = finalize_result {
errors.push(format!("Failed to finalize startup abort: {e}"));
}
if errors.is_empty() {
Ok(())
} else {
anyhow::bail!("{}", errors.join("; "))
}
}
async fn process_receivers_for(
&mut self,
duration: Duration,
receivers: &mut RunnerReceivers<'_>,
) -> usize {
let deadline = dst::time::Instant::now() + duration;
let mut processed = 0;
loop {
tokio::select! {
biased;
() = dst::time::sleep_until(deadline) => break,
Some(message) = receivers.time_evt.recv() => {
let _ = AsyncRunner::handle_time_event(message);View on GitHub (pinned to 18893faf8b)
Solutions
- Parse the '; '-joined message: each segment is one distinct cleanup failure
- Fix the underlying reason the trader needed aborting in the first place
- Address each listed cleanup failure (often ordering/double-stop issues)
- Add logging around the abort steps to pinpoint which step failed
Defensive patterns
Strategy: try-catch
Try / catch
if let Err(e) = node.finish_startup_trader().await {
for seg in e.to_string().split("; ") {
tracing::error!(abort_error = seg, "startup abort failure segment");
}
} Prevention
- Keep cleanup paths idempotent so partial aborts can be retried
- Avoid double-stopping traders/engines during abort
- Add tracing to abort steps to identify which one fails
When it happens
Trigger: finish_startup_trader encounters a startup failure after the trader has begun starting, then abort_started_trader runs and one or more of its cleanup steps (stopping components, finalizing abort) each push errors into the errors vec.
Common situations: Partial-start failures such as an actor/strategy failing during start, combined with cleanup steps that also fail (e.g. stopping an engine already in a bad state, connection teardown errors).
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- {startup_err}; failed to finalize startup abort: {finalize_e
- Failed during trader startup: {start_err}; failed to stop pa
- Failed during trader startup: {start_err}; failed to finaliz
- Failed during trader startup: {start_err}; failed to stop pa
- {}
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/e2c69cf42835a702.
Report an issue: GitHub.