From b315ffe4660b730f8861aeae71274499e31ee718 Mon Sep 17 00:00:00 2001 From: Rongsong Shen Date: Wed, 29 Jul 2026 14:37:32 +0000 Subject: [PATCH] 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. --- .wolf/buglog.json | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.wolf/buglog.json b/.wolf/buglog.json index 234abf1c..e7cc65b8 100644 --- a/.wolf/buglog.json +++ b/.wolf/buglog.json @@ -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" } ]