{"record":{"id":"c84d33e1b4095467","repo":"FuelLabs/fuel-core","slug":"time-exceeds-system-limits","errorCode":null,"errorMessage":"Time exceeds system limits","messagePattern":"Time exceeds system limits","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/services/consensus_module/poa/src/service.rs","lineNumber":763,"sourceCode":"            return action;\n        }\n\n        if let Some(action) = self.maybe_produce_predefined_block().await {\n            tracing::debug!(\"Predefined block produced, stopping PoA task\");\n            return action;\n        }\n\n        let next_block_production: BoxFuture<Instant> = match self.trigger {\n            Trigger::Never => Box::pin(core::future::pending::<Instant>()),\n            Trigger::Instant => Box::pin(async {\n                let _ = self.new_txs_watcher.changed().await;\n                Instant::now()\n            }),\n            Trigger::Interval { block_time } => {\n                let next_block_time = match self\n                    .last_block_created\n                    .checked_add(block_time)\n                    .ok_or(anyhow!(\"Time exceeds system limits\"))\n                {\n                    Ok(time) => time,\n                    Err(err) => return TaskNextAction::ErrorContinue(err),\n                };\n                Box::pin(async move {\n                    sleep_until(next_block_time).await;\n                    Instant::now()\n                })\n            }\n            Trigger::Open { period } => {\n                let deadline = match self\n                    .last_block_created\n                    .checked_add(period)\n                    .ok_or(anyhow!(\"Time exceeds system limits\"))\n                {\n                    Ok(time) => time,\n                    Err(err) => return TaskNextAction::ErrorContinue(err),\n                };","sourceCodeStart":745,"sourceCodeEnd":781,"githubUrl":"https://github.com/FuelLabs/fuel-core/blob/b9d4d170da3a31c9ace5f963d633b326348e0d42/crates/services/consensus_module/poa/src/service.rs#L745-L781","documentation":"In the main task loop, Trigger::Interval computes the next wake-up as self.last_block_created.checked_add(block_time) on tokio::time::Instant. If that addition overflows the platform Instant range, the error is wrapped in TaskNextAction::ErrorContinue: the service logs it and retries the same computation, so with a too-large block_time the node never schedules another block and stalls. This is a config-sanity failure, not an organic runtime condition.","triggerScenarios":"Config.trigger = Trigger::Interval { block_time } with a block_time so large that Instant + block_time overflows (e.g. Duration::MAX, or a units mistake such as passing seconds where millis were intended, or an unclamped u64 from a config file).","commonSituations":"Copy-pasted/mis-edited TOML config values for block_time; config generators emitting raw integers without bounds; unit confusion between seconds and milliseconds when building Duration.","solutions":["Set a sane block_time (e.g. 1s–60s: Duration::from_secs(5)) in the PoA trigger config.","Validate trigger intervals at startup (Instant::now().checked_add(step) must be Some) and fail fast with a clear config error.","Restart the node after fixing the config — the ErrorContinue loop does not self-heal while the misconfigured interval remains."],"exampleFix":"// before\ntrigger: Trigger::Interval { block_time: Duration::MAX }\n\n// after\ntrigger: Trigger::Interval { block_time: Duration::from_secs(5) }","handlingStrategy":"validation","validationCode":"// Validate the trigger before constructing/starting the service\nfn validate_trigger_scheduling(trigger: &fuel_core_poa::Trigger) -> anyhow::Result<()> {\n    let now = tokio::time::Instant::now();\n    let step = match trigger {\n        fuel_core_poa::Trigger::Interval { block_time } => *block_time,\n        fuel_core_poa::Trigger::Open { period } => *period,\n        _ => return Ok(()),\n    };\n    anyhow::ensure!(\n        now.checked_add(step).is_some(),\n        \"trigger interval {step:?} overflows the Instant range\"\n    );\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Bound-check every Duration read from config files before converting it into a Trigger variant.","Standardize on human-scale intervals (seconds) and reject values above, e.g., one hour for block_time.","Watch node logs for repeated ErrorContinue entries after trigger config changes; they indicate a stalled scheduler, not transient noise."],"tags":["consensus","poa","configuration","overflow","time","rust"],"backgroundTag":null,"analyzedSha":"b9d4d170da3a31c9ace5f963d633b326348e0d42","analyzedAt":"2026-08-16T08:56:42.692Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}