{"record":{"id":"76b6387662ef0148","repo":"diem/diem","slug":"state-sync-unable-to-create-state-sync-coordinat","errorCode":null,"errorMessage":"[State Sync] Unable to create state sync coordinator!","messagePattern":"\\[State Sync\\] Unable to create state sync coordinator!","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"state-sync/state-sync-v1/src/bootstrapper.rs","lineNumber":87,"sourceCode":"        let initial_state = executor_proxy\n            .get_local_storage_state()\n            .expect(\"[State Sync] Starting failure: cannot sync with storage!\");\n        let network_senders: HashMap<_, _> = network\n            .iter()\n            .map(|(network_id, sender, _events)| (network_id.clone(), sender.clone()))\n            .collect();\n\n        let coordinator = StateSyncCoordinator::new(\n            coordinator_receiver,\n            mempool_notifier,\n            consensus_listener,\n            network_senders,\n            node_config,\n            waypoint,\n            executor_proxy,\n            initial_state,\n        )\n        .expect(\"[State Sync] Unable to create state sync coordinator!\");\n        runtime.spawn(coordinator.start(network));\n\n        Self {\n            _runtime: runtime,\n            coordinator_sender,\n        }\n    }\n\n    pub fn create_client(&self) -> StateSyncClient {\n        StateSyncClient::new(self.coordinator_sender.clone())\n    }\n}\n","sourceCodeStart":69,"sourceCodeEnd":100,"githubUrl":"https://github.com/diem/diem/blob/fc4714a8ea273b6efe8b13dbce72ea60aad9a16c/state-sync/state-sync-v1/src/bootstrapper.rs#L69-L100","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["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.","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.","Verify with node_config.base.role which branch applies: Validators double tick_interval_ms, FullNodes add it to long_poll_timeout_ms.","Fix the typo/corrupted value that produced an extreme number (e.g. extra digits or wrong unit seconds-vs-milliseconds) and restart the node."],"exampleFix":"// before (node.yaml)\nstate_sync:\n  tick_interval_ms: 18446744073709551615\n  long_poll_timeout_ms: 10000\n// after\nstate_sync:\n  tick_interval_ms: 1000\n  long_poll_timeout_ms: 30000","handlingStrategy":"validation","validationCode":"fn validate_state_sync_config(cfg: &NodeConfig) -> Result<(), String> {\n    let ts = &cfg.state_sync;\n    match cfg.base.role {\n        RoleType::FullNode => ts.tick_interval_ms\n            .checked_add(ts.long_poll_timeout_ms)\n            .map(|_| ())\n            .ok_or_else(|| \"tick_interval_ms + long_poll_timeout_ms overflows u64\".into()),\n        RoleType::Validator => ts.tick_interval_ms\n            .checked_mul(2)\n            .map(|_| ())\n            .ok_or_else(|| \"tick_interval_ms * 2 overflows u64\".into()),\n        _ => Ok(()),\n    }\n}","typeGuard":"fn sane_state_sync_config(cfg: &NodeConfig) -> bool {\n    cfg.state_sync.tick_interval_ms > 0\n        && cfg.state_sync.tick_interval_ms <= 60_000\n        && cfg.state_sync.long_poll_timeout_ms <= 600_000\n}","tryCatchPattern":null,"preventionTips":["Always run config validation (checked arithmetic on state_sync timeouts) before calling bootstrap.","Use reasonable defaults for tick_interval_ms and long_poll_timeout_ms instead of copying untrusted values.","Keep tick and long-poll timeout fields well below u64::MAX / 2 so addition and multiplication cannot overflow.","Wrap bootstrap in catch_unwind or parse the panic message in process supervisors to surface the config field at fault."],"tags":["panic","state-sync","configuration","integer-overflow"],"backgroundTag":"state-sync-bootstrap-panic","analyzedSha":"fc4714a8ea273b6efe8b13dbce72ea60aad9a16c","analyzedAt":"2026-09-04T21:07:05.890Z","contentChangedAt":"2026-09-04T21:07:05.890Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}