chore(wolf): log bug-1483 (pre-existing test-mode leak in ha_arm_heartbeat_timeout_vtask)

Found during raft-adapter-conformance task 3.2; not fixed (out of that
task's boundary), avoided via the existing stub-and-reset workaround
already used by test_ha_prevote.c's LOST-path tests.
This commit is contained in:
Rongsong Shen 2026-07-29 14:37:32 +00:00
parent fce73b5b58
commit b315ffe466

View file

@ -14361,5 +14361,28 @@
"related_bugs": [],
"occurrences": 1,
"last_seen": "2026-07-29T10:43:00Z"
},
{
"id": "bug-1483",
"timestamp": "2026-07-29T10:20:00Z",
"error_message": "ha_arm_heartbeat_timeout_vtask (ha.c ~8805-8848), when called with c==NULL (unit-test mode driving a PreVote round to LOST without stubbing ha_prevote_rearm_liveness_hook), callocs a liveness_poll_ctx_t and stores it into the static s_liveness_ctx, but the guard skips scheduling anything to poll or free it -- the context leaks/dangles permanently in that code path.",
"file": "src/controller/ha.c (ha_arm_heartbeat_timeout_vtask, ~8805-8848)",
"root_cause": "Test-mode (c==NULL) entry into a production helper allocates state but has no corresponding free/cleanup path when the delaymgr-scheduling guard short-circuits -- a latent leak specific to the c==NULL unit-test invocation shape, not exercised by any live production path (a real cluster_t is never NULL there).",
"fix": "Not yet fixed. Found during raft-adapter-conformance task 3.2 while building a PreVote-round LOST-path test; avoided (not papered over) by stubbing ha_prevote_rearm_liveness_hook and resetting it to NULL after, matching the existing workaround already used by every LOST-path test in test_ha_prevote.c. A real fix would either free s_liveness_ctx on the c==NULL early-return, or make the guard also handle cleanup in that branch.",
"tags": [
"ha.c",
"ha_arm_heartbeat_timeout_vtask",
"s_liveness_ctx",
"test-mode-leak",
"c-is-null-path",
"raft-adapter-conformance",
"task-3.2",
"found-not-yet-fixed",
"pre-existing",
"prevote-lost-path"
],
"related_bugs": [],
"occurrences": 1,
"last_seen": "2026-07-29T10:20:00Z"
}
]