next is red: the prefix handler's stop-deadline test fails intermittently #188

Closed
opened 2026-10-27 10:28:36 +01:00 by clawbot · 1 comment
Collaborator

What is wrong. next is red at bac531c. In script/cibuild, TestPrefixHandlerSkipsItsLastWriteAfterTheStopDeadline (internal/routewatch/batchwrite_internal_test.go) failed with "198.51.100.0/24 was written after the stop deadline", then passed in the gate's verbose rerun; the gate still exits 1. The test predates #187, which made each flush write the routing table's changes before the per-peer batch and changed what Stop waits for.

It is not yet known whether the code can write an update after the stop deadline (a defect in the shutdown that #100 fixed) or only the test's timing is fragile.

What acceptable looks like. Find which it is. If the code can write after the deadline, fix the code; if only the test's timing is wrong, make the test wait for the state it checks instead of on time. Either way the test, and every other test in the package, passes reliably under the race detector.

Definition of done.

  • The cause stated in the PR body in one or two sentences.
  • script/cibuild green on the fix, and the package's tests run many times in a row (for example with -count) without a failure.
  • One reviewed PR into next.

Model: opus-5-5

**What is wrong.** `next` is red at `bac531c`. In `script/cibuild`, `TestPrefixHandlerSkipsItsLastWriteAfterTheStopDeadline` (`internal/routewatch/batchwrite_internal_test.go`) failed with "198.51.100.0/24 was written after the stop deadline", then passed in the gate's verbose rerun; the gate still exits 1. The test predates https://git.eeqj.de/sneak/routewatch/pulls/187, which made each flush write the routing table's changes before the per-peer batch and changed what `Stop` waits for. It is not yet known whether the code can write an update after the stop deadline (a defect in the shutdown that https://git.eeqj.de/sneak/routewatch/issues/100 fixed) or only the test's timing is fragile. **What acceptable looks like.** Find which it is. If the code can write after the deadline, fix the code; if only the test's timing is wrong, make the test wait for the state it checks instead of on time. Either way the test, and every other test in the package, passes reliably under the race detector. **Definition of done.** - The cause stated in the PR body in one or two sentences. - `script/cibuild` green on the fix, and the package's tests run many times in a row (for example with `-count`) without a failure. - One reviewed PR into `next`. Model: opus-5-5
clawbot self-assigned this 2026-10-27 10:28:36 +01:00
clawbot added the critical label 2026-10-27 10:28:36 +01:00
Author
Collaborator

Built in #190. The code could write after the stop deadline: when a write ran past it, a full batch's wake-up waited beside Stop's context, and the flush goroutine picked one of them at random. It now takes a waiting stop first. The same race in the AS, peer and peering handlers is #189.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/routewatch/pulls/190. The code could write after the stop deadline: when a write ran past it, a full batch's wake-up waited beside Stop's context, and the flush goroutine picked one of them at random. It now takes a waiting stop first. The same race in the AS, peer and peering handlers is https://git.eeqj.de/sneak/routewatch/issues/189. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/routewatch#188