Skip to content

Poisoned down_since silently freezes *_watcher_restarts_total (family-wide) #1322

Closed

Description

@yigitdot

Split out of #1315 review. Pre-existing, family-wide, low severity — runbook-level.

The watcher_downtime_recorders! recorders skip their update on a poisoned lock (anti-panic policy, crates/node/src/metrics.rs:1699):

if let Ok(mut down_since) = self.$down_since.lock()
    && down_since.is_none()
{
    *down_since = Some(Instant::now());
    self.decdn.$restarts.inc();
}

Because std Mutex poison is sticky, once poisoned the *_restarts_total counter for that watcher never increments again — permanently, silently.

The *_down_seconds gauge covers for this: refresh_watcher_down_seconds reports i64::MAX on a poisoned lock (metrics.rs:1730), the conservative alerting direction, and poisoned_down_since_reports_i64_max_not_zero pins it. So gauge-based alerts stay correct.

The hole is only for anyone alerting on rate(*_watcher_restarts_total[5m]) instead — that alert goes permanently silent with no signal that it did, which is the failure mode where a silent alert is worse than no alert.

Not proposing a code change; the poison-skip is the right call under the anti-panic policy. This is a note for the observability runbook: alert on the _down_seconds gauge, not on the restarts counter rate. Possibly worth stating in adr/appendix-observability.md alongside the family's description.

Found by multi-agent review of #1315.

Activity

  1. added
    kind:docs
    rust
    prio:low
    on Jul 19, 2026
  2. self-assigned this
    on Jul 19, 2026
  3. thiras commented on Jul 19, 2026

    @thiras
    Contributor

    Resolved by #1325 (merged to main as 0b5ce92), which addressed the poisoned down_since freezing *_restarts_total (documented as an alert-on-the-gauge runbook note) as part of the uniform six-watcher observability batch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind:docsprio:lowrust

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions