[BUG] slotsMissed_int counts standby interval as missed slots after forging is disabled and re-enabled
I maintainer di solito rispondono entro 2 giorni
@jutaro ci sta già lavorando.
Dal 6/10/2026.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- haskell
- Ambito
- observability
Direzione di ricerca
Start by tracing the implementation of cardano_node_metrics_slotsMissed_int and the handling of forging state changes after SIGHUP. Reproduce the non-producing → producing → non-producing → producing sequence, then verify that slotsMissed_int excludes slots elapsed during the intentionally disabled interval and only changes for missed checks while producing.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Internal/External
External
Area
Other
Summary
cardano_node_metrics_slotsMissed_int appears to incorrectly count slots that elapsed while forging was intentionally disabled as missed slots when forging is subsequently re-enabled.
The issue does not occur on the first transition from the node's initial non-producing state into producing mode.
It occurs after the following sequence:
initial non-producing -> producing -> non-producing -> producing
After approximately 4 minutes in non-producing mode, slotsMissed_int jumped from 0 to 241 when forging was re-enabled and then remained stable during normal producing operation.
Relevant test log lines:
2026-09-20T22:22:02+02:00 slotsMissed=0 forging_enabled=1
2026-09-20T22:22:03+02:00 slotsMissed=0 forging_enabled=0
...
2026-09-20T22:26:00+02:00 slotsMissed=0 forging_enabled=0
2026-09-20T22:26:01+02:00 slotsMissed=0 forging_enabled=1
2026-09-20T22:26:02+02:00 slotsMissed=241 forging_enabled=1
2026-09-20T22:26:03+02:00 slotsMissed=241 forging_enabled=1
2026-09-20T22:26:04+02:00 slotsMissed=241 forging_enabled=1
Steps to reproduce
Forging is switched between active and standby states by making the forging credentials available/unavailable and sending SIGHUP to the running cardano-node process (kill -s HUP <pid>). The cardano-node process must remain running throughout the entire non-producing -> producing -> non-producing -> producing sequence; restarting the node between state changes does not reproduce the issue.
-
Start a block-producing node with valid KES/VRF/opcert credentials using
--non-producing-mode. -
Verify that the node is initially non-producing.
-
With the forging credentials already present from startup, send
SIGHUPto the runningcardano-nodeprocess (kill -s HUP <pid>) to dynamically enable forging. -
Verify that:
cardano_node_metrics_forging_enabled_int = 1 cardano_node_metrics_slotsMissed_int = 0 -
Make the forging credentials unavailable and send
SIGHUPagain to dynamically disable forging. -
Verify that:
cardano_node_metrics_forging_enabled_int = 0 cardano_node_metrics_slotsMissed_int = 0 -
Leave the node in this intentionally non-producing state for several minutes.
-
Make the forging credentials available again and send
SIGHUPto dynamically re-enable forging. -
Observe the metrics immediately after
cardano_node_metrics_forging_enabled_intchanges from0to1. -
Observe that
cardano_node_metrics_slotsMissed_intincreases approximately by the number of slots elapsed during the last period in which forging was disabled.In my reproduction test:
2026-09-20T22:22:02+02:00 slotsMissed=0 forging_enabled=1 2026-09-20T22:22:03+02:00 slotsMissed=0 forging_enabled=0 ... 2026-09-20T22:26:00+02:00 slotsMissed=0 forging_enabled=0 2026-09-20T22:26:01+02:00 slotsMissed=0 forging_enabled=1 2026-09-20T22:26:02+02:00 slotsMissed=241 forging_enabled=1 2026-09-20T22:26:03+02:00 slotsMissed=241 forging_enabled=1 -
Leave the node producing normally for several minutes.
-
Observe that
cardano_node_metrics_slotsMissed_intremains stable after the initial jump.
Expected behavior
Slots that elapse while forging is intentionally disabled should not be counted as missed leadership checks.
After forging is re-enabled, cardano_node_metrics_slotsMissed_int should continue from its previous value and should only increase for leadership checks that are actually missed while the node is in producing mode.
In the reproduction above, the expected value of cardano_node_metrics_slotsMissed_int after re-enabling forging should therefore still be 0, not 241.
System info:
-
OS Name: Ubuntu
-
OS Version 24.04.4 LTS
-
Node version:
cardano-node 11.1.2 - linux-x86_64 - ghc-9.6 git rev fef83fed01d7926f3de83b3b917be5a4a48768b5 -
CLI version
cardano-cli 11.2.3.0 - linux-x86_64 - ghc-9.6 git rev fef83fed01d7926f3de83b3b917be5a4a48768b5
Screenshots and attachments
Historical Grafana view of cardano_node_metrics_slotsMissed_int on my failover block producer. The metric shows large discrete increases after extended flat periods. The size of such an increase approximately matches the duration for which forging had intentionally been disabled, as both axes track seconds.
Additional context
A related dynamic-forging metrics issue was previously reported in #6113. That issue affected failover operation itself, while this issue is limited to incorrect slotsMissed_int monitoring after forging is disabled and re-enabled.
- Lingua principale
- Haskell
- Stelle
- 3.2k
- Fork
- 763
- Merge medio
- 2g 6h
- PR unite (30g)
- 18
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di IntersectMBO/cardano-node
-
Stale
Difficoltà 1/5 1-3 ore Idoneità per principianti 75/100
IntersectMBO/cardano-node#6597 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
IntersectMBO/cardano-node#6522 · 3 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
Remove carriage returns in testnet README.md for better diffsForse già presa @palas l’ha presa 3 giorni fa. Aperta
IntersectMBO/cardano-node#6744 · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
needs triage type: enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
IntersectMBO/cardano-node#6737 ·
I maintainer di solito rispondono entro 2 giorni
-
needs triage
Difficoltà 4/5 3-5 giorni Idoneità per principianti 44/100
IntersectMBO/cardano-node#6734 · 4 commenti ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di IntersectMBO/cardano-node
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
alunduil/siren-json.hs#264 ·
I maintainer di solito rispondono entro 1 giorno
-
console: no way to refresh row data in Browse Rows without a full page reloadForse già presa @12fahed l’ha presa oggi. Apertak/enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
hasura/graphql-engine#10895 · 1 commento ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
MorphRule, DataizeRule and ContextualizeRule silently accept unknown YAML keys, unlike rewrite `Rule`Forse già presa @renyamamoto2026-cmyk l’ha presa 2 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
objectionary/phino#2107 ·
I maintainer di solito rispondono entro 1 giorno