CI flake register

Aperta
#773 11 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
8/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
postgresql, rust

Direzione di ricerca

This is a maintainer's register of intermittent CI failures, not one task. Start with the open entry for rescue_drains_an_abandoned_backlog_without_rescuing_live_claims, whose cause is not yet investigated, and read the CI runs it cites. Done would mean a root cause recorded for that test, with a fix or a new entry, and the register updated.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

operational

One entry per test that has failed intermittently in CI, with its cause, fix, and every occurrence. A second occurrence of an unexplained failure gets an entry here before anything else. Tests are fixed, never skipped or quarantined.

Prune returns Blocked while another session holds a lock (AlloyDB Omni, Postgres)

Cause: prune takes its locks NOWAIT; a background session (autovacuum, AlloyDB workers) holding one briefly makes prune return Blocked. Product side: #703.
Fix (queue ring): tests retry Blocked for the slot within scaled_timeout via prune_retrying_blocked. main #764, release/0.6.6 #765.
Fix (claim and lease rings): prune_ring_retrying_blocked with the same semantics. main #775 (15 sites, merged), release/0.6.6 #776 (7 sites); sites that expect Blocked or SkippedActive, hold locks on purpose, discard results, or cannot reach a lock are unchanged.
Follow-up: two claim prunes in receipt_plane_chaos_test.rs (around lines 293 and 450) expect Pruned without holding a lock and have no retry; they run outside the AlloyDB job.
Seen: #760 (test_queue_storage_prune_carry_forward_survives_retry_and_rebuild), #761 (test_queue_terminal_live_counts_prune_folds_into_rollups), #766 (test_successful_prunes_report_database_phase_timings), main run 43585236782 (test_queue_storage_expired_deadline_batch_blocks_prune_until_rescued, claim ring, after #764 merged).

Bulk rescue retry count reads an estimate (release/0.6.6 only)

Test: rescue_drains_an_abandoned_backlog_without_rescuing_live_claims.
Cause: queue_overview().available is an estimate above 5000 rows per lane (next_seq - claim_seq, including tombstoned rows); the test treated it as exact.
Fix: #768 counts exactly when the overview flags available_is_estimate. main counts exactly and is not affected.
Seen: release/0.6.6 pushes (45094), #760 (47139).
Note: the same test has also failed on main with different assertions (live-claim heartbeat staleness, a 180s claim timeout). Not yet explained.

VACUUM leaves heap pages while an older snapshot is open

Tests: test_prune_truncates_a_vacuumed_child_with_expanded_indexes (release/0.6.6), test_prune_vacuumed_materialized_lease_reclaims_indexes_and_toast_once (main).
Cause: a snapshot in the test database older than the DELETE leaves rows dead but not removable, so one VACUUM truncates nothing. Reproduced with a held REPEATABLE READ snapshot.
Fix: repeat VACUUM until the heap is empty, bounded by scaled_timeout. release/0.6.6 #769, main #771.
Seen: release/0.6.6 run 43338615280, #758, release/0.6.6 run 43575807607 (before #769 merged).

Patch upgrade rehearsal: replica_identity lock timeout (release/0.6.6)

Test: released_patch_upgrade_and_rollback (0.6.15, pg18).
Cause: the replica_identity patch takes its lock with a 300ms lock_timeout and fails with 55P03 when a live released worker holds it; the rehearsal did not re-run awa migrate. main's migrations wait instead and are not exposed.
Fix: #770 retries migrate on that error, up to 5 attempts. The earlier step that applies the exported patch SQL directly to audit its locks had no retry; #792 retries it on the same error. Operator side: #774.
Seen: #758; #789 run 43808024707 (0.6.9, pg17, the exported-patch audit at line 986).

Open: bulk rescue live-claim and claim-timeout failures on main

