docs(raft-ha-core-safety): task 5.3 done (unit) + 7.2 re-attributed to bug-924 env block

5.3 fix (bf88681) lands and is unit-validated (test_ha_core_safety 20 Tests /
0 Failures). Re-ran the 7.2 chaotic soak with all Phase-2+5.2+5.3 fixes: it
still stalls at round 4, but bisecting the frozen logs shows the cause is the
bug-924 WAL-fdatasync wedge, NOT consensus — a survivor's persist flusher spins
on `fdatasync FAILED (errno=22 EINVAL)` and stops answering PreVotes, so the
round times out (presents as an election stall, is a durability-layer wedge).

A file-level repro of the controller's exact WAL pattern (open + posix_fallocate
64MB + write + fdatasync) SUCCEEDS on every available ext4/tmpfs path, so it is
the live overlay-backed WAL fd under chaotic restart — the documented bug-924,
a Non-Goal of this spec (owned by ha-commit-durability, excluded from the
verdict).

Re-attributes the round-4 stall (the first §"Task 7.2" note guessed in_catch_up;
5.3 fixes that real latent eligibility deadlock at unit level but it is not the
soak blocker). 7.2 is now BLOCKED ON ENVIRONMENT, not a consensus NO-GO; the
consensus work this spec owns (Phase-2 payload integrity, 5.2, 5.3) is
unit-complete. research.md §"Task 5.3 + 7.2 re-run"; bug-1272 updated.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019dbTHR9CsEYK9RsqmQpQpC
This commit is contained in:
Rongsong Shen 2026-06-30 02:56:00 +00:00
parent bf88681fb0
commit 5d72133216
3 changed files with 126 additions and 10 deletions

View file

@ -21048,25 +21048,94 @@
"error_message": "raft-ha-core-safety 7.2 chaotic soak: round-4 'NO new primary within window (possible election stall)' after 3 overlapping kills",
"file": "src/controller/ha.c (election/PreVote path)",
"root_cause": "After 3 overlapping kills the only fully-up-to-date node is killed; the two survivors are both restarted-and-lagging (tips 15 and 11; leader was 19). Both hold the full committed prefix [1..11] (safe candidates) but their PreVote rounds repeatedly time out with no grant quorum (prospective terms frozen, never bumped). Distinct from the 5.2 spurious-failover flap (that is fixed and confirmed). Contributors: freshness mutual-denial between lagging survivors, in_catch_up-denies-all-votes (Req 2.5) with no live primary to catch up from, and/or peer vote connection not established between two nodes that only held a control channel to the dead primary.",
"fix": "NOT YET FIXED. Tracked as raft-ha-core-safety task 5.3: a lagging-but-safe survivor (holds majority-agreed committed prefix) must be electable when no live primary remains; relax in_catch_up/freshness vote gates for vote-eligibility once the primary is unreachable, preserving Election Safety + Leader Completeness + the 5.2 suppression. 7.2 blocked on 5.3.",
"fix": "FIXED at unit level by task 5.3 (commit bf88681): gate the in_catch_up PreVote deny in raft_cb_vote_eligible on a LIVE primary (primary_ctrl_fd>=0 && ha_heartbeat_is_fresh), so a catching-up survivor with a dead primary can grant/win a fresh PreVote (logOk preserves Leader Completeness). CORRECTION: this in_catch_up deadlock is a real latent defect (unit RED\u2192GREEN) but is NOT the soak's round-4 blocker. The soak stall is bug-924 (WAL fdatasync\u2192EINVAL wedges a survivor so it stops answering PreVotes; presents as an election stall). 7.2 live acceptance is blocked on that env defect (out of scope; owned by ha-commit-durability), not on consensus.",
"tags": [
"raft",
"ha",
"election",
"liveness",
"prevote",
"in_catch_up",
"ha",
"liveness",
"chaotic-soak",
"environment",
"election",
"bug-924",
"corrected",
"7.2",
"5.3"
"fdatasync",
"raft",
"5.3",
"in_catch_up"
],
"related_bugs": [
"bug-924",
"bug-851",
"bug-1042",
"bug-1060"
],
"occurrences": 2,
"last_seen": "2026-06-30T02:55:00Z"
},
{
"id": "bug-1273",
"timestamp": "2026-06-30T02:41:41.017Z",
"error_message": "Missing error handling in unknown",
"file": "src/controller/testsuite/test_ha_core_safety.c",
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
"fix": "Added try/catch block | Also: /* Task 5.3 lagging-but-safe survivor electability under ove; * CORE RED \u2014 a catching-up survivor with NO live primary m",
"tags": [
"auto-detected",
"error-handling",
"c"
],
"related_bugs": [],
"occurrences": 2,
"last_seen": "2026-06-30T02:41:53.665Z"
},
{
"id": "bug-1274",
"timestamp": "2026-06-30T02:42:59.119Z",
"error_message": "Significant refactor of ",
"file": "src/controller/ha.c",
"root_cause": "2 lines replaced/restructured",
"fix": "Rewrote 3\u219220 lines (2 removed)",
"tags": [
"auto-detected",
"refactor",
"c"
],
"related_bugs": [],
"occurrences": 1,
"last_seen": "2026-06-30T02:25:00Z"
"last_seen": "2026-06-30T02:42:59.119Z"
},
{
"id": "bug-1275",
"timestamp": "2026-06-30T02:55:23.808Z",
"error_message": "Function not marked async",
"file": ".kiro/specs/raft-ha-core-safety/tasks.md",
"root_cause": "Function uses await but wasn't declared async",
"fix": "Added async modifier",
"tags": [
"auto-detected",
"async-fix",
"md"
],
"related_bugs": [],
"occurrences": 1,
"last_seen": "2026-06-30T02:55:23.808Z"
},
{
"id": "bug-1276",
"timestamp": "2026-06-30T02:55:37.693Z",
"error_message": "Incorrect value in code",
"file": ".kiro/specs/raft-ha-core-safety/tasks.md",
"root_cause": "Had `research.md`",
"fix": "Changed to 's persist flusher jams on `",
"tags": [
"auto-detected",
"wrong-value",
"md"
],
"related_bugs": [],
"occurrences": 1,
"last_seen": "2026-06-30T02:55:37.693Z"
}
]
}