diem/diem · critical

[State Sync] Unable to create state sync coordinator!

Error message

[State Sync] Unable to create state sync coordinator!

What it means

This panic comes from an .expect() in StateSyncBootstrapper::bootstrap_with_executor_proxy when StateSyncCoordinator::new returns an Err. The coordinator constructor validates state-sync configuration (notably computing retry timeouts from state_sync.tick_interval_ms, long_poll_timeout_ms, and multicast_timeout_ms using checked arithmetic) and propagates an Error (e.g. IntegerOverflow) on failure. Because bootstrap is called once at node startup, any error here aborts the whole process.

Source

Thrown at state-sync/state-sync-v1/src/bootstrapper.rs:87

        let initial_state = executor_proxy
            .get_local_storage_state()
            .expect("[State Sync] Starting failure: cannot sync with storage!");
        let network_senders: HashMap<_, _> = network
            .iter()
            .map(|(network_id, sender, _events)| (network_id.clone(), sender.clone()))
            .collect();

        let coordinator = StateSyncCoordinator::new(
            coordinator_receiver,
            mempool_notifier,
            consensus_listener,
            network_senders,
            node_config,
            waypoint,
            executor_proxy,
            initial_state,
        )
        .expect("[State Sync] Unable to create state sync coordinator!");
        runtime.spawn(coordinator.start(network));

        Self {
            _runtime: runtime,
            coordinator_sender,
        }
    }

    pub fn create_client(&self) -> StateSyncClient {
        StateSyncClient::new(self.coordinator_sender.clone())
    }
}

View on GitHub (pinned to fc4714a8ea)

Solutions

  1. Check the underlying error logged just before the panic (the coordinator's Err, e.g. 'Fullnode retry timeout has overflown!') to identify the exact config field.
  2. Open node.yaml and reduce state_sync.tick_interval_ms and state_sync.long_poll_timeout_ms to sane values (e.g. tick_interval_ms <= 10000, long_poll_timeout_ms <= 120000) so their sum fits u64.
  3. Verify with node_config.base.role which branch applies: Validators double tick_interval_ms, FullNodes add it to long_poll_timeout_ms.
  4. Fix the typo/corrupted value that produced an extreme number (e.g. extra digits or wrong unit seconds-vs-milliseconds) and restart the node.

Example fix

// before (node.yaml)
state_sync:
  tick_interval_ms: 18446744073709551615
  long_poll_timeout_ms: 10000
// after
state_sync:
  tick_interval_ms: 1000
  long_poll_timeout_ms: 30000
Defensive patterns

Strategy: validation

Validate before calling

fn validate_state_sync_config(cfg: &NodeConfig) -> Result<(), String> {
    let ts = &cfg.state_sync;
    match cfg.base.role {
        RoleType::FullNode => ts.tick_interval_ms
            .checked_add(ts.long_poll_timeout_ms)
            .map(|_| ())
            .ok_or_else(|| "tick_interval_ms + long_poll_timeout_ms overflows u64".into()),
        RoleType::Validator => ts.tick_interval_ms
            .checked_mul(2)
            .map(|_| ())
            .ok_or_else(|| "tick_interval_ms * 2 overflows u64".into()),
        _ => Ok(()),
    }
}

Type guard

fn sane_state_sync_config(cfg: &NodeConfig) -> bool {
    cfg.state_sync.tick_interval_ms > 0
        && cfg.state_sync.tick_interval_ms <= 60_000
        && cfg.state_sync.long_poll_timeout_ms <= 600_000
}

Prevention

When it happens

Trigger: Calling bootstrap / bootstrap_with_executor_proxy with a NodeConfig whose state_sync.tick_interval_ms + long_poll_timeout_ms (FullNode) or tick_interval_ms * 2 (Validator) overflows u64, or any future error variant returned by StateSyncCoordinator::new (coordinator.rs:121-133).

Common situations: Operator sets an enormous state_sync.tick_interval_ms or long_poll_timeout_ms in node.yaml (near u64::MAX), a malformed/mistyped config value, or running a FullNode config where the two timeout fields summed overflow during node bring-up.

Related errors


AI-assisted analysis of diem/diem@fc4714a8ea (2026-09-04). Data as JSON: /api/errors/76b6387662ef0148. Report an issue: GitHub.