Test: rescue_drains_an_abandoned_backlog_without_rescuing_live_claims.
Seen: main runs 43484415494 (500 claims went more than 18s without a heartbeat), 43407399753 (timed out after 180s waiting for the doomed runtime to claim).
Second occurrence of the live-claim shape: #822 at bc3b3166 (job 134637473413, pg18 rest), "500 claims had gone 00:00:19.318425 or longer without a heartbeat, beyond the 18s staleness", 348 rescued rows. The 2026-11-13 run (job 132090308624, pg17 rest) failed identically: 500 claims, 19.89 s. #822 changes only drain_queue, which this test never calls.
Analysis so far: 500 is RECEIPT_RESCUE_BATCH_LIMIT, so this is the leader's first rescue batch, and every claim in it was at least 19.3 s past its last heartbeat (or its claim, if it had none). The doomed runtime holds up to 50,000 claims and heartbeats them in 100 sequential 500-row batches every 2.25 s (scaled_staleness(6 s) / 8) on a 20-connection pool, while it is still claiming 10,000-row chunks. A pass that takes longer than the 18 s staleness would leave a whole stretch of claims stale. The runtime warns when a pass outlasts the interval, but the test's subscriber defaults to ERROR, so those warnings are not in the log. Not yet shown whether it is one slow pass or a stretch of claims that no pass reached.
Needs a decision: whether a 50,000-attempt heartbeat pass over 18 s on a loaded runner is a test margin (the staleness is already scaled) or a heartbeat throughput limit worth a product issue. Next step: capture the doomed runtime's heartbeat pass durations in the test.

Mixed-fleet chaos smoke: live Python attempt rescued by a Rust leader

Test: test_mixed_rust_and_python_workers_share_same_queue (chaos_suite_test.rs), "Marker completed more than once after expected drain".
Cause: the Rust chaos clients set a fixed 250 ms heartbeat_staleness; stale-heartbeat rescue runs on the maintenance leader with its own staleness, so a Rust leader can rescue a live Python attempt whose heartbeat lags on a busy runner. The Python helper already scaled its own staleness.
Fix: #791 routes all four chaos clients' staleness through ci_timing::scaled_staleness and drops the file's local copy of the timing helpers.
Seen: #789 run 43808024707 (python-4). Once in the last ~35 CI runs.

Patch upgrade rehearsal: leader rescues a live attempt (release/0.6.6)

Test: released_patch_upgrade_and_rollback (0.6.17, pg17), "job 700 completed more than once outside a killed worker": attempt 1 completed by a candidate runtime, attempt 2 by a released 0.6.17 runtime 21 s later.
Cause: receipt-claim stale-heartbeat rescue runs on the maintenance leader with that runtime's own staleness; the rehearsal set a fixed 2 s on the candidate client and the released helper, so on a starved runner the leader can rescue a live attempt. The harness records Complete when the handler returns, before the finalize, which is then ignored as stale. Reproduced locally with staleness tightened under CPU load; not caused by the idle gate in #787 (14/14 local passes on both #787 and the base at normal margin).
Fix: #795 routes both sides' staleness through ci_timing::scaled_staleness.
Seen: #787 run 43808000332.

Not a flake: weekly chaos rescue seeded impossible ready rows (test bug)

