Skip to content

Blacklist watcher downtime family is error-triggered: panic and wedge both scrape healthy #1320

Closed

Description

@yigitdot

Split out of #1315 review (#1283 follow-up).

The blacklist_watcher_* downtime family added in #1315 moves only when run_tick returns Err. Both failure modes that motivated #1282 — the move off the runtime JoinSet onto a detached resumable_watcher::spawn/AbortOnDrop — land on down_since == None and therefore scrape as fully healthy:

  • Panic while healthy (the common case, since established is set true after the first clean tick at chain_events/resumable_watcher.rs:453-455): down_since stays None forever, so decdn_blacklist_watcher_down_seconds reads 0 on every scrape indefinitely — byte-identical to a working watcher. restarts_total frozen. The detached JoinHandle is never awaited, so the panic itself is discarded silently.
  • Panic while in backoff: gauge climbs forever. The alert does fire, but it is indistinguishable from a live loop still retrying.
  • Wedged/hung run_tick (an await not covered by timed): never returns Err, so on_backoff never fires, gauge reads 0. No panic required.
  • Clean loop exit via shutdown.cancelled(): same, 0 forever.

#1315's description declared panic visibility out of scope and argued the metrics narrow the gap because a panicked task "freezes down_seconds at its last value rather than climbing." That is literally true but understates it: the value it freezes at is not an inert stale number, it is a positively healthy 0.

Proposed fix, which supersedes the narrower panic-visibility paragraph in #1283: a blacklist_watcher_last_tick_timestamp_seconds liveness gauge (or a monotonic tick counter) stamped on run_tick's success path, alerted on time() - last_tick > 3 * poll_interval. That catches panic, wedge, and clean exit uniformly, where a downtime gauge catches none of them. Probably belongs on the shared resumable_watcher loop rather than blacklist alone, since all six watchers have the same shape.

Found by multi-agent review of #1315.

Activity

  1. added
    rust
    prio:medium
    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 blacklist watcher downtime family reading healthy on panic/wedge/clean-exit 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

prio:mediumrust

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions