52 lines
2.7 KiB
Markdown
52 lines
2.7 KiB
Markdown
---
|
|
id: "bug-1915"
|
|
status: "investigating"
|
|
status_updated: "2026-10-03"
|
|
status_note: "single log sample; reproduce under load and check election/term handling around elect_ctx replacement"
|
|
component: "controller"
|
|
severity: "wrong-result"
|
|
timestamp: "2026-10-03T16:10:25Z"
|
|
last_seen: "2026-10-03T16:10:25Z"
|
|
occurrences: 1
|
|
files: ["src/controller/ha.c"]
|
|
tags: ["ha", "raft", "election", "prevote"]
|
|
related: ["bug-1913"]
|
|
---
|
|
|
|
# bug-1915: two PreVote wins in one election replace elect_ctx; term-2 leader then finds no vote eps to promote
|
|
|
|
## Description
|
|
**Observed:**
|
|
In one primary log captured during the bug-1913 investigation (late-joiner election under 40-spinner CPU load), "PreVote round WON" appears twice (prospective terms 2 and 3). The second real election replaced `ha->elect_ctx`, and the term-2 `raft_cb_become_leader` then found no vote endpoints to promote into standby channels, so both standbys had to register later as late joiners (bug-1913). A term-2 leader was also logged after the term-3 election had started.
|
|
|
|
**Expected:** one election round per prospective term; a node that becomes leader promotes the vote connections from the election that elected it (or the stale election cannot complete leadership).
|
|
**Impact:** unconfirmed (single sample). It is the trigger for late-joiner elections (bug-1913, now mitigated by an immediate catch-up probe), and a leader logged for an older term after a newer election started needs a Raft-safety check (term monotonicity, which election's votes made it leader).
|
|
**Found by:** test (bug-1913 investigation, 2026-10-03)
|
|
|
|
## Environment
|
|
- OS: no /etc/os-release; Docker container; NixOS kernel; kernel Linux 6.18.33 x86_64
|
|
- libc: glibc 2.42-47 (interpreter /nix/store/wb6rhpznjfczwlwx23zmdrrw74bayxw4-glibc-2.42-47/lib/ld-linux-x86-64.so.2)
|
|
- Toolchain: gcc (GCC) 15.2.0, meson 1.9.1
|
|
- Build: asan (xce.build)
|
|
- Code: scheduler-framework @ 6d9ef3d0-dirty
|
|
- Deployment: local 3-node HA (xceadmin live HA fixture), 40 busy loops on 32 cores
|
|
|
|
## Reproduction
|
|
1. Loop `src/xceadmin/tests/test_e2e_live_ha_push.py` under heavy CPU load with `XCE_KEEP_DEPLOY_DIR=1`.
|
|
2. In the elected primary's log, look for two "PreVote round WON" lines in one election and a `raft_cb_become_leader` that promotes no vote endpoints.
|
|
- Frequency: 1/40 runs, 2026-10-03 (single log sample under 40-spinner load; not yet reproduced deliberately)
|
|
- Evidence: not kept (scratchpad loop logs from the bug-1913 investigation)
|
|
|
|
## Root cause
|
|
TODO: required for fixed/partial
|
|
|
|
## Fix
|
|
TODO: required for fixed/partial
|
|
|
|
## Verification
|
|
- Test: TODO: name + file; RED before the fix, GREEN after
|
|
- Suites: TODO: suite results and build profile
|
|
- Live: TODO: soak/deploy run, or n/a and why
|
|
|
|
## References
|
|
- Related: none
|