Test: test_receipt_rescue_makes_progress_under_overload (receipt_plane_chaos_test.rs).
Error: rescue_stale_heartbeats: Validation("queue storage ready row missing for deleted lease job 10258 run_lease 10258"), identical on every run.
Cause: 92b9bf12 (main, via #664) and 85f9d8d9 (0.6, released in v0.6.14) made the ready-row lookup match ready.run_lease + 1 = claim.run_lease, the relation every real claim creates. The test seeded each ready row with the same run_lease as its claim, a state production never produces; queue prune is the only path that removes ready rows and it refuses while leases or unclosed claims exist.
Fix: seed the ready row at run_lease - 1, attempt 0. main #777, release/0.6.6 #778.
Seen: weekly runs 42493813172 (2026-11-08) and 43731166229 (2026-11-15).

Open: rolling upgrade rehearsal mixed-fleet job output (main, weekly)

Test: test_migrate_first_mixed_fleet_job_output (rolling_upgrade_rehearsal_test.rs), "job exists".
Seen: weekly run 41320045477 (2026-11-01). Once so far.

Open: lifecycle hook test reads its just-completed job as missing (release/0.6.6)

Tests: whichever lifecycle_hook_test.rs test runs, e.g. test_completed_event_of_a_deadline_job_matches_the_terminal_job, test_retry_after_below_bound_still_retries, test_typed_completed_event_handler_runs. admin::get_job returns JobNotFound { id: 1 } after the job's event was received.
Cause not yet found. Not reproduced locally (0 of 128 runs on PG 17, with and without #799). Prune and a concurrent binary are ruled out. Each test drops and recreates the schema, so job 1 is always the new test's job. Leading hypothesis: a task from the previous test's client is still running after shutdown(2s) returns, against the recreated schema. Next step: test-only diagnostics that dump the runtime and storage-backend rows on JobNotFound.
Seen: run 35724760957 (2026-09-22), run 42110422437 (2026-11-05, a810a50f), #799 job 133724933357 (2026-11-17).

Open: documented-roles runtime test never sees job 2 complete (release/0.6.6)

Test: documented_roles_runtime_test::runtime_runs_as_the_documented_least_privilege_role, jobs never reached their expected states: [(2, Completed)] at line 284, with no permission error.
Cause not yet found. The earlier hypothesis (cleanup deletes the completed row between polls, given completed_retention(1 ms) and cleanup_interval(200 ms)) does not hold: with a 1 s sleep added before the first poll, every job, including jobs 1 and 2, was still seen Completed locally. Locally, job 2 is the progress job (it calls flush_progress and then completes); ID 1 goes to the first complete insert unless the per-second cron fire lands first. All three failures name job 2 and no other job, which points at the progress path rather than a random polling race. A progress attempt that keeps failing or overrunning its 500 ms deadline would retry with 2^attempt s backoff and leave the window; not shown.
Next step: #830 makes the timeout report each missing job's row (args, state, attempt, errors, progress) and the runtime's captured warnings and errors.
Seen: #808 at 847a03d9 (job 134587583149, pg18 rest), #808 at 1c9e475f (job 134602176301, pg17 rest), #819 at 853b4277 (job 134754995414, pg17 rest).

Runtime snapshot cleanup test loses its fresh row to another test's setup (main)

Test: integration_test::test_cleanup_runtime_snapshots_preserves_fresh, "fresh snapshot should not be deleted".
Cause: every setup() in integration_test.rs calls TestClient::migrate, which calls reset_runtime_backend, which runs DELETE FROM awa.runtime_instances. Most callers do not hold test_lock(), so a test starting in parallel can delete the fresh snapshot between the upsert and list_runtime_instances. The job runs only this binary, so no other binary is involved. test_admin_runtime_observability_snapshot already moved to its own database for the same reason.
Fix: #831 runs the test in its own TestDatabase. release/0.6.6 has the same exposure (the test there does not take the lock either); not seen there yet.
Seen: #822 at e3b3d468 (job 134739462236, queue_storage pg17).

Idle-check detector control loses its relcache to an invalidation reset (release/0.6.6)

Test: queue_storage_runtime_test::test_maintenance_idle_checks_run_on_one_session, "pooled sessions that ran the idle checks must hold their rings' indexes".
Cause: the control ran the pool-path idle checks on whichever pooled sessions were free and read their memory contexts afterwards; a shared-invalidation reset in between drops the relcache entries.
Fix: #806 (merged) runs the checks and the read on one session and repeats on a reset. The main forward-port #823 carries it.
Seen: #805 at d7fb9e41 (job 134392035044, pg17 heavy).

Open: prune vs overlapping short readers stall ceiling (AlloyDB Omni, release/0.6.6)

Test: queue_storage_runtime_test::test_prune_wins_against_overlapping_short_readers, "a reader stalled for 1.074195223s behind prune", against an unscaled 1,000 ms ceiling (modelled bound about 360 ms).
First occurrence. If it recurs, take the ceiling through ci_timing.
Seen: #808 at 847a03d9 (job 134587582626, AlloyDB Omni).

Open: prune_oldest post-lock recheck sees Blocked (main)

Test: queue_storage_runtime_test::test_prune_oldest_rechecks_pending_ready_after_lock_wait, "post-lock proof must see the committed pending ready row, got Blocked { slot: 0 }" at line 4924.
First occurrence; #818 does not touch prune.
Seen: #818 at a66bdcc6 (job 134779745238, pg18 heavy).

Lingua principale
Rust
Stelle
37
Fork
8
Merge medio
14h 16m
PR unite (30g)
244

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di hardbyte/awa

Tutte le issue di hardbyte/awa

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.