16922 lines
1 MiB
16922 lines
1 MiB
{
|
|
"version": 1,
|
|
"bugs": [
|
|
{
|
|
"id": "bug-002",
|
|
"timestamp": "2026-05-21T07:46:54.198Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".claude/skills/kiro-spec-init/SKILL.md",
|
|
"root_cause": "Had `.kiro/settings/templates/specs/init.json`",
|
|
"fix": "Changed to `templates/specs/init.json`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 12,
|
|
"last_seen": "2026-05-21T07:48:24.177Z"
|
|
},
|
|
{
|
|
"id": "bug-004",
|
|
"timestamp": "2026-05-21T07:58:54.673Z",
|
|
"error_message": "Wrong reference: g_tmpdir should be g_instdir",
|
|
"file": "src/controller/testsuite/test_config_repl.c",
|
|
"root_cause": "Used \"g_tmpdir\" instead of \"g_instdir\"",
|
|
"fix": "Changed g_tmpdir \u2192 g_instdir",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-05-21T07:59:00.347Z"
|
|
},
|
|
{
|
|
"id": "bug-005",
|
|
"timestamp": "2026-05-21T08:24:10.738Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/config_repl.c",
|
|
"root_cause": "No early return/throw for edge case: rc == 0",
|
|
"fix": "Added guard clause: if (rc == 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-21T08:24:10.738Z"
|
|
},
|
|
{
|
|
"id": "bug-006",
|
|
"timestamp": "2026-05-21T08:30:20.719Z",
|
|
"error_message": "AddressSanitizer: attempting double-free on sctx in ha_connect_to_peer",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "endpoint_fini calls FREEUP(ep->data) which frees sctx, then ha_connect_to_peer also calls free(sctx) \u2014 double-free at lines 3594-3595 and 3600-3601",
|
|
"fix": "Set ep->data = NULL before endpoint_fini so FREEUP becomes a no-op; then free(sctx) explicitly in the error paths",
|
|
"tags": [
|
|
"md",
|
|
"double-free",
|
|
"asan",
|
|
"ha_connect_to_peer",
|
|
"endpoint_fini",
|
|
"integration-test"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-05T07:23:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-007",
|
|
"timestamp": "2026-05-21T12:53:13.789Z",
|
|
"error_message": "AddressSanitizer: heap-use-after-free in liveness_poll_fn at ha.c:3293 \u2014 reading ctx->cancelled after ha_arm_heartbeat_timeout_vtask freed the old ctx",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "ha_arm_heartbeat_timeout_vtask freed the old liveness_poll_ctx_t immediately after setting cancelled=1, but the delaymgr task was already in flight reading ctx->cancelled=0 and then continued to read ctx->ha after free",
|
|
"fix": "ha_arm_heartbeat_timeout_vtask no longer frees old ctx; liveness_poll_fn now frees ctx when it fires with cancelled=1 (guarded by #ifndef XCE_TESTING to avoid bad-free on stack-allocated test ctxs)",
|
|
"tags": [
|
|
"guard-clause",
|
|
"c",
|
|
"heap-use-after-free",
|
|
"asan",
|
|
"liveness_poll_fn",
|
|
"ha_arm_heartbeat_timeout_vtask",
|
|
"race-condition",
|
|
"integration-test"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-05T07:23:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-008",
|
|
"timestamp": "2026-05-21T13:20:28.953Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/config_repl.c",
|
|
"root_cause": "No early return/throw for edge case: getaddrinfo(host, port_str, &hints, &res",
|
|
"fix": "Added guard clause: if (getaddrinfo(host, port_str, &hints, &res)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-21T13:20:28.953Z"
|
|
},
|
|
{
|
|
"id": "bug-020",
|
|
"timestamp": "2026-05-25T11:31:55.826Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/ha-config-bootstrap/brief.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-05-25T11:31:55.826Z"
|
|
},
|
|
{
|
|
"id": "bug-023",
|
|
"timestamp": "2026-05-26T07:17:31.980Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": ".kiro/specs/ha-config-bootstrap/brief.md",
|
|
"root_cause": "No early return/throw for edge case: req->term < my_term",
|
|
"fix": "Added guard clause: if (req->term < my_term)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-26T07:17:31.980Z"
|
|
},
|
|
{
|
|
"id": "bug-024",
|
|
"timestamp": "2026-05-26T07:18:36.066Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "../../../../../claude/.claude/plans/prancy-herding-nest.md",
|
|
"root_cause": "No early return/throw for edge case: n_peers == 2",
|
|
"fix": "Added guard clause: if (n_peers == 2)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-26T07:18:36.066Z"
|
|
},
|
|
{
|
|
"id": "bug-026",
|
|
"timestamp": "2026-05-26T07:26:48.363Z",
|
|
"error_message": "Wrong return value",
|
|
"file": ".kiro/specs/ha-config-bootstrap/brief.md",
|
|
"root_cause": "Was returning: 1;",
|
|
"fix": "Now returns: 1; // single-node: always primary",
|
|
"tags": [
|
|
"auto-detected",
|
|
"return-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-26T07:26:48.363Z"
|
|
},
|
|
{
|
|
"id": "bug-027",
|
|
"timestamp": "2026-05-26T07:27:34.925Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "../../../../../claude/.claude/plans/prancy-herding-nest.md",
|
|
"root_cause": "Condition was: if (n_peers == 2)",
|
|
"fix": "Changed to: if (n_peers == 1)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-26T07:27:34.925Z"
|
|
},
|
|
{
|
|
"id": "bug-029",
|
|
"timestamp": "2026-05-26T07:29:11.741Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-config-bootstrap/brief.md",
|
|
"root_cause": "Had `main.c`",
|
|
"fix": "Changed to `-EINVAL`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-26T07:29:11.741Z"
|
|
},
|
|
{
|
|
"id": "bug-032",
|
|
"timestamp": "2026-05-26T09:07:23.015Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-config-bootstrap/brief.md",
|
|
"root_cause": "Had `-EINVAL`",
|
|
"fix": "Changed to `--vcpus N`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-26T09:07:23.015Z"
|
|
},
|
|
{
|
|
"id": "bug-034",
|
|
"timestamp": "2026-05-26T09:23:02.818Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "../../../../../claude/.claude/plans/prancy-herding-nest.md",
|
|
"root_cause": "No early return/throw for edge case: rc == 0",
|
|
"fix": "Added guard clause: if (rc == 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-26T09:23:02.818Z"
|
|
},
|
|
{
|
|
"id": "bug-035",
|
|
"timestamp": "2026-05-26T09:46:12.902Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-config-bootstrap/brief.md",
|
|
"root_cause": "Had `sysconf(_SC_NPROCESSORS_ONLN)`",
|
|
"fix": "Changed to ` when not specified. Values `",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-26T09:46:12.902Z"
|
|
},
|
|
{
|
|
"id": "bug-038",
|
|
"timestamp": "2026-05-26T10:09:32.424Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": ".kiro/specs/ha-config-bootstrap/brief.md",
|
|
"root_cause": "No early return/throw for edge case: c->myconf->config_version_tag != 0",
|
|
"fix": "Added guard clause: if (c->myconf->config_version_tag != 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-26T10:09:32.424Z"
|
|
},
|
|
{
|
|
"id": "bug-039",
|
|
"timestamp": "2026-05-26T10:09:57.711Z",
|
|
"error_message": "Wrong return value",
|
|
"file": "../../../../../claude/.claude/plans/prancy-herding-nest.md",
|
|
"root_cause": "Was returning: 0 (standby); fresher peer runs its own election",
|
|
"fix": "Now returns: `-ENODATA`. Not a normal runtime path.",
|
|
"tags": [
|
|
"auto-detected",
|
|
"return-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-26T10:09:57.711Z"
|
|
},
|
|
{
|
|
"id": "bug-041",
|
|
"timestamp": "2026-05-26T10:10:40.149Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "../../../../../claude/.claude/plans/prancy-herding-nest.md",
|
|
"root_cause": "Had `test_fetch_config_from_best_peer`",
|
|
"fix": "Changed to `test_handle_config_request_standbys_serve_config`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-26T10:10:40.149Z"
|
|
},
|
|
{
|
|
"id": "bug-042",
|
|
"timestamp": "2026-05-26T11:35:44.097Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/ha-config-bootstrap/brief.md",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-05-26T11:39:15.673Z"
|
|
},
|
|
{
|
|
"id": "bug-046",
|
|
"timestamp": "2026-05-26T13:51:32.274Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "../../../../../claude/.claude/plans/prancy-herding-nest.md",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: - [ ] `test_heartbeat_carries_committed_lsn`: heartbeat payl; `committed_lsn`; standby updates `ha.last_known_committed_ls",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-05-26T13:51:57.860Z"
|
|
},
|
|
{
|
|
"id": "bug-047",
|
|
"timestamp": "2026-05-26T13:52:49.044Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": ".kiro/specs/ha-config-bootstrap/brief.md",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: // Catch-up gate (Clarification 6): behind nodes must not in; if (c->ha.in_catch_up) {",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-05-26T13:53:15.121Z"
|
|
},
|
|
{
|
|
"id": "bug-048",
|
|
"timestamp": "2026-05-27T03:02:34.912Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "../../../../../claude/.claude/plans/prancy-herding-nest.md",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: name, key, applied_lsn, and config_tag immediately after TCP; - [ ] `test_ctrl_hello_registers_standby_in_repl`: handle_ct",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-05-27T03:04:02.739Z"
|
|
},
|
|
{
|
|
"id": "bug-059",
|
|
"timestamp": "2026-05-27T07:24:56.724Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-config-bootstrap/brief.md",
|
|
"root_cause": "Had `-ENOSYS`",
|
|
"fix": "Changed to `bootstrap_config_if_needed()`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-27T07:24:56.724Z"
|
|
},
|
|
{
|
|
"id": "bug-060",
|
|
"timestamp": "2026-05-27T09:24:44.651Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-config-bootstrap/spec.json",
|
|
"root_cause": "Had \"2026-05-27T01:24:00-07:00\"",
|
|
"fix": "Changed to \"2026-05-27T01:30:00-07:00\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"json"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-27T09:24:44.651Z"
|
|
},
|
|
{
|
|
"id": "bug-067",
|
|
"timestamp": "2026-05-28T03:42:53.810Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'worker.c'",
|
|
"fix": "Changed to 'startup_validation.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-28T03:42:53.810Z"
|
|
},
|
|
{
|
|
"id": "bug-068",
|
|
"timestamp": "2026-05-28T04:01:56.031Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/main.c",
|
|
"root_cause": "Condition was: if (arguments->vcpus < 1)",
|
|
"fix": "Changed to: if (validate_vcpus(arguments->vcpus)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-28T04:01:56.031Z"
|
|
},
|
|
{
|
|
"id": "bug-069",
|
|
"timestamp": "2026-05-28T04:02:06.925Z",
|
|
"error_message": "Wrong reference: vcpus should be nres",
|
|
"file": "src/include/clusterconfig.h",
|
|
"root_cause": "Used \"vcpus\" instead of \"nres\"",
|
|
"fix": "Changed vcpus \u2192 nres",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-28T04:02:06.925Z"
|
|
},
|
|
{
|
|
"id": "bug-071",
|
|
"timestamp": "2026-05-28T04:02:48.429Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/schema/controller.capnp",
|
|
"root_cause": "Had \"vcpus\"",
|
|
"fix": "Changed to \"resources\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"capnp"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-28T04:02:48.429Z"
|
|
},
|
|
{
|
|
"id": "bug-074",
|
|
"timestamp": "2026-05-28T05:59:28.525Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Condition was: if (opcode == OPCode_requestVote || opcode == OPCode_p)",
|
|
"fix": "Changed to: if (opcode == OPCode_requestVote ||\n opcod)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-28T05:59:28.525Z"
|
|
},
|
|
{
|
|
"id": "bug-075",
|
|
"timestamp": "2026-05-28T07:04:33.895Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'startup_validation.c'",
|
|
"fix": "Changed to 'testsuite/test_ha_election.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-28T07:04:33.895Z"
|
|
},
|
|
{
|
|
"id": "bug-078",
|
|
"timestamp": "2026-05-28T07:22:56.418Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: peer_idx < 0 || peer_idx >= ctx->n_peers",
|
|
"fix": "Added guard clause: if (peer_idx < 0 || peer_idx >= ctx->n_peers)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-28T07:22:56.418Z"
|
|
},
|
|
{
|
|
"id": "bug-081",
|
|
"timestamp": "2026-05-28T07:53:10.883Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: role != CTRL_STANDBY",
|
|
"fix": "Added guard clause: if (role != CTRL_STANDBY)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-28T07:53:10.883Z"
|
|
},
|
|
{
|
|
"id": "bug-082",
|
|
"timestamp": "2026-05-28T08:23:40.040Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: ctx->done_posted",
|
|
"fix": "Added guard clause: if (ctx->done_posted)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-05-28T08:25:11.221Z"
|
|
},
|
|
{
|
|
"id": "bug-083",
|
|
"timestamp": "2026-05-28T08:45:37.921Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/config_repl.c",
|
|
"root_cause": "No early return/throw for edge case: !host || !tag_out",
|
|
"fix": "Added guard clause: if (!host || !tag_out)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-28T08:45:37.921Z"
|
|
},
|
|
{
|
|
"id": "bug-084",
|
|
"timestamp": "2026-05-28T08:48:58.609Z",
|
|
"error_message": "Wrong reference: capn_str_null should be str",
|
|
"file": "src/controller/config_repl.c",
|
|
"root_cause": "Used \"capn_str_null\" instead of \"str\"",
|
|
"fix": "Changed capn_str_null \u2192 str",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-28T08:48:58.609Z"
|
|
},
|
|
{
|
|
"id": "bug-086",
|
|
"timestamp": "2026-05-28T09:13:17.676Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'startup_validation.c'",
|
|
"fix": "Changed to 'testsuite/test_ha_bootstrap_support.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-28T09:13:17.676Z"
|
|
},
|
|
{
|
|
"id": "bug-087",
|
|
"timestamp": "2026-05-28T10:13:52.421Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: !workdir",
|
|
"fix": "Added guard clause: if (!workdir)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-28T10:13:52.421Z"
|
|
},
|
|
{
|
|
"id": "bug-091",
|
|
"timestamp": "2026-05-28T13:53:09.924Z",
|
|
"error_message": "Wrong reference: in_catch_up should be acked_config_lsn",
|
|
"file": "src/controller/repl.c",
|
|
"root_cause": "Used \"in_catch_up\" instead of \"acked_config_lsn\"",
|
|
"fix": "Changed in_catch_up \u2192 acked_config_lsn",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-28T13:53:09.924Z"
|
|
},
|
|
{
|
|
"id": "bug-092",
|
|
"timestamp": "2026-05-28T14:11:04.583Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "No early return/throw for edge case: p->current_lsn == 0 || cutoff_lsn + 1 >= p->current_lsn",
|
|
"fix": "Added guard clause: if (p->current_lsn == 0 || cutoff_lsn + 1 >=)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-28T14:11:04.583Z"
|
|
},
|
|
{
|
|
"id": "bug-094",
|
|
"timestamp": "2026-05-28T14:47:44.445Z",
|
|
"error_message": "Wrong reference: ha_state_t should be _Atomic",
|
|
"file": "src/controller/ha.h",
|
|
"root_cause": "Used \"ha_state_t\" instead of \"_Atomic\"",
|
|
"fix": "Changed ha_state_t \u2192 _Atomic",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-28T14:47:44.445Z"
|
|
},
|
|
{
|
|
"id": "bug-095",
|
|
"timestamp": "2026-05-28T15:04:44.613Z",
|
|
"error_message": "Wrong reference: socket should be epoll",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Used \"socket\" instead of \"epoll\"",
|
|
"fix": "Changed socket \u2192 epoll",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-28T15:04:44.613Z"
|
|
},
|
|
{
|
|
"id": "bug-096",
|
|
"timestamp": "2026-05-28T15:05:23.129Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: ha_tcp_connect_hook",
|
|
"fix": "Added guard clause: if (ha_tcp_connect_hook)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-28T15:05:23.129Z"
|
|
},
|
|
{
|
|
"id": "bug-097",
|
|
"timestamp": "2026-05-29T02:48:17.371Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/request.c",
|
|
"root_cause": "No early return/throw for edge case: (ep == NULL",
|
|
"fix": "Added guard clause: if ((ep == NULL)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-29T02:48:17.371Z"
|
|
},
|
|
{
|
|
"id": "bug-098",
|
|
"timestamp": "2026-05-29T02:50:46.444Z",
|
|
"error_message": "Wrong reference: XCE_ERR_STANDBY should be E_XCE_STANDBY",
|
|
"file": "src/lib/request.c",
|
|
"root_cause": "Used \"XCE_ERR_STANDBY\" instead of \"E_XCE_STANDBY\"",
|
|
"fix": "Changed XCE_ERR_STANDBY \u2192 E_XCE_STANDBY",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-29T02:50:46.444Z"
|
|
},
|
|
{
|
|
"id": "bug-099",
|
|
"timestamp": "2026-05-29T02:51:03.529Z",
|
|
"error_message": "Wrong reference: XCE_ERR_NOT_READY should be E_XCE_NOT_READY",
|
|
"file": "src/lib/testsuite/test_libxce_retry.c",
|
|
"root_cause": "Used \"XCE_ERR_NOT_READY\" instead of \"E_XCE_NOT_READY\"",
|
|
"fix": "Changed XCE_ERR_NOT_READY \u2192 E_XCE_NOT_READY",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-05-29T02:51:16.657Z"
|
|
},
|
|
{
|
|
"id": "bug-102",
|
|
"timestamp": "2026-05-29T03:37:52.117Z",
|
|
"error_message": "Wrong reference: data should be ctrl_hello_reply_t",
|
|
"file": "src/include/typemap.h",
|
|
"root_cause": "Used \"data\" instead of \"ctrl_hello_reply_t\"",
|
|
"fix": "Changed data \u2192 ctrl_hello_reply_t",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-29T03:37:52.117Z"
|
|
},
|
|
{
|
|
"id": "bug-104",
|
|
"timestamp": "2026-05-29T03:54:23.205Z",
|
|
"error_message": "Missing error handling in struct",
|
|
"file": "src/include/typemap.h",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: wal_catchup_entry_t* walcatchupentrymsg;; snapshot_transfer_t* snapshottransfermsg; | Also: /* Forward declarations for types defined later in this file; typedef struct snapshot_transfer_t snapshot_transfer_fw",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-05-29T03:56:34.078Z"
|
|
},
|
|
{
|
|
"id": "bug-109",
|
|
"timestamp": "2026-05-29T06:59:14.045Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: !ha",
|
|
"fix": "Added guard clause: if (!ha)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-29T06:59:14.045Z"
|
|
},
|
|
{
|
|
"id": "bug-111",
|
|
"timestamp": "2026-05-29T07:02:31.287Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Condition was: if (c->myconf && c->myconf->cluster_config)",
|
|
"fix": "Changed to: if (c->myconf && c->myconf->peers_cfg.candidates_count)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-29T07:02:31.287Z"
|
|
},
|
|
{
|
|
"id": "bug-117",
|
|
"timestamp": "2026-05-29T13:41:46.841Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/myapp.c",
|
|
"root_cause": "Had \"Pre-election config loaded: tag=%016\"",
|
|
"fix": "Changed to \"Pre-election config loaded: tag=%016llx\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-29T13:41:46.841Z"
|
|
},
|
|
{
|
|
"id": "bug-118",
|
|
"timestamp": "2026-05-29T13:51:42.299Z",
|
|
"error_message": "Wrong reference: nres should be vcpus",
|
|
"file": "src/include/clusterconfig.h",
|
|
"root_cause": "Used \"nres\" instead of \"vcpus\"",
|
|
"fix": "Changed nres \u2192 vcpus",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-29T13:51:42.299Z"
|
|
},
|
|
{
|
|
"id": "bug-119",
|
|
"timestamp": "2026-05-29T16:32:10.285Z",
|
|
"error_message": "Wrong reference: data should be request_vote_reply_t",
|
|
"file": "src/include/typemap.h",
|
|
"root_cause": "Used \"data\" instead of \"request_vote_reply_t\"",
|
|
"fix": "Changed data \u2192 request_vote_reply_t",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-29T16:32:10.285Z"
|
|
},
|
|
{
|
|
"id": "bug-122",
|
|
"timestamp": "2026-05-30T00:05:02.052Z",
|
|
"error_message": "Wrong reference: cluster_init_phase2 should be cluster_register_listener",
|
|
"file": "src/controller/include/cluster.h",
|
|
"root_cause": "Used \"cluster_init_phase2\" instead of \"cluster_register_listener\"",
|
|
"fix": "Changed cluster_init_phase2 \u2192 cluster_register_listener",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T00:05:02.052Z"
|
|
},
|
|
{
|
|
"id": "bug-123",
|
|
"timestamp": "2026-05-30T00:20:27.244Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/cluster.c",
|
|
"root_cause": "No early return/throw for edge case: c->ep.flags == 0",
|
|
"fix": "Added guard clause: if (c->ep.flags == 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T00:20:27.244Z"
|
|
},
|
|
{
|
|
"id": "bug-127",
|
|
"timestamp": "2026-05-30T01:12:38.572Z",
|
|
"error_message": "Wrong reference: CTRL_PERF_NHASH should be c",
|
|
"file": "src/controller/cluster.c",
|
|
"root_cause": "Used \"CTRL_PERF_NHASH\" instead of \"c\"",
|
|
"fix": "Changed CTRL_PERF_NHASH \u2192 c",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T01:12:38.572Z"
|
|
},
|
|
{
|
|
"id": "bug-129",
|
|
"timestamp": "2026-05-30T01:21:20.140Z",
|
|
"error_message": "Wrong reference: true should be false",
|
|
"file": ".claude/skills/xce-build/SKILL.md",
|
|
"root_cause": "Used \"true\" instead of \"false\"",
|
|
"fix": "Changed true \u2192 false",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T01:21:20.140Z"
|
|
},
|
|
{
|
|
"id": "bug-130",
|
|
"timestamp": "2026-05-30T01:28:22.079Z",
|
|
"error_message": "Wrong reference: 120 should be 300",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Used \"120\" instead of \"300\"",
|
|
"fix": "Changed 120 \u2192 300",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T01:28:22.079Z"
|
|
},
|
|
{
|
|
"id": "bug-135",
|
|
"timestamp": "2026-05-30T06:19:47.181Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/election-iomgr-refactor/design.md",
|
|
"root_cause": "Had `cluster_init_phase2`",
|
|
"fix": "Changed to `cluster_config == NULL`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T06:19:47.181Z"
|
|
},
|
|
{
|
|
"id": "bug-136",
|
|
"timestamp": "2026-05-30T06:38:09.325Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": ".kiro/specs/election-iomgr-refactor/design.md",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: /* After election determines role: */; int is_first_boot = !c->running; /* running=1 only after cl | Also: #### `ha_dispatch_gate` \u2014 CTRL_PRIMARY_COMMITTING case; ```c | Also: ### 3-node startup \u2014 ctrl-a wins (with COMMITTING phase); participant PeerC as ctrl-c endpoint | Also: - **`ha_start_election_async()` is fully non-blocking**: Arm; - *Initial startup* (`ha->phase2_done == 0`): calls `cluster",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 5,
|
|
"last_seen": "2026-05-30T06:43:07.267Z"
|
|
},
|
|
{
|
|
"id": "bug-139",
|
|
"timestamp": "2026-05-30T06:58:05.115Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/election-iomgr-refactor/design.md",
|
|
"root_cause": "Had `delay_task_cancel()`",
|
|
"fix": "Changed to `clock_gettime(CLOCK_MONOTONIC)`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T06:58:05.115Z"
|
|
},
|
|
{
|
|
"id": "bug-142",
|
|
"timestamp": "2026-05-30T07:57:14.052Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: xce_vote_request_hook != NULL",
|
|
"fix": "Added guard clause: if (xce_vote_request_hook != NULL)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T07:57:14.052Z"
|
|
},
|
|
{
|
|
"id": "bug-143",
|
|
"timestamp": "2026-05-30T08:16:03.222Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: !pkt || !pkt->data || pkt->sz == 0",
|
|
"fix": "Added guard clause: if (!pkt || !pkt->data || pkt->sz == 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T08:16:03.222Z"
|
|
},
|
|
{
|
|
"id": "bug-144",
|
|
"timestamp": "2026-05-30T08:49:04.058Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T08:49:04.058Z"
|
|
},
|
|
{
|
|
"id": "bug-145",
|
|
"timestamp": "2026-05-30T08:49:59.817Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: atomic_load(&t->cancelled",
|
|
"fix": "Added guard clause: if (atomic_load(&t->cancelled)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T08:49:59.817Z"
|
|
},
|
|
{
|
|
"id": "bug-147",
|
|
"timestamp": "2026-05-30T09:13:19.377Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T09:13:19.377Z"
|
|
},
|
|
{
|
|
"id": "bug-149",
|
|
"timestamp": "2026-05-30T10:31:53.836Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'startup_validation.c'",
|
|
"fix": "Changed to 'testsuite/test_ha_vote_gate.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T10:31:53.836Z"
|
|
},
|
|
{
|
|
"id": "bug-153",
|
|
"timestamp": "2026-05-30T11:43:01.989Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'startup_validation.c'",
|
|
"fix": "Changed to 'testsuite/test_ha_repl_push.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T11:43:01.989Z"
|
|
},
|
|
{
|
|
"id": "bug-154",
|
|
"timestamp": "2026-05-30T11:43:44.829Z",
|
|
"error_message": "Missing error handling in XCE_TESTING",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: /* Push config to standbys with lower config_tag (Req 7.1) *; #ifdef XCE_TESTING",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-05-30T11:43:58.208Z"
|
|
},
|
|
{
|
|
"id": "bug-157",
|
|
"timestamp": "2026-05-30T12:02:39.009Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_ha_startup.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-05-30T12:03:10.183Z"
|
|
},
|
|
{
|
|
"id": "bug-159",
|
|
"timestamp": "2026-05-30T12:22:57.013Z",
|
|
"error_message": "Wrong return value",
|
|
"file": "src/controller/testsuite/test_ha_startup.c",
|
|
"root_cause": "Was returning: in < 10ms.",
|
|
"fix": "Now returns: in < 5ms (design spec).",
|
|
"tags": [
|
|
"auto-detected",
|
|
"return-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T12:22:57.013Z"
|
|
},
|
|
{
|
|
"id": "bug-160",
|
|
"timestamp": "2026-05-30T12:23:18.560Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/testsuite/test_ha_startup.c",
|
|
"root_cause": "Had \"myapp_run path: ha_start_election_async must retu",
|
|
"fix": "Changed to \"myapp_run path: ha_start_election_async must retu",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T12:23:18.560Z"
|
|
},
|
|
{
|
|
"id": "bug-161",
|
|
"timestamp": "2026-05-30T12:29:45.867Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T12:29:45.867Z"
|
|
},
|
|
{
|
|
"id": "bug-162",
|
|
"timestamp": "2026-05-30T12:30:10.570Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-05-30T12:30:26.987Z"
|
|
},
|
|
{
|
|
"id": "bug-163",
|
|
"timestamp": "2026-05-30T12:31:02.203Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_ha_failover.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T12:31:02.203Z"
|
|
},
|
|
{
|
|
"id": "bug-164",
|
|
"timestamp": "2026-05-30T12:45:22.182Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T12:45:22.182Z"
|
|
},
|
|
{
|
|
"id": "bug-166",
|
|
"timestamp": "2026-05-30T12:50:35.870Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/testsuite/test_ha_bootstrap_support.c",
|
|
"root_cause": "No early return/throw for edge case: c->myconf->config_version_tag != 0",
|
|
"fix": "Added guard clause: if (c->myconf->config_version_tag != 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T12:50:35.870Z"
|
|
},
|
|
{
|
|
"id": "bug-167",
|
|
"timestamp": "2026-05-30T13:06:57.152Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: cancelled_val",
|
|
"fix": "Added guard clause: if (cancelled_val)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T13:06:57.152Z"
|
|
},
|
|
{
|
|
"id": "bug-168",
|
|
"timestamp": "2026-05-30T13:24:06.024Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'startup_validation.c'",
|
|
"fix": "Changed to 'testsuite/test_ha_repl_ack.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T13:24:06.024Z"
|
|
},
|
|
{
|
|
"id": "bug-169",
|
|
"timestamp": "2026-05-30T13:42:28.077Z",
|
|
"error_message": "Wrong reference: third should be second",
|
|
"file": "src/controller/testsuite/test_ha_repl_ack.c",
|
|
"root_cause": "Used \"third\" instead of \"second\"",
|
|
"fix": "Changed third \u2192 second",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T13:42:28.077Z"
|
|
},
|
|
{
|
|
"id": "bug-170",
|
|
"timestamp": "2026-05-30T14:35:07.679Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T14:35:07.679Z"
|
|
},
|
|
{
|
|
"id": "bug-172",
|
|
"timestamp": "2026-05-30T23:42:12.644Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-30T23:42:12.644Z"
|
|
},
|
|
{
|
|
"id": "bug-176",
|
|
"timestamp": "2026-05-31T02:09:39.630Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Condition was: if (c->myconf && c->myconf->peers_cfg.candidates_count)",
|
|
"fix": "Changed to: if (ha->my_priority > 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-31T02:09:39.630Z"
|
|
},
|
|
{
|
|
"id": "bug-183",
|
|
"timestamp": "2026-05-31T03:02:33.311Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/request.c",
|
|
"root_cause": "No early return/throw for edge case: req == NULL",
|
|
"fix": "Added guard clause: if (req == NULL)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-31T03:02:33.311Z"
|
|
},
|
|
{
|
|
"id": "bug-186",
|
|
"timestamp": "2026-05-31T04:11:45.534Z",
|
|
"error_message": "Missing error handling in struct",
|
|
"file": ".kiro/specs/raft-library/design.md",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: Caller->>RaftSM: raft_on_vote_request(state, from, term); alt term < current_term",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-05-31T04:13:04.500Z"
|
|
},
|
|
{
|
|
"id": "bug-188",
|
|
"timestamp": "2026-05-31T04:19:54.524Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-library/design.md",
|
|
"root_cause": "Had `raft.c`",
|
|
"fix": "Changed to `raft.h`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-31T04:19:54.524Z"
|
|
},
|
|
{
|
|
"id": "bug-190",
|
|
"timestamp": "2026-05-31T05:07:37.759Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft.c",
|
|
"root_cause": "No early return/throw for edge case: cfg->n_peers < 1",
|
|
"fix": "Added guard clause: if (cfg->n_peers < 1)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-31T05:07:37.759Z"
|
|
},
|
|
{
|
|
"id": "bug-191",
|
|
"timestamp": "2026-05-31T05:23:19.394Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft.c",
|
|
"root_cause": "No early return/throw for edge case: s->role == RAFT_CANDIDATE || s->role == RAFT_LEADER",
|
|
"fix": "Added guard clause: if (s->role == RAFT_CANDIDATE || s->role == )",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-31T05:23:19.394Z"
|
|
},
|
|
{
|
|
"id": "bug-197",
|
|
"timestamp": "2026-05-31T07:08:23.387Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-31T07:08:23.387Z"
|
|
},
|
|
{
|
|
"id": "bug-206",
|
|
"timestamp": "2026-05-31T08:40:00.000Z",
|
|
"error_message": "test_vote_reply_handler_term_fencing FAIL: Expected 10 Was 3 \u2014 ha->term must be atomically updated to peer term when peer term > ours",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "vote_reply_msg_handler delegated term fencing entirely to raft_cb_become_follower (via raft_on_vote_reply). In XCE_TESTING builds, vote_reply_dispatch calls xce_vote_reply_hook and returns early, bypassing raft_on_vote_reply and thus never updating ha->term.",
|
|
"fix": "Added explicit CAS loop in vote_reply_msg_handler before vote_reply_dispatch to advance ha->term when vr_term > ha->term. This applies on both the production path and the XCE_TESTING hook path.",
|
|
"tags": [
|
|
"term-fencing",
|
|
"raft",
|
|
"ha",
|
|
"xce-testing",
|
|
"test-seam",
|
|
"vote-reply"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-31T08:40:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-207",
|
|
"timestamp": "2026-05-31T08:47:08.484Z",
|
|
"error_message": "Wrong reference: test_raft_init_zero_peers_returns_einval should be test_raft_init_even_peers_returns_einval",
|
|
"file": "src/lib/testsuite/test_raft.c",
|
|
"root_cause": "Used \"test_raft_init_zero_peers_returns_einval\" instead of \"test_raft_init_even_peers_returns_einval\"",
|
|
"fix": "Changed test_raft_init_zero_peers_returns_einval \u2192 test_raft_init_even_peers_returns_einval",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-31T08:47:08.484Z"
|
|
},
|
|
{
|
|
"id": "bug-208",
|
|
"timestamp": "2026-05-31",
|
|
"error_message": "ASAN LeakSanitizer: detected memory leaks in scheduler testsuite \u2014 build exits with error code",
|
|
"file": "src/scheduler/testsuite/test.c",
|
|
"root_cause": "sched_meet_host_selection() lazily allocates w->host_eval_ctx via build_host_eval_ctx(). Four test functions (test_meet_host_selection_always_true_passes, test_meet_host_selection_always_false_fails, test_meet_host_selection_numeric_match, test_meet_host_selection_string_match) called zarray_fini() without first calling sched_worker_release_host_ctx() to free the lazily-allocated host_eval_ctx.",
|
|
"fix": "Added sched_worker_release_host_ctx(&w) calls before zarray_fini() in all four affected test functions.",
|
|
"tags": [
|
|
"asan",
|
|
"leak",
|
|
"scheduler",
|
|
"test",
|
|
"host_eval_ctx"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-31"
|
|
},
|
|
{
|
|
"id": "bug-209",
|
|
"timestamp": "2026-05-31T10:19:47.014Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Condition was: if (ha_rdhup_election_hook != NULL)",
|
|
"fix": "Changed to: if (c->myconf && c->myconf->peers_cfg.candidates_count)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-31T10:19:47.014Z"
|
|
},
|
|
{
|
|
"id": "bug-211",
|
|
"timestamp": "2026-05-31T11:29:03.301Z",
|
|
"error_message": "Wrong reference: 2000 should be 5000",
|
|
"file": "src/controller/ha.h",
|
|
"root_cause": "Used \"2000\" instead of \"5000\"",
|
|
"fix": "Changed 2000 \u2192 5000",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-31T11:29:03.301Z"
|
|
},
|
|
{
|
|
"id": "bug-215",
|
|
"timestamp": "2026-05-31T12:43:45.333Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: !pkt || !pkt->data || pkt->sz == 0",
|
|
"fix": "Added guard clause: if (!pkt || !pkt->data || pkt->sz == 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-31T12:43:45.333Z"
|
|
},
|
|
{
|
|
"id": "bug-216",
|
|
"timestamp": "2026-05-31T12:49:40.554Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-peer-connection-reuse/tasks.md",
|
|
"root_cause": "Had 's vote endpoints to standby control channels\n\n- [",
|
|
"fix": "Changed to 's vote endpoints to standby control channels\n\n- [",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-31T12:49:40.554Z"
|
|
},
|
|
{
|
|
"id": "bug-218",
|
|
"timestamp": "2026-05-31T12:58:44.435Z",
|
|
"error_message": "Wrong reference: Request_body_nodata should be Request_body_nomsg",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Used \"Request_body_nodata\" instead of \"Request_body_nomsg\"",
|
|
"fix": "Changed Request_body_nodata \u2192 Request_body_nomsg",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-31T12:58:44.435Z"
|
|
},
|
|
{
|
|
"id": "bug-220",
|
|
"timestamp": "2026-05-31T14:20:41.161Z",
|
|
"error_message": "Wrong reference: vote_reply_msg_handler should be vote_reply_msg_handler_for_test",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Used \"vote_reply_msg_handler\" instead of \"vote_reply_msg_handler_for_test\"",
|
|
"fix": "Changed vote_reply_msg_handler \u2192 vote_reply_msg_handler_for_test",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-05-31T14:20:41.161Z"
|
|
},
|
|
{
|
|
"id": "bug-224",
|
|
"timestamp": "2026-06-01T02:07:55.176Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: !c->delaymgr.running",
|
|
"fix": "Added guard clause: if (!c->delaymgr.running)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-01T02:07:55.176Z"
|
|
},
|
|
{
|
|
"id": "bug-229",
|
|
"timestamp": "2026-06-01T02:49:09.141Z",
|
|
"error_message": "Wrong operator: && should be !=",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Used \"&&\" instead of \"!=\"",
|
|
"fix": "Changed operator && \u2192 !=",
|
|
"tags": [
|
|
"auto-detected",
|
|
"operator-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-01T02:49:09.141Z"
|
|
},
|
|
{
|
|
"id": "bug-233",
|
|
"timestamp": "2026-06-01T03:07:51.264Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'testsuite/test_ha_connect.c'",
|
|
"fix": "Changed to 'testsuite/test_ha_ctrlhello.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-01T03:07:51.264Z"
|
|
},
|
|
{
|
|
"id": "bug-235",
|
|
"timestamp": "2026-06-01T03:13:14.521Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'testsuite/test_ha_connection_reuse.c'",
|
|
"fix": "Changed to 'testsuite/test_ha_connect.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-01T03:13:14.521Z"
|
|
},
|
|
{
|
|
"id": "bug-236",
|
|
"timestamp": "2026-06-01T03:15:29.129Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: rc < 0",
|
|
"fix": "Added guard clause: if (rc < 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-01T03:15:29.129Z"
|
|
},
|
|
{
|
|
"id": "bug-238",
|
|
"timestamp": "2026-06-01T03:23:32.483Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'testsuite/test_ha_connect.c'",
|
|
"fix": "Changed to 'testsuite/test_ha_connection_reuse.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-01T03:24:43.046Z"
|
|
},
|
|
{
|
|
"id": "bug-239",
|
|
"timestamp": "2026-06-01T03:28:46.956Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: ha_tcp_connect_hook != NULL",
|
|
"fix": "Added guard clause: if (ha_tcp_connect_hook != NULL)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-01T03:28:46.956Z"
|
|
},
|
|
{
|
|
"id": "bug-240",
|
|
"timestamp": "2026-06-01T04:08:07.950Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'testsuite/test_ha_connect.c'",
|
|
"fix": "Changed to 'testsuite/test_ha_connection_reuse.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-01T04:12:55.229Z"
|
|
},
|
|
{
|
|
"id": "bug-241",
|
|
"timestamp": "2026-06-01T04:13:03.001Z",
|
|
"error_message": "Wrong reference: test_ha_connect should be test_ha_ctrlhello",
|
|
"file": "src/controller/testsuite/controller_test.c",
|
|
"root_cause": "Used \"test_ha_connect\" instead of \"test_ha_ctrlhello\"",
|
|
"fix": "Changed test_ha_connect \u2192 test_ha_ctrlhello",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-01T04:13:08.650Z"
|
|
},
|
|
{
|
|
"id": "bug-242",
|
|
"timestamp": "2026-06-01T05:19:12.427Z",
|
|
"error_message": "Wrong reference: vcpu should be vcpus",
|
|
"file": "src/tools/deploy-ha.sh",
|
|
"root_cause": "Used \"vcpu\" instead of \"vcpus\"",
|
|
"fix": "Changed vcpu \u2192 vcpus",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"sh"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-01T05:19:12.427Z"
|
|
},
|
|
{
|
|
"id": "bug-250",
|
|
"timestamp": "2026-06-01T07:46:05.128Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: !ep || !ep->data",
|
|
"fix": "Added guard clause: if (!ep || !ep->data)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-01T07:46:05.128Z"
|
|
},
|
|
{
|
|
"id": "bug-252",
|
|
"timestamp": "2026-06-01T08:35:29.969Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'startup_validation.c'",
|
|
"fix": "Changed to 'testsuite/test_ha_rdhup_integration.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-01T08:35:29.969Z"
|
|
},
|
|
{
|
|
"id": "bug-255",
|
|
"timestamp": "2026-06-01T12:02:55.635Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/cluster.c",
|
|
"root_cause": "Condition was: if (rc != 0)",
|
|
"fix": "Changed to: if (validate_heartbeat_config(ha_cfg.heartbeat_timeout)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-01T12:02:55.635Z"
|
|
},
|
|
{
|
|
"id": "bug-256",
|
|
"timestamp": "2026-06-01T12:36:28.381Z",
|
|
"error_message": "Wrong reference: startup_validation should be testsuite_test_ha_liveness",
|
|
"file": "src/xce.build/build.ninja",
|
|
"root_cause": "Used \"startup_validation\" instead of \"testsuite_test_ha_liveness\"",
|
|
"fix": "Changed startup_validation \u2192 testsuite_test_ha_liveness",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"ninja"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-01T12:36:28.381Z"
|
|
},
|
|
{
|
|
"id": "bug-260",
|
|
"timestamp": "2026-06-01T14:42:41.325Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: interval_s <= 0",
|
|
"fix": "Added guard clause: if (interval_s <= 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-01T14:44:38.543Z"
|
|
},
|
|
{
|
|
"id": "bug-263",
|
|
"timestamp": "2026-06-01T15:32:59.304Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/testsuite/test_ha_liveness.c",
|
|
"root_cause": "No early return/throw for edge case: !f",
|
|
"fix": "Added guard clause: if (!f)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-01T15:32:59.304Z"
|
|
},
|
|
{
|
|
"id": "bug-265",
|
|
"timestamp": "2026-06-03T08:47:25.835Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-03T08:47:25.835Z"
|
|
},
|
|
{
|
|
"id": "bug-266",
|
|
"timestamp": "2026-06-03T08:47:54.376Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-03T08:47:54.376Z"
|
|
},
|
|
{
|
|
"id": "bug-269",
|
|
"timestamp": "2026-06-03T08:50:58.837Z",
|
|
"error_message": "Wrong reference: test_am_i_primary should be test_ha_cluster",
|
|
"file": "src/controller/testsuite/controller_test.c",
|
|
"root_cause": "Used \"test_am_i_primary\" instead of \"test_ha_cluster\"",
|
|
"fix": "Changed test_am_i_primary \u2192 test_ha_cluster",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-03T08:51:07.382Z"
|
|
},
|
|
{
|
|
"id": "bug-279",
|
|
"timestamp": "2026-06-04T11:54:56.114Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-repl-hardening/design.md",
|
|
"root_cause": "Had `(checkpoint_lsn, last_received_chunk)`",
|
|
"fix": "Changed to `snap.part`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-04T11:54:56.114Z"
|
|
},
|
|
{
|
|
"id": "bug-284",
|
|
"timestamp": "2026-06-04T14:33:03.464Z",
|
|
"error_message": "Missing error handling in XCE_TESTING",
|
|
"file": "src/controller/testsuite/test_config_repl.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: /* \u2500\u2500 Task 2.1: OPCode_walCatchupEntry handler \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500; #ifdef XCE_TESTING | Also: /* Task 2.1: OPCode_walCatchupEntry handler */; RUN_TEST(test_wal_catchup_entry_advances_applied_lsn);",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-04T14:33:51.476Z"
|
|
},
|
|
{
|
|
"id": "bug-285",
|
|
"timestamp": "2026-06-04T14:41:35.073Z",
|
|
"error_message": "Missing error handling in XCE_TESTING",
|
|
"file": "src/controller/cluster.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: case OPCode_walCatchupEntry:; /* Task 2.1: standby applies a single WAL catch-up entry fro",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-04T14:41:48.239Z"
|
|
},
|
|
{
|
|
"id": "bug-288",
|
|
"timestamp": "2026-06-04T14:46:44.652Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/controller/ha.h",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: #include \"persist.h\" /* persist_t, apply_wal_entry */; #include \"typemap.h\" /* wal_catchup_entry_t */",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-04T14:47:53.528Z"
|
|
},
|
|
{
|
|
"id": "bug-292",
|
|
"timestamp": "2026-06-04T16:15:43.743Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: peer_idx < 0 || peer_idx >= MAX_HA_CANDIDATES",
|
|
"fix": "Added guard clause: if (peer_idx < 0 || peer_idx >= MAX_HA_CANDI)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-04T16:15:43.743Z"
|
|
},
|
|
{
|
|
"id": "bug-294",
|
|
"timestamp": "2026-06-04T16:45:25.724Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: standby_tag < committed_tag",
|
|
"fix": "Added guard clause: if (standby_tag < committed_tag)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-04T16:45:25.724Z"
|
|
},
|
|
{
|
|
"id": "bug-295",
|
|
"timestamp": "2026-06-04T16:57:59.213Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/testsuite/test_ha_role.c",
|
|
"root_cause": "Had \"test_evaluate_repl_action_stream_wal_from_zero: P",
|
|
"fix": "Changed to \"test_evaluate_repl_action_send_snapshot_lsn_zero:",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-04T16:57:59.213Z"
|
|
},
|
|
{
|
|
"id": "bug-296",
|
|
"timestamp": "2026-06-04T16:58:16.627Z",
|
|
"error_message": "Wrong reference: test_evaluate_repl_action_stream_wal_from_zero should be test_evaluate_repl_action_send_snapshot_lsn_zero",
|
|
"file": "src/controller/testsuite/test_ha_role.c",
|
|
"root_cause": "Used \"test_evaluate_repl_action_stream_wal_from_zero\" instead of \"test_evaluate_repl_action_send_snapshot_lsn_zero\"",
|
|
"fix": "Changed test_evaluate_repl_action_stream_wal_from_zero \u2192 test_evaluate_repl_action_send_snapshot_lsn_zero",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-04T16:58:16.627Z"
|
|
},
|
|
{
|
|
"id": "bug-297",
|
|
"timestamp": "2026-06-04T17:08:18.571Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: !ha || peer_idx < 0 || peer_idx >= MAX_HA_CANDIDATES",
|
|
"fix": "Added guard clause: if (!ha || peer_idx < 0 || peer_idx >= MAX_H)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-04T17:08:18.571Z"
|
|
},
|
|
{
|
|
"id": "bug-301",
|
|
"timestamp": "2026-06-04T23:09:43.701Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/testsuite/test_config_repl.c",
|
|
"root_cause": "No early return/throw for edge case: g_snaptest_chunk_count >= 16",
|
|
"fix": "Added guard clause: if (g_snaptest_chunk_count >= 16)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-04T23:09:43.701Z"
|
|
},
|
|
{
|
|
"id": "bug-302",
|
|
"timestamp": "2026-06-04T23:10:44.426Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/config_repl.c",
|
|
"root_cause": "No early return/throw for edge case: !snap_dir",
|
|
"fix": "Added guard clause: if (!snap_dir)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-04T23:10:44.426Z"
|
|
},
|
|
{
|
|
"id": "bug-308",
|
|
"timestamp": "2026-06-05T01:19:20.356Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/config_repl.c",
|
|
"root_cause": "No early return/throw for edge case: !d",
|
|
"fix": "Added guard clause: if (!d)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-05T01:19:20.356Z"
|
|
},
|
|
{
|
|
"id": "bug-309",
|
|
"timestamp": "2026-06-05T01:33:20.146Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: !ha || !p || !snap_dir || !chunk",
|
|
"fix": "Added guard clause: if (!ha || !p || !snap_dir || !chunk)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-05T01:33:20.146Z"
|
|
},
|
|
{
|
|
"id": "bug-310",
|
|
"timestamp": "2026-06-05T01:34:06.660Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/cluster.c",
|
|
"root_cause": "No early return/throw for edge case: !chunk",
|
|
"fix": "Added guard clause: if (!chunk)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-05T01:34:06.660Z"
|
|
},
|
|
{
|
|
"id": "bug-311",
|
|
"timestamp": "2026-06-05T02:21:15.033Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: ua > ub",
|
|
"fix": "Added guard clause: if (ua > ub)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-05T02:21:15.033Z"
|
|
},
|
|
{
|
|
"id": "bug-312",
|
|
"timestamp": "2026-06-05T02:47:32.237Z",
|
|
"error_message": "Wrong reference: uintptr_t should be void",
|
|
"file": "src/controller/testsuite/test_ha_evaluate_committing.c",
|
|
"root_cause": "Used \"uintptr_t\" instead of \"void\"",
|
|
"fix": "Changed uintptr_t \u2192 void",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-05T02:47:32.237Z"
|
|
},
|
|
{
|
|
"id": "bug-314",
|
|
"timestamp": "2026-06-05T04:01:58.721Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: !ha",
|
|
"fix": "Added guard clause: if (!ha)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-05T04:01:58.721Z"
|
|
},
|
|
{
|
|
"id": "bug-315",
|
|
"timestamp": "2026-06-05T04:52:32.206Z",
|
|
"error_message": "Wrong reference: 10000 should be 60000",
|
|
"file": "src/controller/ha.h",
|
|
"root_cause": "Used \"10000\" instead of \"60000\"",
|
|
"fix": "Changed 10000 \u2192 60000",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-05T04:52:51.260Z"
|
|
},
|
|
{
|
|
"id": "bug-317",
|
|
"timestamp": "2026-06-05T04:53:55.034Z",
|
|
"error_message": "Wrong reference: 10000 should be HA_DEFAULT_COMMITTING_TIMEOUT_MS",
|
|
"file": "src/controller/testsuite/test_ha_evaluate_committing.c",
|
|
"root_cause": "Used \"10000\" instead of \"HA_DEFAULT_COMMITTING_TIMEOUT_MS\"",
|
|
"fix": "Changed 10000 \u2192 HA_DEFAULT_COMMITTING_TIMEOUT_MS",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-05T04:53:55.034Z"
|
|
},
|
|
{
|
|
"id": "bug-320",
|
|
"timestamp": "2026-06-05T06:50:00Z",
|
|
"error_message": "3-node startup: majority convergence never fires; cluster falls through to committing_timeout degraded-mode WARN",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "ha->n_peers was set to candidates_count (3, total including self) in ha_start_election_async. ha_check_majority_convergence loops i=0..n_peers-1 checking standby_converged[], but standby_converged[] is indexed by votes_idx (relative, self excluded: 0..n_other-1). With n_peers=3, it checked standby_converged[2] which is never set, so n_converged (2) < n_peers (3) always \u2014 majority convergence path could never succeed.",
|
|
"fix": "Changed ha->n_peers = n_peers to ha->n_peers = n_other (= n_peers-1 = other-node count). Moved the assignment after n_other is computed. ha_repl_ack_received quorum formula (ha->n_peers+2)/2 still yields correct majority for both old and new value.",
|
|
"tags": [
|
|
"ha",
|
|
"majority-convergence",
|
|
"n_peers",
|
|
"off-by-one",
|
|
"integration-test"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-05T06:50:00Z"
|
|
},
|
|
{
|
|
"id": "bug-326",
|
|
"timestamp": "2026-06-06T11:06:46.509Z",
|
|
"error_message": "Wrong reference: DEBUG2 should be INFO",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Used \"DEBUG2\" instead of \"INFO\"",
|
|
"fix": "Changed DEBUG2 \u2192 INFO",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-06T11:06:46.509Z"
|
|
},
|
|
{
|
|
"id": "bug-327",
|
|
"timestamp": "2026-06-06T12:11:21.422Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Had \"HA: heartbeat tick (role=%d, n_standbys=%d)\"",
|
|
"fix": "Changed to \"HA: primary heartbeat armed\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-06T12:11:21.422Z"
|
|
},
|
|
{
|
|
"id": "bug-328",
|
|
"timestamp": "2026-06-06T13:02:49.052Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/delay.c",
|
|
"root_cause": "No early return/throw for edge case: t1_is_ms && t2_is_ms",
|
|
"fix": "Added guard clause: if (t1_is_ms && t2_is_ms)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-06T13:02:49.052Z"
|
|
},
|
|
{
|
|
"id": "bug-329",
|
|
"timestamp": "2026-06-08T13:12:54.436Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/raft-library/research.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-08T13:12:54.436Z"
|
|
},
|
|
{
|
|
"id": "bug-334",
|
|
"timestamp": "2026-06-09T12:56:11.095Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Condition was: if (my_role == CTRL_STANDBY && ha_heartbeat_is_fresh(h)",
|
|
"fix": "Changed to: if (my_role == CTRL_STANDBY && ha->primary_ctrl_fd >= )",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-09T12:56:11.095Z"
|
|
},
|
|
{
|
|
"id": "bug-335",
|
|
"timestamp": "2026-06-09T00:00:00Z",
|
|
"error_message": "UPDATE_RESVALS dequeue writes worker resval at index 0 unconditionally instead of resolving resource idx by name",
|
|
"file": "src/scheduler/src/scheduler.c",
|
|
"root_cause": "zarray_put(&w->resvals, 0, rv->val) hardcodes index 0; worker resvals are indexed by resource idx (see schedobj.c:291)",
|
|
"fix": "FIXED 2026-06-10: UPDATE_RESVALS now resolves rv->name via key_find on sched->resmgr and writes to r->idx (matching UPDATE_RESVALS_FULL pattern) instead of hardcoding index 0.",
|
|
"tags": [
|
|
"scheduler",
|
|
"resvals",
|
|
"latent-bug",
|
|
"gap-analysis",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-10T17:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-336",
|
|
"timestamp": "2026-06-09T00:00:00Z",
|
|
"error_message": "XCE_SCHED_OP_UPDATE_RESOURCES cannot update existing resources; makeResource returns NULL/EEXIST and return value is silently ignored",
|
|
"file": "src/scheduler/src/scheduler.c",
|
|
"root_cause": "makeResource_ in src/lib/resobj.c rejects duplicates with EEXIST; dequeue case ignores NULL return, so 'add or update' (EARS-UB-1.1) is only 'add'",
|
|
"fix": "FIXED 2026-06-10: UPDATE_RESOURCES now checks makeResource return; on NULL (EEXIST) looks up existing resource by name and updates valtype/ordtype/flags/interval fields in place (add-or-update semantics).",
|
|
"tags": [
|
|
"scheduler",
|
|
"resources",
|
|
"latent-bug",
|
|
"gap-analysis",
|
|
"silent-error",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-10T17:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-337",
|
|
"timestamp": "2026-06-09T00:02:00Z",
|
|
"error_message": "Vote-deny gate inert: ha_heartbeat_is_fresh reads ha->last_heartbeat which has no production writer after the liveness refactor",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "ha-heartbeat-liveness refactor moved activity tracking to ha->last_activity but ha_heartbeat_is_fresh (ha.c:1762) still reads the orphaned last_heartbeat timespec; only tests write it, so freshness is always stale after ~heartbeat_timeout_ms of uptime and standbys grant votes despite a live primary (gates at ha.c:214 and ha.c:1841)",
|
|
"fix": "FIXED 2026-06-09: ha_heartbeat_is_fresh now reads ha->last_activity (returns 0 when last_activity==0); dead last_heartbeat field removed from ha_state_t; test_ha_vote_gate.c helper rewritten as set_last_activity_age and fresh/stale tests now also set primary_ctrl_fd. All tests green.",
|
|
"tags": [
|
|
"ha",
|
|
"heartbeat",
|
|
"liveness",
|
|
"vote-gate",
|
|
"dead-field",
|
|
"gap-analysis"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-09T17:30:00Z"
|
|
},
|
|
{
|
|
"id": "bug-338",
|
|
"timestamp": "2026-06-09T00:00:00Z",
|
|
"error_message": "controller_unit_test: test_vote_granted_to_same_candidate_same_term FAIL (Expected 1 Was 0); test_standby_fresh_heartbeat_denies_vote_request FAIL (Expected 0 Was 1, Req 6.2)",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Uncommitted handle_request_vote changes: (1) duplicate-vote deny made candidate-agnostic (denies same-candidate idempotent re-grant, diverging from raft.c which keeps re-grant); (2) STANDBY vote deny now requires primary_ctrl_fd >= 0, tests use ha_init default fd=-1",
|
|
"fix": "FIXED 2026-06-09: handle_request_vote Req 2.6 check restored to same-candidate idempotent re-grant (deny only when voted_for_name differs from candidate_id), matching raft.c; test_standby_fresh_heartbeat_denies_vote_request updated to set primary_ctrl_fd=999. Also fixed myapp.c leader_known check to treat a vote for myconf->name as a self-vote (production records real name, not the 'self' test placeholder). All tests green.",
|
|
"tags": [
|
|
"ha",
|
|
"election",
|
|
"vote-gate",
|
|
"raft",
|
|
"unit-test",
|
|
"uncommitted-drift",
|
|
"gap-analysis"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-09T17:30:00Z"
|
|
},
|
|
{
|
|
"id": "bug-339",
|
|
"timestamp": "2026-06-09T17:30:00Z",
|
|
"error_message": "After killing the primary in a 3-node controller HA cluster, the two surviving controllers enter an infinite election loop: both only ever raft_cb_become_follower (never become_leader), terms climb in lockstep (4..23), RDHUP -> CTRL_ELECTING -> CTRL_STANDBY repeats forever.",
|
|
"file": "src/controller/ha.c, src/controller/myapp.c, src/controller/testsuite/test_ha_rdhup_integration.c",
|
|
"root_cause": "LSN-source asymmetry between candidate-advertised LSN and voter freshness floor, specific to the RDHUP failover election path. ha_on_primary_ctrl_fd_rdhup advertised c->persist.committed_lsn as the RequestVote last_log_lsn, but a STANDBY never advances persist.committed_lsn (only the primary's commit engine writes it at persist.c:1192). Standbys advance applied_lsn (ha_apply_wal_catchup_entry) and last_known_committed_lsn (heartbeat replies). The voter-side freshness floor (cluster.c OPCode_requestVote) is max(applied_lsn, last_known_committed_lsn) via ha_vote_self_freshness. So once a standby applied any WAL beyond its last snapshot, every surviving standby advertised a stale-low LSN (e.g. 0) while each peer computed a HIGH floor (e.g. 10); the freshness gate cand_lsn < my_lsn tripped on BOTH sides, each denied the other's vote, neither reached quorum (2 of 3), each election timed out -> become_follower -> 10s liveness timeout -> RDHUP -> re-elect at term+1. The boot path (myapp.c:217) already advertised applied_lsn, so cold-boot election worked; only the RDHUP failover path was inconsistent.",
|
|
"fix": "In ha_on_primary_ctrl_fd_rdhup, compute candidate freshness ONCE via ha_vote_self_freshness(ha, config_version_tag, applied_lsn, &cand_tag, &cand_lsn) right after ha->raft_c=c, and use cand_tag/cand_lsn for BOTH the elect_ctx (votes[0].my_tag/my_lsn + self_tag/self_lsn) and the XCE_TESTING ha_rdhup_election_hook args. This makes candidate-advertised LSN identical to the voter-side floor, so for any two nodes A,B: A grants B iff floor_B >= floor_A -> the freshest node is always granted by every peer; equal-floor ties are broken by raft priority delay. Regression test added: test_rdhup_candidate_advertises_freshness_floor_not_stale_committed (applied/learned=10, persist.committed=0 -> asserts advertised my_lsn==10). RED (Was 0) -> GREEN verified. Follow-up: boot election path (myapp.c) also routed through ha_vote_self_freshness (was raw applied_lsn) so both election paths are symmetric with the voter floor.",
|
|
"tags": [
|
|
"guard-clause",
|
|
"c",
|
|
"raft",
|
|
"election-safety",
|
|
"restart",
|
|
"persistence",
|
|
"gap-analysis",
|
|
"ha",
|
|
"election",
|
|
"rdhup",
|
|
"failover",
|
|
"freshness-gate",
|
|
"committed_lsn",
|
|
"applied_lsn",
|
|
"split-vote",
|
|
"infinite-loop"
|
|
],
|
|
"related_bugs": [
|
|
"bug-338"
|
|
],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-15T11:00:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-340",
|
|
"timestamp": "2026-06-10T00:23:21.918Z",
|
|
"error_message": "After kill+RESTART of a controller (ctrl-1), the restarted node loops forever: ha_on_primary_ctrl_fd_rdhup \u2192 CTRL_ELECTING \u2192 raft_cb_become_follower \u2192 CTRL_STANDBY every ~heartbeat_timeout, term climbing unbounded (473+), while ctrl-2 stays PRIMARY at term 3. On ctrl-2: every heartbeat tick logs `xce_encode op 0 (NOP)` then `WARN endpoint_update_epoll rc1=-1 < 0` (netio.c:575) \u2014 a wedged outbound standby endpoint.",
|
|
"file": "src/controller/ha.c, src/controller/testsuite/test_ha_liveness.c",
|
|
"root_cause": "primary_heartbeat_fn never evicted a dead/wedged outbound standby endpoint from ha->standby_endpoints. When a peer is killed/restarted, its outbound ep on the primary wedges: handle_error (netio.c:420) runs iomgr_unmonitor (EPOLL_CTL_DEL, does NOT close the fd) and the err handler may leave the ep in standby_endpoints; epoll_ctl(EPOLL_CTL_MOD) on the DEL'd fd then returns ENOENT (rc1=-1) on every heartbeat enqueue. xce_nop_req still returns >=0 (enqueue ok) so the heartbeat layer never detected the wedge. Critically, primary_heartbeat_fn step 2 (reconnect) treats a peer as 'found' (connected) if ANY ep for it is in standby_endpoints \u2014 so the wedged ep SUPPRESSED reconnection. ctrl-2 therefore never opened a fresh connection to the restarted ctrl-1, never sent a ctrlhello, so ctrl-1 never set primary_ctrl_fd / refreshed last_activity and its liveness watchdog re-elected every heartbeat_timeout forever. (The earlier suspected 'become_follower doesn't reset last_activity' was NOT a bug: ha_arm_heartbeat_timeout_vtask already stamps last_activity=now, so the ~11s period is exactly one full timeout \u2014 confirming the watchdog is correct and the sole cause is the broken channel.)",
|
|
"fix": "In primary_heartbeat_fn (ha.c) step 1, added liveness eviction symmetric with the standby's own liveness poll: for each standby ep, if ep->ts_last_in > 0 (was responsive at least once) AND (now_wall - ep->ts_last_in) > heartbeat_timeout_s, remove it from ha->standby_endpoints (zarray_del, under ha->lock) and collect it; after releasing ha->lock, repl_remove_standby() each evicted ep. Removal is the load-bearing action \u2014 the reconnect scan (step 2) then re-establishes a fresh ctrlhello channel to the restarted peer on this/next tick, and ctrl-1 settles via ha_discover_primary (no term gate, ha.c:3807) \u2192 become_follower \u2192 STANDBY. ts_last_in/ts_last_out are existing endpoint_t fields (wall clock, set in handle_input/handle_output), so no libnetio change. The evicted ep object itself is reclaimed by its err handler when the dead connection finally surfaces an epoll event (bounded leak, consistent with codebase). Eviction keys on ts_last_in>0 so a just-connected joiner (ts_last_in==0) gets grace. Regression tests: test_primary_hb_evicts_silent_standby (RED\u2192GREEN), test_primary_hb_keeps_live_standby, test_primary_hb_keeps_unconfirmed_standby in test_ha_liveness.c.",
|
|
"tags": [
|
|
"logic-fix",
|
|
"c",
|
|
"ha",
|
|
"heartbeat",
|
|
"rejoin",
|
|
"restart",
|
|
"standby-endpoints",
|
|
"reconnect",
|
|
"epoll",
|
|
"liveness",
|
|
"election-loop"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-15T15:00:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-341",
|
|
"timestamp": "2026-06-10T00:23:52.563Z",
|
|
"error_message": "Wrong reference: last_heartbeat should be voted_for_term",
|
|
"file": "src/controller/ha.h",
|
|
"root_cause": "Used \"last_heartbeat\" instead of \"voted_for_term\"",
|
|
"fix": "Changed last_heartbeat \u2192 voted_for_term",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-10T00:23:52.563Z"
|
|
},
|
|
{
|
|
"id": "bug-344",
|
|
"timestamp": "2026-06-10T00:32:34.054Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "../../../../../claude/.claude/projects/-home-rshen-projects-xce-xce/memory/project_ha_bootstrap_progress.md",
|
|
"root_cause": "Had `ha->last_heartbeat`",
|
|
"fix": "Changed to `ha->last_activity`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-10T00:32:34.054Z"
|
|
},
|
|
{
|
|
"id": "bug-349",
|
|
"timestamp": "2026-06-10T01:39:19.368Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/request.c",
|
|
"root_cause": "No early return/throw for edge case: l.p.type == CAPN_NULL",
|
|
"fix": "Added guard clause: if (l.p.type == CAPN_NULL)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-10T01:39:19.368Z"
|
|
},
|
|
{
|
|
"id": "bug-350",
|
|
"timestamp": "2026-06-10T01:39:31.683Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/lib/request.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: if (req->body_which == Request_body_walcatchupentrymsg; && req->body.walcatchupentrymsg != NULL) { | Also: /* wal_entry_to_wire: fill a wire WalCatchupEntry from a C e; * fields and raw payload bytes. Sub-entry nesting is one le",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-10T01:40:14.312Z"
|
|
},
|
|
{
|
|
"id": "bug-351",
|
|
"timestamp": "2026-06-09T00:00:00Z",
|
|
"error_message": "request.c: passing argument 'from' of xce_wal_batch_encode_raw / xce_snapshot_chunk_encode_raw from incompatible pointer type (xce_peerinfo_t** vs xce_peerinfo_t*)",
|
|
"file": "src/lib/request.c",
|
|
"root_cause": "ep->peer is already xce_peerinfo_t* (netio.h endpoint struct); call sites passed &ep->peer producing xce_peerinfo_t**",
|
|
"fix": "Dropped the & at both call sites (xce_wal_batch_req_raw line 547, xce_snapshot_chunk_req_raw line 633) to pass ep->peer directly",
|
|
"tags": [
|
|
"build-failure",
|
|
"pointer-type",
|
|
"c",
|
|
"request.c",
|
|
"ha-replication"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-09T00:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-352",
|
|
"timestamp": "2026-06-10T01:46:28.589Z",
|
|
"error_message": "ASAN heap-use-after-free in free_packet (netio.c:333) via endpoint_fini <- raft_cb_become_follower (loser path) <- raft_on_vote_reply; election loser crashes on vote-reply processing",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "vote_reply_decode_and_dispatch took pkt = ep->fsm_in.pkt and freed it WITHOUT clearing ep->fsm_in.pkt; vote_reply_dispatch can synchronously reach raft_cb_become_follower -> endpoint_fini(ep), which frees the stale fsm_in.pkt again. repl_ack_decode_and_dispatch already nulls the pointer (correct pattern); the vote-reply path missed it.",
|
|
"fix": "FIXED 2026-06-10: ep->fsm_in.pkt = NULL immediately after taking ownership in vote_reply_decode_and_dispatch (ha.c:2413), matching repl_ack_decode_and_dispatch. Found by task 7.7 E2E (3-node deploy, election loser crash).",
|
|
"tags": [
|
|
"c",
|
|
"ha",
|
|
"election",
|
|
"asan",
|
|
"use-after-free",
|
|
"packet-ownership",
|
|
"netio",
|
|
"e2e"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-10T02:10:00Z"
|
|
},
|
|
{
|
|
"id": "bug-353",
|
|
"timestamp": "2026-06-10T01:46:45.213Z",
|
|
"error_message": "Config push silently rejected when standby is in CTRL_ELECTING: ha_dispatch_gate only allows requestVote/probeConfigTag, returning -E_XCE_ERR_NOT_READY for all other opcodes. If liveness poll fires during election window, any incoming config push is discarded.",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "CTRL_ELECTING gate in ha_dispatch_gate (ha.c:1464) allowed only vote/probe opcodes. Config push from primary arriving during the ELECTING window (after liveness-poll-triggered failover, before election result) was rejected with -E_XCE_ERR_NOT_READY (10013). Standby never saved config, leaving conf dir empty.",
|
|
"fix": "FIXED 2026-06-10: Added OPCode_hello, OPCode_nop, OPCode_replConfigPush, OPCode_walCatchupEntry, OPCode_snapshotTransfer to CTRL_ELECTING allowlist. A campaigning node must accept replication from the current primary to stay current for both win and loss paths. Controller suite green.",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c",
|
|
"ha",
|
|
"dispatch-gate",
|
|
"election",
|
|
"config-replication",
|
|
"silent-failure"
|
|
],
|
|
"related_bugs": [
|
|
"bug-335",
|
|
"bug-336"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-10T17:30:00Z"
|
|
},
|
|
{
|
|
"id": "bug-358",
|
|
"timestamp": "2026-06-10T03:55:44.698Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/config_repl.c",
|
|
"root_cause": "Condition was: if (!rcpr->raw_bytes || rcpr->raw_bytes_len == 0 || !r)",
|
|
"fix": "Changed to: if ((ctrl_role_t)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-10T03:55:44.698Z"
|
|
},
|
|
{
|
|
"id": "bug-359",
|
|
"timestamp": "2026-06-10T04:16:25.052Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/scheduler/src/scheduler.c",
|
|
"root_cause": "No early return/throw for edge case: r == NULL",
|
|
"fix": "Added guard clause: if (r == NULL)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-10T04:16:28.320Z"
|
|
},
|
|
{
|
|
"id": "bug-361",
|
|
"timestamp": "2026-06-10T04:47:09.048Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Condition was: if (opcode == OPCode_requestVote || opcode == OPCode_p)",
|
|
"fix": "Changed to: if (opcode == OPCode_requestVote ||\n opcode)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-10T04:47:09.048Z"
|
|
},
|
|
{
|
|
"id": "bug-364",
|
|
"timestamp": "2026-06-10T06:26:24.340Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/CLAUDE.md",
|
|
"root_cause": "Had `CTRL_ELECTING`",
|
|
"fix": "Changed to `CTRL_INIT`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-10T06:26:24.340Z"
|
|
},
|
|
{
|
|
"id": "bug-367",
|
|
"timestamp": "2026-06-10T07:56:21.347Z",
|
|
"error_message": "Missing error handling in XCE_TESTING",
|
|
"file": "src/controller/testsuite/test_repl_unit.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: /* =========================================================; * Task 1.1: repl_broadcast send path tests",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-10T07:57:02.036Z"
|
|
},
|
|
{
|
|
"id": "bug-368",
|
|
"timestamp": "2026-06-10T07:57:40.792Z",
|
|
"error_message": "Wrong reference: WAL_JOB should be WAL_JOB_SUBMIT",
|
|
"file": "src/controller/testsuite/test_repl_unit.c",
|
|
"root_cause": "Used \"WAL_JOB\" instead of \"WAL_JOB_SUBMIT\"",
|
|
"fix": "Changed WAL_JOB \u2192 WAL_JOB_SUBMIT",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-10T07:57:40.792Z"
|
|
},
|
|
{
|
|
"id": "bug-371",
|
|
"timestamp": "2026-06-10T07:59:24.268Z",
|
|
"error_message": "Wrong reference: DEBUG3 should be TRACE",
|
|
"file": "src/controller/repl.c",
|
|
"root_cause": "Used \"DEBUG3\" instead of \"TRACE\"",
|
|
"fix": "Changed DEBUG3 \u2192 TRACE",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-10T07:59:24.268Z"
|
|
},
|
|
{
|
|
"id": "bug-373",
|
|
"timestamp": "2026-06-10T08:45:30.400Z",
|
|
"error_message": "Wrong reference: request should be ep",
|
|
"file": "src/controller/cluster.c",
|
|
"root_cause": "Used \"request\" instead of \"ep\"",
|
|
"fix": "Changed request \u2192 ep",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-10T08:45:30.400Z"
|
|
},
|
|
{
|
|
"id": "bug-374",
|
|
"timestamp": "2026-06-10T08:47:48.296Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/controller/testsuite/test_ha_role.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: /* Task 3.3 (ha-wal-replication): dispatch gate standby-role; RUN_TEST(test_dispatch_gate_allows_wal_catchup_in_standby_ro",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-10T08:48:00.267Z"
|
|
},
|
|
{
|
|
"id": "bug-376",
|
|
"timestamp": "2026-06-10T09:17:35.218Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Condition was: if (opcode == OPCode_nop)",
|
|
"fix": "Changed to: if (rep_s.data_which == RequestReply_data_walackreplym)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-10T09:17:35.218Z"
|
|
},
|
|
{
|
|
"id": "bug-378",
|
|
"timestamp": "2026-06-10T10:02:00.000Z",
|
|
"error_message": "AddressSanitizer: global-buffer-overflow in dataq_enq via xce_wal_batch_req_raw <- repl_broadcast <- persist_wal_async",
|
|
"file": "src/controller/testsuite/test_p2_integration.c",
|
|
"root_cause": "Tests 8 and 9 declared ep_a/ep_b/g_ep9_a/g_ep9_b as 'static int' (4 bytes) and passed them to repl_add_standby without (void*) cast. repl_broadcast then called xce_wal_batch_req_raw(s->ep, ...) using the stored int* as a real network endpoint, causing an 8-byte read past the 4-byte int. Neither test installed repl_broadcast_send_hook to intercept the call.",
|
|
"fix": "Added #include typemap.h; added extern repl_broadcast_send_hook declaration guarded by XCE_TESTING; added p2_drop_send_hook no-op; installed hook around persist_wal_sync_append in tests 8 and 9; fixed missing (void*) casts on all four ep variables",
|
|
"tags": [
|
|
"asan",
|
|
"global-buffer-overflow",
|
|
"repl_broadcast",
|
|
"unit-test",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-10T10:02:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-380",
|
|
"timestamp": "2026-06-10T10:37:21.924Z",
|
|
"error_message": "Wrong reference: test_catchup_full_lifecycle_integration should be test_single_node_committed_lsn_unchanged",
|
|
"file": "src/controller/testsuite/test_p2_integration.c",
|
|
"root_cause": "Used \"test_catchup_full_lifecycle_integration\" instead of \"test_single_node_committed_lsn_unchanged\"",
|
|
"fix": "Changed test_catchup_full_lifecycle_integration \u2192 test_single_node_committed_lsn_unchanged",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-10T10:37:21.924Z"
|
|
},
|
|
{
|
|
"id": "bug-382",
|
|
"timestamp": "2026-06-10T11:54:19.749Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/ha-wal-replication/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-10T11:54:19.749Z"
|
|
},
|
|
{
|
|
"id": "bug-384",
|
|
"timestamp": "2026-06-10T14:13:01.581Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/steering/tech.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-10T14:13:01.581Z"
|
|
},
|
|
{
|
|
"id": "bug-386",
|
|
"timestamp": "2026-06-10T14:43:53.161Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "CLAUDE.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-10T14:43:53.161Z"
|
|
},
|
|
{
|
|
"id": "bug-388",
|
|
"timestamp": "2026-06-10T14:54:18.503Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/CLAUDE.md",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-10T14:54:53.661Z"
|
|
},
|
|
{
|
|
"id": "bug-389",
|
|
"timestamp": "2026-06-11T02:46:08.749Z",
|
|
"error_message": "Wrong reference: signal should be stdio",
|
|
"file": "src/lib/delay.c",
|
|
"root_cause": "Used \"signal\" instead of \"stdio\"",
|
|
"fix": "Changed signal \u2192 stdio",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-11T02:46:08.749Z"
|
|
},
|
|
{
|
|
"id": "bug-391",
|
|
"timestamp": "2026-06-11T03:41:14.912Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: !ha",
|
|
"fix": "Added guard clause: if (!ha)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-11T03:41:14.912Z"
|
|
},
|
|
{
|
|
"id": "bug-392",
|
|
"timestamp": "2026-06-11T03:46:02.642Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "No early return/throw for edge case: sync_rc_out",
|
|
"fix": "Added guard clause: if (sync_rc_out)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-11T03:46:02.642Z"
|
|
},
|
|
{
|
|
"id": "bug-394",
|
|
"timestamp": "2026-06-11T05:09:37.037Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-consistency-invariants/research.md",
|
|
"root_cause": "Had `persist_truncate_wal_above`",
|
|
"fix": "Changed to `restore_job`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-11T05:09:37.037Z"
|
|
},
|
|
{
|
|
"id": "bug-396",
|
|
"timestamp": "2026-06-10T22:45:00-07:00",
|
|
"error_message": "Worker job state notifications (OPCode_notify) are permanently lost when the controller dispatch gate rejects them (quorum loss / COMMITTING window): worker never reads replies, never retries, no rejoin resync",
|
|
"file": "src/worker/src/controller_connector.c, src/lib/xceapi.c, src/controller/cluster.c",
|
|
"root_cause": "xce_notify is enqueue-and-forget (no cbuf_get); error replies dropped via cbuf_tryput -EAGAIN (xcectx.c:304); xcecd_job_finished return ignored (FIXME at xcecd_worker_utils.c:298); xce_join_req carries no running-job state so rejoin cannot resync",
|
|
"fix": "FIXED 2026-06-12 (ha-commit-barrier-rollout tasks 1.2+4.2+4.3): dispatch gate admits fact opcodes (notify/update/setpreason/clrpreason) without write quorum (ha.c CTRL_PRIMARY allowlist); facts append via RETAIN (log-is-the-queue, no timeout) and commit when quorum returns. End-to-end retention proof: test_fact_retention_across_quorum_loss. Worker-side redelivery gap remains (worker-rejoin-resync backlog covers disconnect windows).",
|
|
"tags": [
|
|
"ha",
|
|
"notify",
|
|
"silent-data-loss",
|
|
"worker",
|
|
"quorum",
|
|
"ha-consistency-invariants"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-12"
|
|
},
|
|
{
|
|
"id": "bug-398",
|
|
"timestamp": "2026-06-11T06:35:26.288Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-consistency-invariants/research.md",
|
|
"root_cause": "Had `restore_job`",
|
|
"fix": "Changed to \"irrevocable\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-11T06:35:26.288Z"
|
|
},
|
|
{
|
|
"id": "bug-399",
|
|
"timestamp": "2026-06-11T06:43:14.709Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-consistency-invariants/research.md",
|
|
"root_cause": "Had 't span syscalls and degrade to serial mode), C ec",
|
|
"fix": "Changed to 't span syscalls), C ecosystem dead (libitm unmain",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-11T06:43:14.709Z"
|
|
},
|
|
{
|
|
"id": "bug-400",
|
|
"timestamp": "2026-06-11T07:23:53.901Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-consistency-invariants/research.md",
|
|
"root_cause": "Had \"return quickly\"",
|
|
"fix": "Changed to `--vcpus`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-11T07:23:53.901Z"
|
|
},
|
|
{
|
|
"id": "bug-401",
|
|
"timestamp": "2026-06-11T07:47:34.756Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-consistency-invariants/research.md",
|
|
"root_cause": "Had `mark_job_*`",
|
|
"fix": "Changed to \"pending facts\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-11T07:47:34.756Z"
|
|
},
|
|
{
|
|
"id": "bug-403",
|
|
"timestamp": "2026-06-11T08:34:47.868Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/ha-consistency-invariants/design.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-11T08:34:47.868Z"
|
|
},
|
|
{
|
|
"id": "bug-405",
|
|
"timestamp": "2026-06-11T09:47:16.750Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-single-leader-role/design.md",
|
|
"root_cause": "Had `writable_lsn`",
|
|
"fix": "Changed to 's \"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-11T09:47:16.750Z"
|
|
},
|
|
{
|
|
"id": "bug-406",
|
|
"timestamp": "2026-06-11T09:49:04.296Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-single-leader-role/tasks.md",
|
|
"root_cause": "Had \" --exclude-dir=.git --exclude-dir=.kiro --exclude",
|
|
"fix": "Changed to \" --exclude-dir=.git --exclude-dir=specs --exclude",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-11T09:49:04.296Z"
|
|
},
|
|
{
|
|
"id": "bug-407",
|
|
"timestamp": "2026-06-11T10:01:15.181Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-commit-barrier-rollout/design.md",
|
|
"root_cause": "Had `repl.h`",
|
|
"fix": "Changed to `entry_lsn`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-11T10:01:15.181Z"
|
|
},
|
|
{
|
|
"id": "bug-408",
|
|
"timestamp": "2026-06-11T10:01:39.424Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-convergence-recovery/tasks.md",
|
|
"root_cause": "Had `-XCE_ERR_NOT_READY`",
|
|
"fix": "Changed to `OPCode_notify`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-11T10:02:02.349Z"
|
|
},
|
|
{
|
|
"id": "bug-410",
|
|
"timestamp": "2026-06-11T13:30:00Z",
|
|
"error_message": "test_commit_engine fixture: Expected 0 Was 1 from repl_add_standby",
|
|
"file": "src/controller/testsuite/test_commit_engine.c",
|
|
"root_cause": "repl_add_standby returns the slot index (>=0) on success, not 0 \u2014 second add legitimately returns 1",
|
|
"fix": "fixture asserts TEST_ASSERT_EQUAL_INT(i, repl_add_standby(...)) per standby slot",
|
|
"tags": [
|
|
"controller",
|
|
"testsuite",
|
|
"repl",
|
|
"return-convention"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-11T13:30:00Z"
|
|
},
|
|
{
|
|
"id": "bug-411",
|
|
"timestamp": "2026-06-11T13:35:00Z",
|
|
"error_message": "3 pre-existing controller testsuite failures masked by exit code 0: test_committed_lsn_does_not_advance_on_timeout (-110), test_repl_ack_after_promote_gate_allows_jobsub (-10013), test_rdhup_primary_dispatch_gate_opens (-10013)",
|
|
"file": "src/controller/testsuite/controller_test.c",
|
|
"root_cause": "each test group calls UNITY_BEGIN/UNITY_END internally, resetting Unity counters \u2014 main()'s final UNITY_END returns 0 unless the LAST group fails, so meson reported the suite green despite 3 real failures; Unity also misattributes failure FILE names to whichever file's UNITY_BEGIN ran (e.g. reports test_repl_unit.c for a test living in test_p2_integration.c)",
|
|
"fix": "not fixed (out of task 1.1 boundary) \u2014 documented; failures exist identically on baseline without ha-commit-engine changes (verified by stash/rebuild). persist_wal_sync_append returns -ETIMEDOUT while the test expects rc==0 with sync_rc==-ETIMEDOUT; the two gate tests fail ha_has_write_quorum (standby_endpoints empty with n_peers=2)",
|
|
"tags": [
|
|
"controller",
|
|
"testsuite",
|
|
"unity",
|
|
"exit-code",
|
|
"pre-existing",
|
|
"ha"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-11T13:35:00Z"
|
|
},
|
|
{
|
|
"id": "bug-413",
|
|
"timestamp": "2026-06-11T15:28:35.990Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/controller/testsuite/test_commit_engine.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: /* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550; * Task 3.1 \u2014 membership re-evaluation (commit_on_membership_ | Also: /* Task 3.1 \u2014 membership re-evaluation */; RUN_TEST(test_catchup_standby_ack_does_not_count_toward_pend",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-11T15:29:25.430Z"
|
|
},
|
|
{
|
|
"id": "bug-420",
|
|
"timestamp": "2026-06-11T16:19:51.195Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/controller/testsuite/test_commit_engine.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: /* Task 4.2 \u2014 wired gate: registry truth at ha_dispatch_gate; RUN_TEST(test_gate_wired_registry_catchup_standby_rejects_th",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-11T16:20:05.714Z"
|
|
},
|
|
{
|
|
"id": "bug-421",
|
|
"timestamp": "2026-06-11T16:23:46.118Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/repl.c",
|
|
"root_cause": "No early return/throw for edge case: !r",
|
|
"fix": "Added guard clause: if (!r)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-11T16:23:46.118Z"
|
|
},
|
|
{
|
|
"id": "bug-423",
|
|
"timestamp": "2026-06-11T22:39:24.704Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/controller/testsuite/test_commit_engine.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: /* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550; * Task 5.1 \u2014 integration: ACK feed and the job-submit sync-a | Also: #include \"typemap.h\" /* wal_catchup_entry_t (task 5; #include \"wal_types.h\" /* WAL_JOB_SUBMIT (task 5.1 sy",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-11T22:40:45.169Z"
|
|
},
|
|
{
|
|
"id": "bug-424",
|
|
"timestamp": "2026-06-11T23:08:49.909Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/ha-commit-engine/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-11T23:08:49.909Z"
|
|
},
|
|
{
|
|
"id": "bug-425",
|
|
"timestamp": "2026-06-11T23:15:25.014Z",
|
|
"error_message": "Wrong return value",
|
|
"file": "src/controller/repl.c",
|
|
"root_cause": "Was returning: idx;",
|
|
"fix": "Now returns: * above mutates nothing, so it deliberately skips ",
|
|
"tags": [
|
|
"auto-detected",
|
|
"return-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-11T23:15:25.014Z"
|
|
},
|
|
{
|
|
"id": "bug-428",
|
|
"timestamp": "2026-06-11T23:43:45.216Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/include/xce/cluster_def.h",
|
|
"root_cause": "Had \"ha.h\"",
|
|
"fix": "Changed to \"commit.h\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-11T23:43:45.216Z"
|
|
},
|
|
{
|
|
"id": "bug-429",
|
|
"timestamp": "2026-06-11T23:44:16.357Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/cluster.c",
|
|
"root_cause": "Condition was: if (ha_is_primary(&c->ha)",
|
|
"fix": "Changed to: if (c->commit.p == NULL)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-11T23:44:16.357Z"
|
|
},
|
|
{
|
|
"id": "bug-431",
|
|
"timestamp": "2026-06-11T23:45:16.518Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "Had \"xce/types.h\"",
|
|
"fix": "Changed to \"xce/errnox.h\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-11T23:45:16.518Z"
|
|
},
|
|
{
|
|
"id": "bug-432",
|
|
"timestamp": "2026-06-11T23:45:42.031Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_p2_integration.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-11T23:45:42.031Z"
|
|
},
|
|
{
|
|
"id": "bug-433",
|
|
"timestamp": "2026-06-11T23:45:51.649Z",
|
|
"error_message": "Wrong reference: test_single_node_committed_lsn_unchanged should be test_single_node_committed_lsn_advances",
|
|
"file": "src/controller/testsuite/test_p2_integration.c",
|
|
"root_cause": "Used \"test_single_node_committed_lsn_unchanged\" instead of \"test_single_node_committed_lsn_advances\"",
|
|
"fix": "Changed test_single_node_committed_lsn_unchanged \u2192 test_single_node_committed_lsn_advances",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-11T23:45:51.649Z"
|
|
},
|
|
{
|
|
"id": "bug-434",
|
|
"timestamp": "2026-06-12T00:23:08.815Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_p2_integration.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-12T00:23:08.815Z"
|
|
},
|
|
{
|
|
"id": "bug-435",
|
|
"timestamp": "2026-06-11T00:00:00Z",
|
|
"error_message": "test_committed_lsn_does_not_advance_on_timeout: Expected 0 Was -110 (baseline failure, masked by bug-411)",
|
|
"file": "src/controller/testsuite/test_p2_integration.c",
|
|
"root_cause": "Stale test expectation: pinned the old accept-on-timeout contract (rc==0 + sync_rc=-ETIMEDOUT advisory). ha-commit-engine made persist_wal_sync_append reject-on-timeout (returns -ETIMEDOUT, Req 2.1/4.4). Fixture was also engine-less (deprecated ce==NULL legacy path).",
|
|
"fix": "Updated expectation to rc==-ETIMEDOUT and wired a commit engine (n_peers=3) with a priming async append so the sync entry lands at LSN 1 on the engine path; kept the committed_lsn-unmoved assertion.",
|
|
"tags": [
|
|
"ha-commit-engine",
|
|
"task-6.1",
|
|
"stale-expectation",
|
|
"unity-misattribution"
|
|
],
|
|
"related_bugs": [
|
|
"bug-411"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-11T00:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-436",
|
|
"timestamp": "2026-06-11T00:00:00Z",
|
|
"error_message": "test_repl_ack_after_promote_gate_allows_jobsub / test_rdhup_primary_dispatch_gate_opens: Expected 0 Was -10013 (NOT_READY; baseline failures, masked by bug-411)",
|
|
"file": "src/controller/testsuite/test_ha_repl_ack.c, src/controller/testsuite/test_ha_rdhup_integration.c",
|
|
"root_cause": "CTRL_PRIMARY dispatch gate now requires write quorum (>= n_peers/2 connected standbys). Fixtures promote via a standby ACK but never register the connected standby; legacy fallback counts ha->standby_endpoints (NULL -> 0). In the rdhup test ha_on_primary_ctrl_fd_rdhup also overwrites ha->n_peers=1 with candidates_count=2 (ha.c:3484).",
|
|
"fix": "Populated standby_endpoints with one endpoint (the ACKing standby) in both fixtures so quorum legitimately holds on a healthy primary; gate unchanged. Freed the zarray before ha_fini (ha_fini does not own it).",
|
|
"tags": [
|
|
"ha-commit-engine",
|
|
"task-6.1",
|
|
"quorum-gate",
|
|
"fixture-fix"
|
|
],
|
|
"related_bugs": [
|
|
"bug-411"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-11T00:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-437",
|
|
"timestamp": "2026-06-12T00:51:52.673Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/ha-commit-engine/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-12T00:51:52.673Z"
|
|
},
|
|
{
|
|
"id": "bug-438",
|
|
"timestamp": "2026-06-12T03:52:57.142Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'commit.c'",
|
|
"fix": "Changed to 'testsuite/test_commit_barrier_rollout.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-12T03:52:57.142Z"
|
|
},
|
|
{
|
|
"id": "bug-440",
|
|
"timestamp": "2026-06-12T04:18:19.158Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "No early return/throw for edge case: detail == HOOK_DETAIL_WORKER_JOIN ||\n detail == H",
|
|
"fix": "Added guard clause: if (detail == HOOK_DETAIL_WORKER_JOIN ||\n )",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-12T04:18:19.158Z"
|
|
},
|
|
{
|
|
"id": "bug-442",
|
|
"timestamp": "2026-06-12T04:50:32.154Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/testsuite/test_commit_barrier_rollout.c",
|
|
"root_cause": "Had \"xce/types.h\"",
|
|
"fix": "Changed to \"xce/errnox.h\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-12T04:50:32.154Z"
|
|
},
|
|
{
|
|
"id": "bug-443",
|
|
"timestamp": "2026-06-12T05:14:36.392Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "No early return/throw for edge case: p == NULL",
|
|
"fix": "Added guard clause: if (p == NULL)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-12T05:14:36.392Z"
|
|
},
|
|
{
|
|
"id": "bug-445",
|
|
"timestamp": "2026-06-12T09:30:00Z",
|
|
"error_message": "AddressSanitizer SEGV in hash_string via makeResource when running controller_unit_test -t test_commit_barrier_reply standalone",
|
|
"file": "src/controller/testsuite/test_commit_barrier_reply.c",
|
|
"root_cause": "Global xstring table uninitialised in standalone runs: makeString() returns NULL, resobj name becomes NULL, key_add hashes NULL. In full-suite runs test_worker_join.c:520 initialises the table unguarded, so the bug only appears with -t selection.",
|
|
"fix": "Probe makeString(\"cbrp-probe\") in the group entry; call xstring_table_init(139) only when the probe returns NULL (avoids double init in full-suite order).",
|
|
"tags": [
|
|
"testsuite",
|
|
"xstring",
|
|
"fixture",
|
|
"segv",
|
|
"ha-commit-barrier-rollout"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-12T09:30:00Z"
|
|
},
|
|
{
|
|
"id": "bug-446",
|
|
"timestamp": "2026-06-12T09:30:00Z",
|
|
"error_message": "makeJob() returns NULL (Expected Non-NULL) in commit-barrier reply fixture",
|
|
"file": "src/controller/testsuite/test_commit_barrier_reply.c",
|
|
"root_cause": "job_init (lib/jobj.c) returns -EINVAL when xce_job_t.submit == NULL, and makeJobsub requires job_obj_init() module tables which no controller test group initialises.",
|
|
"fix": "Fixture calls job_obj_init(64, 64) once per process (static guard) and provides a zeroed static job_submit_data_t as jdef.submit.",
|
|
"tags": [
|
|
"testsuite",
|
|
"jobj",
|
|
"fixture",
|
|
"ha-commit-barrier-rollout"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-12T09:30:00Z"
|
|
},
|
|
{
|
|
"id": "bug-447",
|
|
"timestamp": "2026-06-12T09:30:00Z",
|
|
"error_message": "queue_ctrl/worker_ctrl append NO WAL entry and reply status 1 on success; job_ctrl also returns 1 (key_find found-rc leak)",
|
|
"file": "src/controller/queue.c",
|
|
"root_cause": "key_find (xkvmgr_find, lib/kvmgr.c:130-151) returns 1 when the key is found. queue_ctrl (queue.c:60), worker_ctrl (worker.c:643) and job_ctrl (job.c:314) store it in rc and never reset it: the 'if (rc == 0)' AFTER_EVENT hook gate is skipped (no WAL_QUEUE_CTRL / WAL_WORKER_CTRL append on the found path) and the requester reply carries status 1 instead of 0. Production gap discovered by task-3.1 RED tests; queue/host control state changes are currently never persisted or replicated.",
|
|
"fix": "FIXED (task 3.2, 2026-06-12): normalized the key_find found-rc to 0 in queue_ctrl (queue.c), worker_ctrl (worker.c) and job_ctrl (job.c) after the miss/-ENOENT checks, so the AFTER_EVENT hook gate fires (WAL append + replication) and the handlers' commit-barrier pattern sees 0. Handlers do_jobcontrol_op/do_queuecontrol_op/do_hostcontrol_op now run persist_commit_barrier(&c->persist, 0) on rc==0 before replying; handle_worker_join barriers between AFTER_EVENT and the success reply. All 12 test_commit_barrier_reply tests PASS; full controller suite 0 FAIL.",
|
|
"tags": [
|
|
"production-gap",
|
|
"queue_ctrl",
|
|
"worker_ctrl",
|
|
"job_ctrl",
|
|
"key_find",
|
|
"wal",
|
|
"ha-commit-barrier-rollout",
|
|
"red-finding"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-12T11:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-448",
|
|
"timestamp": "2026-06-12T10:05:12.464Z",
|
|
"error_message": "job_ctrl reference leak: reference(j) taken at job.c:317 but normal exit path (job.c:444-446) never calls dereference(j); only the workermgr-miss error path releases it",
|
|
"file": "src/controller/job.c",
|
|
"root_cause": "asymmetric reference/dereference across exit paths, predates ha-commit-barrier-rollout",
|
|
"fix": "NOT YET FIXED - discovered by task 3.2 adversarial review; add dereference(j) on the normal exit path",
|
|
"tags": [
|
|
"wrong-value",
|
|
"c",
|
|
"controller",
|
|
"job",
|
|
"refcount",
|
|
"leak",
|
|
"pre-existing"
|
|
],
|
|
"related_bugs": [
|
|
"bug-447"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-12T10:30:00-07:00"
|
|
},
|
|
{
|
|
"id": "bug-451",
|
|
"timestamp": "2026-06-12T11:05:00-07:00",
|
|
"error_message": "va_list type confusion: WAL_JOB_RUSAGE hook payload reads job_t fields from an xce_job_rusages_t*",
|
|
"file": "src/controller/job.c (caller) / src/controller/persist.c (consumer)",
|
|
"root_cause": "update_job_rusages fires AFTER_EVENT HOOK_DETAIL_JOB_RUSAGE_UPDATE with (cluster_t*, xce_job_rusages_t*) at job.c:1015-1016, but persist_job_hook_fun's default arm (persist.c:1354-1359) reads the second vararg as job_t* and dereferences j->job.state at offset 56 == sizeof(xce_job_rusages_t) \u2014 an out-of-bounds read on an exactly-sized allocation; the WAL_JOB_RUSAGE payload state field is garbage (jobid at offset 0 lines up by accident)",
|
|
"fix": "FIXED (TDD RED->GREEN). Added a dedicated HOOK_DETAIL_JOB_RUSAGE_UPDATE arm to persist_job_hook_fun (persist.c) that reads the real xce_job_rusages_t* payload and looks the job up by jobid via the cluster_t* the hook already carries (c->jobmgr), instead of falling through to the default arm that misread it as a job_t*. Fix candidate (1) from the original investigation was used -- a dedicated RUSAGE arm -- not candidate (2) (firing the hook with (c, j) like other job hooks), because sched_job_rusage_update_fun/apiserver_job_rusage_update_fun (this hook's other two listeners, sched.c/apiserver.c) genuinely need the full rusages payload (pids/pgids/usages), so changing what job.c fires would have broken them. Regression test (test_commit_barrier_reply.c's test_update_op_rusage_receipt_reply_facts_retained, extended): drives the real do_update_op/update_job_rusages call path and scans the resulting WAL_JOB_RUSAGE entry, asserting state == JOB_STAT_PEND (the job's real state) -- RED under the old code (read back 0, the zeroed padding past xce_job_rusages_t's end), GREEN under the fix. Also fixed test_persist_hooks.c's test_job_hook_rusage_writes_wal_entry, which previously masked the bug by passing a job_t* stub instead of the real xce_job_rusages_t* shape -- now builds a minimal real cluster+jobmgr+job and passes the correct payload type; added a sibling test for the job-not-found graceful-skip path (returns 0, appends nothing, no crash). Full controller_unit_test suite: 1096 tests, 2 pre-existing unrelated failures (test_config_repl.c, filed as bug-1561 -- overlayfs fdatasync artifact, zero diff in that file this session), no regressions.\n\n[Original entry]\nNOT FIXED (discovered while writing task 3.3 receipt-ACK verdict pins; production out of boundary). Test test_update_op_rusage_receipt_reply_facts_retained uses a padded union so the pin stays in-bounds under ASAN without masking the bug; fix candidates: dedicated RUSAGE arm in persist_job_hook_fun reading xce_job_rusages_t*, or fire the hook with (c, j) like the other job hooks",
|
|
"tags": [
|
|
"pre-existing",
|
|
"type-confusion",
|
|
"va_list",
|
|
"wal",
|
|
"rusage",
|
|
"asan",
|
|
"oob-read",
|
|
"ha-commit-barrier-rollout",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-447",
|
|
"bug-448"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-12T11:05:00-07:00"
|
|
},
|
|
{
|
|
"id": "bug-452",
|
|
"timestamp": "2026-06-12T15:03:38.962Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_commit_barrier_reply.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-12T15:03:38.962Z"
|
|
},
|
|
{
|
|
"id": "bug-457",
|
|
"timestamp": "2026-06-13T00:18:17.080Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/config_repl.c",
|
|
"root_cause": "No early return/throw for edge case: !c->ha.standby_endpoints",
|
|
"fix": "Added guard clause: if (!c->ha.standby_endpoints)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T00:18:17.080Z"
|
|
},
|
|
{
|
|
"id": "bug-459",
|
|
"timestamp": "2026-06-13T00:30:00Z",
|
|
"error_message": "configAck quorum fabricated success: counted acked_config_lsn > 0 (any previous upgrade's ack), denominator n_active with no self-count, and n_active==0 short-circuited to success; upgradeConfig also ACKed the admin tool unconditionally and requested restart even when the majority wait timed out (logged-only result)",
|
|
"file": "src/controller/repl.c, src/controller/config_repl.c",
|
|
"root_cause": "legacy connectivity-based counting on the configAck track predated the commit engine's per-push arithmetic; push_config_to_standbys returned the transport push count and only logged the barrier outcome, so do_upgrade_config_with_bytes could not observe failure",
|
|
"fix": "task 5.2: configAck branch counts acked_config_lsn >= push_tag (entry_lsn carries the tag), majority 1+count > n_peers/2 over engine n_peers, n_peers<=1 immediate 0, ce==NULL -EINVAL fail-loud; push_config_to_standbys returns the barrier result (push count via acked_out); do_upgrade_config_with_bytes sends send_upgrade_error and skips success ACK + restart on non-zero; committed_config_tag advance stays success-branch-only",
|
|
"tags": [
|
|
"ha",
|
|
"config-repl",
|
|
"quorum",
|
|
"configAck",
|
|
"commit-barrier",
|
|
"upgradeConfig"
|
|
],
|
|
"related_bugs": [
|
|
"bug-396"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T00:30:00Z"
|
|
},
|
|
{
|
|
"id": "bug-461",
|
|
"timestamp": "2026-06-13T01:11:49.673Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/config_repl.c",
|
|
"root_cause": "Condition was: if (n == 0)",
|
|
"fix": "Changed to: if (n_out)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T01:11:49.673Z"
|
|
},
|
|
{
|
|
"id": "bug-465",
|
|
"timestamp": "2026-06-13T01:30:00Z",
|
|
"error_message": "Config-ACK signal never produced in production: repl_on_config_ack had zero production callers; standby replconfigpushreplymsg silently dropped in repl_ack_decode_and_dispatch (ha.c) and myreq_handler default case (cluster.c) -> every multi-member config upgrade barrier timed out (upgrades bricked)",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "ha-config-bootstrap task 8.1's production ingestion half was never landed; the 5.2 barrier relied on a signal nothing produced (tests injected repl_on_config_ack directly)",
|
|
"fix": "Added replconfigpushreplymsg decode branch in repl_ack_decode_and_dispatch (ha.c) and an OPCode_reply ingestion case in cluster.c myreq_handler, both calling repl_on_config_ack(&c->persist.repl, ep, versionTag); wire-path integration test added (test_config_ack_wire_path_completes_barrier)",
|
|
"tags": [
|
|
"ha",
|
|
"config-repl",
|
|
"barrier",
|
|
"capnp",
|
|
"wire-path",
|
|
"task-5.2"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T01:30:00Z"
|
|
},
|
|
{
|
|
"id": "bug-466",
|
|
"timestamp": "2026-06-13T01:30:00Z",
|
|
"error_message": "Unconditional 500ms config barrier wait in push_config_to_standbys reachable from iomgr epoll thread (ha.c raft_cb_become_leader, ha_dispatch_repl_action_for_standby, legacy election path; join.c controller join) -> blocks all controller I/O; the awaited ACK arrives on the blocked thread (structural deadlock)",
|
|
"file": "src/controller/config_repl.c",
|
|
"root_cause": "task 5.2 made the barrier unconditional inside push_config_to_standbys while best-effort catch-up/election pushes on iomgr-reachable paths still called the same entry",
|
|
"fix": "Split the API: exported transport-only fan-out push_config_transport_only (no barrier, iomgr-safe) and switched all 5 ha.c sites + join.c:187 to it; push_config_to_standbys (transport+barrier) kept for the vtask-context upgrade path only; doc comments updated in config_repl.h",
|
|
"tags": [
|
|
"ha",
|
|
"iomgr",
|
|
"deadlock",
|
|
"config-repl",
|
|
"api-split",
|
|
"task-5.2"
|
|
],
|
|
"related_bugs": [
|
|
"bug-465"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T01:30:00Z"
|
|
},
|
|
{
|
|
"id": "bug-467",
|
|
"timestamp": "2026-06-13T01:38:08.308Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Condition was: if (rep_s.data_which == RequestReply_data_replconfigpu)",
|
|
"fix": "Changed to: if (0 /* REVIEWER RED CHECK */ && rep_s.data_which == )",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-13T01:38:43.310Z"
|
|
},
|
|
{
|
|
"id": "bug-468",
|
|
"timestamp": "2026-06-13T03:56:09.185Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_commit_barrier_reply.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T03:56:09.185Z"
|
|
},
|
|
{
|
|
"id": "bug-469",
|
|
"timestamp": "2026-06-13T06:33:41.449Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'testsuite/test_ha_cluster.c'",
|
|
"fix": "Changed to 'testsuite/test_ha_role_lifecycle.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T06:33:41.449Z"
|
|
},
|
|
{
|
|
"id": "bug-470",
|
|
"timestamp": "2026-06-13T06:34:01.929Z",
|
|
"error_message": "Wrong reference: test_ha_cluster should be test_ha_role_lifecycle",
|
|
"file": "src/controller/testsuite/controller_test.c",
|
|
"root_cause": "Used \"test_ha_cluster\" instead of \"test_ha_role_lifecycle\"",
|
|
"fix": "Changed test_ha_cluster \u2192 test_ha_role_lifecycle",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-13T06:34:05.212Z"
|
|
},
|
|
{
|
|
"id": "bug-471",
|
|
"timestamp": "2026-06-13T06:41:01.532Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/testsuite/test_ha_role_lifecycle.c",
|
|
"root_cause": "No early return/throw for edge case: pid < 0",
|
|
"fix": "Added guard clause: if (pid < 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T06:41:01.532Z"
|
|
},
|
|
{
|
|
"id": "bug-473",
|
|
"timestamp": "2026-06-13T07:32:43.287Z",
|
|
"error_message": "Wrong return value",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "Was returning: WAL_MODE_LOCAL;",
|
|
"fix": "Now returns: WAL_MODE_RETAIN;",
|
|
"tags": [
|
|
"auto-detected",
|
|
"return-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T07:32:43.287Z"
|
|
},
|
|
{
|
|
"id": "bug-476",
|
|
"timestamp": "2026-06-13T08:38:00.471Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: c->ha.hooks_registered",
|
|
"fix": "Added guard clause: if (c->ha.hooks_registered)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T08:38:00.471Z"
|
|
},
|
|
{
|
|
"error_message": "AddressSanitizer: global-buffer-overflow in xce_wal_batch_req_raw <- repl_broadcast <- persist_wal_async <- ha_arm_own_term_gate <- ha_promote_to_primary, during test_promotion_registers_persist_hooks (test_ha_role_lifecycle.c case 3)",
|
|
"file": "src/controller/testsuite/test_ha_role_lifecycle.c (fixture defect \u2014 OUT OF task 2.2 boundary)",
|
|
"root_cause": "task-2.2's ha_promote_to_primary now appends a WAL_NOOP via persist_wal_async, which broadcasts to registered standbys. The lifecycle fixture (lifecycle_cluster_setup) registers fake `int g_lc_eps[]` endpoints via repl_add_standby and NEVER installs repl_broadcast_send_hook, so repl_broadcast calls xce_wal_batch_req_raw(s->ep) and reads ep->peer (offset 36) past the 4-byte int. IDENTICAL to the prior test_p2_integration tests 8/9 bug already in buglog.",
|
|
"fix": "Test-side fix (parent must apply, mirrors the documented p2_integration fix): in test_ha_role_lifecycle.c add `extern int (*repl_broadcast_send_hook)(void*, wal_catchup_entry_t**, int);` and a no-op drop hook, install it in lifecycle_cluster_setup before promotion (reset to NULL in teardown), and cast endpoints to (void*). Production ha.c is correct per design (persist_wal_async appends+broadcasts by design).",
|
|
"tags": [
|
|
"ha-single-leader-role",
|
|
"task-2.2",
|
|
"test-fixture",
|
|
"asan",
|
|
"repl_broadcast",
|
|
"global-buffer-overflow",
|
|
"out-of-boundary"
|
|
],
|
|
"id": "bug-477",
|
|
"timestamp": "2026-06-13",
|
|
"last_seen": "2026-06-13",
|
|
"occurrences": 1,
|
|
"related_bugs": []
|
|
},
|
|
{
|
|
"error_message": "task-2.1 lifecycle fixture off-by-one: case 5/6/7 assert writable_lsn==noop_lsn and current_lsn==noop_lsn+1, but lifecycle_cluster_setup primes current_lsn = appended_lsn + 1, so a real persist_wal_async appends the noop at appended_lsn+1 (current_lsn->appended_lsn+2), giving noop_lsn=appended_lsn+1 != asserted appended_lsn.",
|
|
"file": "src/controller/testsuite/test_ha_role_lifecycle.c (fixture defect \u2014 OUT OF task 2.2 boundary)",
|
|
"root_cause": "persist_wal_async assigns hdr.lsn = current_lsn++ (entry takes the CURRENT value). The fixture comment assumes the next append takes current_lsn-1, which is off by one. To make the noop land at `appended_lsn`, the prime must be `current_lsn = appended_lsn`, not `appended_lsn + 1`.",
|
|
"fix": "Test-side fix (parent): set g_lc.persist.current_lsn = appended_lsn in lifecycle_cluster_setup. Production noop_lsn = current_lsn-1 (post-append) is correct per design \u00a7Promotion Rewrite / brief.",
|
|
"tags": [
|
|
"ha-single-leader-role",
|
|
"task-2.2",
|
|
"test-fixture",
|
|
"off-by-one",
|
|
"lsn",
|
|
"out-of-boundary"
|
|
],
|
|
"id": "bug-478",
|
|
"timestamp": "2026-06-13",
|
|
"last_seen": "2026-06-13",
|
|
"occurrences": 1,
|
|
"related_bugs": []
|
|
},
|
|
{
|
|
"id": "bug-480",
|
|
"timestamp": "2026-06-13T08:57:05.687Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_ha_role_lifecycle.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T08:57:05.687Z"
|
|
},
|
|
{
|
|
"id": "bug-482",
|
|
"timestamp": "2026-06-13T09:36:17.806Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_ha_start_election_async.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T09:36:17.806Z"
|
|
},
|
|
{
|
|
"id": "bug-483",
|
|
"timestamp": "2026-06-13T09:45:01.531Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_ha_role_lifecycle.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T09:45:01.531Z"
|
|
},
|
|
{
|
|
"id": "bug-484",
|
|
"timestamp": "2026-06-13T10:16:06.331Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-single-leader-role/tasks.md",
|
|
"root_cause": "Had `lifecycle_cluster_setup`",
|
|
"fix": "Changed to `ha_promote_to_primary`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T10:16:06.331Z"
|
|
},
|
|
{
|
|
"id": "bug-493",
|
|
"timestamp": "2026-06-13T12:08:04.621Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Condition was: if (role == CTRL_PRIMARY || role == CTRL_PRIMARY_COMMI)",
|
|
"fix": "Changed to: if (role == CTRL_PRIMARY)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 4,
|
|
"last_seen": "2026-06-13T12:09:17.994Z"
|
|
},
|
|
{
|
|
"id": "bug-494",
|
|
"timestamp": "2026-06-13T12:10:08.938Z",
|
|
"error_message": "Wrong reference: CTRL_PRIMARY_COMMITTING should be CTRL_PRIMARY",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Used \"CTRL_PRIMARY_COMMITTING\" instead of \"CTRL_PRIMARY\"",
|
|
"fix": "Changed CTRL_PRIMARY_COMMITTING \u2192 CTRL_PRIMARY",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T12:10:08.938Z"
|
|
},
|
|
{
|
|
"id": "bug-496",
|
|
"timestamp": "2026-06-13T13:07:42.791Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/testsuite/test_ha_role_lifecycle.c",
|
|
"root_cause": "Had \"winning election must land DIRECTLY in CTRL_PRIMA",
|
|
"fix": "Changed to \"winning election must land DIRECTLY in CTRL_PRIMA",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T13:07:42.791Z"
|
|
},
|
|
{
|
|
"id": "bug-497",
|
|
"timestamp": "2026-06-13T13:10:05.452Z",
|
|
"error_message": "Wrong reference: CTRL_PRIMARY_COMMITTING should be CTRL_PRIMARY",
|
|
"file": "src/controller/testsuite/test_ha_connection_reuse.c",
|
|
"root_cause": "Used \"CTRL_PRIMARY_COMMITTING\" instead of \"CTRL_PRIMARY\"",
|
|
"fix": "Changed CTRL_PRIMARY_COMMITTING \u2192 CTRL_PRIMARY",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T13:10:05.452Z"
|
|
},
|
|
{
|
|
"id": "bug-498",
|
|
"timestamp": "2026-06-13T13:10:16.164Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/testsuite/test_ha_connection_reuse.c",
|
|
"root_cause": "Had \"err_handler: ep must be removed from standby_endp",
|
|
"fix": "Changed to \"err_handler: ep must be removed from standby_endp",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T13:10:16.164Z"
|
|
},
|
|
{
|
|
"id": "bug-500",
|
|
"timestamp": "2026-06-13T13:14:11.496Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/testsuite/test_ha_startup.c",
|
|
"root_cause": "Had \"test_dispatch_gate_committing_allows_repl_ops: PA",
|
|
"fix": "Changed to \"test_dispatch_gate_primary_no_quorum_allows_repl_",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T13:14:11.496Z"
|
|
},
|
|
{
|
|
"id": "bug-501",
|
|
"timestamp": "2026-06-13T13:15:33.777Z",
|
|
"error_message": "Wrong reference: test_nonblocking_single_node_election_enters_committing should be test_nonblocking_single_node_election_enters_primary_directly",
|
|
"file": "src/controller/testsuite/test_ha_startup.c",
|
|
"root_cause": "Used \"test_nonblocking_single_node_election_enters_committing\" instead of \"test_nonblocking_single_node_election_enters_primary_directly\"",
|
|
"fix": "Changed test_nonblocking_single_node_election_enters_committing \u2192 test_nonblocking_single_node_election_enters_primary_directly",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T13:15:33.777Z"
|
|
},
|
|
{
|
|
"id": "bug-503",
|
|
"timestamp": "2026-06-13T13:30:00.000Z",
|
|
"error_message": "test_dispatch_gate_primary_no_quorum_denies_job_ops: Expected -10013 Was 0 (jobsub allowed, expected -XCE_ERR_NOT_READY)",
|
|
"file": "src/controller/testsuite/test_ha_startup.c",
|
|
"root_cause": "Retargeting the dispatch-gate test from CTRL_PRIMARY_COMMITTING to CTRL_PRIMARY (ha-single-leader-role task 5.1) changed gate semantics: the deleted COMMITTING branch denied job ops UNCONDITIONALLY, but the CTRL_PRIMARY branch only denies job ops when ha_has_write_quorum() is false. ha_init leaves n_peers=0, so ha_has_write_quorum returns true (single-node = self-majority, ha.c:1437) and jobsub was ALLOWED (rc=0). A blind role swap does not reproduce the original deny.",
|
|
"fix": "Set ha.n_peers = 2 in both retargeted dispatch-gate tests so a multi-node primary with zero connected standbys genuinely lacks write quorum (connected 0 < n_peers/2=1), making the universal commit barrier deny job ops with -XCE_ERR_NOT_READY while still permitting replication ops.",
|
|
"tags": [
|
|
"ha-single-leader-role",
|
|
"dispatch-gate",
|
|
"write-quorum",
|
|
"test-retarget",
|
|
"commit-barrier",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T13:30:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-505",
|
|
"timestamp": "2026-06-13T14:01:32.553Z",
|
|
"error_message": "Wrong reference: uint32_t should be ha_config_t",
|
|
"file": "src/controller/ha.h",
|
|
"root_cause": "Used \"uint32_t\" instead of \"ha_config_t\"",
|
|
"fix": "Changed uint32_t \u2192 ha_config_t",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T14:01:32.553Z"
|
|
},
|
|
{
|
|
"id": "bug-507",
|
|
"timestamp": "2026-06-13T14:43:54.194Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/steering/ha-async-io.md",
|
|
"root_cause": "Had `CTRL_PRIMARY_COMMITTING \u2192 CTRL_PRIMARY`",
|
|
"fix": "Changed to 's own-term commit rule (\u00a75.4.2): an election winn",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T14:43:54.194Z"
|
|
},
|
|
{
|
|
"id": "bug-508",
|
|
"timestamp": "2026-06-13T14:54:21.781Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".claude/skills/xce-deploy-ha/SKILL.md",
|
|
"root_cause": "Had `\u2192 CTRL_PRIMARY_COMMITTING`",
|
|
"fix": "Changed to `HA FSM (raft): \u2192 CTRL_PRIMARY (term=...)`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-13T14:54:21.781Z"
|
|
},
|
|
{
|
|
"id": "bug-509",
|
|
"timestamp": "2026-06-13T15:31:21.740Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "../../../../../claude/.claude/projects/-home-rshen-projects-xce-xce/memory/project_ha_consistency_invariants.md",
|
|
"root_cause": "Had \"XCE HA Raft+CP umbrella \u2014 sub-specs 1&2 of 4 IMPL",
|
|
"fix": "Changed to \"XCE HA Raft+CP umbrella \u2014 sub-specs 1,2,3 of 4 IM",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-13T15:31:40.089Z"
|
|
},
|
|
{
|
|
"id": "bug-510",
|
|
"timestamp": "2026-06-14T00:30:31.077Z",
|
|
"error_message": "Wrong reference: stdint should be stdbool",
|
|
"file": "src/controller/include/cluster.h",
|
|
"root_cause": "Used \"stdint\" instead of \"stdbool\"",
|
|
"fix": "Changed stdint \u2192 stdbool",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T00:30:31.077Z"
|
|
},
|
|
{
|
|
"id": "bug-512",
|
|
"timestamp": "2026-06-14T00:34:38.745Z",
|
|
"error_message": "Wrong reference: xlist_destroy should be xlist_fini",
|
|
"file": "src/controller/testsuite/test_egress_filter.c",
|
|
"root_cause": "Used \"xlist_destroy\" instead of \"xlist_fini\"",
|
|
"fix": "Changed xlist_destroy \u2192 xlist_fini",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T00:34:38.745Z"
|
|
},
|
|
{
|
|
"id": "bug-513",
|
|
"timestamp": "2026-06-14T00:35:13.711Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'commit.c'",
|
|
"fix": "Changed to 'testsuite/test_egress_filter.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T00:35:13.711Z"
|
|
},
|
|
{
|
|
"id": "bug-514",
|
|
"timestamp": "2026-06-14T00:37:31.926Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/testsuite/test_egress_filter.c",
|
|
"root_cause": "No early return/throw for edge case: iter_make(&it, c->jobmgr",
|
|
"fix": "Added guard clause: if (iter_make(&it, c->jobmgr)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T00:37:31.926Z"
|
|
},
|
|
{
|
|
"id": "bug-516",
|
|
"timestamp": "2026-06-14T01:46:09.600Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T01:46:09.600Z"
|
|
},
|
|
{
|
|
"id": "bug-518",
|
|
"timestamp": "2026-06-14T01:50:24.429Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/sched.c",
|
|
"root_cause": "No early return/throw for edge case: l->count > 0",
|
|
"fix": "Added guard clause: if (l->count > 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T01:50:24.429Z"
|
|
},
|
|
{
|
|
"id": "bug-519",
|
|
"timestamp": "2026-06-14T01:52:56.833Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/testsuite/test_egress_filter.c",
|
|
"root_cause": "Had \"\\n>> commit-gated scheduler egress tests (RED, ta",
|
|
"fix": "Changed to \"\\n>> commit-gated scheduler egress tests (GREEN, ",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T01:52:56.833Z"
|
|
},
|
|
{
|
|
"id": "bug-521",
|
|
"timestamp": "2026-06-14T03:55:55.380Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/testsuite/test_demotion_convergence.c",
|
|
"root_cause": "Had \"commit.h\"",
|
|
"fix": "Changed to \"cluster.h\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-14T03:58:21.222Z"
|
|
},
|
|
{
|
|
"id": "bug-523",
|
|
"timestamp": "2026-06-14T04:21:18.071Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha_convergence.c",
|
|
"root_cause": "No early return/throw for edge case: ctx == NULL || ctx->c == NULL",
|
|
"fix": "Added guard clause: if (ctx == NULL || ctx->c == NULL)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T04:21:18.071Z"
|
|
},
|
|
{
|
|
"id": "bug-343",
|
|
"timestamp": "2026-06-14T04:34:32+00:00",
|
|
"error_message": "AddressSanitizer: heap-use-after-free in ha_rejoin_reconcile_fn (ha_convergence.c:236) during test_rejoin_second_call_no_second_restart",
|
|
"file": "src/controller/testsuite/test_demotion_convergence.c",
|
|
"root_cause": "dc_run_pending_task peeked tasks.head and ran entry(args) WITHOUT dequeuing. The once-guard correctly makes the 2nd ha_rejoin_reconcile schedule no new task, so head still pointed at the first (already-run) task whose body had freed its heap ctx (args). The 2nd dc_run_pending_task re-ran that task on the freed ctx. The convergence task bodies free their own args (production delaymgr killer frees only the delay_task_t node, never args; production execv never re-runs a one-shot).",
|
|
"fix": "Made dc_run_pending_task DEQUEUE via ordq_get(&mgr->tasks, NULL), run the body, then free(t)/free(it) \u2014 mirroring the real delaymgr worker (ordq_get -> runner_fn -> FREEUP for runcount==1). A 2nd call now returns DC_NO_TASK as production would. Production ha_rejoin_reconcile/ha_rejoin_reconcile_fn unchanged (the body-frees-ctx pattern is correct).",
|
|
"tags": [
|
|
"asan",
|
|
"use-after-free",
|
|
"ha",
|
|
"rejoin",
|
|
"delaymgr",
|
|
"test-harness",
|
|
"ha-convergence-recovery",
|
|
"task-3.2"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T04:34:32+00:00"
|
|
},
|
|
{
|
|
"id": "bug-526",
|
|
"timestamp": "2026-06-14T04:52:58.813Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-convergence-recovery/tasks.md",
|
|
"root_cause": "Had \"No space left on device\"",
|
|
"fix": "Changed to `/tmp/xce_*`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T04:52:58.813Z"
|
|
},
|
|
{
|
|
"id": "bug-527",
|
|
"timestamp": "2026-06-14T04:57:22.178Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/controller/ha.h",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: /*; * ha_walack_continuation_for_test: test-only entry point for",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-14T04:57:42.146Z"
|
|
},
|
|
{
|
|
"id": "bug-532",
|
|
"timestamp": "2026-06-14T06:12:36.513Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha_convergence.c",
|
|
"root_cause": "No early return/throw for edge case: ha == NULL",
|
|
"fix": "Added guard clause: if (ha == NULL)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T06:12:36.513Z"
|
|
},
|
|
{
|
|
"id": "bug-533",
|
|
"timestamp": "2026-06-14T06:37:35.904Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/controller/testsuite/test_convergence_verification.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: printf(\"\\n>> Regression pins: fan-out / snapshot fallback / ; \"re-inclusion (task 6.1 \u2014 PASS against current code)\\n\\n\"); | Also: /* \u2500\u2500 Fan-out counting send-hook (task 6.1 (a)/(d), umbrella; * repl_broadcast routes each enqueue through repl_broadcast_",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-14T06:40:03.882Z"
|
|
},
|
|
{
|
|
"id": "bug-534",
|
|
"timestamp": "2026-06-14T06:38:38.792Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/testsuite/test_convergence_verification.c",
|
|
"root_cause": "Had \"delay.h\"",
|
|
"fix": "Changed to \"controller.capnp.h\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T06:38:38.792Z"
|
|
},
|
|
{
|
|
"id": "bug-536",
|
|
"timestamp": "2026-06-14T07:56:01.819Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_ha_rdhup_integration.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T07:56:01.819Z"
|
|
},
|
|
{
|
|
"id": "bug-537",
|
|
"timestamp": "2026-06-14T08:02:40.832Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T08:02:40.832Z"
|
|
},
|
|
{
|
|
"id": "bug-538",
|
|
"timestamp": "2026-06-14",
|
|
"error_message": "config-less controller (my_config_tag==0) became PRIMARY after RDHUP and pushed empty config, breaking replication on a live 3-node cluster",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "ha_on_primary_ctrl_fd_rdhup did not apply the no-config voter-only guard that ha_start_election_async has; after primary RDHUP it set CTRL_ELECTING, allocated elect_ctx and called raft_on_leader_lost even for tag=0 nodes. Two tag=0 nodes granted each other (freshness gate only denies LOWER tag; tag0==tag0 granted), electing a config-less primary.",
|
|
"fix": "Added an election-safety guard in ha_on_primary_ctrl_fd_rdhup after the WAL-truncate block and before elect_ctx alloc/hook/raft_on_leader_lost: if my_config_tag==0 && candidates_count>1, log + set role=CTRL_STANDBY and return (stays passive voter). Mirrors ha_start_election_async. Single-node (n_peers==1) unaffected.",
|
|
"tags": [
|
|
"ha",
|
|
"election-safety",
|
|
"rdhup",
|
|
"config-bootstrap",
|
|
"Req2.8",
|
|
"Req10.5",
|
|
"voter-only-guard"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14"
|
|
},
|
|
{
|
|
"id": "bug-542",
|
|
"timestamp": "2026-06-14T09:29:31.490Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'commit.c'",
|
|
"fix": "Changed to 'testsuite/test_coldstart_lsn0.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T09:29:31.490Z"
|
|
},
|
|
{
|
|
"id": "bug-543",
|
|
"timestamp": "2026-06-14T09:36:36.967406Z",
|
|
"error_message": "WAL HOLE on cold-start catch-up: a fresh EMPTY standby (standby_lsn=0) catching up to a primary holding [0,1] receives ONLY lsn 1, missing lsn 0",
|
|
"file": "src/controller/config_repl.c",
|
|
"root_cause": "ha_stream_wal_to_standby filter `if (hdr.lsn > standby_lsn)` excludes lsn 0 when standby_lsn==0 (0>0 is false). standby_lsn=0 is ambiguous: it means BOTH 'empty standby (applied nothing)' AND 'standby has applied lsn 0'. The streamer cannot distinguish, computes start_lsn=standby_lsn+1=1, and drops the genuine lsn-0 entry. Only non-cosmetic because lsn-0 entries can be REAL data (first-ever WAL entry of a fresh cluster is lsn 0 from a real write OR the promotion NOOP).",
|
|
"fix": "FIXED via reserve-lsn-0: persist_init() now sets current_lsn=1 on a fresh store (persist.c), so lsn 0 is reserved as the none/empty sentinel and the first-ever WAL entry (promotion NOOP) is lsn 1. The streamer filter hdr.lsn>standby_lsn now yields 1>0=true for an empty standby (standby_lsn=0), streaming the first entry \u2014 no hole. No streamer change needed; the reserved base makes the existing filter correct. Also fixes the uncommittable cold-start NOOP (now lsn 1, committable 0->1) and the own-term writable_lsn gate (now 1, effective). Test: test_coldstart_lsn0.c H1-H4 all green incl H4 no-hole. Base-shift fallout fixed in test_commit_engine, test_commit_barrier_rollout, test_commit_barrier_reply, test_p2_integration, test_egress_filter (removed now-redundant priming appends / wired engine).",
|
|
"tags": [
|
|
"ha",
|
|
"replication",
|
|
"wal",
|
|
"cold-start",
|
|
"lsn-0",
|
|
"catch-up",
|
|
"correctness",
|
|
"off-by-one"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T10:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-550",
|
|
"timestamp": "2026-06-14T11:38:09.614Z",
|
|
"error_message": "Wrong reference: test_pin_dispatch_gate_degraded_allowlist should be test_empty_standby_fresh_cluster_streams_not_snapshot",
|
|
"file": "src/controller/testsuite/test_convergence_verification.c",
|
|
"root_cause": "Used \"test_pin_dispatch_gate_degraded_allowlist\" instead of \"test_empty_standby_fresh_cluster_streams_not_snapshot\"",
|
|
"fix": "Changed test_pin_dispatch_gate_degraded_allowlist \u2192 test_empty_standby_fresh_cluster_streams_not_snapshot",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T11:38:09.614Z"
|
|
},
|
|
{
|
|
"id": "bug-551",
|
|
"timestamp": "2026-06-14T11:45:02.411Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Condition was: if (standby_lsn < oldest_wal_lsn)",
|
|
"fix": "Changed to: if (standby_lsn + 1 < oldest_wal_lsn)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T11:45:02.411Z"
|
|
},
|
|
{
|
|
"id": "bug-555",
|
|
"timestamp": "2026-06-14T12:23:52.351Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/testsuite/test_repl_apply.c",
|
|
"root_cause": "No early return/throw for edge case: !p",
|
|
"fix": "Added guard clause: if (!p)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T12:23:52.351Z"
|
|
},
|
|
{
|
|
"id": "bug-556",
|
|
"timestamp": "2026-06-14T12:25:37.723Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/include/persist.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T12:25:37.723Z"
|
|
},
|
|
{
|
|
"id": "bug-557",
|
|
"timestamp": "2026-06-14T12:26:04.137Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "No early return/throw for edge case: !p",
|
|
"fix": "Added guard clause: if (!p)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T12:26:04.137Z"
|
|
},
|
|
{
|
|
"id": "bug-560",
|
|
"timestamp": "2026-06-14T19:54:55.428Z",
|
|
"error_message": "Wrong reference: myconf_t should be uint32_t",
|
|
"file": "src/include/myconf.h",
|
|
"root_cause": "Used \"myconf_t\" instead of \"uint32_t\"",
|
|
"fix": "Changed myconf_t \u2192 uint32_t",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T19:54:55.428Z"
|
|
},
|
|
{
|
|
"id": "bug-561",
|
|
"timestamp": "2026-06-14T20:05:48.755409",
|
|
"error_message": "jobsub intermittent -ETIMEDOUT \"Connection timed out\": commit: WAIT deadline expired without commit (timeout_ms=50)",
|
|
"file": "src/include/config.h",
|
|
"root_cause": "DEFAULT_SYNC_TIMEOUT_MS=50 too tight for durable sync majority replication (each standby fdatasyncs before ACK); not configurable (controller always used persist_config_defaults).",
|
|
"fix": "Raised DEFAULT_SYNC_TIMEOUT_MS 50->500; added --sync-timeout-ms CLI flag plumbed arguments->myconf.sync_timeout_ms->pcfg.sync_timeout_ms (0=use default) in main.c/myconf.h/cluster.c.",
|
|
"tags": [
|
|
"ha",
|
|
"commit-barrier",
|
|
"timeout",
|
|
"replication",
|
|
"jobsub",
|
|
"config"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T20:05:48.755409"
|
|
},
|
|
{
|
|
"id": "bug-562",
|
|
"timestamp": "2026-06-14T23:55:00Z",
|
|
"error_message": "AddressSanitizer: heap-use-after-free in encode_RequestReply / strlen (lib/controller.capnp.c:13168) on ctrl-2 startup, via xce_reply->xce_encode from OPCode_nop handler (cluster.c:307). Also: job submission succeeds but joblist shows no jobs.",
|
|
"file": "src/lib/request.c",
|
|
"root_cause": "init_reply_by_req() only set seq+opcode, leaving the rest of the stack-declared xce_reply_t uninitialized. The Cap'n-C generated encode_RequestReply reads the common trailer field redirect_host UNCONDITIONALLY (gated only on != NULL), so a garbage stack pointer in reply.redirect_host was strlen'd. The garbage aliased a 4KB capnp segment freed moments earlier by the WAL-ack reply encode on the same thread -> UAF. Handlers that build a reply via init_reply_by_req and only set status/data_which/data (e.g. the NOP/state-report path) never cleared redirect_host. Empty joblist is downstream: ctrl-2 crash-looping on this UAF destabilizes replication/quorum, so a get request that fails over to the not-caught-up standby reads an empty jobmgr (standby serves get from its own committed state).",
|
|
"fix": "memset(reply,0,sizeof(*reply)) at the top of init_reply_by_req() (src/lib/request.c) before setting seq/opcode. All 30+ reply sites follow declare->init->populate, so zeroing in the shared initializer fixes the whole class (redirect_host/redirect_port/status/data garbage) at the source. Added regression test test_init_reply_by_req_zeroes_reply in src/lib/testsuite/test_request.c (poisons reply with 0xFF, asserts redirect_host==NULL etc).",
|
|
"tags": [
|
|
"use-after-free",
|
|
"asan",
|
|
"capnp",
|
|
"encode_RequestReply",
|
|
"redirect_host",
|
|
"init_reply_by_req",
|
|
"ha",
|
|
"joblist",
|
|
"uninitialized-stack"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-14T23:55:00Z"
|
|
},
|
|
{
|
|
"id": "bug-563",
|
|
"timestamp": "2026-06-15T09:16:53.679025Z",
|
|
"error_message": "jobsub returns ok (status 0, jobid) but joblist AND jobinfo show the job absent on a stable single primary (ctrl-1); reslist works.",
|
|
"file": "src/lib/request.c",
|
|
"root_cause": "SOLVED (reproduced locally via /xce-build + 3-node deploy-ha, ASAN). cluster_start() \u2014 the ONLY place that sets c->running=1 \u2014 is ORPHANED (zero callers; grep confirms). The HA startup path (myapp_run) starts iomgr/vtaskmgr/delaymgr/persist_start itself but never calls cluster_start, so c->running stays 0 (calloc default) on the primary. check_controller() (the streaming gate passed to xce_reply_get for joblist/workerlist) returns -EINVAL when !c->running; xce_reply_get then sets nc=0 (chunk count), shipping an EMPTY list to the client even though collect_jobs/key_find found the job. reslist passes checkf=NULL so it was immune. DIAG proof: 'reply_get send: table=2 pos=0 nc=0 nrows=1 checkstatus=-22' (pre-fix) -> 'nc=1 ... checkstatus=1' (post-fix). Single-node/legacy cluster_init path called cluster_start, which is why non-replicated worked.",
|
|
"fix": "Set c->running=1 at the TOP of cluster_run() (src/controller/cluster.c), symmetric with the existing c->running=0 on shutdown \u2014 the orphaned cluster_start() used to set it. c->running is a liveness/shutdown flag: check_controller() is polled PER CHUNK inside xce_reply_get()'s streaming loop so a long multi-chunk fetch (e.g. thousands of jobs) ABORTS mid-stream (nc=0) if a shutdown request arrives during it. The bug: running started 0 and was never set under HA, so the gate fired on every reply, not just during shutdown. Fix restores running=1 for the run-loop lifetime; the shutdown abort path (running=0 when cluster_run's cbuf_get loop breaks on the stop signal) is unchanged. Verified E2E on a local 3-node deploy-ha (ASAN): jobs now appear in joblist; DIAG showed checkstatus/nc flip -22/0 -> 1/1. Final fix is in cluster_run (not myapp_run \u2014 moved there so the 1<->0 lifecycle is co-located in the function that receives the shutdown signal).",
|
|
"tags": [
|
|
"joblist",
|
|
"workerlist",
|
|
"jobsub",
|
|
"ha",
|
|
"check_controller",
|
|
"c-running",
|
|
"cluster_start",
|
|
"orphaned-function",
|
|
"xce_reply_get",
|
|
"SOLVED"
|
|
],
|
|
"related_bugs": [
|
|
"bug-562"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-15T09:16:53.679025Z"
|
|
},
|
|
{
|
|
"id": "bug-570",
|
|
"timestamp": "2026-06-15T11:10:10.553Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/steering/product.md",
|
|
"root_cause": "Had `raft.c`",
|
|
"fix": "Changed to `src/lib/raft/`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-15T11:10:10.553Z"
|
|
},
|
|
{
|
|
"id": "bug-572",
|
|
"timestamp": "2026-06-15T11:10:26.312Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/steering/tech.md",
|
|
"root_cause": "Had `raft.c`",
|
|
"fix": "Changed to `src/lib/raft/`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-15T11:10:26.312Z"
|
|
},
|
|
{
|
|
"id": "bug-575",
|
|
"timestamp": "2026-06-16T00:10:49.295Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-prevote/research.md",
|
|
"root_cause": "Had 't understand PreVote (older binary) \u2014 does the ca",
|
|
"fix": "Changed to 's \"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-16T00:10:49.295Z"
|
|
},
|
|
{
|
|
"id": "bug-576",
|
|
"timestamp": "2026-06-16T00:18:28.793Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-prevote/research.md",
|
|
"root_cause": "Had 's \"",
|
|
"fix": "Changed to `ha_heartbeat_is_fresh()`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-16T00:18:28.793Z"
|
|
},
|
|
{
|
|
"id": "bug-578",
|
|
"timestamp": "2026-06-16T03:00:48.818Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-prevote/design.md",
|
|
"root_cause": "Had `ha_elect_ctx_t`",
|
|
"fix": "Changed to `raft_on_vote_reply`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 9,
|
|
"last_seen": "2026-06-16T03:02:59.202Z"
|
|
},
|
|
{
|
|
"id": "bug-579",
|
|
"timestamp": "2026-06-16T03:01:07.659Z",
|
|
"error_message": "Wrong return value",
|
|
"file": ".kiro/specs/ha-prevote/design.md",
|
|
"root_cause": "Was returning: codes (e.g. `RAFT_PRE_VOTE_WON`, `RAFT_PRE_VOTE_LO",
|
|
"fix": "Now returns: codes (e.g. `RAFT_PRE_VOTE_WON`, `RAFT_PRE_VOTE_LO",
|
|
"tags": [
|
|
"auto-detected",
|
|
"return-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-16T03:01:07.660Z"
|
|
},
|
|
{
|
|
"id": "bug-584",
|
|
"timestamp": "2026-06-16T04:27:50.039Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft.c",
|
|
"root_cause": "No early return/throw for edge case: s->cbs->on_trace",
|
|
"fix": "Added guard clause: if (s->cbs->on_trace)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-16T04:27:50.039Z"
|
|
},
|
|
{
|
|
"id": "bug-585",
|
|
"timestamp": "2026-06-16T04:36:28.796Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/testsuite/test_raft.c",
|
|
"root_cause": "No early return/throw for edge case: rc != 0",
|
|
"fix": "Added guard clause: if (rc != 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-16T04:36:28.796Z"
|
|
},
|
|
{
|
|
"id": "bug-586",
|
|
"timestamp": "2026-06-16T04:50:38.855Z",
|
|
"error_message": "Missing error handling in struct",
|
|
"file": "src/controller/testsuite/test_ha_vote_gate.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: /* Task 3.1 \u2014 voter-side PreVote dispatch gate (stickiness +; * no mutation, reply term unchanged) */",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-16T04:50:49.601Z"
|
|
},
|
|
{
|
|
"id": "bug-591",
|
|
"timestamp": "2026-06-16T05:27:09.380Z",
|
|
"error_message": "Wrong reference: test_commit_engine should be test_ha_prevote",
|
|
"file": "src/controller/testsuite/controller_test.c",
|
|
"root_cause": "Used \"test_commit_engine\" instead of \"test_ha_prevote\"",
|
|
"fix": "Changed test_commit_engine \u2192 test_ha_prevote",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-16T05:27:18.877Z"
|
|
},
|
|
{
|
|
"id": "bug-592",
|
|
"timestamp": "2026-06-16T05:28:01.236Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: !c || !c->myconf",
|
|
"fix": "Added guard clause: if (!c || !c->myconf)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-16T05:30:07.209Z"
|
|
},
|
|
{
|
|
"id": "bug-593",
|
|
"timestamp": "2026-06-16T05:44:57.430Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/ha-prevote/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-16T05:44:57.430Z"
|
|
},
|
|
{
|
|
"id": "bug-594",
|
|
"timestamp": "2026-06-16T05:50:25.729Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'testsuite/test_commit_engine.c'",
|
|
"fix": "Changed to 'testsuite/test_ha_failover_prevote.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-16T05:50:25.730Z"
|
|
},
|
|
{
|
|
"id": "bug-595",
|
|
"timestamp": "2026-06-16T05:50:35.123Z",
|
|
"error_message": "Wrong reference: test_commit_engine should be test_ha_failover_prevote",
|
|
"file": "src/controller/testsuite/controller_test.c",
|
|
"root_cause": "Used \"test_commit_engine\" instead of \"test_ha_failover_prevote\"",
|
|
"fix": "Changed test_commit_engine \u2192 test_ha_failover_prevote",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-16T05:50:39.775Z"
|
|
},
|
|
{
|
|
"id": "bug-597",
|
|
"timestamp": "2026-06-16T05:59:43.939Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-16T05:59:43.939Z"
|
|
},
|
|
{
|
|
"id": "bug-598",
|
|
"timestamp": "2026-06-16T06:33:05.644Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: role == CTRL_STANDBY && ha->raft.pre_vote_in_progress",
|
|
"fix": "Added guard clause: if (role == CTRL_STANDBY && ha->raft.pre_vot)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-16T06:33:05.644Z"
|
|
},
|
|
{
|
|
"id": "bug-603",
|
|
"timestamp": "2026-06-16T08:18:48.567Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-16T08:18:48.567Z"
|
|
},
|
|
{
|
|
"id": "bug-604",
|
|
"timestamp": "2026-06-16T15:55:00Z",
|
|
"error_message": "controller unit test TIMEOUT 300.01s killed by SIGTERM; suite exceeds 300s meson cap",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "fsync_worker slept the full wal_sync_ms in one uninterruptible nanosleep() then checked fsync_stop. persist_stop sets the flag and immediately pthread_join()s, so the join blocked until the in-progress sleep returned \u2014 up to a full wal_sync_ms per teardown. Tests set wal_sync_ms=5000 ('slow fsync, no races'), so each persist_stop cost ~5s; across ~7 suites with many fixtures the cumulative teardown time blew past the 300s controller-test cap. The 'commit: WAIT deadline expired' warnings in the log were unrelated intentional negative tests (50-300ms).",
|
|
"fix": "Replaced the nanosleep with pthread_cond_timedwait on a new fsync_mutex/fsync_cond (added to persist_t, init in persist_init, destroyed in persist_fini). persist_stop now sets fsync_stop and pthread_cond_signal(fsync_cond) under fsync_mutex before join, so the worker wakes immediately. fdatasync still runs under p->lock, released before re-acquiring fsync_mutex (no lock nesting). Full controller suite now completes in ~10s (was >300s); 0 failures.",
|
|
"tags": [
|
|
"controller",
|
|
"persist",
|
|
"fsync",
|
|
"thread-shutdown",
|
|
"test-timeout",
|
|
"pthread_join",
|
|
"nanosleep",
|
|
"condvar",
|
|
"ha"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-16T15:55:00Z"
|
|
},
|
|
{
|
|
"id": "bug-605",
|
|
"timestamp": "2026-06-16T16:30:00Z",
|
|
"error_message": "3-node fresh HA deploy never elects a primary: all nodes stay CTRL_STANDBY, config-holder (ctrl-1) loops PreVote LOST every ~11s forever; config-less peers idle as voter-only. REPRODUCED via /xce-deploy-ha + clean restart 2026-06-16.",
|
|
"file": "src/controller/ha.c (ha_dispatch_gate); test: src/controller/testsuite/test_ha_role.c",
|
|
"root_cause": "ha_dispatch_gate() admitted OPCode_requestVote in CTRL_INIT/CTRL_ELECTING/CTRL_STANDBY but NEVER OPCode_preVoteRequest (opcode 38). ha-prevote added the new opcode + handler (cluster.c:440) but missed wiring it into the role-admission gate. So a STANDBY voter rejected an incoming PreVote with -XCE_ERR_STANDBY (-10014) BEFORE the handler ran -> no preVoteReply sent -> candidate's failed/empty exchange tallied as a denial (pre_vote_reply_decode_and_dispatch counts ok=0 as non-grant; vote_ep_err_handler synthesizes a denied vote). In a cold cluster (config-holder + config-less voter-only peers) every PreVote 'lost' with NO voter ever making a liveness decision (zero 'PreVote DENIED' logs), so no primary was ever elected and the config-holder looped PreVote forever. Confirmed via gdb: myreq_handler ha_dispatch_gate rc=-10014 on opcode 38. Design invariant: a PreVote (strictly non-mutating) must be at least as admissible as a real requestVote in every role.",
|
|
"fix": "Added OPCode_preVoteRequest alongside OPCode_requestVote in ha_dispatch_gate() for CTRL_INIT, CTRL_ELECTING, and the CTRL_STANDBY switch (src/controller/ha.c). PreVote now reaches the cluster.c handler and a proper preVoteReply is sent. Added TDD test test_dispatch_gate_allows_prevote_in_voter_roles (test_ha_role.c) asserting gate(preVoteRequest)==gate(requestVote)==0 across voter roles. VERIFIED: controller unit suite OK (new test PASS); fresh /xce-deploy-ha 3-node cold start now elects ctrl-1 PRIMARY (term=2), standbys establish primary channel + config committed, prevote-LOST=0, connections 96->8.",
|
|
"tags": [
|
|
"ha",
|
|
"prevote",
|
|
"ha-dispatch-gate",
|
|
"opcode-38",
|
|
"cold-start",
|
|
"bootstrap-deadlock",
|
|
"FIXED",
|
|
"XCE_ERR_STANDBY"
|
|
],
|
|
"related_bugs": [
|
|
"bug-339"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-16T09:38:00Z"
|
|
},
|
|
{
|
|
"id": "bug-606",
|
|
"timestamp": "2026-06-16T17:46:00Z",
|
|
"error_message": "After killing the primary (ctrl-1), the two surviving standbys (ctrl-2,ctrl-3) livelock in synchronized elections: PreVote win \u2192 CTRL_ELECTING \u2192 become_follower (term bumped) \u2192 ~10s \u2192 repeat, term climbing unbounded (3\u21929\u2192\u221e), no new primary ever elected. Reproduce: deploy 3-node HA, elect primary, submit 3-5 jobs, kill ctrl-1.",
|
|
"file": "src/controller/ha.c (ha_begin_failover, ha_election_stagger_ms, ha_failover_stagger_fn); src/controller/ha.h; test: src/controller/testsuite/test_ha_role.c",
|
|
"root_cause": "Dueling-candidates split-vote livelock \u2014 Raft \u00a75.2 randomized election timeout is missing on the FAILOVER path. Both survivors lose the primary at the same instant; their liveness polls fire on the identical fixed heartbeat_timeout, so they start PreVote+real-election in perfect lock-step (ms-aligned timestamps). Both win PreVote (neither sees a primary, so each grants the other \u2014 PreVote cannot break this tie), then both campaign at the same term, each votes for itself and denies the other (quorum 2, only 2 live nodes) \u2192 split vote \u2192 election times out (fixed election_timeout_ms, raft.c:105, NO jitter) \u2192 become_follower, term+1 \u2192 repeat forever. The priority/jitter config (election_jitter_max_ms, election_priority_step_ms) is applied ONLY at startup (ha_wait_for_heartbeat_or_timeout); the failover re-election path (liveness_poll_fn \u2192 ha_on_primary_ctrl_fd_rdhup \u2192 PreVote \u2192 ha_start_election_async \u2192 raft_start_election) has no de-synchronization. raft_on_leader_lost DOES have a priority stagger (raft.c:421) but the failover loop does not go through it.",
|
|
"fix": "Added ha_election_stagger_ms() (ha.c/ha.h): per-node failover delay = my_priority*election_priority_step_ms + random[0,election_jitter_max_ms], re-randomized each call (mirrors the startup stagger). ha_begin_failover() now schedules the PreVote start via delaymgr after that stagger (production only; c==NULL/no-delaymgr stays synchronous so existing tests are unaffected). The delaymgr callback ha_failover_stagger_fn guards with role==STANDBY && ha_heartbeat_is_fresh \u2192 skips PreVote if a primary connected during the stagger. Effect: two survivors no longer campaign in lock-step; the higher-priority survivor wins and its heartbeats reset the other. TDD: test_election_stagger_desyncs_by_priority (bounds + step>jitter ordering). VERIFIED on kill-primary repro: ctrl-2 (stagger 630ms) won \u2192 PRIMARY term=1; ctrl-3 (stagger 1072ms) received ctrl-2's ctrlhello first \u2192 STANDBY, then its stagger timer hit the guard and skipped PreVote ('a primary is alive \u2014 skipping PreVote'). No term inflation, no livelock. NOTE: optional raft.c:105 give-up-watchdog randomization NOT needed \u2014 the failover-start stagger alone resolves it; left as future defense-in-depth.",
|
|
"tags": [
|
|
"ha",
|
|
"raft",
|
|
"election",
|
|
"split-vote",
|
|
"dueling-candidates",
|
|
"livelock",
|
|
"randomized-timeout",
|
|
"failover",
|
|
"stagger",
|
|
"jitter",
|
|
"FIXED"
|
|
],
|
|
"related_bugs": [
|
|
"bug-605"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-16T10:04:00Z"
|
|
},
|
|
{
|
|
"id": "bug-608",
|
|
"timestamp": "2026-06-16T10:36:00Z",
|
|
"error_message": "libxce client never fails over after primary killed; xce_joblist returns 'Invalid argument' (EINVAL) indefinitely",
|
|
"file": "src/lib/request.c",
|
|
"root_cause": "Two gaps: (1) xce_request_with_retry() (request.c:1956) is implemented+unit-tested but NO production path calls it - every xce_*_req wrapper calls plain xce_request() (request.c:1385 etc). (2) The retry primitive keys on E_XCE_STANDBY + reply.redirect_host/port (request.c:2010), but the real controller emits a dedicated E_XCE_REDIRECT status with data_which=nodata (join.c:264-266) and never populates those trailer fields. Controller non-primary taxonomy is E_XCE_REDIRECT / E_XCE_NOMASTER / E_XCE_NOT_READY / E_XCE_STANDBY (errnox.h:22-25). So the client both bypasses the wrapper AND, even if wired, would not detect the controller's actual redirect signal.",
|
|
"fix": "Spec libxce-failover: wire all production request paths through transparent failover; classify on actual controller statuses (REDIRECT=fast-rotate to find existing primary, address-if-present else rotate master list; NOMASTER/NOT_READY=backoff then cluster-not-ready; STANDBY=rotate); realign the existing retry unit tests to the emitted statuses. Implementation pending (requirements phase).",
|
|
"tags": [
|
|
"libxce",
|
|
"failover",
|
|
"ha",
|
|
"E_XCE_REDIRECT",
|
|
"retry",
|
|
"client",
|
|
"protocol-mismatch"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-16T10:36:00Z"
|
|
},
|
|
{
|
|
"id": "bug-609",
|
|
"timestamp": "2026-06-16T10:52:01.800Z",
|
|
"error_message": "After primary killed, libxce client xce_joblist/jobsubmit returns 'Invalid argument' (-EINVAL) on every fresh call \u2014 transparent failover did not engage",
|
|
"file": "src/lib/client_failover.c",
|
|
"root_cause": "handle_disconnect leaves xce_ctx_t.state=XCE_CTX_ERR after the primary's connection drops; the per-op xceapi guard (xceapi.c:14) returns -EINVAL when state!=XCE_CTX_RUN, BEFORE the op reaches a primary. xcecli_retry_decide classified -EINVAL as TERMINAL (non-retriable), so the failover loop bailed without rotating/recovering. The ctx->state ERR->RUN recovery only ran AFTER a rotate, which a terminal classification never triggered. Surfaced by the live 3-node E2E (task 6.2); the unit tests fed status codes directly to decide() and bypassed the real guard, so they missed it.",
|
|
"fix": "In xcecli_retry_decide, before classifying *rc, detect ac->ctx.state==XCE_CTX_ERR (known-dead connection) and treat it as a prompt transport-style failover cause (XCE_FO_RETRY_NOW, no backoff) regardless of *rc, so the loop rotates+recovers. On budget exhaustion surface -E_XCE_NOT_READY (cluster-not-ready), never -EINVAL. Regression: test_decide_known_dead_ctx_retries_not_terminal.",
|
|
"tags": [
|
|
"md",
|
|
"libxce",
|
|
"failover",
|
|
"EINVAL",
|
|
"XCE_CTX_ERR",
|
|
"reconnect",
|
|
"E2E"
|
|
],
|
|
"related_bugs": [
|
|
"bug-608"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-17T04:45:00Z"
|
|
},
|
|
{
|
|
"id": "bug-610",
|
|
"timestamp": "2026-06-16T10:52:36.535Z",
|
|
"error_message": "ASan SEGV in endpoint_connect (netio.c:672) via xce_failover_rotate \u2192 xcecli_retry_next \u2192 xcecli_joblist during live master failover (NULL ep->iomgr deref)",
|
|
"file": "src/lib/client_failover.c",
|
|
"root_cause": "xce_failover_rotate reconnected via endpoint_fini + endpoint_init + endpoint_connect, but endpoint_init (do_endpoint_init) resets the endpoint struct including ep->iomgr, and the rotate never re-bound it. The client's endpoint gets ep->iomgr = &ctx->iomgr only via xce_ctx_set_endpoint (called once in xcecli_start). endpoint_connect derefs iomgr->ssl_ctx when ep->ssl==NULL (true after endpoint_fini frees the SSL) \u2192 NULL deref crash. Also the rotate never re-set owner/msg_handler/err_handler nor iomgr_monitor'd the new fd, so even without the crash the reconnected endpoint would not route replies. Pure unit tests could not exercise the live socket/iomgr path; only the live failover E2E hit it.",
|
|
"fix": "Added xce_ctx_reconnect(ctx,host,port) in xcectx.c (where static handle_msg/handle_disconnect live) that mirrors the connection-establishment of xcecli_start/xce_ctx_start without restarting iomgr/vtaskmgr or touching ctx->state: endpoint_fini \u2192 endpoint_init \u2192 endpoint_set_peer \u2192 re-bind ep->iomgr=&ctx->iomgr \u2192 endpoint_connect \u2192 re-set owner+msg/err handlers \u2192 iomgr_monitor. xce_failover_rotate now delegates the reconnect to it.",
|
|
"tags": [
|
|
"async-fix",
|
|
"md",
|
|
"libxce",
|
|
"failover",
|
|
"crash",
|
|
"SEGV",
|
|
"endpoint_connect",
|
|
"iomgr",
|
|
"reconnect",
|
|
"E2E"
|
|
],
|
|
"related_bugs": [
|
|
"bug-609",
|
|
"bug-608"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-17T15:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-613",
|
|
"timestamp": "2026-06-16T13:15:11.048Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/libxce-failover/design.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-16T13:15:11.048Z"
|
|
},
|
|
{
|
|
"id": "bug-614",
|
|
"timestamp": "2026-06-16T13:18:29.113Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/libxce-failover/design.md",
|
|
"root_cause": "Had `xce_ctx_call`",
|
|
"fix": "Changed to `xcecli_retry_next`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-16T13:18:35.874Z"
|
|
},
|
|
{
|
|
"id": "bug-617",
|
|
"timestamp": "2026-06-16T23:38:24.000Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/libxce-failover/design.md",
|
|
"root_cause": "Had `redirect_host/port`",
|
|
"fix": "Changed to `host/port`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-16T23:38:53.585Z"
|
|
},
|
|
{
|
|
"id": "bug-619",
|
|
"timestamp": "2026-06-16T23:40:22.003Z",
|
|
"error_message": "Wrong reference: address should be hint",
|
|
"file": ".kiro/specs/libxce-failover/tasks.md",
|
|
"root_cause": "Used \"address\" instead of \"hint\"",
|
|
"fix": "Changed address \u2192 hint",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-16T23:40:22.003Z"
|
|
},
|
|
{
|
|
"id": "bug-623",
|
|
"timestamp": "2026-06-17T00:04:51.775Z",
|
|
"error_message": "Wrong reference: XCE_MAXHOST_LEN should be XCE_MAXHOSTNAME_LEN",
|
|
"file": ".kiro/specs/libxce-failover/design.md",
|
|
"root_cause": "Used \"XCE_MAXHOST_LEN\" instead of \"XCE_MAXHOSTNAME_LEN\"",
|
|
"fix": "Changed XCE_MAXHOST_LEN \u2192 XCE_MAXHOSTNAME_LEN",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-17T00:04:51.775Z"
|
|
},
|
|
{
|
|
"id": "bug-624",
|
|
"timestamp": "2026-06-17T02:35:29.695Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/lib/meson.build",
|
|
"root_cause": "Had 'dataq.c'",
|
|
"fix": "Changed to 'client_failover.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-17T02:35:29.695Z"
|
|
},
|
|
{
|
|
"id": "bug-626",
|
|
"timestamp": "2026-06-17T02:48:27.547Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/client_failover.c",
|
|
"root_cause": "No early return/throw for edge case: ac == NULL || host_out == NULL || host_sz == 0 || port_out =",
|
|
"fix": "Added guard clause: if (ac == NULL || host_out == NULL || host_s)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-17T02:48:27.547Z"
|
|
},
|
|
{
|
|
"id": "bug-629",
|
|
"timestamp": "2026-06-17T03:18:22.365Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/client_failover.c",
|
|
"root_cause": "No early return/throw for edge case: base >= (double",
|
|
"fix": "Added guard clause: if (base >= (double)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-17T03:18:22.365Z"
|
|
},
|
|
{
|
|
"id": "bug-631",
|
|
"timestamp": "2026-06-17T03:31:29.120Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/client_failover.c",
|
|
"root_cause": "No early return/throw for edge case: ac == NULL",
|
|
"fix": "Added guard clause: if (ac == NULL)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-17T03:31:29.120Z"
|
|
},
|
|
{
|
|
"id": "bug-633",
|
|
"timestamp": "2026-06-17T03:40:10.853Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/client_failover.c",
|
|
"root_cause": "No early return/throw for edge case: ac == NULL",
|
|
"fix": "Added guard clause: if (ac == NULL)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-17T03:40:10.853Z"
|
|
},
|
|
{
|
|
"id": "bug-635",
|
|
"timestamp": "2026-06-17T03:51:08.767Z",
|
|
"error_message": "Wrong return value",
|
|
"file": "src/lib/client.c",
|
|
"root_cause": "Was returning: xce_reslist(&(ctx->ctx), res);",
|
|
"fix": "Now returns: XCECLI_FAILOVER_CALL(ctx, /*is_write=*/false,",
|
|
"tags": [
|
|
"auto-detected",
|
|
"return-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 8,
|
|
"last_seen": "2026-06-17T03:51:29.554Z"
|
|
},
|
|
{
|
|
"id": "bug-637",
|
|
"timestamp": "2026-06-17T03:57:33.232Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/libxce-failover/design.md",
|
|
"root_cause": "Had `nop`",
|
|
"fix": "Changed to `jobinfo`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-17T03:57:40.348Z"
|
|
},
|
|
{
|
|
"id": "bug-638",
|
|
"timestamp": "2026-06-17T04:02:05.572Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/client_failover.c",
|
|
"root_cause": "No early return/throw for edge case: ac == NULL",
|
|
"fix": "Added guard clause: if (ac == NULL)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-17T04:02:05.572Z"
|
|
},
|
|
{
|
|
"id": "bug-639",
|
|
"timestamp": "2026-06-17T04:11:59.759Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'testsuite/test_p1_integration.c'",
|
|
"fix": "Changed to 'testsuite/test_join_redirect.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-17T04:11:59.759Z"
|
|
},
|
|
{
|
|
"id": "bug-640",
|
|
"timestamp": "2026-06-17T04:12:01.203Z",
|
|
"error_message": "Wrong reference: test_p1_integration should be test_join_redirect",
|
|
"file": "src/controller/testsuite/controller_test.c",
|
|
"root_cause": "Used \"test_p1_integration\" instead of \"test_join_redirect\"",
|
|
"fix": "Changed test_p1_integration \u2192 test_join_redirect",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-17T04:12:02.464Z"
|
|
},
|
|
{
|
|
"id": "bug-641",
|
|
"timestamp": "2026-06-17T04:19:58.697Z",
|
|
"error_message": "Wrong reference: test_recover_resets_err_state_to_run should be test_decide_jitter_staggers_many_clients",
|
|
"file": "src/lib/testsuite/test_libxce_retry.c",
|
|
"root_cause": "Used \"test_recover_resets_err_state_to_run\" instead of \"test_decide_jitter_staggers_many_clients\"",
|
|
"fix": "Changed test_recover_resets_err_state_to_run \u2192 test_decide_jitter_staggers_many_clients",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-17T04:19:58.697Z"
|
|
},
|
|
{
|
|
"id": "bug-644",
|
|
"timestamp": "2026-06-17T08:15:04.978Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/lib/meson.build",
|
|
"root_cause": "Had 'testsuite/test_raft.c'",
|
|
"fix": "Changed to 'testsuite/test_netio_arm_failure.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-17T08:15:04.978Z"
|
|
},
|
|
{
|
|
"id": "bug-646",
|
|
"timestamp": "2026-06-17T08:21:32.099Z",
|
|
"error_message": "xce_test jobsub hangs forever after a failover; main thread blocked in cbuf_get (xceapi.c:304) while io_worker sits idle in epoll_wait. Logs: 'rotate failed (rc=-111)' then 'endpoint_update_epoll rc1=-1 < 0'.",
|
|
"file": "src/lib/netio.c",
|
|
"root_cause": "endpoint_update_epoll() swallowed iomgr_update_poll() failures: it WARN'd 'rc1=-1' but returned 0 and left ep->flags unchanged, so the poll interest was never armed. iomgr_update_poll uses EPOLL_CTL_MOD, which fails with ENOENT when the fd is no longer registered (e.g. after a failed reconnect: xce_ctx_reconnect endpoint_fini's the old fd but only iomgr_monitor/EPOLL_CTL_ADDs on a SUCCESSFUL connect). The next endpoint_enq() send then MOD-failed silently, request bytes were never flushed, no reply arrived, and the synchronous client blocked forever in cbuf_get (no timeout) with no socket-drop event to wake it (handle_disconnect only fires on a broken socket). Server side was a red herring: DEFAULT_SYNC_TIMEOUT_MS=500 bounds the commit barrier, and ha_dispatch_gate already replies STANDBY/NOT_READY for non-serving roles.",
|
|
"fix": "endpoint_update_epoll() captures errno and RETURNS -errno (not 0) on iomgr_update_poll failure. endpoint_enq(): on negative arm result, run handle_error(ep) (iomgr_unmonitor + handle_disconnect -> state=ERR + inject -ECONNRESET into wbuf, waking the blocked cbuf_get) and return the error so the failover loop rotates. handle_output(): propagates the arm failure so io_handler runs the error path. TDD: test_netio_arm_failure.c drives EPOLL_CTL_MOD ENOENT via endpoint_enq on an unregistered fd; asserts loud rc<0 + err_handler fired (verified red without fix, green with).",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c",
|
|
"libxce",
|
|
"failover",
|
|
"netio",
|
|
"epoll",
|
|
"EPOLL_CTL_MOD",
|
|
"ENOENT",
|
|
"silent-failure",
|
|
"hang",
|
|
"cbuf_get",
|
|
"reconnect"
|
|
],
|
|
"related_bugs": [
|
|
"bug-610",
|
|
"bug-609"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-17T16:30:00Z"
|
|
},
|
|
{
|
|
"id": "bug-647",
|
|
"timestamp": "2026-06-17T08:21:56.735Z",
|
|
"error_message": "Wrong reference: 611 should be 646",
|
|
"file": "src/lib/netio.c",
|
|
"root_cause": "Used \"611\" instead of \"646\"",
|
|
"fix": "Changed 611 \u2192 646",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-17T08:21:56.735Z"
|
|
},
|
|
{
|
|
"id": "bug-648",
|
|
"timestamp": "2026-06-17T17:30:00Z",
|
|
"error_message": "Peer-close/EOF on an SSL connection was swallowed: io_fsm_do() set fsm->state=FSM_STATE_ERROR but returned rc=0 on a clean EOF, so handle_input() returned >=0, handle_error/handle_disconnect never ran, and a blocked cbuf_get() reply-waiter was not woken on the first close event.",
|
|
"file": "src/lib/netio.c",
|
|
"root_cause": "io_fsm_do() computed rc = -errno when a closed/reset connection was detected. By OpenSSL 3.x contract (verified against docs + a live probe on OpenSSL 3.6.0), a peer close makes SSL_read() return 0 and is reported via SSL_get_error(), NOT via the return value or errno: clean close_notify -> SSL_ERROR_ZERO_RETURN (errno 0); unexpected EOF (FIN, no close_notify) -> SSL_ERROR_SSL since OpenSSL 3.0 (pre-3.0 it was SSL_ERROR_SYSCALL with errno 0 -- documented); RST -> SSL_ERROR_SYSCALL errno=ECONNRESET. errno is only meaningful for SSL_ERROR_SYSCALL; for SSL_ERROR_SSL the error queue is authoritative and any errno (we observed EPIPE=32) is a leaked side effect of OpenSSL's internal alert-write (write() on a broken connection returns EPIPE; read() never does). So -errno is 0 for the documented EOF cases -> the close looked like success. NOTE: on this 3.6 build a process-death FIN surfaced as SSL_ERROR_SSL/errno=32, which the OLD code propagated -- so this swallow is NOT necessarily the cause of the observed controller-kill permanent hang (that still implicates the reconnect/SSL-handshake path); it is a real, separate, errno-dependent non-determinism.",
|
|
"fix": "Extracted pure io_classify_io_error(ssl_err, ecode, io_rc): returns 0 only for WANT_READ/WANT_WRITE and EAGAIN/EWOULDBLOCK syscall; otherwise returns a NEGATIVE error ((ecode!=0)?-ecode:-ECONNRESET) so a detected close NEVER returns 0 regardless of the unreliable errno. io_fsm_do() now sets FSM_STATE_ERROR iff the classifier returns <0. TDD: test_netio_close_propagation.c asserts ZERO_RETURN/errno0 and SSL_ERROR_SSL/EOF map to <0 (verified red with old -ecode, green with fix). libxce suite 168/0; controller_unit_test links clean.",
|
|
"tags": [
|
|
"libxce",
|
|
"netio",
|
|
"ssl",
|
|
"SSL_read",
|
|
"EOF",
|
|
"close_notify",
|
|
"openssl-3.x",
|
|
"SSL_ERROR_ZERO_RETURN",
|
|
"SSL_ERROR_SSL",
|
|
"silent-failure",
|
|
"hang"
|
|
],
|
|
"related_bugs": [
|
|
"bug-646",
|
|
"bug-610"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-17T17:30:00Z"
|
|
},
|
|
{
|
|
"id": "bug-651",
|
|
"timestamp": "2026-06-17T10:44:37.350Z",
|
|
"error_message": "Wrong return value",
|
|
"file": "src/lib/request.c",
|
|
"root_cause": "Was returning: 0;",
|
|
"fix": "Now returns: (enq_rc < 0) ? enq_rc : 0;",
|
|
"tags": [
|
|
"auto-detected",
|
|
"return-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-17T10:44:37.350Z"
|
|
},
|
|
{
|
|
"id": "bug-650",
|
|
"timestamp": "2026-06-17T18:30:00Z",
|
|
"error_message": "xce_test jobsub hangs in cbuf_get (xceapi.c:304) after failover even with bug-646/648 deployed. Log shows 'endpoint marked dead' (bug-646 firing) then a permanent hang; target primary (ctrl-2) is fully idle (no vtask in handle_jobsubmit) and the client fd is an unconnected TCP socket \u2014 the request was never transmitted yet the client waits for a reply forever.",
|
|
"file": "src/lib/request.c",
|
|
"root_cause": "xce_request() and the 5 other request.c senders (xce_reply, xce_replconfigpush_req_raw, xce_wal_batch_req_raw, xce_snapshot_chunk_req_raw, xce_replconfig_reply_raw) called endpoint_enq(ep,&pkt->link) and IGNORED its return, always `return 0`. So when the transport was dead, endpoint_enq() correctly returned <0 and ran handle_error() (bug-646 fix) \u2014 but xce_request() swallowed that <0 and reported success. xce_jobsubmit() (xceapi.c:299-304) then saw rc>=0 and fell through to the BLOCKING cbuf_get(); the request was never flushed (server idle) and when err_handler was NULL after a failed reconnect, handle_disconnect never injected -ECONNRESET, so nothing woke the waiter. The bug-646 netio fix was defeated one layer up: the request layer reported success on a failed send. This was the missing link making every prior netio fix insufficient for the live hang.",
|
|
"fix": "All six request.c senders propagate the enq result: `int enq_rc = endpoint_enq(ep,&pkt->link); return (enq_rc < 0) ? enq_rc : 0;`. A failed send now returns <0 through xce_jobsubmit_req -> xce_jobsubmit, which returns before cbuf_get; the failover loop classifies the transport error and rotates instead of blocking on a reply that never arrives. TDD: test_request_send_propagation.c builds an OPCode_nop request (encodes OK) on a dead endpoint (EPOLL_CTL_MOD ENOENT) and asserts xce_request returns <0 (verified red with old `return 0`, green with fix). libxce 169/0; controller_unit_test links clean.",
|
|
"tags": [
|
|
"libxce",
|
|
"request",
|
|
"xce_request",
|
|
"failover",
|
|
"silent-failure",
|
|
"hang",
|
|
"cbuf_get",
|
|
"endpoint_enq",
|
|
"send-propagation"
|
|
],
|
|
"related_bugs": [
|
|
"bug-646",
|
|
"bug-648"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-17T18:30:00Z"
|
|
},
|
|
{
|
|
"id": "bug-654",
|
|
"timestamp": "2026-06-17T11:21:51.571Z",
|
|
"error_message": "Wrong return value",
|
|
"file": "src/lib/testsuite/test_netio_arm_failure.c",
|
|
"root_cause": "Was returning: a negative error and (2) invoke the endpoint's err",
|
|
"fix": "Now returns: a negative, RETRIABLE error so the caller propagat",
|
|
"tags": [
|
|
"auto-detected",
|
|
"return-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-17T11:21:51.571Z"
|
|
},
|
|
{
|
|
"id": "bug-656",
|
|
"timestamp": "2026-06-17T11:22:17.916Z",
|
|
"error_message": "Wrong reference: test_enq_arm_failure_is_loud_and_fires_errhandler should be test_enq_arm_failure_is_loud_no_errhandler",
|
|
"file": "src/lib/testsuite/test_netio_arm_failure.c",
|
|
"root_cause": "Used \"test_enq_arm_failure_is_loud_and_fires_errhandler\" instead of \"test_enq_arm_failure_is_loud_no_errhandler\"",
|
|
"fix": "Changed test_enq_arm_failure_is_loud_and_fires_errhandler \u2192 test_enq_arm_failure_is_loud_no_errhandler",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-17T11:22:17.916Z"
|
|
},
|
|
{
|
|
"id": "bug-652",
|
|
"timestamp": "2026-06-17T19:10:00Z",
|
|
"error_message": "Controller (primary) self-deadlocks on ha->lock after bug-646/650 deploy: jobsub now works, but the controller freezes. gdb shows Thread 3 in primary_heartbeat_fn holding ha->lock (owner=self) and re-acquiring it via xce_nop_req -> xce_request -> endpoint_enq -> handle_error -> vote_ep_err_handler (ha.c:3478); Thread 9 (io_worker) also blocked on the same ha->lock. Whole controller frozen.",
|
|
"file": "src/lib/netio.c",
|
|
"root_cause": "REGRESSION from bug-646: endpoint_enq() invoked handle_error() synchronously on the send path when the poll arm failed. handle_error() calls the endpoint's err_handler, which on a controller vote endpoint is vote_ep_err_handler() \u2014 it locks ha->lock. But endpoint_enq runs on the CALLER's thread, and the controller's primary_heartbeat_fn already holds ha->lock when it sends heartbeat NOPs. Non-recursive mutex -> self-deadlock. The err_handler is contractually an io_worker-thread callback (off an epoll error event, holding no caller locks); calling it from the synchronous send path violated that. With bug-650 now propagating the enq error up the return chain, the handle_error call in endpoint_enq was both redundant and harmful.",
|
|
"fix": "endpoint_enq() no longer calls handle_error(); on arm failure it just returns a RETRIABLE -ECONNRESET. The caller propagates it (request.c senders return it -> client failover classifies ECONNRESET as RETRY_NOW and rotates; controller heartbeat path simply gets the error, no lock re-entry). The real teardown stays on the io_worker thread (handle_input/handle_output -> io_handler -> handle_error), which holds no caller locks. Updated test_netio_arm_failure.c: endpoint_enq must return <0 AND must NOT invoke the err_handler (g_err_count==0). libxce 169/0; controller_unit_test links clean.",
|
|
"tags": [
|
|
"libxce",
|
|
"netio",
|
|
"endpoint_enq",
|
|
"deadlock",
|
|
"self-deadlock",
|
|
"ha-lock",
|
|
"reentrancy",
|
|
"regression",
|
|
"controller",
|
|
"vote_ep_err_handler"
|
|
],
|
|
"related_bugs": [
|
|
"bug-646",
|
|
"bug-650"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-17T19:10:00Z"
|
|
},
|
|
{
|
|
"id": "bug-658",
|
|
"timestamp": "2026-06-17T14:46:54.135Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Condition was: if (role == CTRL_STANDBY && ha_heartbeat_is_fresh(ha)",
|
|
"fix": "Changed to: if (role == CTRL_STANDBY && ha->primary_ctrl_fd >= 0 &)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-17T14:46:54.135Z"
|
|
},
|
|
{
|
|
"id": "bug-659",
|
|
"timestamp": "2026-06-17T14:47:25.446Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/cluster.c",
|
|
"root_cause": "Condition was: if (role == CTRL_STANDBY &&\n )",
|
|
"fix": "Changed to: if (role == CTRL_STANDBY &&\n )",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-17T14:47:25.446Z"
|
|
},
|
|
{
|
|
"id": "bug-660",
|
|
"timestamp": "2026-06-17T22:00:00Z",
|
|
"error_message": "Failover election takes minutes (11+ PreVote rounds) to converge. A standby keeps denying a legitimately-higher-term candidate's PreVote with reason=fresh_heartbeat for ~2.5 min AFTER its primary died (ctrl-3 killed 21:44:14, ctrl-2 logs 'PreVote DENIED ... reason=fresh_heartbeat (my_term=3)' until 21:46:58).",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "The PreVote/vote eligibility gate raft_cb_vote_eligible (ha.c:311) denied on `role==CTRL_STANDBY && ha_heartbeat_is_fresh(ha)` \u2014 checking freshness ALONE. ha_heartbeat_is_fresh derives from ha->last_activity, but ha_arm_heartbeat_timeout_vtask resets last_activity=now on EVERY watchdog (re-)arm, and ha_prevote_rearm_liveness re-arms it after every lost PreVote. So a node with NO live primary perpetually refreshes its own 'fresh heartbeat' each failover cycle and denies all other candidates (reason=fresh_heartbeat), blocking convergence until it happens to restart. The sibling gate in handle_request_vote (ha.c:2205) already required `primary_ctrl_fd >= 0 && is_fresh`; raft_cb_vote_eligible was missing the primary_ctrl_fd guard. The existing fresh-deny tests even documented the intent ('the deny gate requires a live connection AND a fresh heartbeat', set primary_ctrl_fd=999), but production didn't enforce it.",
|
|
"fix": "Added `ha->primary_ctrl_fd >= 0 &&` to the ha.c:311 eligibility gate (mirrors ha.c:2205). primary_ctrl_fd is -1 on init / after the primary RDHUPs / after the liveness watchdog fires, and a real fd only via config_repl.c:1451 (first ctrlhello from the live primary) \u2014 so a dead/absent primary no longer masquerades as fresh and the standby GRANTS, converging in ~1 round. Kept cluster.c:526 denial-reason logging in sync. TDD: test_pre_vote_dead_primary_grants_despite_fresh_activity (fresh last_activity + primary_ctrl_fd=-1 -> GRANT); verified RED (Expected 1 Was 0) without the guard, GREEN with it, and the 3 existing fresh-deny tests (fd=999) unaffected. Full controller suite + libxce 169/0, zero regressions.",
|
|
"tags": [
|
|
"controller",
|
|
"ha",
|
|
"election",
|
|
"prevote",
|
|
"convergence",
|
|
"fresh_heartbeat",
|
|
"raft_cb_vote_eligible",
|
|
"primary_ctrl_fd",
|
|
"slow-election"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-17T22:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-661",
|
|
"timestamp": "2026-06-17T23:30:00Z",
|
|
"error_message": "3-node failover test lost committed jobs: 7 earliest JobIds (WAL LSN<=20), majority-ACKed and survived first failover, permanently gone after a restarted node with near-empty WAL won election. joblist dropped from 10 to 3.",
|
|
"file": "src/controller/persist.c, src/controller/commit.c, src/controller/repl.c",
|
|
"root_cause": "'committed' does not imply 'durable'. WAL fsync is asynchronous (persist.c:173 fsync_worker, timer wal_sync_ms); persist_append and the standby WalAck path do NOT fdatasync before ACK. commit_on_ack (commit.c:303) advances committed_lsn on majority ACK = OS page cache only, durable on zero disks. On kill+restart, killed nodes lose the not-yet-fsynced tail; persist_recover hits CRC break at zeroed region (prev_crc=00000000, offset 40) and truncates replay to ~0 entries, yet the hollow node stays eligible, wins election under degraded required=1 quorum (PreVote+freshness gate cannot fence it because the committed entries were durable on nobody), self-promotes advertising committed_lsn=21 over an empty job table, and the node holding the real data converges DOWN. Violates Leader-Completeness assumption (majority-ACK != durable-on-majority) in src/controller/CLAUDE.md.",
|
|
"fix": "NOT YET FIXED. Discovery -> new spec ha-commit-durability (Path C, brief written). R1 fsync-before-ACK (standby fdatasync before WalAck, primary self-count only after local fdatasync, committed_lsn advances only on durable majority, group-commit to bound latency). R2 promotion fence (WAL CRC/replay failure => ineligible to lead until caught up, FATAL not silent truncate; never lead below known committed high-water even under degraded quorum). Live E2E reproduces via xce_test jobsub + primary kills on /xce-deploy-ha. DETERMINISTIC REPRO (task 1.3, 2026-06-18): `bash src/tools/test-commit-durability.sh --deterministic` launches the cluster with --wal-sync-ms 30000 (plumbed via deploy-ha.sh start.sh `$*` passthrough, EXTRA_CTRL_ARGS) so the primary's fsync_worker never fires in-window -> every committed entry is page-cache-only on the primary (majority_candidate_locked counts cap=highest_appended_lsn=current_lsn-1, NOT durable). It then drives rolling PRIMARY kills (each right after committing to that primary) + restart, so hollow nodes re-lead. RED CONFIRMED: 6-round run lost the 3 EARLIEST committed JobIds permanently (rounds 4 and 6 + final check), Results 5 passed/3 failed, exit=1 \u2014 matching the incident signature (earliest jobs gone). NOTE: a single double-kill does NOT repro \u2014 this codebase enforces strict majority (lone survivor will NOT self-elect: log shows 'no single-voter primary within 40s'); loss needs the ROLLING/term-accumulating path the incident used. Evidence log: dur-det-run.log in worktree.",
|
|
"tags": [
|
|
"controller",
|
|
"ha",
|
|
"durability",
|
|
"fsync",
|
|
"wal",
|
|
"commit-engine",
|
|
"data-loss",
|
|
"failover",
|
|
"leader-completeness",
|
|
"promotion-fence",
|
|
"async-fsync",
|
|
"deterministic-repro",
|
|
"wal-sync-ms"
|
|
],
|
|
"related_bugs": [
|
|
"bug-339",
|
|
"bug-447",
|
|
"bug-396"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-18T00:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-662",
|
|
"timestamp": "2026-06-17T23:34:32.115Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "../../../../../claude/.claude/projects/-home-rshen-projects-xce-xce/memory/MEMORY.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-17T23:34:32.115Z"
|
|
},
|
|
{
|
|
"id": "bug-664",
|
|
"timestamp": "2026-06-17T23:59:44.577Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/tools/test-commit-durability.sh",
|
|
"root_cause": "Had \"${2:-6}\"",
|
|
"fix": "Changed to \"${2:-8}\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"sh"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-17T23:59:50.630Z"
|
|
},
|
|
{
|
|
"id": "bug-666",
|
|
"timestamp": "2026-06-18T02:32:07.670Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/ha-commit-durability/brief.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-18T02:32:07.670Z"
|
|
},
|
|
{
|
|
"id": "bug-667",
|
|
"timestamp": "2026-06-18T02:35:08.157Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/steering/roadmap.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-18T02:35:08.157Z"
|
|
},
|
|
{
|
|
"id": "bug-668",
|
|
"timestamp": "2026-06-18T03:12:26.259Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-commit-durability/design.md",
|
|
"root_cause": "Had `persist.c:515`",
|
|
"fix": "Changed to `fsync_worker`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 5,
|
|
"last_seen": "2026-06-18T03:15:00.270Z"
|
|
},
|
|
{
|
|
"id": "bug-671",
|
|
"timestamp": "2026-06-18T03:15:13.287Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/steering/roadmap.md",
|
|
"root_cause": "Had `fsync_worker`",
|
|
"fix": "Changed to `/kiro-validate-design`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T03:15:13.287Z"
|
|
},
|
|
{
|
|
"id": "bug-673",
|
|
"timestamp": "2026-06-18T03:50:26.761Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/CLAUDE.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-18T03:50:26.761Z"
|
|
},
|
|
{
|
|
"id": "bug-676",
|
|
"timestamp": "2026-06-18T04:00:06.872Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-commit-durability/design.md",
|
|
"root_cause": "Had `src/include/persist.h`",
|
|
"fix": "Changed to `persist_wal_sync_append`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T04:00:06.872Z"
|
|
},
|
|
{
|
|
"id": "bug-677",
|
|
"timestamp": "2026-06-18T04:39:24.460Z",
|
|
"error_message": "Wrong reference: myconf_t should be uint32_t",
|
|
"file": "src/include/myconf.h",
|
|
"root_cause": "Used \"myconf_t\" instead of \"uint32_t\"",
|
|
"fix": "Changed myconf_t \u2192 uint32_t",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T04:39:24.460Z"
|
|
},
|
|
{
|
|
"id": "bug-678",
|
|
"timestamp": "2026-06-18T04:50:36.884Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'commit.c'",
|
|
"fix": "Changed to 'testsuite/test_commit_durability.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T04:50:36.884Z"
|
|
},
|
|
{
|
|
"id": "bug-679",
|
|
"timestamp": "2026-06-18T04:51:30.430Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "No early return/throw for edge case: !p",
|
|
"fix": "Added guard clause: if (!p)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T04:51:30.430Z"
|
|
},
|
|
{
|
|
"id": "bug-682",
|
|
"timestamp": "2026-06-18T05:02:07.556Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/tools/test-commit-durability.sh",
|
|
"root_cause": "Had \"$(mktemp /tmp/xce-durability-acked.XXXXXX)\"",
|
|
"fix": "Changed to \"$(mktemp \"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"sh"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T05:02:07.556Z"
|
|
},
|
|
{
|
|
"id": "bug-684",
|
|
"timestamp": "2026-06-18T05:28:05.352Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/tools/test-commit-durability.sh",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"sh"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-18T05:29:29.811Z"
|
|
},
|
|
{
|
|
"id": "bug-686",
|
|
"timestamp": "2026-06-18T05:43:02.761Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-18T05:45:15.732Z"
|
|
},
|
|
{
|
|
"id": "bug-688",
|
|
"timestamp": "2026-06-18T05:54:46.908Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/include/persist.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-18T05:54:55.010Z"
|
|
},
|
|
{
|
|
"id": "bug-690",
|
|
"timestamp": "2026-06-18T05:55:33.474Z",
|
|
"error_message": "Wrong reference: else should be RUN_TEST",
|
|
"file": "src/controller/testsuite/test_commit_durability.c",
|
|
"root_cause": "Used \"else\" instead of \"RUN_TEST\"",
|
|
"fix": "Changed else \u2192 RUN_TEST",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T05:55:33.474Z"
|
|
},
|
|
{
|
|
"id": "bug-692",
|
|
"timestamp": "2026-06-18T05:59:17.869Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-18T06:00:42.436Z"
|
|
},
|
|
{
|
|
"id": "bug-693",
|
|
"timestamp": "2026-06-18T06:05:00.000Z",
|
|
"error_message": "durable_lsn advanced even when fdatasync FAILED (EIO/ENOSPC) at two of three sites (flusher_flush_once, persist_stop), letting a non-durable LSN count toward the commit majority",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "ha-commit-durability task 2.1 flush sites called fdatasync(p->wal_fd) without capturing/checking the return code, then advanced durable_lsn unconditionally. On sync error the bytes are not on stable storage, violating Req 1.1/1.2 and the fail-loud preference.",
|
|
"fix": "Capture int rc = fdatasync(...) at every durable_lsn advance site (flusher_flush_once gating + fallback paths, persist_stop) and advance durable_lsn ONLY when rc == 0; on error leave durable_lsn unchanged and log loudly via ERROR(). persist_flush already gated on rc==0 (reference). Added XCE_TESTING fault-injection seam (test_force_fsync_fail + persist_test_set_force_fsync_fail + flusher_fsync_forced_fail helper, constant-false in production) and error-path test test_durable_lsn_holds_on_fsync_failure proving durable_lsn holds at baseline under injected failure and recovers when cleared.",
|
|
"tags": [
|
|
"ha-commit-durability",
|
|
"durability",
|
|
"fdatasync",
|
|
"fail-loud",
|
|
"remediation",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T06:05:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-694",
|
|
"timestamp": "2026-06-18T06:09:08.298Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "../../../../../claude/.claude/projects/-home-rshen-projects-xce-xce/memory/project_ha_commit_durability.md",
|
|
"root_cause": "Had `/kiro-spec-init ha-commit-durability`",
|
|
"fix": "Changed to 't fence the stale node because the entries were d",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T06:09:08.298Z"
|
|
},
|
|
{
|
|
"id": "bug-695",
|
|
"timestamp": "2026-06-18T06:12:59.924Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/include/persist.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T06:12:59.924Z"
|
|
},
|
|
{
|
|
"id": "bug-696",
|
|
"timestamp": "2026-06-18T06:13:32.891Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T06:13:32.891Z"
|
|
},
|
|
{
|
|
"id": "bug-697",
|
|
"timestamp": "2026-06-18T06:13:40.659Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "No early return/throw for edge case: !p",
|
|
"fix": "Added guard clause: if (!p)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T06:13:40.659Z"
|
|
},
|
|
{
|
|
"id": "bug-699",
|
|
"timestamp": "2026-06-18T06:14:16.158Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/commit.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T06:14:16.158Z"
|
|
},
|
|
{
|
|
"id": "bug-701",
|
|
"timestamp": "2026-06-18T06:15:45.248Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/testsuite/test_commit_durability.c",
|
|
"root_cause": "Had \"config.h\"",
|
|
"fix": "Changed to \"commit.h\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T06:15:45.248Z"
|
|
},
|
|
{
|
|
"id": "bug-704",
|
|
"timestamp": "2026-06-18",
|
|
"error_message": "controller suite regressions after capping commit self-contribution at durable_lsn: test_repl_majority/test_commit_barrier_rollout/test_coldstart_lsn0/test_demotion_convergence got -ETIMEDOUT / committed_lsn=0 (Expected N Was 0)",
|
|
"file": "src/controller/testsuite/{test_repl_majority,test_commit_barrier_rollout,test_coldstart_lsn0,test_demotion_convergence}.c",
|
|
"root_cause": "ha-commit-durability 2.2 changed majority_candidate_locked self-cap from highest_appended_lsn to persist_durable_lsn. Existing commit-path fixtures prime current_lsn (appended tip) but never set durable_lsn, so under the new cap self contributed 0 and committed_lsn never advanced.",
|
|
"fix": "In every commit-path stub/in-memory-primed fixture, set durable_lsn to the appended tip (appended_lsn / current_lsn-1) right after committed_lsn=0, preserving the pre-durability 'self covers every appended entry' model. The durability precondition itself is exercised by dedicated new tests.",
|
|
"tags": [
|
|
"durable",
|
|
"commit",
|
|
"majority",
|
|
"self-cap",
|
|
"test-fixture",
|
|
"ha-commit-durability",
|
|
"task-2.2"
|
|
],
|
|
"related_bugs": [
|
|
"bug-661",
|
|
"bug-693"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18"
|
|
},
|
|
{
|
|
"id": "bug-705",
|
|
"timestamp": "2026-06-18T06:33:12.523Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/include/persist.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-18T06:33:25.815Z"
|
|
},
|
|
{
|
|
"id": "bug-707",
|
|
"timestamp": "2026-06-18T06:34:06.875Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "No early return/throw for edge case: p",
|
|
"fix": "Added guard clause: if (p)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T06:34:06.875Z"
|
|
},
|
|
{
|
|
"id": "bug-708",
|
|
"timestamp": "2026-06-18T06:34:36.356Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_commit_durability.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T06:34:36.356Z"
|
|
},
|
|
{
|
|
"id": "bug-711",
|
|
"timestamp": "2026-06-18T06:50:49.987Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "No early return/throw for edge case: written_lsn > durable",
|
|
"fix": "Added guard clause: if (written_lsn > durable)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T06:50:49.987Z"
|
|
},
|
|
{
|
|
"id": "bug-714",
|
|
"timestamp": "2026-06-18T07:00:36.008Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "No early return/throw for edge case: written_lsn > durable",
|
|
"fix": "Added guard clause: if (written_lsn > durable)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T07:00:36.008Z"
|
|
},
|
|
{
|
|
"id": "bug-720",
|
|
"timestamp": "2026-06-18T07:52:20.595Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/controller/testsuite/test_commit_durability.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: /* task 3.2 \u2014 Boot Policy Decision Table skeletons (IGNORED,; * 3.3/4.3). Registered so each row is reported as IGNORED, n",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-18T07:52:29.952Z"
|
|
},
|
|
{
|
|
"id": "bug-721",
|
|
"timestamp": "2026-06-18T08:04:18.857Z",
|
|
"error_message": "Missing error handling in enum",
|
|
"file": "src/include/persist.h",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: /* Bounded catch-up window (ha-commit-durability task 3.3, R; * The FINITE deadline a recovery-truncated / behind member i",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-18T08:04:38.131Z"
|
|
},
|
|
{
|
|
"id": "bug-726",
|
|
"timestamp": "2026-06-18T08:19:47.036Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T08:19:47.036Z"
|
|
},
|
|
{
|
|
"id": "bug-728",
|
|
"timestamp": "2026-06-18T08:39:54.889Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-commit-durability/design.md",
|
|
"root_cause": "Had `durable_floor \u2264 applied_lsn`",
|
|
"fix": "Changed to `applied_lsn`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T08:39:54.889Z"
|
|
},
|
|
{
|
|
"id": "bug-732",
|
|
"timestamp": "2026-06-18T08:51:34.635Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/testsuite/test_ha_vote_gate.c",
|
|
"root_cause": "No early return/throw for edge case: !mkdtemp(tmp",
|
|
"fix": "Added guard clause: if (!mkdtemp(tmp)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T08:51:34.635Z"
|
|
},
|
|
{
|
|
"id": "bug-733",
|
|
"timestamp": "2026-06-18T08:52:12.840Z",
|
|
"error_message": "Wrong return value",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Was returning: persist_durable_floor(p);",
|
|
"fix": "Now returns: floor > 8ULL ? floor : 8ULL; /* BUG: pretends lear",
|
|
"tags": [
|
|
"auto-detected",
|
|
"return-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T08:52:12.840Z"
|
|
},
|
|
{
|
|
"id": "bug-735",
|
|
"timestamp": "2026-06-18T09:08:09.215Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: /* \u2500\u2500 ha-commit-durability task 4.3: pre-promotion eligibili; * Refuse promotion BEFORE the node becomes authoritative CTR",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-18T09:08:55.973Z"
|
|
},
|
|
{
|
|
"id": "bug-736",
|
|
"timestamp": "2026-06-18T09:09:28.348Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/controller/testsuite/test_commit_durability.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: /* Empty first-boot WAL: durable=0, HWM=0 -> ELIGIBLE. A fr; * member is not behind anything and must be promotable (no f",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-18T09:10:32.435Z"
|
|
},
|
|
{
|
|
"id": "bug-738",
|
|
"timestamp": "2026-06-18T09:45:40.163Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_commit_durability.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-18T09:50:15.505Z"
|
|
},
|
|
{
|
|
"id": "bug-739",
|
|
"timestamp": "2026-06-18T09:46:18.019Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/include/persist.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-18T09:46:36.395Z"
|
|
},
|
|
{
|
|
"id": "bug-740",
|
|
"timestamp": "2026-06-18T09:46:46.814Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-18T09:47:04.913Z"
|
|
},
|
|
{
|
|
"id": "bug-741",
|
|
"timestamp": "2026-06-18T09:49:58.840Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/controller/testsuite/test_commit_durability.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: /* Test-injectable send hook (defined in repl.c under XCE_TE; * repl_broadcast from dereferencing the dummy endpoints as r",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-18T09:50:07.979Z"
|
|
},
|
|
{
|
|
"id": "bug-743",
|
|
"timestamp": "2026-06-18T10:25:02.673Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/controller/ha.h",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: /* ha_cancel_promotion_fence_timer: cancel a pending bounded; * (idempotent; no-op when none is armed). Called when the m",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-18T10:27:05.112Z"
|
|
},
|
|
{
|
|
"id": "bug-745",
|
|
"timestamp": "2026-06-18T10:26:34.227Z",
|
|
"error_message": "Wrong operator: != should be ==",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Used \"!=\" instead of \"==\"",
|
|
"fix": "Changed operator != \u2192 ==",
|
|
"tags": [
|
|
"auto-detected",
|
|
"operator-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T10:26:34.227Z"
|
|
},
|
|
{
|
|
"id": "bug-746",
|
|
"timestamp": "2026-06-18T10:30:18.073Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/controller/testsuite/test_commit_durability.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: /* task 4.4 \u2014 bounded-window catch-up before FATAL (no synch; * deferred-timer FATAL only after a real bounded failure; fe",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-18T10:30:51.746Z"
|
|
},
|
|
{
|
|
"id": "bug-755",
|
|
"timestamp": "2026-06-18T10:55:31.898Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-commit-durability/design.md",
|
|
"root_cause": "Had \"bounded window\"",
|
|
"fix": "Changed to `DEFAULT_RECOVERY_CATCHUP_WINDOW_MS`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T10:55:31.898Z"
|
|
},
|
|
{
|
|
"id": "bug-759",
|
|
"timestamp": "2026-06-18T11:21:44.844Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "../../../../../claude/.claude/projects/-home-rshen-projects-xce-xce/memory/project_ha_commit_durability.md",
|
|
"root_cause": "Had `--wal-sync-ms`",
|
|
"fix": "Changed to `:FAIL:`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T11:21:44.844Z"
|
|
},
|
|
{
|
|
"id": "bug-760",
|
|
"timestamp": "2026-06-18T13:00:00Z",
|
|
"error_message": "test_commit_barrier_rollout.c:446 test_fact_hook_append_is_retained_and_nonblocking FAIL: Expected 1 Was 0 \u2014 a covering ACK must advance committed_lsn over the retained fact (6/6 deterministic)",
|
|
"file": "src/controller/testsuite/test_commit_barrier_rollout.c",
|
|
"root_cause": "ha-commit-durability task 2.2 capped the primary commit self-contribution at durable_lsn (advanced asynchronously by the demand-driven group-commit flusher) and wired a durable-advance commit-wake callback. This adjacent-spec (ha-commit-barrier-rollout) test uses a REAL persist+flusher and checks committed_lsn SYNCHRONOUSLY the instant after repl_on_ack(fact_lsn); the flusher has not yet fdatasync'd LSN1, so durable_lsn==0, self-cap==0, majority candidate==0, committed_lsn stays 0. Pre-spec the test passed (self counted the appended tip immediately). Task 2.2 primed durable_lsn in the in-memory stub fixtures (barrier_setup_vcpus) but did NOT update this real-flusher test. The implementation-note claim that this is a pre-existing /tmp-overlay fdatasync-EIO artifact is FALSE in this env: fdatasync returns rc=0 on /tmp here, and the test passed pre-spec.",
|
|
"fix": "FIXED \u2014 test_commit_barrier_rollout.c:445: insert persist_flush(g_fp) + assert persist_durable_lsn>=fact_lsn BEFORE repl_on_ack, so the covering ACK (commit_on_ack runs synchronously inside repl_on_ack) deterministically completes the durable majority. Mirrors task 2.2's durable_lsn priming of the in-memory barrier_setup_vcpus stubs. Verified: was 6/6 deterministic FAIL, now fact_hook PASS across 4 runs + meson controller suite Ok:1 Fail:0, all groups 0 Failures. Production was never affected (RETAIN facts have no waiter; WAIT-mode replies block on commit barrier commit.c:334).",
|
|
"tags": [
|
|
"ha-commit-durability",
|
|
"commit-barrier-rollout",
|
|
"durable_lsn",
|
|
"group-commit",
|
|
"test-race",
|
|
"async-durability",
|
|
"validation",
|
|
"NO-GO"
|
|
],
|
|
"related_bugs": [
|
|
"bug-661",
|
|
"bug-704"
|
|
],
|
|
"occurrences": 6,
|
|
"last_seen": "2026-06-18T13:30:00Z"
|
|
},
|
|
{
|
|
"id": "bug-761",
|
|
"timestamp": "2026-06-18T13:13:49.968Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_commit_barrier_rollout.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T13:13:49.968Z"
|
|
},
|
|
{
|
|
"id": "bug-762",
|
|
"timestamp": "2026-06-18T13:18:43.638Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/ha-commit-durability/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-18T13:18:43.638Z"
|
|
},
|
|
{
|
|
"id": "bug-763",
|
|
"timestamp": "2026-06-18T14:54:25.478Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/steering/roadmap.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-18T14:54:25.478Z"
|
|
},
|
|
{
|
|
"id": "bug-765",
|
|
"timestamp": "2026-06-18T14:30:00Z",
|
|
"error_message": "scheduler-controller-msg-gap marked 36/36 [x] but NOT truly implemented: schedUpdateJob notify path hits the bulk CREATE path (sched_update_existing_job is dead code) \u2192 corrupts/duplicates live job state, no -ENOENT; Req 3 broken at dequeue, Req 6 stores nothing (rusage never stored).",
|
|
"file": "src/scheduler/ (sched_update_existing_job dead; schedUpdateJob \u2192 CREATE path)",
|
|
"root_cause": "Tasks were checked [x] without the dequeue/update path and rusage storage actually being wired; gap surfaced only by cross-task re-audit (per-task review missed it).",
|
|
"fix": "FIXED 2026-06-18 (commits 5c1f715,93124c5,080ff78,276e26c): G-8/G-4 (route notify job-update to in-place sched_update_existing_job, all mutable fields, -ENOENT no-create); G-5 (store rusage on xce_sched_job_t via sched_apply_job_rusage + free_JobRusages_ptr); G-3 (free all 5 killer op payloads with generated deep-freers); G-7 (doc reconciliation \u2014 sched_op_name stays static in scheduler.c, lib must not depend on scheduler headers); G-6 (real white-box tests: test_handlers.c 6/6 for 9.2/9.3, test_job_update.c 10/10 for 9.4/9.5/9.7, registered as meson tests). Scheduler suite 31/31 GREEN, ASAN-clean, boundary-clean. validate-impl GO. RESIDUAL (documented, non-blocking): 9.6 dequeue worker-resvals APPLY unit test (dormant path R-3 \u2014 enqueue tested), 9.8 documented compile-time absence, 9.9 log-capture gated, 9.2 -ENOMEM fault-injection.",
|
|
"tags": [
|
|
"scheduler",
|
|
"controller",
|
|
"msg-gap",
|
|
"validate-gap",
|
|
"not-implemented",
|
|
"HIGH",
|
|
"job-state-corruption"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-18T17:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-766",
|
|
"timestamp": "2026-06-19T02:55:49.212Z",
|
|
"error_message": "Wrong return value",
|
|
"file": ".kiro/specs/scheduler-controller-msg-gap/tasks.md",
|
|
"root_cause": "Was returning: `-ENOENT` if job not found",
|
|
"fix": "Now returns: `-ENOENT` if job not found. _Remediation (bug-765,",
|
|
"tags": [
|
|
"auto-detected",
|
|
"return-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-19T02:55:49.212Z"
|
|
},
|
|
{
|
|
"id": "bug-768",
|
|
"timestamp": "2026-06-19T03:30:28.056Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/scheduler/src/schedobj.c",
|
|
"root_cause": "Condition was: if (job->rusages != NULL && job->rusages != rusages)",
|
|
"fix": "Changed to: if (job->rusages != rusages)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-19T03:30:28.056Z"
|
|
},
|
|
{
|
|
"id": "bug-772",
|
|
"timestamp": "2026-06-19T03:49:23.624Z",
|
|
"error_message": "Wrong reference: xce_sched_op_name should be sched_op_name",
|
|
"file": ".kiro/specs/scheduler-controller-msg-gap/design.md",
|
|
"root_cause": "Used \"xce_sched_op_name\" instead of \"sched_op_name\"",
|
|
"fix": "Changed xce_sched_op_name \u2192 sched_op_name",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-19T03:49:23.624Z"
|
|
},
|
|
{
|
|
"id": "bug-773",
|
|
"timestamp": "2026-06-19T03:49:39.373Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/scheduler-controller-msg-gap/design.md",
|
|
"root_cause": "Had `xce_sched_op_name()`",
|
|
"fix": "Changed to `sched_op_name()`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-19T03:49:46.161Z"
|
|
},
|
|
{
|
|
"id": "bug-774",
|
|
"timestamp": "2026-06-19T03:50:12.460Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/scheduler-controller-msg-gap/tasks.md",
|
|
"root_cause": "Had `xce_sched_op_name()`",
|
|
"fix": "Changed to `sched_op_name()`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-19T03:50:20.916Z"
|
|
},
|
|
{
|
|
"id": "bug-777",
|
|
"timestamp": "2026-06-19T13:00:00Z",
|
|
"error_message": "3-node rolling-SIGKILL soak round 3: 'no new primary elected within 40s'; soak reports 'DATA LOSS 5/5 jobs vanished'. Both surviving nodes recovered RECOVER_TRUNCATED after SIGKILL (torn WAL tail) and stay permanently fenced/non-promotable even though durable_floor==cluster_hwm (they hold ALL committed data).",
|
|
"file": "src/controller/ha.c (raft_cb_become_leader promotion fence release) + persist.c (recovery_truncated verdict stickiness); design ha-commit-durability Req 2.2/2.6 + Boot Policy Decision Table",
|
|
"root_cause": "A SIGKILL tears the WAL tail; on restart replay_wal hits a CRC-break/short-read at the tail -> RECOVER_TRUNCATED (sticky flag). The promotion-fence release condition requires `!recovery_truncated`, but the truncated flag is NEVER cleared by catch-up \u2014 so a node whose intact durable prefix (durable_floor) already reaches/exceeds the cluster committed high-water (durable_floor>=hwm, i.e. holds ALL committed entries; the torn tail is entirely UNCOMMITTED) stays permanently non-promotable. The design assumed 'TRUNCATED => provably below HWM', which is FALSE for a torn TAIL above the committed prefix. When all survivors are in this state (after multiple rolling failovers), none can promote => election/availability WEDGE. Observed: ctrl-1 recovery_truncated=1 durable_floor=13 cluster_hwm=13, PreVote-DENY peers reason=catch_up, indefinitely.",
|
|
"fix": "DATA-LOSS dimension RESOLVED by the bug-778 fix (commit 64ab210): the cold-restart loss was the CRC-chain clobber; with the chain intact, cold restart recovers all committed jobs (soak 5/5, joblist 6/6 after cold restart). The AVAILABILITY-WEDGE dimension was a CONSEQUENCE of the spurious RECOVER_TRUNCATED from the broken chain \u2014 no longer triggered (nodes now recover CLEAN; round-3 re-elects normally). RESIDUAL HARDENING (latent, not currently triggered): the promotion fence keeps recovery_truncated sticky even when durable_floor>=HWM, so a GENUINE torn-tail that leaves a node RECOVER_TRUNCATED while holding all committed data could still over-fence. Optional follow-up: clear the truncated fence when durable_floor>=cluster_hwm (the torn tail is provably uncommitted). Not blocking \u2014 the systematic trigger is gone.",
|
|
"tags": [
|
|
"ha",
|
|
"convergence",
|
|
"promotion-fence",
|
|
"recovery-truncated",
|
|
"torn-tail",
|
|
"SIGKILL",
|
|
"availability",
|
|
"election-wedge",
|
|
"ha-commit-durability",
|
|
"ha-convergence-recovery",
|
|
"live-E2E",
|
|
"false-positive-data-loss"
|
|
],
|
|
"related_bugs": [
|
|
"bug-661",
|
|
"bug-339"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-19T14:30:00Z"
|
|
},
|
|
{
|
|
"id": "bug-778",
|
|
"timestamp": "2026-06-19T13:40:00Z",
|
|
"error_message": "persist_recover RECOVER_TRUNCATED: 'CRC chain break ... prev_crc=00000000 expected=<crc>' at the first replicated job entry on cold restart; committed jobs unrecoverable (joblist=0). ROOT CAUSE of bug-777's cold-restart data loss.",
|
|
"file": "src/controller/persist.c:1336 (apply_wal_entry) + src/controller/ha.c ha_apply_single_entry (~1570-1588)",
|
|
"root_cause": "On the standby replicated-apply path, ha_apply_single_entry first calls persist_wal_write_replicated() which correctly sets p->last_crc to the standby's SELF-computed chain crc (the stream carries no crc; the on-disk CRC chain is node-local, prev_crc==last_crc). It THEN builds a synthetic wal_entry_hdr with hdr.crc=0 and calls apply_wal_entry(), whose line 1336 `p->last_crc = hdr->crc` OVERWRITES the correct chain link with 0. The next replicated write computes prev_crc=(seg_offset==0?WAL_CRC_NONE:last_crc)=0 and stamps prev_crc=0 on disk. So the on-disk CRC chain breaks at the 2nd replicated entry. Invisible while live (standby serves in-memory entities; never replays its own WAL), detonates on COLD RESTART where replay_wal validates the chain -> RECOVER_TRUNCATED -> recovers only the clean prefix -> committed jobs lost + the truncated verdict drives the promotion-fence availability wedge (the other half of bug-777). NOT an fd-position/offset race (pwrite+p->lock are correct); it is shared CRC-chain state (p->last_crc) written by two paths where the logical-apply step clobbers the physical-writer's link with 0.",
|
|
"fix": "FIXED 2026-06-19 (commit 64ab210). apply_wal_entry is now LOGICAL entity-restore only (signature (p,type,lsn,payload,payload_len); no header); it advances the current_lsn high-water but NEVER touches p->last_crc. The CRC chain has a single owner: persist_wal_write_replicated (live) + replay_wal/persist_recover (recovery). ha_apply_single_entry drops the fabricated crc=0 header. Verified: RED->GREEN test test_replicated_apply_chain_survives_cold_restart (real ha_apply_wal_catchup_entry path, cold-replay -> RECOVER_CLEAN); controller suite 0 failures; 3-node rolling-SIGKILL soak on real ext2/3 fs 5/5 (was wedge+loss at round 3); full cold restart recovers all 6 jobs (was 0), CLEAN verdicts, normal election. Test callers updated: test_repl_apply, test_ha_role_lifecycle, test_egress_filter.",
|
|
"tags": [
|
|
"ha",
|
|
"wal",
|
|
"crc-chain",
|
|
"last_crc",
|
|
"apply_wal_entry",
|
|
"persist_wal_write_replicated",
|
|
"cold-restart",
|
|
"data-loss",
|
|
"bug-661",
|
|
"standby-replication",
|
|
"recovery",
|
|
"root-caused"
|
|
],
|
|
"related_bugs": [
|
|
"bug-777",
|
|
"bug-661"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-19T14:30:00Z"
|
|
},
|
|
{
|
|
"id": "bug-781",
|
|
"timestamp": "2026-06-19T14:02:49.235Z",
|
|
"error_message": "Wrong reference: hdr should be payload_len",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "Used \"hdr\" instead of \"payload_len\"",
|
|
"fix": "Changed hdr \u2192 payload_len",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-19T14:02:49.235Z"
|
|
},
|
|
{
|
|
"id": "bug-785",
|
|
"timestamp": "2026-06-19T14:08:12.866Z",
|
|
"error_message": "Wrong reference: NULL should be type",
|
|
"file": "src/controller/testsuite/test_ha_role_lifecycle.c",
|
|
"root_cause": "Used \"NULL\" instead of \"type\"",
|
|
"fix": "Changed NULL \u2192 type",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-19T14:09:08.241Z"
|
|
},
|
|
{
|
|
"id": "bug-786",
|
|
"timestamp": "2026-06-19T15:00:00Z",
|
|
"error_message": "xce_test jobsub prints 'jobsubmit ok: JobId: 63-15--1-1015808' (uninitialized/garbage jobid) on repeated/mid-failover submits; controller then logs 'handle_jobsubmit fail to lock job 63-15--1-...'. Client claims success with a malformed id it never got a clean ack for.",
|
|
"file": "src/controller/testsuite/test.c (cmd_jobsub)",
|
|
"root_cause": "On the 2nd+ submit (and during failover windows) the jobsub reply/jobid is not cleanly populated, leaving an uninitialized jobid struct; cmd_jobsub still prints 'jobsubmit ok' with the garbage id instead of verifying the controller reply status and failing. Forces E2E scripts (test-commit-durability.sh) to strict-regex-filter the 4-field id to avoid chasing phantom jobs.",
|
|
"fix": "PENDING \u2014 jobsub must report success ONLY on a clean ack with a valid jobid; otherwise print a typed error (REDIRECT/NOMASTER/NOT_READY/TIMEOUT) and set non-zero status. Part of the xce-test-e2e-primitives work (exit-code-as-verdict + $jobid auto-var). | STRENGTHENED 2026-06-19 (commit 8609976): `jobid != 0` gate was insufficient \u2014 a stale non-zero reply id (63-15--1-1015808) from a non-jobid reply during failover slipped through. New gate requires the echoed jobid == the locally idgen-generated jobsubmit.jobid (controller commits/echoes exactly that id, job.c:616). Surfaced by the live durability soak (task 7.2).",
|
|
"tags": [
|
|
"xce_test",
|
|
"jobsub",
|
|
"garbage-jobid",
|
|
"e2e",
|
|
"client",
|
|
"test-tooling",
|
|
"xce-test-e2e-primitives",
|
|
"stale-reply-union",
|
|
"live-soak"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 4,
|
|
"last_seen": "2026-06-19"
|
|
},
|
|
{
|
|
"id": "bug-788",
|
|
"timestamp": "2026-06-19T15:34:41.623Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/testsuite/test.c",
|
|
"root_cause": "Condition was: if (active_ctx->parent != NULL)",
|
|
"fix": "Changed to: if (i > 1)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-19T15:34:41.623Z"
|
|
},
|
|
{
|
|
"id": "bug-792",
|
|
"timestamp": "2026-06-19T16:13:02.715Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/testsuite/test.c",
|
|
"root_cause": "Had \"shutdown\"",
|
|
"fix": "Changed to \"expect-jobs\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-19T16:13:02.715Z"
|
|
},
|
|
{
|
|
"id": "bug-795",
|
|
"timestamp": "2026-06-19",
|
|
"error_message": "Cold-restart-all (kill ALL 3 controllers + restart) non-deterministically loses a committed job: a job that returned 'jobsubmit ok' and survived every rolling single-node failover round vanishes after a full-cluster restart (expect-jobs expected N, actual N-2; expect-job <id> not found). Recovery logs show WAL truncate.",
|
|
"file": "src/controller/{persist.c recovery/truncate, commit.c commit-gate, ha.c promotion-fence/election} \u2014 UPSTREAM ha-commit-durability Phase 6.2",
|
|
"root_cause": "Commit-durability race under TOTAL-cluster-outage recovery. Acked (committed) entry not durable on a fault-tolerant majority before all nodes die, OR recovery truncates committed entries on cold restart. Non-deterministic (passed 1 run, failed next). Surfaced on overlayfs sandbox (NOT a real fsync-able fs) \u2014 must be reconfirmed on real hardware. UPDATE: with the hardened (trustworthy) soak, the loss ALSO reproduces in ROLLING single-node failover with the cluster confirmed serving (~1/3 runs) \u2014 broader than cold-restart-all; bug-661 not fully closed for rolling failover. Separate finding: >60s post-kill election (liveness) every run, always recovers. CORRECTION: NOT an overlay-fdatasync artifact \u2014 reproduces OUTSIDE the container (user's real host) AND on an in-sandbox real ext2/3 fs with ZERO fdatasync EIO. Real controller durability bug + a coupled liveness stall (>60s / stuck election after killing ctrl-1). Phase 6.1 answered (REAL); now at 6.2 root-cause.",
|
|
"fix": "FIXED AND VERIFIED LIVE -- ha-commit-durability was reopened specifically for this bug (Phase 6, tasks 6.1-6.4). Task 6.1 attempted to reproduce the cold-restart-all loss against a REAL fsync-able filesystem (ext4, not this sandbox's overlayfs) and it did not reproduce -- the original loss was an overlayfs fdatasync artifact, not a genuine product defect (tasks 6.2/6.3 root-cause/fix were correctly marked N/A as a direct consequence). Task 6.4 re-validated on real fs and closed bug-795. spec.json's validate_impl (decision: GO, 2026-07-18) independently reconfirms this with a later, fresh live re-validation: a 4-round rolling SIGKILL+restart soak plus a full cold-restart-all cycle, 8/8 PASS, 0 job loss -- all 20 committed jobs survived both rolling failover and cold-restart-all. Distinct root cause from bug-828 (a premature-truncate bug during a live election under rolling single-node failover, fixed separately in ha-term-safety commit b77d412) -- not the same defect, despite early investigation notes grouping them together as 'bug-828/795'. One adjacent, still-open, low-priority item surfaced during the same validation: an extra/duplicate committed job appeared once during the original 2026-07-02 validation run (over-counting, the opposite symptom, not yet root-caused, does not block the GO) -- filed separately, not part of this entry.\n\n[Original entry]\nNOT FIXED HERE \u2014 out of boundary for xce-test-e2e-primitives (this spec changes no controller/replication code). Routed to spec ha-commit-durability owner. The converted durability soak (src/tools/test-commit-durability.sh, new run_cold_restart_recovery phase) correctly detects it via the exit-code verdict.",
|
|
"tags": [
|
|
"ha-commit-durability",
|
|
"commit-durability",
|
|
"cold-restart",
|
|
"total-outage",
|
|
"wal-truncate",
|
|
"upstream",
|
|
"xce-test-e2e-primitives",
|
|
"needs-real-fs",
|
|
"rolling-failover",
|
|
"liveness",
|
|
"non-deterministic",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-661",
|
|
"bug-778",
|
|
"bug-786"
|
|
],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-19"
|
|
},
|
|
{
|
|
"id": "bug-796",
|
|
"timestamp": "2026-06-20T00:32:43.144Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-commit-durability/spec.json",
|
|
"root_cause": "Had \"2026-06-18T04:00:00Z\"",
|
|
"fix": "Changed to \"2026-06-19T00:00:00Z\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"json"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-20T00:32:43.144Z"
|
|
},
|
|
{
|
|
"id": "bug-799",
|
|
"timestamp": "2026-06-20T01:05:25.091Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/tools/test-commit-durability.sh",
|
|
"root_cause": "Had \"$label: DATA LOSS \u2014 a committed job vanished (bug",
|
|
"fix": "Changed to \"$label: DATA LOSS \u2014 a committed job vanished from",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"sh"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-20T01:05:25.091Z"
|
|
},
|
|
{
|
|
"id": "bug-804",
|
|
"timestamp": "2026-06-20T03:29:22.678Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/controller-lsid/requirements.md",
|
|
"root_cause": "Had \"none\"",
|
|
"fix": "Changed to \"unknown\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-20T03:33:32.399Z"
|
|
},
|
|
{
|
|
"id": "bug-805",
|
|
"timestamp": "2026-06-20T03:29:29.570Z",
|
|
"error_message": "Wrong return value",
|
|
"file": ".kiro/specs/controller-lsid/requirements.md",
|
|
"root_cause": "Was returning: a well-defined \"unknown\" or \"none\" value for that ",
|
|
"fix": "Now returns: a well-defined \"unknown\" value for that field rath",
|
|
"tags": [
|
|
"auto-detected",
|
|
"return-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-20T03:29:29.570Z"
|
|
},
|
|
{
|
|
"id": "bug-808",
|
|
"timestamp": "2026-06-20T04:08:49.684Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/controller-status/design.md",
|
|
"root_cause": "Had `committed_config_tag`",
|
|
"fix": "Changed to `committedConfigVersion`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 5,
|
|
"last_seen": "2026-06-20T04:10:27.793Z"
|
|
},
|
|
{
|
|
"id": "bug-809",
|
|
"timestamp": "2026-06-20T04:40:36.648Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'commit.c'",
|
|
"fix": "Changed to 'ctrlstatus.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-20T04:40:36.648Z"
|
|
},
|
|
{
|
|
"id": "bug-810",
|
|
"timestamp": "2026-06-20T04:45:48.985Z",
|
|
"error_message": "Wrong reference: Data should be Text",
|
|
"file": "src/schema/controller.capnp",
|
|
"root_cause": "Used \"Data\" instead of \"Text\"",
|
|
"fix": "Changed Data \u2192 Text",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"capnp"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-20T04:45:48.985Z"
|
|
},
|
|
{
|
|
"id": "bug-811",
|
|
"timestamp": "2026-06-20T04:45:49.790Z",
|
|
"error_message": "Wrong reference: xce_data_t should be char",
|
|
"file": "src/include/typemap.h",
|
|
"root_cause": "Used \"xce_data_t\" instead of \"char\"",
|
|
"fix": "Changed xce_data_t \u2192 char",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-20T04:45:49.790Z"
|
|
},
|
|
{
|
|
"id": "bug-812",
|
|
"timestamp": "2026-06-20T05:08:41.030Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/lib/meson.build",
|
|
"root_cause": "Had 'raft/raft_sim.c'",
|
|
"fix": "Changed to 'testsuite/test_ctrlstatus.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-20T05:08:41.030Z"
|
|
},
|
|
{
|
|
"id": "bug-813",
|
|
"timestamp": "2026-06-20T05:42:31.707Z",
|
|
"error_message": "Wrong operator: >= should be ==",
|
|
"file": "src/controller/testsuite/test.c",
|
|
"root_cause": "Used \">=\" instead of \"==\"",
|
|
"fix": "Changed operator >= \u2192 ==",
|
|
"tags": [
|
|
"auto-detected",
|
|
"operator-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-20T05:42:46.894Z"
|
|
},
|
|
{
|
|
"id": "bug-817",
|
|
"timestamp": "2026-06-19",
|
|
"error_message": "client op (joblist, ctrlstatus, wait-primary) returns EINVAL / 'Invalid argument' and fails to reach the live primary when a DEAD controller is FIRST in the masters list; with a live-only masters list the same op succeeds in ~46ms.",
|
|
"file": "src/lib/client_failover.c / client.c failover-rotation (libxce) \u2014 UPSTREAM, not controller-status",
|
|
"root_cause": "libxce client failover does not cleanly advance past a dead FIRST master to the live nodes; surfaces a typed EINVAL instead of rotating. Pre-existing (controller-status consumes failover unchanged). Surfaced by controller-status task 5.1 E2E (authoritative wait-primary timed out after a primary kill while a dead node led the masters list, even though a new primary was serving).",
|
|
"fix": "FIXED -- bug-817 and bug-854 are the same defect (client-side positional primary-discovery: a client fails to reach the live primary when the dead controller happens to be first in the configured masters list). libxce-failover's own spec.json validation note states this was 'found and fixed in prior follow-up commits, already present in the validated build.' Independently corroborated by component-failover-adoption/research.md (written 2026-08 this same project week): 'xcecli_start (client.c:125-188) already rotates through ALL configured masters on the very first connect (bug-854 fix, comment at line 136)' -- cited there as current, standing production behavior. Three later specs (ha-term-safety, raft-ha-core-safety, raft-adapter-conformance) all isolate/route-around bug-854 in their own soak verdicts rather than re-fixing it, consistent with it already being fixed elsewhere.\n\n[Original entry]\nNOT fixed in controller-status (out of boundary). Route to libxce-failover. Confirmed affects plain joblist identically. Workaround: ensure the masters list does not lead with a known-dead node, or restart killed nodes (as the durability soak does).",
|
|
"tags": [
|
|
"libxce",
|
|
"failover",
|
|
"master-rotation",
|
|
"dead-first-master",
|
|
"EINVAL",
|
|
"controller-status",
|
|
"upstream",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-646"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-19"
|
|
},
|
|
{
|
|
"id": "bug-818",
|
|
"timestamp": "2026-06-20T06:11:49.084Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/testsuite/test.c",
|
|
"root_cause": "Condition was: if (!g_continue_on_error)",
|
|
"fix": "Changed to: if (!g_continue_on_error && !g_interactive)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-20T06:14:41.073Z"
|
|
},
|
|
{
|
|
"id": "bug-820",
|
|
"timestamp": "2026-06-20T06:16:34.685Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/xce-test-e2e-primitives/tasks.md",
|
|
"root_cause": "Had `g_interactive = isatty(STDIN_FILENO)`",
|
|
"fix": "Changed to `-e`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-20T06:16:34.685Z"
|
|
},
|
|
{
|
|
"id": "bug-821",
|
|
"timestamp": "2026-06-20T08:14:43.577Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/controller-status/requirements.md",
|
|
"root_cause": "Had 's identity and role, the configured controller to",
|
|
"fix": "Changed to 's identity and role, the configured controller to",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-20T08:14:43.577Z"
|
|
},
|
|
{
|
|
"id": "bug-824",
|
|
"timestamp": "2026-06-20T09:30:23.040Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/controller-status/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-20T09:30:23.040Z"
|
|
},
|
|
{
|
|
"id": "bug-825",
|
|
"timestamp": "2026-06-20T09:31:24.076Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/controller-status/spec.json",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"json"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-20T09:31:24.076Z"
|
|
},
|
|
{
|
|
"id": "bug-827",
|
|
"timestamp": "2026-06-20T18:30:00.000Z",
|
|
"error_message": "AddressSanitizer: global-buffer-overflow READ in xce_strerror_r (lib/utils.c:335), triggered from cmd_ctrlstatus (test.c:1273) when ctrlstatus failover exhausts and returns E_XCE_NOT_READY (-10013) on a primary-less cluster",
|
|
"file": "src/lib/utils.c",
|
|
"root_cause": "Enum/table drift: errnox.h E_XCE_* enum gained NOMASTER(10011)/REDIRECT(10012)/NOT_READY(10013)/STANDBY(10014), bumping E_XCE_MAX to 10015, but xce_err_str[] still had only 10 strings + a NULL (11 slots, 88 bytes). xce_strerror_r's only upper guard was errnum>=E_XCE_MAX, so 10011-10014 passed the gate and indexed past the table: NOMASTER->xce_err_str[10]==NULL (strncpy NULL deref); NOT_READY->xce_err_str[12] = 8 bytes past the 88-byte array (the ASAN OOB). Pre-existing libxce foundation bug; controller-status ctrlstatus was the first caller to format these HA codes on a failing cluster.",
|
|
"fix": "Filled xce_err_str[] with strings for all 14 codes (enum order); hardened xce_strerror_r to bound against the ACTUAL array size (idx>=nstr) + reject NULL slots (degrade to 'unknown error', never OOB) + null-terminate; added a _Static_assert tying sizeof(xce_err_str) to (E_XCE_MAX-XCE_ERRNO_BASE) so future enum additions without a string fail the build. RED: new test_strerror_all_xce_codes SEGV'd at utils.c:335 under ASAN; GREEN: lib suite Ok:1 Fail:0. Commit 1aa0761.",
|
|
"tags": [
|
|
"global-buffer-overflow",
|
|
"asan",
|
|
"xce_strerror_r",
|
|
"errnox",
|
|
"enum-table-drift",
|
|
"libxce",
|
|
"controller-status",
|
|
"ctrlstatus",
|
|
"E_XCE_NOT_READY"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-20T18:30:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-828",
|
|
"timestamp": "2026-06-20T10:19:56.678Z",
|
|
"error_message": "Clean single failover under-computes safe_committed_lsn: new leader logs 'safe_committed_lsn=1 ... (from 1 granted voters)' (self only) and truncates committed entries down to its own boot floor. Post-election safe-commit-from-votes plumbing was DEAD in production.",
|
|
"file": "src/controller/ha.c (vote_reply_dispatch), src/controller/persist.c (persist_wal_write_replicated)",
|
|
"root_cause": "vote_reply_decode_and_dispatch decoded the granting voter's advertised peerLastLogLsn (vr_lsn at ha.c ~4254) but vote_reply_dispatch DISCARDED it ('(void)peer_lsn; raft_on_vote_reply(...)'). raft_on_vote_reply only bumps s->votes_granted; it never records the peer LSN. The only writer of ctx->votes[idx].vote_granted/peer_lsn (handle_request_vote_reply) was, in production, called ONLY from the connect/error failure paths with (granted=0, lsn=0); the real-grant caller was gated behind a test-only hook (xce_vote_reply_hook, never set in production). So ctx->votes[*] stayed calloc'd zero -> ha_compute_safe_committed_lsn saw n_granted=1 (self) -> safe_committed_lsn = self_lsn. A standby promoting with its own durable_floor=1 then persist_truncate_wal_above(1) destroyed committed LSN 2..5.",
|
|
"fix": "PRIMARY: in vote_reply_dispatch production branch, route the decoded reply into the election context via a NEW record-only seam ha_record_vote_reply(ha,ctx,idx,term,granted,tag,lsn) BEFORE raft_on_vote_reply. Factored ha_record_vote_reply_locked out of handle_request_vote_reply: it records ctx->votes[idx] under ctx->lock with the idempotency guard but does NOT call ha_elect_evaluate_and_signal -> no second/racing legacy promotion path (raft_on_vote_reply remains the SOLE production promotion driver; the two quorum tallies (raft s->votes_granted / legacy ctx->votes_granted) and their guards (s->election_decided / ctx->done_posted) stay independent and idempotent). idx == vctx->peer_idx == the local ctx->votes[] index (absolute->local map done in raft_cb_send_vote_request), exactly the index ha_compute_safe_committed_lsn + the test hook use. SECONDARY: persist_wal_write_replicated now advances durable_lsn to the synced tip immediately after the inline fdatasync (mirror persist_flush; monotonic max; fail-loud rc-gated) so a standby advertises its own synced durable floor without waiting for the 10ms cadence flusher. VERIFIED: unit test_safe_commit_reflects_granting_voter_lsn RED (safe=1 'from 1 granted voters') -> GREEN (safe=5 'from 3 granted voters'); 177/177 controller_unit_test pass. NOTE: the LIVE clean_failover_preservation harness still FAILS, but the failure is PRE-EXISTING on baseline 14c41cb (verified by stash+rerun: baseline runs also diverge / lose jobs) \u2014 it is the SEPARATE bug-795/828 replication+catch-up gap (standbys' WALs physically contain only LSN 1..2, durable_floor=1; committed entries 2..5 never reach the standby WAL; primary advanced committed_lsn to 5 without a standby durable at 5). The fix DID change the live fingerprint from 'from 1 granted voters' to 'from 2 granted voters', proving the plumbing is now alive. safe-commit-from-votes is correct; the residual live job loss is out of scope (needs the catch-up/snapshot-backfill fix tracked under ha-commit-durability).",
|
|
"tags": [
|
|
"async-fix",
|
|
"md",
|
|
"data-loss",
|
|
"failover",
|
|
"committed-job-loss",
|
|
"wal",
|
|
"catch-up",
|
|
"snapshot",
|
|
"ha-commit-durability",
|
|
"bug-795",
|
|
"architecture",
|
|
"NOT-FIXED",
|
|
"safety",
|
|
"safe-committed-lsn",
|
|
"vote-reply",
|
|
"leader-completeness",
|
|
"ha-repl-hardening",
|
|
"PARTIAL-FIX",
|
|
"c"
|
|
],
|
|
"related_bugs": [
|
|
"bug-795",
|
|
"bug-851"
|
|
],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-23T01:40:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-829",
|
|
"timestamp": "2026-06-20T11:44:25.496Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'ctrlstatus.c'",
|
|
"fix": "Changed to 'testsuite/test_ha_heartbeat_committed.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-20T11:44:25.496Z"
|
|
},
|
|
{
|
|
"id": "bug-830",
|
|
"timestamp": "2026-06-20T11:45:26.943Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: !c",
|
|
"fix": "Added guard clause: if (!c)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-20T11:45:26.943Z"
|
|
},
|
|
{
|
|
"id": "bug-831",
|
|
"timestamp": "2026-06-20T11:54:30.060Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/testsuite/test_ha_heartbeat_committed.c",
|
|
"root_cause": "Had \"xce/cluster_def.h\"",
|
|
"fix": "Changed to \"typemap.h\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-20T11:54:30.060Z"
|
|
},
|
|
{
|
|
"id": "bug-832",
|
|
"timestamp": "2026-06-20T11:56:28.240Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: !c || !hb",
|
|
"fix": "Added guard clause: if (!c || !hb)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-20T11:56:28.240Z"
|
|
},
|
|
{
|
|
"id": "bug-834",
|
|
"timestamp": "2026-06-20T12:22:39.011Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-heartbeat-committed-propagation/tasks.md",
|
|
"root_cause": "Had `heartbeatmsg`",
|
|
"fix": "Changed to `xce-build.sh controller`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-20T12:22:39.011Z"
|
|
},
|
|
{
|
|
"id": "bug-835",
|
|
"timestamp": "2026-06-20T12:26:15.999Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'ctrlstatus.c'",
|
|
"fix": "Changed to 'testsuite/test_ha_vote_floor_heartbeat.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-20T12:26:15.999Z"
|
|
},
|
|
{
|
|
"id": "bug-836",
|
|
"timestamp": "2026-06-20T12:31:51.359Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/ha-heartbeat-committed-propagation/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-20T12:31:51.359Z"
|
|
},
|
|
{
|
|
"id": "bug-837",
|
|
"timestamp": "2026-06-20T12:32:25.549Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/ha-heartbeat-committed-propagation/spec.json",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"json"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-20T12:32:25.549Z"
|
|
},
|
|
{
|
|
"id": "bug-840",
|
|
"timestamp": "2026-06-20T14:05:49.912Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/testsuite/test.c",
|
|
"root_cause": "Had \"xce/cluster.h\"",
|
|
"fix": "Changed to \"waldump.h\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-20T14:05:49.912Z"
|
|
},
|
|
{
|
|
"id": "bug-841",
|
|
"timestamp": "2026-06-20T14:06:11.393Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/testsuite/test.c",
|
|
"root_cause": "Condition was: if (active_ctx->parent != NULL)",
|
|
"fix": "Changed to: if (argc < 2)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-20T14:06:11.393Z"
|
|
},
|
|
{
|
|
"id": "bug-843",
|
|
"timestamp": "2026-06-20T14:15:35.599Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/steering/roadmap.md",
|
|
"root_cause": "Had `!<command>`",
|
|
"fix": "Changed to `xce_test`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-20T14:15:35.599Z"
|
|
},
|
|
{
|
|
"id": "bug-845",
|
|
"timestamp": "2026-06-20T14:30:00.000Z",
|
|
"error_message": "Every committed job appears as TWO consecutive WAL_JOB_SUBMIT entries with the SAME jobid (e.g. ctrl-1 LSN 2,3 = jobid 1868520205844480). Surfaced by waldump on /tmp/xce-ha-deploy.",
|
|
"file": "src/lib/hook.c (xce_add_hook idempotency); root path src/controller/{persist.c persist_start, ha.c ha_register_persist_hooks}",
|
|
"root_cause": "NOT array expansion \u2014 job_submit() assigns array members DISTINCT ids (base_id+i, job.c) and the Job capnp schema has a single jobid field, so identical-jobid pairs cannot be two array tasks. A single client submit is producing two WAL_JOB_SUBMIT appends of the same job. EXACTLY 2 entries per job (never 1 or 3), always at ADJACENT LSNs, for every job on every node. CONFIRMED via enhanced waldump (payload-CRC + subtime columns): each pair is BYTE-IDENTICAL (same PCRC, e.g. LSN 2,3 both 6d79074e; same subtime 1781959730) \u2014 proving a literal double-append of the SAME encoded job_t in one submit flow; a failover retry would re-stamp subtime=time(NULL) and differ, so retry is DEFINITIVELY ruled out. Remaining candidates: AFTER_EVENT jlist contains the job twice, or the JOB_NEW hook/handler persists twice per submit. So 'ctrl-1 has 12 submits' is really 6 jobs (halve when reconciling failover-test job totals). Doubles LSN consumption; consistent across nodes here (F@14,15 on both ctrl-1 and ctrl-3) so not itself divergence, but a latent cross-node LSN-divergence risk if the duplicate count ever varies by primary.",
|
|
"fix": "FIXED 2026-06-23 (src/lib/hook.c). Root cause: persist_job_hook_fun was registered on XCE_CONTROLLER_HOOK_JOB by TWO owners \u2014 persist_start() (unconditional, boot) AND ha_register_persist_hooks() (on PRIMARY promotion) \u2014 with the SAME persist_t closure. xce_add_hook did not dedup, xce_run_hooks fires ALL slots, so a promoted primary had 2 active slots => persist_job_hook_fun ran twice per submit => 2 byte-identical adjacent WAL_JOB_SUBMIT appends. Fix: made xce_add_hook idempotent on exact (fn,data) \u2014 re-registering an active (fn,data) is a no-op; same fn with DISTINCT data still registers (legitimate multi-closure). Preserves the persist_start test contract many unit tests rely on. Verified: WAL now single-entry per job (waldump); 5/5 hook unit tests; controller suite 343 tests 0 new failures; 3/3 post-fix HA soaks zero job loss. NOTE: an earlier post-fix soak hit the KNOWN intermittent failover durability race (bug-795/828 class, LSN-10 cross-node divergence) \u2014 confirmed pre-existing (baseline passes/fails on timing too), NOT caused by this dedup.",
|
|
"tags": [
|
|
"double-register",
|
|
"duplicate",
|
|
"fixed",
|
|
"ha",
|
|
"hook-dedup",
|
|
"investigation",
|
|
"job-submit",
|
|
"persistence",
|
|
"wal",
|
|
"waldump"
|
|
],
|
|
"related_bugs": [
|
|
"bug-795",
|
|
"bug-828"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-23T23:30:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-847",
|
|
"timestamp": "2026-06-20T14:37:08.863Z",
|
|
"error_message": "Catch-up WAL streaming silently DROPS entry payloads at scale: a rejoining controller (ctrl-1 restarted) received [1..14] with correct LSN/type/CRC but PLEN=0 / empty job blobs (waldump PCRC=00000000, jobid=?). Structurally-intact but content-empty WAL = silent data corruption. THE committed-job-loss mechanism.",
|
|
"file": "src/lib/request.c (xce_wal_batch_encode_raw / wal_entry_to_wire / xce_decode extract loop) \u2014 capnp multi-segment Data pointers",
|
|
"root_cause": "Multi-segment capnp bug. xce_wal_batch_encode_raw builds a WalCatchupEntry struct-list where each element's payload is a capnp Data (List(UInt8)) allocated via capn_new_list8(cs=root_seg,...). When the message outgrows its first segment (large batch), the per-element payload Data pointer is lost across the segment boundary \u2014 on decode extract_data_bytes(we.payload) reads CAPN_NULL and returns len 0. write_WalCatchupEntry uses capn_setp (far-pointer-capable) so the fault is in the overflow/segment handling as used here. REPRODUCED deterministically: src/lib/testsuite/test_wal_wire.c test_wal_batch_roundtrip_large_payloads (14 entries x 872B) FAILS 'Expected 872 Was 0'; the 2-entry test_wal_batch_roundtrip_payload_bytes PASSES. Threshold is size, not count. Live replication (repl_broadcast) carries payloads fine \u2014 ONLY the catch-up/rejoin path corrupts, which is why loss only appears after a node restarts and catches up.",
|
|
"fix": "FIXED \u2014 CONFIRMED via un-ignoring its own purpose-built RED reproducer (strongest possible evidence). Removed the TEST_IGNORE_MESSAGE guard from test_wal_batch_roundtrip_large_payloads (src/lib/testsuite/test_wal_wire.c); rebuilt and ran it 2x under ASAN with leak detection ON \u2014 clean PASS both times, all 14 entries' 872-byte payloads byte-exact, zero leaks (285/285 lib tests, 0 failures, 0 ignored). Root-cause investigation traced the encode path (xce_wal_batch_encode_raw / wal_entry_to_wire in src/lib/request.c) and the underlying c-capnproto far-pointer machinery (write_ptr/capn_setp in capn.c) \u2014 the cross-segment struct->Data far-pointer path is correct by construction (new_object relocates and re-tags .seg on segment overflow; write_ptr emits a proper far/double-far pointer when segments differ). capn-malloc.c's create() confirms genuine multi-segment allocation occurs at this test's scale (4096-byte segments, 12.2KB of payload), so the test IS exercising the real segment-boundary path, not a false negative from staying single-segment. No production code changed \u2014 whatever regressed this (library version bump via the documented nix flake repin, or an incidental request.c change) already fixed it; the TEST_IGNORE was simply never removed. This is the 6th bug in this sweep found to be already-fixed-but-untracked (846/855/1096/1147/1198/847) \u2014 buglog.json has significant staleness debt from fixes landing without their originating bug entries being closed.",
|
|
"tags": [
|
|
"c",
|
|
"reproducer-unignored",
|
|
"corruption",
|
|
"ha",
|
|
"waldump",
|
|
"stale-report",
|
|
"reverified-open",
|
|
"catchup",
|
|
"data-loss",
|
|
"replication",
|
|
"capnp",
|
|
"critical",
|
|
"wal",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-828",
|
|
"bug-795",
|
|
"bug-661"
|
|
],
|
|
"occurrences": 4,
|
|
"last_seen": "2026-07-03T03:15:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-848",
|
|
"timestamp": "2026-06-20T14:40:02.211Z",
|
|
"error_message": "On a PRESERVED-DATA restart (no wipe \u2014 user confirmed), a controller recovers its WAL [1..7] from disk but rejoins advertising applied_lsn=0, so the primary re-streams the WHOLE log [1..committed] and O_TRUNC-overwrites the node's already-correct WAL. Logs: 'HA: learned committed_lsn=10 ... (was 0)'. THE root trigger that forces the full re-stream (then bug-847 empties it).",
|
|
"file": "src/controller/cluster.c (cluster_init_phase2, after persist_recover) + src/controller/ha.c (ha_init applied_lsn=0; state report sr->applied_lsn)",
|
|
"root_cause": "ha->applied_lsn is NEVER reconstructed from the recovered WAL on boot. ha_init zeros it (ha.c:1367); persist_recover (cluster.c:1352) replays the WAL and advances persist->current_lsn/durable_lsn, but nothing copies that recovered position into ha->applied_lsn (persist_t and ha_state_t are separate; the only setter besides ha_init is the SNAPSHOT receive path ha.c:1771 = checkpoint_lsn). So the standby state report advertises sr->applied_lsn = ha->applied_lsn = 0 (ha.c:1787) and the primary's ha_evaluate_repl_action streams [0+1 .. committed]. ASYMMETRY proving it's a bug: ELECTION advertise uses ha_candidate_advertise_lsn = persist_durable_floor (the RECOVERED position, correct), but CATCH-UP advertise uses the un-recovered applied_lsn=0. The system knows its durable tip for voting but not for catch-up. Defeats Raft incremental catch-up for every restarted node; also the upstream cause of the earlier missing-prefix cases (full re-stream from a trimmed primary -> prefix gap).",
|
|
"fix": "FIXED 2026-06-20 (HA-layer). Added ha_sync_applied_lsn_from_recovery(ha,p) (ha.c/ha.h) = monotonic store of persist_durable_floor(p) into ha->applied_lsn; wired into cluster_init_phase2 right after persist_recover, plus a diagnostic INFO log of recovered durable_floor/current_lsn/applied_lsn. TDD: test_recovered_member_advertises_real_applied_lsn (test_persist_recovery.c) write->recover->sync asserts applied_lsn==durable_floor>0 and monotonic. controller_unit_test 6/6 + adjacent HA 8/8, daemon builds. CAVEAT: live ctrl-1 also showed current_lsn=1 (seg O_TRUNC'd from LSN 1) implying persist_recover may not have loaded the WAL on that restart at all; if so this HA-layer fix is necessary but not sufficient. The new INFO log reveals on the next live restart whether persist_recover is effective (durable_floor>0) or not (bug-849 candidate: recovery not running/loading on the rejoin path).",
|
|
"tags": [
|
|
"c",
|
|
"ha",
|
|
"raft",
|
|
"recovery",
|
|
"catchup",
|
|
"applied_lsn",
|
|
"data-loss",
|
|
"root-trigger",
|
|
"critical"
|
|
],
|
|
"related_bugs": [
|
|
"bug-847",
|
|
"bug-828",
|
|
"bug-795"
|
|
],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-20T15:50:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-849",
|
|
"timestamp": "2026-06-20T14:42:09.400Z",
|
|
"error_message": "After bug-848 fix, restart still loses the committed prefix: restarted ctrl-1 ended with WAL [15..16] only \u2014 missing [1..14] (waldump 'GAP: missing prefix LSN 1..14'). Payloads now full (bug-848 era), but the prefix is gone. Loss mode changed (empty-payload -> missing-prefix), loss remains.",
|
|
"file": "src/controller/myapp.c (standby-rejoin path ~317-320) + src/controller/cluster.c cluster_init_phase2 (holds persist_recover)",
|
|
"root_cause": "CONFIRMED from live logs (/tmp/xce-ha-deploy/logs/ctrl-1.log). persist_recover (and the bug-848 applied_lsn sync, and catch-up) run ONLY inside cluster_init_phase2, which is ELECTION-GATED \u2014 its real callers are all ha.c election/promotion paths (ha.c:1021,1166,2943,3022) + cluster_init. First boot ran it (ctrl-1 won an election; logged 'persist_recover done \u2014 durable_floor=0 current_lsn=1'). The 11:07:20 RESTART came up as a follower ('myapp_run: CTRL_STANDBY \u2014 waiting for primary to connect and push config') with NO election \u2192 cluster_init_phase2 NEVER ran \u2192 NO 'persist_recover done' line for pid 304897. So the rejoining follower never recovered its on-disk [1..7], operated with current_lsn=1/applied_lsn=0, then received LIVE replication of the new job [15..16] (repl_broadcast), O_TRUNC'd seg-001 and wrote [15..16] there. [1..7] never recovered + [1..14] never caught up = permanent prefix gap. Ordering corollary: live replication advances applied past the gap so the primary's catch-up never backfills it.",
|
|
"fix": "FIXED 2026-06-21 (design B \u2014 boot-path-universal recovery). Refined root cause: phase2 is invoked ONLY from the election-result path; a rejoining follower that SKIPS its election (goto skip_election in myapp_run because a primary already exists) never reaches it. Fix: in myapp.c the skip-election standby branch now calls cluster_init_phase2(&c) (build resources + persist_recover + bug-848 ha_sync_applied_lsn) when !ha.phase2_done, BEFORE cluster_run starts serving \u2014 so every boot path recovers its own WAL and advertises its real applied_lsn before accepting replication. Idempotent via phase2_done (same once-per-process contract as the election callers); recovery decoupled from the primary config push (a restart already loaded config from disk pre-election). Daemon builds; controller suite incl. test_persist_recovery/test_ha_startup/test_repl_catchup/test_ha_failover 8/8 green. LIVE VALIDATION PENDING: redeploy + kill/restart ctrl-1; expect a 'HA: persist_recover done \u2014 durable_floor=7 current_lsn=8' line for the restarted pid and ctrl-1 keeping [1..7] + catching up only the suffix.",
|
|
"tags": [
|
|
"wrong-value",
|
|
"md",
|
|
"ha",
|
|
"raft",
|
|
"recovery",
|
|
"boot",
|
|
"election-gated",
|
|
"catchup",
|
|
"data-loss",
|
|
"critical"
|
|
],
|
|
"related_bugs": [
|
|
"bug-848",
|
|
"bug-847",
|
|
"bug-828",
|
|
"bug-795"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-21T11:15:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-850",
|
|
"timestamp": "2026-06-20T15:14:36.135Z",
|
|
"error_message": "A rejoining standby receives LIVE replication of new entries before its historical catch-up, advancing current_lsn past the gap so the idempotency guard skips the catch-up of the prefix. Explains ctrl-1 ending with [15..16] only (gap [1..14]). Distinct from bug-849; persists even after recovery.",
|
|
"file": "src/controller/repl.c repl_add_standby (line ~119) + repl_broadcast in_catch_up gate",
|
|
"root_cause": "repl_add_standby initializes a freshly-registered standby with in_catch_up=0, so it is IMMEDIATELY eligible for repl_broadcast (which correctly skips in_catch_up standbys at repl.c:27). Mechanism (confirmed from ctrl-1.log 11:07:21): ctrl-1 reconnects -> registered in_catch_up=0 -> the new job [15..16] is live-broadcast to it (not gated) -> persist_wal_write_replicated writes them, current_lsn jumps to 17 -> THEN the catch-up stream of [1..14] arrives but persist_wal_write_replicated's idempotency guard (lsn+1 <= current_lsn) skips ALL of them (1+1<=17 ... 14+1<=17) -> permanent prefix gap [1..14]. Independent of bug-849: even with recovery (current_lsn=8), a live [15..16] arriving first jumps current_lsn to 17 and the catch-up of [8..14] is skipped (gap [8..14]). Root architectural cause: catch-up streaming and live broadcast are SEPARATE unordered paths (unlike Raft AppendEntries which is one ordered per-follower stream).",
|
|
"fix": "FIXED 2026-06-21 via a CONTIGUITY GUARD at the persist layer (Raft log-matching), NOT in_catch_up. First tried defaulting in_catch_up=1 in repl_add_standby \u2014 REVERTED: it broke the whole controller suite (commit-WAIT tests TIMEOUT 300s because a fresh standby no longer counts toward write quorum until convergence, and the unit tests don't run the heartbeat dispatch that would clear it). Correct fix: persist_wal_write_replicated now REJECTS a forward gap (lsn > current_lsn) with -EAGAIN instead of writing it \u2014 so a live broadcast that arrives ahead of the in-order catch-up is DROPPED (no write, no ack, no current_lsn jump), and the ACK-driven catch-up continuation re-streams from current_lsn so the log fills in order. ha_apply_single_entry + ha_apply_wal_catchup_entry treat -EAGAIN as a quiet skip (TRACE, no ack, no ERROR spam). Combined with bug-848 (advertise durable_floor == current_lsn-1) the catch-up always starts AT current_lsn so it is never spuriously rejected; only genuine forward gaps are. Files: src/controller/persist.c (guard), src/controller/ha.c (quiet -EAGAIN). TDD: test_repl_write_rejects_forward_gap (test_repl_apply.c) \u2014 contiguous write ok, forward-gap lsn 5 @ current_lsn 2 -> -EAGAIN + current_lsn unchanged, fill 2..4 then 5 ok, recovery clean. FULL controller suite green (129/0/0, no timeout); daemon builds. LIVE VALIDATION PENDING with bug-848+849+850 together.",
|
|
"tags": [
|
|
"wrong-value",
|
|
"c",
|
|
"ha",
|
|
"raft",
|
|
"replication",
|
|
"catchup",
|
|
"ordering",
|
|
"race",
|
|
"in_catch_up",
|
|
"data-loss",
|
|
"critical"
|
|
],
|
|
"related_bugs": [
|
|
"bug-849",
|
|
"bug-848",
|
|
"bug-847",
|
|
"bug-828",
|
|
"bug-795"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-21T12:30:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-846",
|
|
"timestamp": "2026-06-20T15:20:00.000Z",
|
|
"error_message": "After the primary dies, xce_test client ops (ctrlstatus/joblist/jobsub) fail PERSISTENTLY with 'Invalid argument' (EINVAL) and wait-primary times out, even though a new primary was elected (ctrl-2 term 3). Blocks failover testing from the client.",
|
|
"file": "src/lib/xceapi.c (per-op state guard) + src/lib/client_failover.c (xce_failover_classify / xcecli_retry_decide)",
|
|
"root_cause": "Client-side, NOT server. ha_dispatch_gate ALLOWS OPCode_ctrlstatus in every role and rejects client writes with the RETRYABLE -XCE_ERR_NOT_READY (never EINVAL), so a reachable controller would answer. The EINVAL is the xceapi per-op guard: `if (ctx->state != XCE_CTX_RUN) return -EINVAL`. The failover loop only AUTO-RECOVERS ctx.state==XCE_CTX_ERR (xcecli_retry_decide rotates+recovers); xce_failover_classify maps EINVAL -> XCE_FO_TERMINAL ('everything else -> terminal'), so a bare EINVAL is surfaced and the sticky master cursor never advances to the live new primary. So once the ctx lands in a non-ERR non-RUN state (INIT/DOWN) \u2014 or yields a bare EINVAL while RUN \u2014 failover gives up permanently. Exact stuck state needs a live repro to confirm.",
|
|
"fix": "FIXED (verified 2026-07-02, no direct code trail to when \u2014 landed under libxce-failover). src/lib/client_failover.c xcecli_retry_decide() now checks `ac->ctx.state == XCE_CTX_ERR` BEFORE classifying rc, bypassing the -EINVAL misclassification entirely (comment there literally reads 'the reported bug'). xcecli_ctx_recover() resets ERR->RUN post-reconnect. This is exactly recommendation (B) from this bug's own original fix note.",
|
|
"tags": [
|
|
"client",
|
|
"stale-report",
|
|
"einval",
|
|
"blocker",
|
|
"failover",
|
|
"ha",
|
|
"fixed",
|
|
"libxce"
|
|
],
|
|
"related_bugs": [
|
|
"bug-646"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-02T17:30:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-853",
|
|
"timestamp": "2026-06-20T15:27:41.698Z",
|
|
"error_message": "Wrong reference: test_wal_batch_entry_without_payload should be test_wal_batch_roundtrip_large_payloads",
|
|
"file": "src/lib/testsuite/test_wal_wire.c",
|
|
"root_cause": "Used \"test_wal_batch_entry_without_payload\" instead of \"test_wal_batch_roundtrip_large_payloads\"",
|
|
"fix": "Changed test_wal_batch_entry_without_payload \u2192 test_wal_batch_roundtrip_large_payloads",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-20T15:27:41.698Z"
|
|
},
|
|
{
|
|
"id": "bug-861",
|
|
"timestamp": "2026-06-21T00:20:55.974Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/testsuite/test_persist_recovery.c",
|
|
"root_cause": "Had \"persist.h\"",
|
|
"fix": "Changed to \"ha.h\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T00:20:55.974Z"
|
|
},
|
|
{
|
|
"id": "bug-864",
|
|
"timestamp": "2026-06-21T03:39:07.483Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/repl.c",
|
|
"root_cause": "No early return/throw for edge case: r->standbys[i].ep == ep",
|
|
"fix": "Added guard clause: if (r->standbys[i].ep == ep)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T03:39:07.483Z"
|
|
},
|
|
{
|
|
"id": "bug-871",
|
|
"timestamp": "2026-06-21T04:01:07.089Z",
|
|
"error_message": "Wrong reference: test_repl_write_rejects_checkpoint should be test_repl_write_rejects_forward_gap",
|
|
"file": "src/controller/testsuite/test_repl_apply.c",
|
|
"root_cause": "Used \"test_repl_write_rejects_checkpoint\" instead of \"test_repl_write_rejects_forward_gap\"",
|
|
"fix": "Changed test_repl_write_rejects_checkpoint \u2192 test_repl_write_rejects_forward_gap",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T04:01:07.089Z"
|
|
},
|
|
{
|
|
"id": "bug-851",
|
|
"timestamp": "2026-06-21T13:30:00.000Z",
|
|
"error_message": "CHAOTIC leadership churn (3x kill-the-primary) causes SILENT committed-prefix DIVERGENCE: all 3 nodes report committedLsn=54 with lsn range 1..54 / 0 gaps / CRC intact, but WAL CONTENT diverges at LSN 45-54 (ctrl-1/ctrl-2/ctrl-3 each hold DIFFERENT jobs at the same LSNs; fps bfeb26ad/216af434/865304ec). Violates Raft committed-prefix invariant (a committed entry must be byte-identical on every member). Originally seen as a liveness 'commit stall'; the deeper defect is divergence + acked-job loss under churn.",
|
|
"file": "src/controller/persist.c:588/726/1040 (hdr.term=p->term, p->term never set) + src/controller/ha.c (election term = local+1, PreVote no-persist; two leaders per term) + src/controller/ha_convergence.c (reconcile cannot (term,lsn) log-match)",
|
|
"root_cause": "ROOT-CAUSED 2026-06-21 (owned-cluster repro, see .kiro/specs/ha-commit-durability/repro-851/). THREE compounding defects: (1) Election term not monotonic across cluster: term = locally-persisted+1, PreVote does NOT persist/propagate ('PreVote round ... no persist'); under chaotic kills a leader wins term N, appends own-term noop+jobs, and is killed BEFORE term N propagates to a majority; a restarted node recovers a STALE term and elects at the SAME N+1 => TWO leaders share a term (logs: term3 led by ctrl-3@08:40 AND ctrl-1@08:47:39; term4 led by ctrl-2@08:47:52 AND ctrl-3@08:48:04), each appending its own-term noop at the SAME lsn 45. (2) WAL entry term field is DEAD (always 0): wal_entry_hdr_t.term exists (wal_types.h:30) but writer does hdr.term=p->term (persist.c:588/726/1040) and p->term is NEVER assigned from ha->term anywhere in the controller (zero matches) => every entry persists term=0; waldump confirms term=0 cluster-wide. (3) No (term,lsn) reconcile: with no usable per-entry term, ha_convergence.c reconcile cannot Raft-log-match, so a divergent same-lsn suffix (45@term3 vs 45@term4) looks already-present and is never truncated; ha_compute_safe_committed_lsn then advances committed 'from 1 granted voter' over content other members never received. NOTE: a CLEAN single failover fully converges (all WALs identical 1..22, 848/849/850 validated) \u2014 only CHAOTIC churn triggers it.",
|
|
"fix": "FIXED AND VERIFIED LIVE -- three distinct contributing root causes were found and fixed, all owned by ha-term-safety (spec.json validate_impl decision: GO, 2026-07-17): (1) Term propagation -- repl_broadcast (persist.c:747, the live replicator) built its wire entry without setting entry.term, so live traffic wire-encoded term=0 even though the primary's own header had the real term (same root cause as bug-990, fixed together in task 3.4: entry.term=hdr->term now carried through the live send+intake path, term-0 legacy direct-apply retired). 175/175 unit tests, live-confirmed on real fs. (2) Election-Safety violation (bug-1095/bug-1096, the 'bug-851 family', found by the raft-sim-conformance oracle): raft_on_vote_reply in libxce's raft.c double-counted duplicate vote replies and never dropped stale-term replies, allowing two leaders at the same term -- fixed with a per-peer vote-reply dedup + stale-term drop, unit-tested at both the raft-sim and controller level. (3) Premature election-time truncation (bug-828, closely related): ha_enter_real_election was truncating the WAL to a stale last_known_committed_lsn before computing the safe commit point, destroying already-durable committed entries -- fixed (commit b77d412), live-verified: clean failover preserves committed jobs, walcompare committed-prefix identical across all 3 members across multiple runs. ha-term-safety's GO decision explicitly cites a fresh 6-round LIVE chaotic-multi-kill soak (bug-851's exact repro scenario) passing with zero committed divergence/job loss -- superseding an earlier in-task note (task 5.4) that had called this env-blocked before that later live run completed.\n\n[Original entry]\nNOT FIXED (HA-core + persistence => full spec workflow per CLAUDE.md, not a quick patch). Keystone lever: stamp hdr.term from live ha->term on the primary append path + carry term through the repl envelope + persist it, THEN make ha_convergence reconcile truncate any local suffix whose (term,lsn) != leader's (standard Raft log-matching). MUST pair with durably-establishing the election term before a new leader acts (no two leaders per term: persist/propagate the won term to a majority before appending the own-term noop, or bump term beyond any (term,lsn) a voter advertises). Route to ha-consistency-invariants / ha-convergence-recovery as a new sub-spec.",
|
|
"tags": [
|
|
"ha",
|
|
"failover",
|
|
"replication",
|
|
"convergence",
|
|
"raft-safety",
|
|
"term-monotonicity",
|
|
"wal-term",
|
|
"committed-divergence",
|
|
"data-loss",
|
|
"spec-needed",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-850",
|
|
"bug-849",
|
|
"bug-848",
|
|
"bug-646"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-21T09:10:00.000Z",
|
|
"root_caused": "2026-06-21T09:10:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-854",
|
|
"timestamp": "2026-06-21T09:10:00.000Z",
|
|
"error_message": "Client primary-discovery is POSITIONAL, not failover-correct: with masters=[m0,m1,...] the client only finds the primary if m0 IS the primary. wait-primary: 9993(primary-first)=ok 45ms; 9992,9993(standby-first)=no primary; 9991,9993(dead-first)=no primary; 9993,9991=ok.",
|
|
"file": "src/lib/client.c:403 xcecli_ctrlstatus_primary + src/controller/ctrlstatus.c:104 (standby primaryName=\"\")",
|
|
"root_cause": "Two compounding defects in libxce: (1) XCECLI_FAILOVER_CALL classifies a standby's status-0 ctrlstatus reply as SUCCESS and never rotates the endpoint (ctrlstatus is answerable in every role, so ANY reachable standby answers 0 \u2014 the inner call never rotates off it). (2) xcecli_ctrlstatus_primary captures a redirect hint from the non-authoritative reply but does not force rotation to consume it \u2014 it re-queries the same standby until the retry budget exhausts, never traversing the master ring. No server-side primaryName source existed on a standby (voted_for_name is not the leader, and primary_host is vestigial/never-written). Verified: baseline (no fix) with standby-first masters does NOT find the primary (pins to standby).",
|
|
"fix": "FIXED (2026-06-23). xcecli_ctrlstatus_primary: force xce_failover_rotate(ctx) + xcecli_ctx_recover(ctx) under failover.lock on every non-authoritative reply (hint-first then next-master rotation). Loop floor raised to max(max_retries, nmasters+1). Verified: wait-primary 'ctrl-3' serving after 92 ms with standby-first masters list; end-to-end clean-failover discover pass. Deliberately NOT adding server-side primaryName source \u2014 it is only a latency optimization; the client rotation fix alone resolves the hang.",
|
|
"tags": [
|
|
"libxce",
|
|
"client",
|
|
"failover",
|
|
"primary-discovery",
|
|
"ctrlstatus",
|
|
"ha",
|
|
"FIXED",
|
|
"client",
|
|
"rotation",
|
|
"xcecli_ctrlstatus_primary"
|
|
],
|
|
"related_bugs": [
|
|
"bug-846",
|
|
"bug-851",
|
|
"bug-646"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-23"
|
|
},
|
|
{
|
|
"id": "bug-875",
|
|
"timestamp": "2026-06-21T10:04:37.876Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-term-safety/requirements.md",
|
|
"root_cause": "Had `OPCode_replConfigPush`",
|
|
"fix": "Changed to `snapshot_transfer_s`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T10:04:37.876Z"
|
|
},
|
|
{
|
|
"id": "bug-857",
|
|
"timestamp": "2026-06-21T10:30:00.000Z",
|
|
"error_message": "Config upgrade can leave members with DIVERGENT materialized state: do_upgrade_config_with_bytes pushes config bytes only then restart_requested; each node re-derives state by replaying its WAL under the NEW config, with no snapshot pinning an identical post-upgrade state. Replay is config-dependent (lost_and_found re-homes orphaned jobs), so nodes can diverge; amplified by bug-851 WAL tail divergence.",
|
|
"file": "src/controller/config_repl.c do_upgrade_config_with_bytes (~1001-1163)",
|
|
"root_cause": "Config is a separate consistency domain (committed_config_tag, no term, tag anti-entropy) outside both the WAL log and raft.c. Upgrade activation = config push + restart + per-node WAL replay under new config; no snapshot transfers an identical materialized state, and state is interpreted against config. Identified via TLA+ gap analysis (config should be log-entry/snapshot-anchored). NOT empirically reproduced yet.",
|
|
"fix": "FIXED AND VERIFIED LIVE -- config-upgrade-snapshot (the spec this was descoped into) is fully task-complete: every task 1 through 8.9 is done, including task 8.5 ('Reproduce bug-857 on the pre-change behavior and confirm it no longer occurs') and task 8.6 (a live chaotic multi-kill soak, 2026-07-29, confirming zero materialized-state/config divergence after a config upgrade). The fix materializes a full entity-bearing state snapshot at the config-change marker (term,lsn) boundary and installs it on every member, exactly as originally planned. Note: config-upgrade-snapshot/spec.json's own `phase` field was left stale at 'tasks-generated' despite the spec being fully implemented -- corrected separately alongside this entry.\n\n[Original entry]\nNOT FIXED. Descoped 2026-06-21 from ha-term-safety R8 into the independent `config-upgrade-snapshot` spec (.kiro/specs/config-upgrade-snapshot/, requirements generated). Fix = upgrade materializes a FULL entity-bearing state snapshot at the config-change marker (term,lsn) boundary, embeds new config, installs on every member; no per-node replay-under-new-config. HARD dependency: entity-bearing-snapshots (snapshots are a 16-byte LSN sentinel today; COW xzarray_freeze/thaw built but dormant). Verify by reproducing bug-857 (upgrade during chaotic multi-kill, diff materialized state).",
|
|
"tags": [
|
|
"config",
|
|
"snapshot",
|
|
"ha",
|
|
"needs-verification",
|
|
"spec-needed",
|
|
"descoped",
|
|
"config-upgrade-snapshot",
|
|
"entity-bearing-snapshots",
|
|
"state-divergence",
|
|
"raft-safety",
|
|
"upgrade",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-851",
|
|
"bug-828"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T10:30:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-878",
|
|
"timestamp": "2026-06-21T10:34:30.593Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/steering/roadmap.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-21T10:34:30.593Z"
|
|
},
|
|
{
|
|
"id": "bug-879",
|
|
"timestamp": "2026-06-21T10:59:29.212Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-term-safety/TLA-gap-analysis.md",
|
|
"root_cause": "Had `raft.c`",
|
|
"fix": "Changed to 's split architecture, the chosen direction is to ",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T10:59:29.212Z"
|
|
},
|
|
{
|
|
"id": "bug-880",
|
|
"timestamp": "2026-06-21T12:56:07.740Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-term-safety/requirements.md",
|
|
"root_cause": "Had `snapshot_transfer_s`",
|
|
"fix": "Changed to `(term, lsn)`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T12:56:07.740Z"
|
|
},
|
|
{
|
|
"id": "bug-881",
|
|
"timestamp": "2026-06-21T13:00:46.210Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-term-safety/design.md",
|
|
"root_cause": "Had `xce_test`",
|
|
"fix": "Changed to `OPCode_replConfigPush`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 4,
|
|
"last_seen": "2026-06-21T13:04:57.579Z"
|
|
},
|
|
{
|
|
"id": "bug-883",
|
|
"timestamp": "2026-06-21T13:05:44.284Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-term-safety/research.md",
|
|
"root_cause": "Had `config_repl.c:1857-1944`",
|
|
"fix": "Changed to `xzarray_freeze`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-21T13:06:07.689Z"
|
|
},
|
|
{
|
|
"id": "bug-884",
|
|
"timestamp": "2026-06-21T15:20:00Z",
|
|
"error_message": "test_persistence_constants:FAIL Expected TRUE Was FALSE (DEFAULT_SYNC_TIMEOUT_MS==50)",
|
|
"file": "src/lib/testsuite/test_config.c",
|
|
"root_cause": "commit ca1d9ae raised DEFAULT_SYNC_TIMEOUT_MS 50->500 in config.h but did not update the test assertion; pre-existing red on HEAD, unrelated to raft",
|
|
"fix": "synced assertion to ==500 (commit 7b6cbb8)",
|
|
"tags": [
|
|
"test",
|
|
"config",
|
|
"stale-assertion",
|
|
"ha-commit-engine"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T15:20:00Z"
|
|
},
|
|
{
|
|
"id": "bug-885",
|
|
"timestamp": "2026-06-21T15:21:59.689Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "No early return/throw for edge case: index < 1 || index > RAFT_SIM_MAX_LOG",
|
|
"fix": "Added guard clause: if (index < 1 || index > RAFT_SIM_MAX_LOG)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T15:21:59.689Z"
|
|
},
|
|
{
|
|
"id": "bug-886",
|
|
"timestamp": "2026-06-21T15:41:42.176Z",
|
|
"error_message": "Wrong reference: test_raft_init_zero_peers_returns_einval should be test_raft_init_oversize_peers_returns_einval",
|
|
"file": "src/lib/testsuite/test_raft.c",
|
|
"root_cause": "Used \"test_raft_init_zero_peers_returns_einval\" instead of \"test_raft_init_oversize_peers_returns_einval\"",
|
|
"fix": "Changed test_raft_init_zero_peers_returns_einval \u2192 test_raft_init_oversize_peers_returns_einval",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T15:41:42.176Z"
|
|
},
|
|
{
|
|
"id": "bug-887",
|
|
"timestamp": "2026-06-21T15:45:29.785Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft.c",
|
|
"root_cause": "No early return/throw for edge case: s->role != RAFT_LEADER",
|
|
"fix": "Added guard clause: if (s->role != RAFT_LEADER)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T15:45:29.785Z"
|
|
},
|
|
{
|
|
"id": "bug-888",
|
|
"timestamp": "2026-06-21T15:52:45.272Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/testsuite/test_raft.c",
|
|
"root_cause": "No early return/throw for edge case: index >= 1 && index <= RAFT_SIM_MAX_LOG",
|
|
"fix": "Added guard clause: if (index >= 1 && index <= RAFT_SIM_MAX_LOG)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T15:52:45.272Z"
|
|
},
|
|
{
|
|
"id": "bug-889",
|
|
"timestamp": "2026-06-21T15:53:14.276Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft.c",
|
|
"root_cause": "No early return/throw for edge case: s->cbs->on_trace",
|
|
"fix": "Added guard clause: if (s->cbs->on_trace)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T15:53:14.276Z"
|
|
},
|
|
{
|
|
"id": "bug-890",
|
|
"timestamp": "2026-06-21T15:59:59.295Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft.c",
|
|
"root_cause": "No early return/throw for edge case: rc != 0",
|
|
"fix": "Added guard clause: if (rc != 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T15:59:59.295Z"
|
|
},
|
|
{
|
|
"id": "bug-891",
|
|
"timestamp": "2026-06-21T16:06:37.923Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft.c",
|
|
"root_cause": "No early return/throw for edge case: s->cbs->on_trace",
|
|
"fix": "Added guard clause: if (s->cbs->on_trace)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T16:06:37.923Z"
|
|
},
|
|
{
|
|
"id": "bug-893",
|
|
"timestamp": "2026-06-21T16:16:47.908Z",
|
|
"error_message": "Wrong reference: g_te_spy should be g_pe_spy",
|
|
"file": "src/lib/testsuite/test_raft.c",
|
|
"root_cause": "Used \"g_te_spy\" instead of \"g_pe_spy\"",
|
|
"fix": "Changed g_te_spy \u2192 g_pe_spy",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T16:16:47.908Z"
|
|
},
|
|
{
|
|
"id": "bug-894",
|
|
"timestamp": "2026-06-21T16:20:39.535Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft.c",
|
|
"root_cause": "No early return/throw for edge case: s->cbs->on_trace",
|
|
"fix": "Added guard clause: if (s->cbs->on_trace)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T16:20:39.535Z"
|
|
},
|
|
{
|
|
"id": "bug-895",
|
|
"timestamp": "2026-06-21T16:29:35.778Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "No early return/throw for edge case: c->nodes[src].partition || c->nodes[dst].partition",
|
|
"fix": "Added guard clause: if (c->nodes[src].partition || c->nodes[dst])",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T16:29:35.778Z"
|
|
},
|
|
{
|
|
"id": "bug-899",
|
|
"timestamp": "2026-06-21T16:42:30.241Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "No early return/throw for edge case: node_idx >= 0 && node_idx < c->n",
|
|
"fix": "Added guard clause: if (node_idx >= 0 && node_idx < c->n)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T16:42:30.241Z"
|
|
},
|
|
{
|
|
"id": "bug-900",
|
|
"timestamp": "2026-06-21T16:51:25.960Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/lib/testsuite/test_raft.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: RUN_TEST(test_sim_9_1_replication_and_partition_catch_up);; RUN_TEST(test_sim_9_2_divergent_suffix_truncation);",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-21T16:51:35.044Z"
|
|
},
|
|
{
|
|
"id": "bug-903",
|
|
"timestamp": "2026-06-21T17:04:17.830Z",
|
|
"error_message": "Wrong operator: <= should be >=",
|
|
"file": "src/lib/testsuite/test_raft.c",
|
|
"root_cause": "Used \"<=\" instead of \">=\"",
|
|
"fix": "Changed operator <= \u2192 >=",
|
|
"tags": [
|
|
"auto-detected",
|
|
"operator-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T17:04:17.830Z"
|
|
},
|
|
{
|
|
"id": "bug-904",
|
|
"timestamp": "2026-06-21T21:44:26.804Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "No early return/throw for edge case: node_idx < 0 || node_idx >= c->n",
|
|
"fix": "Added guard clause: if (node_idx < 0 || node_idx >= c->n)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T21:44:26.804Z"
|
|
},
|
|
{
|
|
"id": "bug-905",
|
|
"timestamp": "2026-06-21T21:49:10.796Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-log-replication/tasks.md",
|
|
"root_cause": "Had `initial_log_len`",
|
|
"fix": "Changed to `raft_sim_restart_node`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T21:49:10.796Z"
|
|
},
|
|
{
|
|
"id": "bug-907",
|
|
"timestamp": "2026-06-21T23:14:37.837Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft.c",
|
|
"root_cause": "No early return/throw for edge case: s->role != RAFT_LEADER",
|
|
"fix": "Added guard clause: if (s->role != RAFT_LEADER)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T23:14:37.837Z"
|
|
},
|
|
{
|
|
"id": "bug-908",
|
|
"timestamp": "2026-06-21T23:14:55.547Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "No early return/throw for edge case: node_idx >= 0 && node_idx < c->n",
|
|
"fix": "Added guard clause: if (node_idx >= 0 && node_idx < c->n)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T23:14:55.547Z"
|
|
},
|
|
{
|
|
"id": "bug-909",
|
|
"timestamp": "2026-06-21T23:30:04.636Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/testsuite/test_raft.c",
|
|
"root_cause": "No early return/throw for edge case: g_mock.get_entry_term_log_len != 0 &&\n index == g_moc",
|
|
"fix": "Added guard clause: if (g_mock.get_entry_term_log_len != 0 &&\n )",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T23:30:04.636Z"
|
|
},
|
|
{
|
|
"id": "bug-911",
|
|
"timestamp": "2026-06-21T23:32:38.225Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/lib/raft/raft.c",
|
|
"root_cause": "Condition was: if (s->cbs->on_vote_eligible != NULL)",
|
|
"fix": "Changed to: if (!raft_log_ok(s, cand_last_log_term, cand_last_log_)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-21T23:32:38.225Z"
|
|
},
|
|
{
|
|
"id": "bug-913",
|
|
"timestamp": "2026-06-22T00:19:56.768Z",
|
|
"error_message": "Wrong reference: TEST_ASSERT_NOT_EQUAL_INT should be TEST_ASSERT_NOT_EQUAL",
|
|
"file": "src/lib/testsuite/test_raft.c",
|
|
"root_cause": "Used \"TEST_ASSERT_NOT_EQUAL_INT\" instead of \"TEST_ASSERT_NOT_EQUAL\"",
|
|
"fix": "Changed TEST_ASSERT_NOT_EQUAL_INT \u2192 TEST_ASSERT_NOT_EQUAL",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T00:19:56.768Z"
|
|
},
|
|
{
|
|
"id": "bug-914",
|
|
"timestamp": "2026-06-22T01:24:34.541Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-term-safety/spec.json",
|
|
"root_cause": "Had \"design-generated\"",
|
|
"fix": "Changed to \"tasks-generated\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"json"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T01:24:34.541Z"
|
|
},
|
|
{
|
|
"id": "bug-855",
|
|
"timestamp": "2026-06-22T03:10:06.653962Z",
|
|
"error_message": "controller_unit_test: 6 test_wal_catchup_* tests FAIL (Expected ... Was -11/-EAGAIN or wrong applied_lsn) on the raft_tla checkpoint branch",
|
|
"file": "src/controller/testsuite/test_config_repl.c (tests) / src/controller/persist.c:705 (guard)",
|
|
"root_cause": "PRE-EXISTING on checkpoint 20e59d0, NOT caused by ha-term-safety 1.1/1.2. The bug-850 contiguity guard (persist.c:705 rejects lsn>current_lsn with -EAGAIN) is committed at HEAD, but the test_wal_catchup_* tests feed forward-gap LSNs (30, 42) into a FRESH persist (current_lsn~=1) and still expect them to apply -> guard returns -EAGAIN -> applied_lsn does not advance. ha-term-safety changes touch only vote/schema/typemap/stubs; git diff --stat shows ZERO changes to persist.c/config_repl.c/test_config_repl.c. Also a separate run TIMED OUT 300s (the bug-850 DNR /tmp fsync-EIO + commit-WAIT signature; environment artifact on overlayfs).",
|
|
"fix": "FIXED (verified 2026-07-02): ran controller_unit_test directly \u2014 all test_wal_catchup_* tests (append_term_fields_round_trip, entry_advances_applied_lsn, entry_error_skipped_no_crash, entry_null_entry_no_crash, batch_advances_applied_lsn, partial_batch, batch_error_entry_skipped, batch_zero_entries_fallback, batch_256_entries) PASS. Landed as part of ha-term-safety's WAL term-index work (owner this bug deferred to).",
|
|
"tags": [
|
|
"controller-test",
|
|
"stale-report",
|
|
"ha-term-safety",
|
|
"wal-catchup",
|
|
"EAGAIN",
|
|
"not-a-regression",
|
|
"contiguity-guard",
|
|
"fixed",
|
|
"bug-850",
|
|
"pre-existing"
|
|
],
|
|
"related_bugs": [
|
|
"bug-850",
|
|
"bug-851"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-02T17:30:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-918",
|
|
"timestamp": "2026-06-22T03:30:00Z",
|
|
"error_message": "nix develop fails: hash mismatch for c-capnproto fixed-output derivation (expected sha256-9dzSc3w+yxYzsF/rZe3qIarKOpjt2zvIyjuS5FXngIM=, got sha256-9rTlcTia+s9ARGeTi+8auGvM0RkS+wZK7aIkzecaeSk=)",
|
|
"file": "src/flake.nix",
|
|
"root_cause": "flake pins c-capnproto to the MUTABLE github archive/main.tar.gz; upstream main branch advanced so the tarball content/hash drifted, breaking the fixed-output derivation. Only pre-cached nix stores still build.",
|
|
"fix": "RESOLVED: user refreshed src/flake.lock; fresh nix develop builds (capnproto 1.2.0). A clean controller rebuild made the full controller test suite green (Ok:1 Fail:0, 12.7s) \u2014 the earlier wal_catchup -EAGAIN/decode failures were a STALE incremental-build artifact (schema compiled against the drifted toolchain), not fsync or a source regression. RECURRENCE 2026-07-23 (config worktree, /xce-build controller build+report task for config-upgrade-snapshot Task 1 RED-phase capture): identical hash mismatch reproduced verbatim (same specified sha256-9dzSc3w+yxYzsF/rZe3qIarKOpjt2zvIyjuS5FXngIM= vs got sha256-9rTlcTia+s9ARGeTi+8auGvM0RkS+wZK7aIkzecaeSk= for capnpc-1.0.1.drv source.drv) on FIRST invocation and again on an identical immediate RETRY (deterministic, not transient -- unlike the unrelated ninja-race bugs, retrying does not help here). Build never reached compilation; no xce_controller, controller_unit_test, or xce_test binaries produced; controller.capnp.c/h were not regenerated. This worktree (config, at .../worktrees/config) still has the pre-fix flake.lock/pin state -- the 2026-06-22 fix (refreshing src/flake.lock) was apparently not carried into this worktree, or upstream c-capnproto main.tar.gz drifted again since. NOT fixed this run (build+report only, no source/flake edits authorized by the task). Next step: refresh src/flake.lock in this worktree (nix flake update / lock the xbuild input) the same way the 2026-06-22 fix did, then retry the controller build. RECURRENCE 3 (2026-07-23, config worktree, config-upgrade-snapshot Task 1 implementer session): identical hash mismatch reproduced again AFTER a prior subagent had already logged occurrence 2 (build+report task, no fix attempted). This session went further: (1) confirmed `nix flake lock --update-input xbuild` in src/ is a NO-OP -- xbuild is already pinned to the latest available shen390s/my-nix-channel@master commit (073f527e), so re-locking flake.lock does NOT fix this recurrence (the previous 2026-06-22 fix's mechanism -- refresh flake.lock -- no longer applies once xbuild is already current); (2) confirmed via direct `nix develop` in the CANONICAL non-worktree repo (/home/rshen/projects/xce/xce/src) that it fails IDENTICALLY (same two sha256 hashes, same capnpc-1.0.1.drv path) -- this is a live, machine-wide, upstream c-capnproto main.tar.gz drift, NOT a worktree-isolation problem, and is not fixable from within this repo at all (the broken pin lives inside the external shen390s/my-nix-channel flake, at whatever commit is currently latest); (3) WORKAROUND discovered and used successfully: this machine's /nix/store already has REALIZED (fully built, not just .drv) output paths for capnpc-1.0.1 and capnproto-1.2.0 from a build that completed before the drift -- `find /nix/store -maxdepth 1 -iname '*capnp*'` surfaces them; invoking their bin/capnp and bin/capnpc-c binaries DIRECTLY (bypassing `nix develop`'s full devShell evaluation entirely) still works and successfully compiled a controller.capnp schema change end-to-end, generating correct bindings. This unblocks schema-level capnp verification even while the full `nix develop` shell is broken, but does NOT unblock a full project build/link -- controller_unit_test additionally needs `librtti` (fetched via a private SSH git flake input), which has NEVER been built/cached on this machine at all (no .drv or realized store path exists for it), so a full build+test run remains genuinely infeasible until either upstream fixes the c-capnproto pin or a machine with a pre-cached librtti+full toolchain is used.",
|
|
"tags": [
|
|
"nix",
|
|
"flake",
|
|
"c-capnproto",
|
|
"env",
|
|
"build",
|
|
"worktree-isolation",
|
|
"worktree"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 4,
|
|
"last_seen": "2026-07-24T08:00:00Z",
|
|
"recurrence_4_RESOLVED": "2026-07-24, config-upgrade-snapshot task 1 resumption session: RESOLVED (repo-local fix, no longer machine-wide-blocked as recurrence 3 concluded). Added a local override in src/nixSupport/xce.nix's capnpc derivation -- `src = pkgs.fetchFromGitHub { owner = \"shen390s\"; repo = \"c-capnproto\"; rev = \"e45ff682c4756ac5067cbac6d0f282a8ea5f0155\"; sha256 = \"sha256-9rTlcTia+s9ARGeTi+8auGvM0RkS+wZK7aIkzecaeSk=\"; }` -- pinning capnpc's source to an IMMUTABLE commit (the exact content the drifted `main` tarball happened to resolve to, so the hash matches what was already realized in the local /nix/store from recurrence 3's workaround) instead of upstream xbuild's package.nix pinning the MUTABLE `main` ref. This makes the fix independent of upstream's moving target permanently, not just until the next drift. Verified end-to-end: `nix develop --command meson setup xce.build --buildtype=debug -Db_sanitize=address --reconfigure && ninja -C xce.build controller/controller_unit_test` built clean (librtti and all other deps resolved fine -- recurrence 3's librtti-never-cached concern did not reproduce, this machine already had it), and the full `controller_unit_test` binary ran to completion: 978 Tests 0 Failures 0 Ignored, OK. Do-not-repeat: when a fixed-output-derivation hash mismatch traces to an upstream flake pinning a MUTABLE branch/ref (not a tag/commit), the durable fix is a local override.overrideAttrs pinning `src` to an explicit immutable commit + matching sha256 in the CONSUMING repo's own nix file -- do not wait on upstream or keep re-locking flake.lock (recurrence 3 already proved that path is a dead end once xbuild is already at its latest available commit)."
|
|
},
|
|
{
|
|
"id": "bug-920",
|
|
"timestamp": "2026-06-22T03:58:08.538Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'testsuite/test_waldump.c'",
|
|
"fix": "Changed to 'testsuite/test_term_safety_adapter.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T03:58:08.538Z"
|
|
},
|
|
{
|
|
"id": "bug-921",
|
|
"timestamp": "2026-06-22T03:58:19.392Z",
|
|
"error_message": "Wrong reference: test_waldump should be test_term_safety_adapter",
|
|
"file": "src/controller/testsuite/controller_test.c",
|
|
"root_cause": "Used \"test_waldump\" instead of \"test_term_safety_adapter\"",
|
|
"fix": "Changed test_waldump \u2192 test_term_safety_adapter",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-22T03:58:28.433Z"
|
|
},
|
|
{
|
|
"id": "bug-922",
|
|
"timestamp": "2026-06-22T03:59:43.099Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "No early return/throw for edge case: !p || lsn == 0",
|
|
"fix": "Added guard clause: if (!p || lsn == 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T03:59:43.099Z"
|
|
},
|
|
{
|
|
"id": "bug-923",
|
|
"timestamp": "2026-06-22T04:01:37.467Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "Condition was: if (hdr.lsn <= from_lsn)",
|
|
"fix": "Changed to: if (hdr.type < WAL_CHECKPOINT)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T04:01:37.467Z"
|
|
},
|
|
{
|
|
"id": "bug-924",
|
|
"timestamp": "2026-06-22",
|
|
"error_message": "controller_unit_test: ~63 'Expected Non-NULL' + test_config_repl catchup FAILs (Expected 0 Was -11 EAGAIN) during ha-term-safety 1.3 validation",
|
|
"file": "environment (/ overlay filesystem)",
|
|
"root_cause": "Disk filled to 100% (7466 leftover /tmp/xce_* WAL dirs from repeated ASAN test runs). make_fresh_persist's persist_init mkdir_p hit ENOSPC -> returned NULL -> cascade of 'Expected Non-NULL'. Also overlayfs returned fdatasync EIO under disk pressure. NOT a code regression: baseline full suite passes; test_config_repl catchup tests are order-dependent and fail in isolation on baseline too.",
|
|
"fix": "rm -rf /tmp/xce_* freed 327GB; full controller suite then Ok:1 Fail:0. For future runs: clean /tmp/xce_* between heavy ASAN test cycles.",
|
|
"tags": [
|
|
"disk-space",
|
|
"enospc",
|
|
"overlayfs",
|
|
"fdatasync-eio",
|
|
"controller-tests",
|
|
"flaky",
|
|
"ha-term-safety"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22"
|
|
},
|
|
{
|
|
"id": "bug-925",
|
|
"timestamp": "2026-06-22T04:42:28.897Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/testsuite/test_term_safety_adapter.c",
|
|
"root_cause": "No early return/throw for edge case: !c",
|
|
"fix": "Added guard clause: if (!c)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T04:42:28.897Z"
|
|
},
|
|
{
|
|
"id": "bug-926",
|
|
"timestamp": "2026-06-22T04:45:07.018Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: !ha || !ha->raft_c",
|
|
"fix": "Added guard clause: if (!ha || !ha->raft_c)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T04:45:07.018Z"
|
|
},
|
|
{
|
|
"id": "bug-928",
|
|
"timestamp": "2026-06-22T04:55:58.789Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/testsuite/test_term_safety_adapter.c",
|
|
"root_cause": "No early return/throw for edge case: !c",
|
|
"fix": "Added guard clause: if (!c)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T04:55:58.789Z"
|
|
},
|
|
{
|
|
"id": "bug-929",
|
|
"timestamp": "2026-06-22T04:57:03.605Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: !ha || !ha->raft_c",
|
|
"fix": "Added guard clause: if (!ha || !ha->raft_c)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-22T04:57:15.567Z"
|
|
},
|
|
{
|
|
"id": "bug-930",
|
|
"timestamp": "2026-06-22T04:57:25.141Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "No early return/throw for edge case: !p",
|
|
"fix": "Added guard clause: if (!p)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T04:57:25.141Z"
|
|
},
|
|
{
|
|
"id": "bug-931",
|
|
"timestamp": "2026-06-22T05:45:09.373Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/include/repl.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T05:45:09.373Z"
|
|
},
|
|
{
|
|
"id": "bug-933",
|
|
"timestamp": "2026-06-22T05:47:50.037Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: !d",
|
|
"fix": "Added guard clause: if (!d)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T05:47:50.037Z"
|
|
},
|
|
{
|
|
"id": "bug-937",
|
|
"timestamp": "2026-06-22T06:39:51.351Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: !ha || !ha->raft_c",
|
|
"fix": "Added guard clause: if (!ha || !ha->raft_c)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T06:39:51.351Z"
|
|
},
|
|
{
|
|
"id": "bug-941",
|
|
"timestamp": "2026-06-22T07:53:06.457Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_term_safety_adapter.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T07:53:06.457Z"
|
|
},
|
|
{
|
|
"id": "bug-942",
|
|
"timestamp": "2026-06-22T07:54:52.956Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: !c",
|
|
"fix": "Added guard clause: if (!c)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T07:54:52.956Z"
|
|
},
|
|
{
|
|
"id": "bug-943",
|
|
"timestamp": "2026-06-22T07:55:30.714Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T07:55:30.714Z"
|
|
},
|
|
{
|
|
"id": "bug-944",
|
|
"timestamp": "2026-06-22T07:56:08.623Z",
|
|
"error_message": "Wrong reference: ha_arm_own_term_gate should be ha_arm_own_term_gate_for_test",
|
|
"file": "src/controller/testsuite/test_term_safety_adapter.c",
|
|
"root_cause": "Used \"ha_arm_own_term_gate\" instead of \"ha_arm_own_term_gate_for_test\"",
|
|
"fix": "Changed ha_arm_own_term_gate \u2192 ha_arm_own_term_gate_for_test",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T07:56:08.623Z"
|
|
},
|
|
{
|
|
"id": "bug-945",
|
|
"timestamp": "2026-06-22T08:09:41.508Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/ha-term-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-22T08:09:41.508Z"
|
|
},
|
|
{
|
|
"id": "bug-948",
|
|
"timestamp": "2026-06-22T08:21:57.062Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: /* ha-term-safety task 3.2 (R2.6 / G5): route the heartbeat ; * library as a 0-entry AppendEntries so the LIBRARY performs",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-22T08:23:05.006Z"
|
|
},
|
|
{
|
|
"id": "bug-953",
|
|
"timestamp": "2026-06-22T08:48:45.792Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: rc == 0 && out_lsn",
|
|
"fix": "Added guard clause: if (rc == 0 && out_lsn)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T08:48:45.792Z"
|
|
},
|
|
{
|
|
"id": "bug-957",
|
|
"timestamp": "2026-06-22T09:08:41.177Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: ep_is_vote",
|
|
"fix": "Added guard clause: if (ep_is_vote)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-22T09:11:38.490Z"
|
|
},
|
|
{
|
|
"id": "bug-960",
|
|
"timestamp": "2026-06-22T09:20:00.000Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/testsuite/test_config_repl.c",
|
|
"root_cause": "No early return/throw for edge case: !c",
|
|
"fix": "Added guard clause: if (!c)",
|
|
"tags": [
|
|
"ha-term-safety",
|
|
"raft",
|
|
"peer-index",
|
|
"match_index",
|
|
"oob",
|
|
"false-quorum",
|
|
"task-3.3",
|
|
"remediation",
|
|
"c",
|
|
"auto-detected",
|
|
"guard-clause"
|
|
],
|
|
"related_bugs": [
|
|
"bug-851"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-22T09:43:23.309Z"
|
|
},
|
|
{
|
|
"id": "bug-959",
|
|
"timestamp": "2026-06-22T09:31:11.227Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/config_repl.c",
|
|
"root_cause": "No early return/throw for edge case: !sha256 || !buf || !out_len",
|
|
"fix": "Added guard clause: if (!sha256 || !buf || !out_len)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T09:31:11.227Z"
|
|
},
|
|
{
|
|
"id": "bug-961",
|
|
"timestamp": "2026-06-22T09:45:31.779Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/config_repl.c",
|
|
"root_cause": "No early return/throw for edge case: !c || !sha256",
|
|
"fix": "Added guard clause: if (!c || !sha256)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T09:45:31.779Z"
|
|
},
|
|
{
|
|
"id": "bug-962",
|
|
"timestamp": "2026-06-22T10:04:06.960Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "No early return/throw for edge case: committed == 0",
|
|
"fix": "Added guard clause: if (committed == 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T10:04:06.960Z"
|
|
},
|
|
{
|
|
"id": "bug-964",
|
|
"timestamp": "2026-06-22T10:05:22.007Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/config_repl.c",
|
|
"root_cause": "No early return/throw for edge case: acked_out",
|
|
"fix": "Added guard clause: if (acked_out)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T10:05:22.007Z"
|
|
},
|
|
{
|
|
"id": "bug-966",
|
|
"timestamp": "2026-06-22T10:10:11.668Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "No early return/throw for edge case: !p",
|
|
"fix": "Added guard clause: if (!p)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T10:10:11.668Z"
|
|
},
|
|
{
|
|
"id": "bug-967",
|
|
"timestamp": "2026-06-22T10:10:17.811Z",
|
|
"error_message": "Wrong reference: persist_roll_segment should be persist_test_force_new_segment",
|
|
"file": "src/controller/testsuite/test_config_repl.c",
|
|
"root_cause": "Used \"persist_roll_segment\" instead of \"persist_test_force_new_segment\"",
|
|
"fix": "Changed persist_roll_segment \u2192 persist_test_force_new_segment",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T10:10:17.811Z"
|
|
},
|
|
{
|
|
"id": "bug-970",
|
|
"timestamp": "2026-06-22T10:24:35.905518Z",
|
|
"error_message": "ha-term-safety task 4.2 rejected (review r1): live config-change path (do_upgrade_config_with_bytes) never appended WAL_CONFIG_MARKER \u2014 config_committed_marker had ZERO production callers (dead primitive); and checkpoint/compaction could trim a committed marker segment, regressing the derive to -ENOENT.",
|
|
"file": "src/controller/config_repl.c, src/controller/persist.c",
|
|
"root_cause": "Finding1: do_upgrade_config_with_bytes still drove the term-blind committed_config_tag push/ack/advance and never called config_append_marker, so the derive primitive was dead code. Finding2: persist_checkpoint->trim_wal_segments unlinks older segments and the snapshot sentinel carried no config reference, so a committed marker in a trimmed segment vanished and config_committed_marker regressed/returned -ENOENT.",
|
|
"fix": "Added config_commit_change() wired into do_upgrade_config_with_bytes step 7: appends WAL_CONFIG_MARKER as the consensus record (config_append_marker), then delegates byte delivery + the existing majority barrier to push_config_to_standbys (mechanism unchanged); committed_config_tag is now only a cache, config_committed_marker (committed-prefix derive) is authoritative. Compaction safety: persist_checkpoint scans the committed prefix for the latest marker {version_tag,sha256} (scan_latest_committed_config_ref) BEFORE trim and stamps it into the snapshot sentinel (41-byte optional tail); load_snapshot reads it back into persist.cfgref_*; config_committed_marker falls back to it when no marker survives the live WAL. Added integration test (drives config_commit_change) + checkpoint-trim test + persist_test_force_new_segment seam. cb5 upgrade pins made persist-backed so the marker append succeeds. RED confirmed (Expected 1 Was 0; Expected 0 Was -110); GREEN 0 failures direct-run.",
|
|
"tags": [
|
|
"ha-term-safety",
|
|
"task-4.2",
|
|
"config-marker",
|
|
"wal",
|
|
"checkpoint",
|
|
"compaction",
|
|
"review-remediation",
|
|
"controller"
|
|
],
|
|
"related_bugs": [
|
|
"bug-851"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T10:24:35.905518Z"
|
|
},
|
|
{
|
|
"id": "bug-971",
|
|
"timestamp": "2026-06-22T10:39:44.072Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/testsuite/test_config_repl.c",
|
|
"root_cause": "No early return/throw for edge case: !mc",
|
|
"fix": "Added guard clause: if (!mc)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T10:39:44.072Z"
|
|
},
|
|
{
|
|
"id": "bug-972",
|
|
"timestamp": "2026-06-22T10:40:31.131Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/config_repl.c",
|
|
"root_cause": "No early return/throw for edge case: !c",
|
|
"fix": "Added guard clause: if (!c)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T10:40:31.131Z"
|
|
},
|
|
{
|
|
"id": "bug-975",
|
|
"timestamp": "2026-06-22T11:00:42.661Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: !ha",
|
|
"fix": "Added guard clause: if (!ha)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T11:00:42.661Z"
|
|
},
|
|
{
|
|
"id": "bug-976",
|
|
"timestamp": "2026-06-22T11:15:00.000Z",
|
|
"error_message": "ha-term-safety task 4.3 REJECTED r1: verify-before-activate BYPASSED on push path (handle_repl_config_push pre-activated via load_primary_config before the hash gate); recovery-activate had NO production call site (boot loaded blindly); serve-fence had NO production reader (a fenced member still served)",
|
|
"file": "src/controller/config_repl.c, src/controller/ha.c, src/controller/myapp.c",
|
|
"root_cause": "config_activate_committed (verify-before-activate + fence) was unit-correct but not integrated: (A) handle_repl_config_push called load_primary_config UNCONDITIONALLY before config_activate_committed, so mismatched bytes went live before the gate; (B) myapp.c boot step 7 + on_commit_advanced never called the consumer, so a recovering member loaded config blind against the committed marker; (C) ha_dispatch_gate / pre-promotion gate never read config_serve_fence, so a fenced member still served + could promote",
|
|
"fix": "(A) handle_repl_config_push now SAVES bytes (conf_save_config) then calls config_activate_committed ONLY \u2014 removed premature load_primary_config; activate is the sole activation point (hash-verify gate). (B) config_activate_committed -ENOENT branch falls back to load_primary_config (absent marker != mismatch, no false fence); myapp.c step 7 calls config_activate_committed (latest committed marker, verified). on_commit_advanced documents why activation is deferred off the iomgr thread (async-I/O invariant: scan/load do disk I/O). (C) ha_dispatch_gate CTRL_PRIMARY now refuses config-dependent state-changing ops when config_serve_fenced (replication/read-only pass), pre-promotion gate in raft_cb_become_leader refuses promotion when fenced via new ha_config_promotion_fenced; member stays ALIVE, never self-terminates; fence clears on correct bytes re-verify",
|
|
"tags": [
|
|
"ha-term-safety",
|
|
"config-replication",
|
|
"verify-before-activate",
|
|
"serve-fence",
|
|
"dispatch-gate",
|
|
"promotion-gate",
|
|
"safety",
|
|
"task-4.3",
|
|
"remediation"
|
|
],
|
|
"related_bugs": [
|
|
"bug-851",
|
|
"bug-924"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T11:15:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-977",
|
|
"timestamp": "2026-06-22T11:21:09.742Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/config_repl.c",
|
|
"root_cause": "No early return/throw for edge case: !c",
|
|
"fix": "Added guard clause: if (!c)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T11:21:09.742Z"
|
|
},
|
|
{
|
|
"id": "bug-980",
|
|
"timestamp": "2026-06-22T11:32:35.966Z",
|
|
"error_message": "Wrong reference: ClusterConfig should be cluster_config_t",
|
|
"file": "src/controller/testsuite/test_config_repl.c",
|
|
"root_cause": "Used \"ClusterConfig\" instead of \"cluster_config_t\"",
|
|
"fix": "Changed ClusterConfig \u2192 cluster_config_t",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T11:32:35.966Z"
|
|
},
|
|
{
|
|
"id": "bug-981",
|
|
"timestamp": "2026-06-22T11:35:00Z",
|
|
"error_message": "ha-term-safety 4.3 Finding D: on a standby, config MARKER (WAL) and config BYTES (out-of-band push) arrive on independent transports; on a 2nd+ upgrade the NEW bytes are saved before the NEW marker enters the committed prefix, so config_activate_committed hash-mismatches the OLDER committed marker and sets the serve-fence. When the NEW marker later commits, nothing re-runs activation (on_commit_advanced does no disk I/O on the iomgr ACK thread; primary's config-behind re-push net does not fire because conf_save_config already advanced the advertised config_version_tag) -> standby PERMANENTLY serve-fenced + non-promotable until reboot. Liveness violation of R7.9.",
|
|
"file": "src/controller/config_repl.c, src/controller/ha.c",
|
|
"root_cause": "No post-commit retry trigger for a config serve-fence set under the push-before-commit ordering. config_committed_marker returns the older committed marker until the new marker is in the committed prefix; the two activation call sites (boot, handle_repl_config_push) both run BEFORE the new marker commits, and ha_cb_commit_advanced_stub deliberately did nothing (async-I/O invariant forbids disk reads on the iomgr ACK thread).",
|
|
"fix": "Added config_schedule_activate_retry(c) (non-blocking ordq_put via delay_task_ms, no-op unless serve-fenced AND delaymgr running) and config_activate_retry_fn(arg) (delaymgr task body that re-runs config_activate_committed off the iomgr thread). ha_cb_commit_advanced_stub now schedules the retry whenever config_serve_fenced(c) is set after commit advances. Once the NEW marker is in the committed prefix and the saved bytes hash-verify, the retry clears the fence and activates; -ENOENT still falls back without fencing; no busy-spin (no-op once unfenced). RED captured by stubbing config_activate_retry_fn to a no-op (fence stayed set, NEW config not loaded); GREEN with the real off-thread retry.",
|
|
"tags": [
|
|
"ha-term-safety",
|
|
"config-repl",
|
|
"serve-fence",
|
|
"liveness",
|
|
"async-io",
|
|
"delaymgr",
|
|
"commit-advance",
|
|
"push-before-commit",
|
|
"R7.9"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T11:35:00Z"
|
|
},
|
|
{
|
|
"id": "bug-983",
|
|
"timestamp": "2026-06-22T11:53:36.582Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: commit_index",
|
|
"fix": "Added guard clause: if (commit_index)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T11:53:36.582Z"
|
|
},
|
|
{
|
|
"id": "bug-984",
|
|
"timestamp": "2026-06-22T12:03:15.865Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/ha-term-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-22T12:03:15.865Z"
|
|
},
|
|
{
|
|
"id": "bug-985",
|
|
"timestamp": "2026-06-22T12:06:43.530Z",
|
|
"error_message": "Wrong return value",
|
|
"file": "src/controller/testsuite/waldump.c",
|
|
"root_cause": "Was returning: -EINVAL;",
|
|
"fix": "Now returns: waldump_path_visit(path, out, stats, NULL, NULL);",
|
|
"tags": [
|
|
"auto-detected",
|
|
"return-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T12:06:43.530Z"
|
|
},
|
|
{
|
|
"id": "bug-986",
|
|
"timestamp": "2026-06-22T12:08:51.529Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/testsuite/test.c",
|
|
"root_cause": "Had \"waldump.h\"",
|
|
"fix": "Changed to \"walcompare.h\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T12:08:51.529Z"
|
|
},
|
|
{
|
|
"id": "bug-987",
|
|
"timestamp": "2026-06-22T12:09:28.306Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/testsuite/test.c",
|
|
"root_cause": "No early return/throw for edge case: st.n_gaps > 0 || st.crc_broken",
|
|
"fix": "Added guard clause: if (st.n_gaps > 0 || st.crc_broken)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T12:09:28.306Z"
|
|
},
|
|
{
|
|
"id": "bug-990",
|
|
"timestamp": "2026-06-22T13:24:07.476480",
|
|
"error_message": "ha-term-safety 5.2 live failover: standbys persist per-entry WAL term=0 while primary persists the real term (e.g. primary LSN1..5 term=1, ctrl-2/ctrl-3 term=0); a clean failover's committed prefix is byte-identical in payload (pcrc) but NOT in term, so R5.1 'byte-identical WAL including terms' cannot pass. walcompare passes only via legacy-0 -> WAL_LEGACY_TERM tolerance, which masks it on a fresh cluster.",
|
|
"file": "src/controller/repl.c (live send repl_broadcast persist.c:747) + src/controller/ha.c (ha_apply_wal_catchup_entry term!=0 legacy direct-apply)",
|
|
"root_cause": "The live replication SEND path was deferred from tasks 3.2/3.3 and still uses the legacy term-0 repl_broadcast; the standby applies via the legacy direct-apply path, NOT through raft_on_append_entries_request, so it never receives/persists the leader's term. The raft library send loop (on_send_append_entries / raft_send_append_entries) has ZERO live callers. on_persist_entry stamps the real term on the PRIMARY only.",
|
|
"fix": "FIXED AND VERIFIED LIVE -- root-caused and fixed together with bug-851 in ha-term-safety task 3.4: repl_broadcast (persist.c:747, the live replicator) built its wire entry without setting entry.term, so standbys persisted term=0 for every live-replicated entry even though the primary's own WAL header carried the real term. Fix carries entry.term=hdr->term/prev_log_term through the live send+intake path (repl_broadcast, persist_wal_async, ha_stream_wal_to_standby, ha_apply_wal_catchup_entry all updated), retiring the term-0 legacy direct-apply branch. 175/175 unit tests, reviewer-approved. Live-confirmed on a real fs ($HOME/tmp/xce-ha-deploy, ext4, 2026-06-22): 'ctrl-2/ctrl-3 persisting the leader's REAL term... walcompare OK over the committed prefix.'\n\n[Original entry]\nNOT FIXED (out of task 5.2 testsuite-only boundary). Remaining integration work: retire the term-0 repl_broadcast live SEND and drive raft_send_append_entries/on_send_append_entries on the live primary so standbys persist the leader's term via raft_on_append_entries_request. Built clean_failover_preservation.sh (XCE_FAILOVER_STRICT_TERM=1) as the ready-to-run assertion this retirement must satisfy.",
|
|
"tags": [
|
|
"ha-term-safety",
|
|
"task-5.2",
|
|
"live-send-retirement",
|
|
"term-0",
|
|
"repl_broadcast",
|
|
"committed-prefix-divergence",
|
|
"bug-851",
|
|
"BLOCKED",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-851"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T13:24:07.476480"
|
|
},
|
|
{
|
|
"id": "bug-991",
|
|
"timestamp": "2026-06-22T16:30:00.000Z",
|
|
"error_message": "Standby WAL catch-up advanced applied_lsn to lsn+1 (next-to-apply) instead of lsn (last-held). The standby then advertised one LSN too high; the leader's catch-up streamer streamed (lsn+1, committed] and SKIPPED the real next-needed entry lsn+1, wedging the library logOk gate forever (no WalAck -> match_index never reaches -> raft commit_index frozen -> committed_lsn pinned at 1). Catch-up-path-specific; live repl_broadcast (absolute-LSN, no skip) commits fine, so failure was nondeterministic.",
|
|
"file": "src/controller/ha.c (ha_apply_term_entry_via_library ~2115; batch ~2205; single-entry ~2225)",
|
|
"root_cause": "applied_lsn carried TWO conflicting semantics. Recovery (=durable_floor), checkpoint (=checkpoint_lsn), init (=0) and the leader's catch-up streamer + ha_evaluate_repl_action all treat it as 'last contiguously-held LSN' and stream (standby_lsn, committed]. But the three live/catch-up apply setters advanced to entry->lsn + 1 ('next-to-apply'). After a standby applied catch-up entry N it advertised N+1, so the leader's next stream began at N+2 and skipped N+1 -> logOk reject -> no WalAck.",
|
|
"fix": "fix-1: the three live-apply setters now advance applied_lsn to the LAST-HELD LSN (e->lsn / last_good_lsn / entry->lsn), not +1, so applied_lsn means 'last contiguously-held LSN' everywhere. Reader audit (all consistent with last-held, no +1 reader needed): state report (advertised LSN, ha.c:2461) now matches streamer contract; convergence reported_lsn>=committed_lsn (2536) correct; snapshot/stream boundary standby_lsn+1<oldest_wal_lsn (2501) already assumed last-held; vote/prevote (5106/5183) feed applied_lsn only to the TAG fold, LSN axis overridden by ha_candidate_advertise_lsn(durable_floor); recovery ha_sync_applied_lsn_from_recovery already last-held. fix-B (source advertised LSN from raft.log_len) NOT landed: on the production catch-up road every streamed entry is term-carrying -> routed through the library, so raft.log_len already == applied_lsn after fix-1; raft.log_len legitimately differs from applied_lsn on the legacy term-0 direct-apply and recovery paths, so re-sourcing would regress bug-848 incremental catch-up -> fix-1 alone delivers the value the streamer+logOk need. Unit RED->GREEN: test_catchup_applied_lsn_is_last_held_no_skip (Expected 1 Was 2 pre-fix, PASS post-fix). 7 legacy test_wal_catchup_* expected values updated lsn+1 -> last-held. NOTE: the LIVE clean_failover_preservation STRICT_TERM commit=5 target was NOT reachable in the sandbox: committed_lsn stalls at 1 IDENTICALLY with this fix stashed (baseline experiment) -> that stall is a SEPARATE upstream blocker (library raft.log_len / commit-advance not advancing past the own-term noop; ha-term-safety task 3.1 area), NOT the bug-991 applied_lsn skip. waldump confirms all 3 members hold LSN 1..5 byte-identical (term 1) -> the replication half (which this fix corrects) is sound.",
|
|
"tags": [
|
|
"ha",
|
|
"controller",
|
|
"wal-catchup",
|
|
"applied_lsn",
|
|
"commit-stall",
|
|
"off-by-one",
|
|
"term-safety",
|
|
"bug-991",
|
|
"streamer-skip"
|
|
],
|
|
"related_bugs": [
|
|
"bug-851",
|
|
"bug-850",
|
|
"bug-848",
|
|
"bug-924",
|
|
"bug-960"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T16:30:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-993",
|
|
"timestamp": "2026-06-22T15:10:39.717Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "No early return/throw for edge case: !p || lsn == 0",
|
|
"fix": "Added guard clause: if (!p || lsn == 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T15:10:39.717Z"
|
|
},
|
|
{
|
|
"id": "bug-998",
|
|
"timestamp": "2026-06-22T15:27:10.703Z",
|
|
"error_message": "Wrong reference: test_repl_ack_currentterm_quorum_advances_commit should be test_live_broadcast_receive_persists_leader_term",
|
|
"file": "src/controller/testsuite/test_term_safety_adapter.c",
|
|
"root_cause": "Used \"test_repl_ack_currentterm_quorum_advances_commit\" instead of \"test_live_broadcast_receive_persists_leader_term\"",
|
|
"fix": "Changed test_repl_ack_currentterm_quorum_advances_commit \u2192 test_live_broadcast_receive_persists_leader_term",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T15:27:10.703Z"
|
|
},
|
|
{
|
|
"id": "bug-990-fix",
|
|
"timestamp": "2026-06-22T16:00:00.000000",
|
|
"error_message": "ha-term-safety 5.2 live failover: standbys persist per-entry WAL term=0 while primary persists the real term; clean-failover committed prefix not byte-identical in TERM (R5.1 term-identity gap). Original bug-990.",
|
|
"file": "src/controller/repl.c (repl_broadcast), src/controller/persist.c (persist_wal_async call site + entry_term_locked), src/controller/config_repl.c (ha_stream_wal_to_standby catch-up), src/controller/ha.c (ha_apply_wal_catchup_entry receive route), src/lib/request.c (wal_entry_to_wire per-entry prev tuple encode)",
|
|
"root_cause": "The LIVE replication SEND paths (repl_broadcast live append + ha_stream_wal_to_standby catch-up) built wal_catchup_entry_t via memset(0) and never set entry.term/prev_log_index/prev_log_term, so standbys received term=0 entries and applied them via the LEGACY term-0 direct-apply branch (persist_wal_write_replicated stamps the STANDBY's local p->term, not the leader's). The term-carrying library receive route (raft_on_append_entries_request, task 3.2) only fired for term!=0 entries, which the live send never produced. Additionally wal_entry_to_wire only encoded per-entry term, not the per-entry prev tuple, so multi-entry catch-up batches could not be routed through the library one-at-a-time.",
|
|
"fix": "Task 3.4 minimal cutover (chosen over driving raft_send_append_entries live, which would rip out the repl model and risk 848/849/850): (1) repl_broadcast gains a prev_log_term param and sets entry.term=hdr->term, entry.prev_log_index=hdr->lsn-1, entry.prev_log_term (sourced under p->lock via new entry_term_locked accessor in persist_wal_async). (2) ha_stream_wal_to_standby sets each catch-up entry's term + prev tuple (tracking the prior streamed entry's lsn/term in ascending order). (3) wal_entry_to_wire now encodes prevLogIndex/prevLogTerm/leaderCommit PER SUB-ENTRY so a multi-entry batch is library-routable. (4) ha_apply_wal_catchup_entry routes every term-carrying entry (single + each batch sub-entry) through new ha_apply_term_entry_via_library -> ha_consume_append_entries -> raft_on_append_entries_request -> on_persist_entry, which persist_set_term(leader_term) before persist_wal_write_replicated (bug-850 contiguity guard preserved beneath). The term-0 legacy direct-apply is retired for live/catch-up entries. ACK/commit path (3.3) unchanged.",
|
|
"tags": [
|
|
"ha-term-safety",
|
|
"task-3.4",
|
|
"live-send-retirement",
|
|
"term-0",
|
|
"repl_broadcast",
|
|
"bug-990",
|
|
"FIXED",
|
|
"catch-up-term"
|
|
],
|
|
"related_bugs": [
|
|
"bug-990",
|
|
"bug-851"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T16:00:00.000000",
|
|
"validation": "Unit RED->GREEN: test_broadcast_carries_leader_term_and_prev_tuple (repl: neuter term -> Expected 7 Was 0) + test_live_broadcast_receive_persists_leader_term (adapter: neuter receive route -> Expected 7 Was 3, i.e. standby persisted its LOCAL term). Full controller suite 175 Tests 0 Failures (clean /tmp direct binary) + meson Ok:1 Fail:0. Live STRICT_TERM gate (clean_failover_preservation.sh) NOT runnable in this overlayfs sandbox: baseline-confirmed no failover completes (split-vote no-promotion within 20s + fdatasync errno=5) \u2014 bug-924 env limitation, requires real-fs. The 7 test_wal_catchup_* (test_config_repl.c) + occasional durability FAILs on the direct binary are the SAME pre-existing bug-924 overlayfs fdatasync artifact (identical on baseline)."
|
|
},
|
|
{
|
|
"id": "bug-1000",
|
|
"timestamp": "2026-06-22T15:44:38.466Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/ha-term-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-22T15:44:38.466Z"
|
|
},
|
|
{
|
|
"id": "bug-1001",
|
|
"timestamp": "2026-06-22T15:44:54.113Z",
|
|
"error_message": "Missing error handling in errno",
|
|
"file": ".kiro/specs/ha-term-safety/tasks.md",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: - _Blocked (live portion only \u2014 build+unit gate CONFIRMED GR",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-22T15:48:39.777Z"
|
|
},
|
|
{
|
|
"id": "bug-1002",
|
|
"timestamp": "2026-06-22T21:10:31.345Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-term-safety/tasks.md",
|
|
"root_cause": "Had 's term and standbys persist it, proven at the int",
|
|
"fix": "Changed to 's REAL term (2) for the committed prefix (pre-3.4",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T21:10:31.345Z"
|
|
},
|
|
{
|
|
"id": "bug-1003",
|
|
"timestamp": "2026-06-22T22:09:23.064Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/lib/raft/raft.c",
|
|
"root_cause": "Condition was: if (agreed == 0)",
|
|
"fix": "Changed to: if (s->cbs->on_trace)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T22:09:23.064Z"
|
|
},
|
|
{
|
|
"id": "bug-1005",
|
|
"timestamp": "2026-06-22T22:31:03.315Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/controller/testsuite/test_term_safety_adapter.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: RUN_TEST(test_catchup_applied_lsn_is_last_held_no_skip);",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-22T22:31:08.791Z"
|
|
},
|
|
{
|
|
"id": "bug-1006",
|
|
"timestamp": "2026-06-22T22:32:53.722Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: /* Advance applied_lsn to last_good_lsn after the full batch; * last contiguously-held LSN, NOT last_good_lsn + 1 \u2014 see th",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-22T22:33:00.066Z"
|
|
},
|
|
{
|
|
"id": "bug-1009",
|
|
"timestamp": "2026-06-22T22:44:50.365Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_config_repl.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T22:44:50.365Z"
|
|
},
|
|
{
|
|
"id": "bug-1013",
|
|
"timestamp": "2026-06-22T00:00:00Z",
|
|
"error_message": "Stable HA cluster: committed_lsn pinned at 1 (< 5) while all 5 entries are durable on all 3 nodes \u2014 STRICT_TERM live failover gate fails 'committed_lsn>=5'",
|
|
"file": "src/controller/commit.c",
|
|
"root_cause": "ha-term-safety task 2.4 added a min(durable-majority, raft_commit_index) ceiling in majority_candidate_locked. raft_commit_index is fed only via the library ACK path (ha_raft_on_repl_ack -> raft_advance_commit -> on_commit_advanced), which advances from match_index[] driven by the asynchronous catch-up streamer and routinely LAGS the durable majority. When delivery goes via catch-up, raft_commit_index stays low and PINS committed_lsn below the safe durable watermark (a redundant, starvation-prone gate). The durable-majority barrier was already current-term-safe under single-writer + the own-term NOOP writable gate, making the ceiling redundant.",
|
|
"fix": "Option A: removed the raft_commit_index fold from majority_candidate_locked (commit.c). The durable-majority barrier + own-term writable_lsn gate are now authoritative for commit-advance. commit_set_raft_commit_index / ce->raft_commit_index made INERT-ADVISORY (recorded for observability/conformance-oracle only; still fed by on_commit_advanced so the library half keeps a sink). Kept durable self-cap (persist_durable_lsn), persist-before-ACK, and assert(cand<=persist_durable_lsn). Verified live: commit advances 4->5 via durable barrier (commit.c:184); walcompare OK committed prefix byte-identical across 3 nodes up to LSN 5.",
|
|
"tags": [
|
|
"ha",
|
|
"commit",
|
|
"raft",
|
|
"term-safety",
|
|
"starvation",
|
|
"commit-ceiling",
|
|
"optA",
|
|
"liveness",
|
|
"catch-up"
|
|
],
|
|
"related_bugs": [
|
|
"bug-991",
|
|
"bug-661",
|
|
"bug-851"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-22T00:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-828-part2",
|
|
"timestamp": "2026-06-23T03:05:00.000Z",
|
|
"error_message": "Clean failover still truncates committed jobs: new primary logs 'safe_committed_lsn=1 (from 2 granted voters)' and walcompare reports committed-prefix DIVERGENCE at LSN 2; jobs at LSN 2..5 lost.",
|
|
"file": "src/controller/testsuite/test_ha_vote_gate.c (test added); ha.c/persist.c advertise path investigated (no change needed)",
|
|
"root_cause": "INVESTIGATED, NOT an advertisement-staleness bug. The advertise path already reflects the live durable tip: ha_candidate_advertise_lsn -> persist_durable_floor, and the voter floor = max(persist_durable_floor, learned_committed); persist_durable_floor == persist_durable_lsn (both read p->durable_lsn, the fsync watermark), and part-1's secondary fix advances durable_lsn after the standby's inline fdatasync in persist_wal_write_replicated. LIVE evidence (fix828c_r1..r3, STRICT_TERM clean failover x3) proves the surviving voters advertise 1 because they are GENUINELY durable only at LSN 1: their WAL physically holds 1..2 (LSN2 = their own term-3 NOOP), recovered tip=2, durable_floor=1. The original primary ctrl-1 (down at election time, WAL 1..5 tip=5) advanced committed_lsn 1->2->3->4->5 in ~250ms while standbys had only converged applied_lsn=1 and catch-up streaming was still in flight. So committed advanced past what the surviving majority durably held \u2014 the UPSTREAM replication / commit-barrier durability gap (bug-795/661), not the vote advertisement. safe_committed_lsn=1 is the CORRECT, SAFE Raft answer given the real durable state; advertising the true durable tip cannot conjure data never replicated.",
|
|
"fix": "No production code change required for part-2 \u2014 the durable-tip advertisement is already correct & safe after part-1. Added unit test test_live_durable_tip_advertised_over_lagging_learned (test_ha_vote_gate.c): a standby durable at LSN5 (real persist, flush -> durable_lsn=5) with learned_committed lagging at 1 must advertise 5 as BOTH candidate self-LSN (ha_candidate_advertise_lsn) and voter floor (ha_vote_self_freshness over persist_durable_floor, dominating learned=1), and ha_compute_safe_committed_lsn from two such granting voters must return 5 \u2014 locking in the in-scope contract. Explicitly did NOT fold learned_committed into the CANDIDATE advertise (the requested max(...,learned_committed)) because that re-opens the truncated-candidate-over-advertises-and-wins hole ha-commit-durability task 4.2 deliberately closed (candidate must advertise only a DURABLE position; learned_committed is volatile/not necessarily durable on this node). The residual live job loss is bug-795/661, out of scope.",
|
|
"tags": [
|
|
"safety",
|
|
"failover",
|
|
"safe-committed-lsn",
|
|
"durable-tip",
|
|
"advertise",
|
|
"leader-completeness",
|
|
"bug-795",
|
|
"bug-661",
|
|
"commit-durability",
|
|
"INVESTIGATION",
|
|
"c"
|
|
],
|
|
"related_bugs": [
|
|
"bug-828",
|
|
"bug-795",
|
|
"bug-661",
|
|
"bug-851",
|
|
"bug-924"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-23T03:05:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1023",
|
|
"timestamp": "2026-06-23T03:45:00Z",
|
|
"error_message": "Clean single failover (STRICT_TERM) loses committed jobs: safe_committed_lsn=1 from votes despite a standby being genuinely durable at LSN 5; walcompare reports committed-prefix divergence at LSN 2 (jobs gone on the new leader).",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "ha_enter_real_election() PRE-TRUNCATED the candidate's WAL above ha->last_known_committed_lsn BEFORE the vote. last_known_committed_lsn is the LOCALLY-LEARNED commit watermark, which LAGS the true cluster commit point (the primary commits an entry on a durable majority, then dies before a heartbeat carries that committed LSN to the standby). persist_truncate_wal_above clamps durable_lsn down to the cutoff (clamp_durable_lsn_locked). So a standby durably holding committed entries [committed+1..tip] discarded them, then advertised the stale-low cutoff as its durable floor (ha_candidate_advertise_lsn / ha_vote_self_freshness both read persist_durable_floor). Every voter doing the same collapsed safe-committed-from-votes to the stale watermark; the AUTHORITATIVE post-election truncate (raft_cb_become_leader -> persist_truncate_wal_above(safe_committed_lsn)) then kept only that stale prefix, losing committed jobs. Live trace (DBG828) PROVED the standbys wrote+fdatasync'd LSN 2-5 (durable_lsn=5) and only LOST them at the pre-election truncate clamp \u2014 NOT a durability/ack-before-fsync violation. Final bug-828/795 slice.",
|
|
"fix": "Removed the pre-election persist_truncate_wal_above(last_known_committed_lsn) in ha_enter_real_election (src/controller/ha.c). Raft model: a candidate does NOT truncate its log before campaigning \u2014 it keeps its full durable log and advertises its real durable tip so voters holding more committed entries deny a colder candidate and the winner has every committed entry (Leader Completeness). Divergent UNCOMMITTED tails are removed only by the authoritative post-election safe-commit truncate (above the majority-held point) and by the library's per-entry (term,lsn) reconcile (on_truncate_from) during AppendEntries. RED: live STRICT_TERM harness safe=1 + walcompare divergence at LSN 2. GREEN: every run now logs safe_committed_lsn=5 (from 2 granted voters) and walcompare 'committed prefixes identical'. Unit: new test_repl_catchup_durable_floor_survives_failover (test_repl_apply.c) + 177/177 unit GREEN. NOTE: live EXIT still 1 due to a PRE-EXISTING libxce client-failover bug (bug: 'client op fails to reach live primary when a DEAD controller is FIRST in the masters list') surfacing now that the durability bug no longer masks the post-walcompare expect-job/wait-primary step \u2014 committed jobs are physically present on disk (walcompare proves it).",
|
|
"tags": [
|
|
"ha",
|
|
"raft",
|
|
"failover",
|
|
"leader-completeness",
|
|
"bug-828",
|
|
"bug-795",
|
|
"durability",
|
|
"truncate",
|
|
"election",
|
|
"durable_lsn"
|
|
],
|
|
"related_bugs": [
|
|
"bug-661",
|
|
"bug-795",
|
|
"bug-828",
|
|
"bug-851",
|
|
"bug-854",
|
|
"bug-339"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-23T03:45:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1025",
|
|
"timestamp": "2026-06-23T04:09:25.647Z",
|
|
"error_message": "Wrong reference: $MASTERS should be $MASTERS_LIVE",
|
|
"file": "src/controller/testsuite/clean_failover_preservation.sh",
|
|
"root_cause": "Used \"$MASTERS\" instead of \"$MASTERS_LIVE\"",
|
|
"fix": "Changed $MASTERS \u2192 $MASTERS_LIVE",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"sh"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-23T04:09:25.647Z"
|
|
},
|
|
{
|
|
"id": "bug-1028",
|
|
"timestamp": "2026-06-23",
|
|
"error_message": "Post-failover AVAILABILITY: after a clean failover the new primary never becomes available to serve clients (wait-primary times out). New primary logs 'ha_dispatch_repl_action_for_standby: standby[0] lsn=5 < committed_lsn=6 -> stream WAL batches' every ~3s indefinitely; the lagging standby never advances to the new primary's own-term tip, and the client cannot reach a serving primary. Surfaced only AFTER bug-828 was fixed (the committed-job-loss previously masked this by failing the harness earlier at walcompare).",
|
|
"file": "src/controller/ha.c (ha_dispatch_repl_action_for_standby / catch-up streamer on the NEW term), config_repl.c (ha_stream_wal_to_standby), persist.c (standby apply) -- NOT data loss; committed prefix is byte-identical on disk (walcompare OK).",
|
|
"root_cause": "ha_stream_wal_to_standby (config_repl.c) stamped each streamed entry's term and the AppendEntries prev_log_term from raw on-disk hdr.term (the WAL header), but the standby's logOk (raft_on_append_entries_request) and the library's own send path both source terms from persist_entry_term (the authoritative in-memory per-LSN term index), which maps a legacy-0 entry to WAL_LEGACY_TERM(1). So for a legacy-0 predecessor entry (raw hdr.term==0), the streamer sent prev_log_term=0 while the standby computed its own term as 1 \u2192 logOk mismatch \u2192 the new-term NOOP (the post-promotion first entry) is perpetually rejected \u2192 no WalAck \u2192 applied_lsn stuck at pre-promotion value \u2192 the heartbeat state report advertises the stale lsn \u2192 the primary re-streams [lsn+1..committed] every heartbeat cycle. The committed prefix stays byte-identical because only term metadata diverges, not data. CONFIRMED: baseline walcompare shows committed-prefix DIVERGENCE (term mismatch \u2192 CRC-chain breaks on some members); with the fix the committed prefix is IDENTICAL.",
|
|
"fix": "FIXED (2026-06-23). ha_stream_wal_to_standby gained a const persist_t* p parameter (decl in config_repl.h). All three hdr.term source sites in the streamer body (entry->term, prev_streamed_term on the main path, prev_streamed_term on the OOM-skip path) replaced with p ? persist_entry_term(p, hdr.lsn) : hdr.term (NULL-p path for count-only unit tests). Callers (ha_dispatch_repl_action_for_standby in ha.c, catchup_stream_range in config_repl.c) pass &c->persist. Unit test (test_wal_stream_term_from_index_not_raw_hdr) legacy-appends LSN 1 at term 0 + LSN 2 at term 3; streams standby_lsn=1,committed=2; asserts streamed entry term==3 and prev_log_term==WAL_LEGACY_TERM(1). RED\u2192GREEN proven (Expected 1 Was 0 \u2192 PASS). Live: standby converge + committed prefix identical.",
|
|
"tags": [
|
|
"failover",
|
|
"availability",
|
|
"liveness",
|
|
"catch-up",
|
|
"new-primary",
|
|
"not-serving",
|
|
"ha-commit-durability",
|
|
"NOT-FIXED",
|
|
"FIXED",
|
|
"catch-up",
|
|
"ha_stream_wal_to_standby",
|
|
"persist_entry_term",
|
|
"logOk"
|
|
],
|
|
"related_bugs": [
|
|
"bug-828",
|
|
"bug-854",
|
|
"bug-795",
|
|
"bug-991"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-23"
|
|
},
|
|
{
|
|
"id": "bug-1033",
|
|
"timestamp": "2026-06-23T08:05:43.916Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "repro854.sh",
|
|
"root_cause": "Had 'set masters %s\\nwait-primary 6000\\nctrlstatus\\nqu",
|
|
"fix": "Changed to 'set masters %s\\nset myname failover-test\\nclient\\",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"sh"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-23T08:05:43.916Z"
|
|
},
|
|
{
|
|
"id": "bug-1035",
|
|
"timestamp": "2026-06-23T09:53:37.812Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/lib/xcectx.c",
|
|
"root_cause": "Had \"xcectx.h\"",
|
|
"fix": "Changed to \"controller.capnp.h\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-23T09:53:37.812Z"
|
|
},
|
|
{
|
|
"id": "bug-1036",
|
|
"timestamp": "2026-06-23T10:44:48.074Z",
|
|
"error_message": "Wrong reference: handle_ssl_handshake should be endpoint_ssl_handshake",
|
|
"file": "src/lib/netio.c",
|
|
"root_cause": "Used \"handle_ssl_handshake\" instead of \"endpoint_ssl_handshake\"",
|
|
"fix": "Changed handle_ssl_handshake \u2192 endpoint_ssl_handshake",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-23T10:44:48.074Z"
|
|
},
|
|
{
|
|
"id": "bug-1037",
|
|
"timestamp": "2026-06-23T10:48:18.493Z",
|
|
"error_message": "Wrong reference: handle_ssl_handshake should be endpoint_ssl_handshake",
|
|
"file": "src/controller/cluster.c",
|
|
"root_cause": "Used \"handle_ssl_handshake\" instead of \"endpoint_ssl_handshake\"",
|
|
"fix": "Changed handle_ssl_handshake \u2192 endpoint_ssl_handshake",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-23T10:48:18.493Z"
|
|
},
|
|
{
|
|
"id": "bug-1040",
|
|
"timestamp": "2026-06-23T10:54:14.342Z",
|
|
"error_message": "Wrong reference: endpoint_ssl_handshake should be handle_ssl_handshake",
|
|
"file": "src/lib/netio.c",
|
|
"root_cause": "Used \"endpoint_ssl_handshake\" instead of \"handle_ssl_handshake\"",
|
|
"fix": "Changed endpoint_ssl_handshake \u2192 handle_ssl_handshake",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-23T10:54:14.342Z"
|
|
},
|
|
{
|
|
"id": "bug-1045",
|
|
"timestamp": "2026-06-23T14:08:05.466Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": ".claude/skills/xce-test-ha/run-ha-soak.sh",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: # \u2500\u2500 Steps 7\u201310 looped: kill primary, verify, submit, restar; #",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"sh"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-23T14:08:49.394Z"
|
|
},
|
|
{
|
|
"id": "bug-1049",
|
|
"timestamp": "2026-06-23T14:39:01.881Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Condition was: if (0 && recovered_tip > ha->raft.log_len)",
|
|
"fix": "Changed to: if (recovered_tip > ha->raft.log_len)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-23T14:39:01.881Z"
|
|
},
|
|
{
|
|
"id": "bug-1051",
|
|
"timestamp": "2026-06-23T14:48:18.998Z",
|
|
"error_message": "Wrong operator: >= should be ==",
|
|
"file": ".claude/skills/xce-test-ha/run-ha-soak.sh",
|
|
"root_cause": "Used \">=\" instead of \"==\"",
|
|
"fix": "Changed operator >= \u2192 ==",
|
|
"tags": [
|
|
"auto-detected",
|
|
"operator-fix",
|
|
"sh"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-23T14:48:18.998Z"
|
|
},
|
|
{
|
|
"id": "bug-1054",
|
|
"timestamp": "2026-06-23T16:02:42.489Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".claude/skills/xce-test-ha/SKILL.md",
|
|
"root_cause": "Had \"End-to-end HA failover soak test for an XCE contr",
|
|
"fix": "Changed to \"End-to-end HA failover soak test for an XCE contr",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-23T16:02:42.489Z"
|
|
},
|
|
{
|
|
"id": "bug-1060",
|
|
"timestamp": "2026-06-24T12:05:00.000Z",
|
|
"error_message": "After soak test coverage maneuver, ctrl-1 and ctrl-2 enter permanent prevote deadlock: ctrl-1 denies ctrl-2 (freshness: LSN=45 < floor=47), ctrl-2 denies ctrl-1 (log_stale: cand_llt=12 < local_last_log_term=13). Neither can ever win.",
|
|
"file": "src/controller/ha.c (raft_cb_become_leader / safe_committed_lsn), src/controller/cluster.c (OPCode_preVoteRequest)",
|
|
"root_cause": "ctrl-3 computed safe_committed_lsn=44 from voter peerLastLogLsn (ctrl-3=47, ctrl-2=44 \u2192 majority at 44) and truncated committed entries 45-47 (term=12, acked by ctrl-3 itself as standby under ctrl-1). ctrl-3 then wrote leadership NOP at LSN=45 (term=13) and replicated it to ctrl-2. Result: ctrl-1 has LSN=45=JOB_SUBMIT/term=12, ctrl-2 has LSN=45=NOOP/term=13 \u2014 divergent WALs. The safe_committed_lsn formula ignores the candidate's own durable knowledge of committed entries, violating Leader Completeness: the new leader must never truncate entries it has that were committed by a prior leader.",
|
|
"fix": "IMPLEMENTED (2026-06-24): added pure helper ha_promotion_truncate_floor(safe_lsn, durable_tip)=max(safe_lsn,durable_tip) in ha.c/ha.h; raft_cb_become_leader now truncates at max(safe_committed_lsn, persist_durable_floor(&c->persist)) instead of bare safe_committed_lsn. Since the cutoff is never below the leader's own durable tip, persist_truncate_wal_above is a no-op on the leader's durable log \u2014 the new leader NEVER truncates entries it holds (Raft \u00a75.4 Leader Completeness). safe_committed_lsn is still the commit lower-bound and promotion-gate HWM (NOT clamped \u2014 clamping it would defeat the behind-node fence). The leadership NOP now appends at the true tip (current_lsn) so replication converges peers to the leader's WAL with zero job loss. Unit test test_promotion_never_truncates_own_committed_entries in test_ha_election.c (GREEN). Steering src/controller/CLAUDE.md updated (Leader Completeness section + Post-Election Safe Commit Point + verification checklist). Recovery of an already-diverged cluster still requires restarting the over-truncated node (loses the cut jobs); this fix prevents the divergence.",
|
|
"tags": [
|
|
"prevote",
|
|
"deadlock",
|
|
"safe_committed_lsn",
|
|
"truncation",
|
|
"leader-completeness",
|
|
"data-loss",
|
|
"coverage-maneuver",
|
|
"FIXED"
|
|
],
|
|
"related_bugs": [
|
|
"bug-795",
|
|
"bug-828"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T18:00:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1066",
|
|
"timestamp": "2026-06-24T04:36:50.602Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/CLAUDE.md",
|
|
"root_cause": "Had `persist_truncate_wal_above(safe_committed_lsn)`",
|
|
"fix": "Changed to 's own durable log**: the cutoff is `",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-24T04:37:04.779Z"
|
|
},
|
|
{
|
|
"id": "bug-1067",
|
|
"timestamp": "2026-06-24T00:00:00.000Z",
|
|
"error_message": "Cross-term WAL catch-up permanently stalls: ctrl-2 stuck at lsn=8, all walCatchupEntry rejected (ae_reject_stale + ae_reject_logmismatch)",
|
|
"file": "src/controller/config_repl.c, src/controller/ha.c",
|
|
"root_cause": "AE term conflation: entry->term is the WAL entry's stored term (e.g. 4 for entries written by ctrl-1 at term=4), but ha_consume_append_entries uses it as the AE header ae_term. For live appends this is correct (leader appends at current term), but for catch-up streaming of historical entries from prior terms, ae_term = entry_term < leader.current_term. The Raft AE stale-term check (if term < s->term \u2192 ae_reject_stale) correctly rejects, but it should never fire \u2014 the AE header term must always be the leader's current term. There is no separate leader_term field in wal_catchup_entry_t. Consequence: historical entries at entry_term < raft.term are permanently rejected; standby_reported_lsn never advances; streamer retransmits forever.",
|
|
"fix": "IMPLEMENTED (2026-06-24): separated the AppendEntries HEADER term (leader's CURRENT term) from the per-entry STORED term. Added wire field WalCatchupEntry.leaderCurrentTerm @8 (controller.capnp) + C field wal_catchup_entry_t.leader_current_term (typemap.h, hand-defined struct \u2014 capnp generates encode/decode against it). Encoder (request.c wal_entry_to_wire + top container) writes it; decode auto-populates (generated, scalar mapname field). The catch-up streamer ha_stream_wal_to_standby gained a leader_term param (callers pass atomic_load(&c->ha.term)) and stamps entry->leader_current_term=leader_term on every streamed entry. Receiver ha_consume_append_entries now uses ae_term = e->leader_current_term ? e->leader_current_term : entry_term (single-entry branch) \u2014 the leader term rides on the sub-entry e by reference through ha_apply_term_entry_via_library, so no extra threading needed. entry->term (@4) remains the per-entry stored term for logOk/on_persist_entry. 0 = unset (legacy/live sender) \u2192 falls back to stored term (live appends have entry_term==leader_term, so unchanged). repl.c live paths UNTOUCHED. Tests (test_term_safety_adapter.c): test_intake_crossterm_catchup_uses_leader_current_term (historical entry@term4 streamed by leader@term5 to follower@term5 is ACCEPTED, not stale-rejected) + test_intake_stale_leader_term_still_rejected (leader_current_term=3 < follower term 5 still REJECTED \u2014 safety preserved). GREEN: 185 PASS term-safety+config-repl, 6 PASS wal_wire wire round-trip, 80 PASS failover/repl/durability, 0 failures.",
|
|
"tags": [
|
|
"catch-up",
|
|
"replication",
|
|
"raft",
|
|
"ae_reject_stale",
|
|
"ae_reject_logmismatch",
|
|
"walCatchupEntry",
|
|
"cross-term",
|
|
"FIXED"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1028",
|
|
"bug-991"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T20:00:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1070",
|
|
"timestamp": "2026-06-24T08:18:27.510Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/controller/config_repl.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: if (c && c->persist.wal_path[0]) {; /* bug-1067: pass the leader's CURRENT term so historical ca",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-24T08:18:42.316Z"
|
|
},
|
|
{
|
|
"id": "bug-1075",
|
|
"timestamp": "2026-06-24T08:23:04.980Z",
|
|
"error_message": "Wrong reference: standby_lsn should be leader_term",
|
|
"file": "src/controller/testsuite/test_coldstart_lsn0.c",
|
|
"root_cause": "Used \"standby_lsn\" instead of \"leader_term\"",
|
|
"fix": "Changed standby_lsn \u2192 leader_term",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T08:23:04.980Z"
|
|
},
|
|
{
|
|
"id": "bug-1077",
|
|
"timestamp": "2026-06-24T17:30:00.000Z",
|
|
"error_message": "AddressSanitizer: SEGV / stack-use-after-return in free_CtrlStatus (lib/controller.capnp.c:11638) via handle_reply -> free_CtrlStatus_ptr (lib/xcectx.c:91) on `ctrlstatus` after failover; READ derefs the dead-stack `getreply` of xce_get_with_condition (xceapi.c)",
|
|
"file": "src/lib/xcectx.c",
|
|
"root_cause": "ctx->reply.u is an UNTAGGED union shared across opcodes (debugmsg/get/jobid/clusterconf/ctrlstatus alias the same 8 bytes). Commit 61e1391 ('fix bug-1060 bug-1067', unrelated Raft work) added speculative free-guards `if (ctx->reply.u.ctrlstatus) free_CtrlStatus_ptr(&ctx->reply.u.ctrlstatus)` (and the clusterconf twin). A non-NULL slot does NOT imply a CtrlStatus*: a failover-aborted reslist/joblist leaves ctx->reply.u.get == &getreply (a dead STACK pointer) because xce_get_with_condition/xce_resval only NULL the slot on the success path, not the xce_get_req<0 / cbuf_get<0 early-returns. The next ctrlstatus reply (worker thread) sees the foreign non-NULL slot and free_CtrlStatus walks it -> stack-use-after-return SEGV.",
|
|
"fix": "1) Revert the two unsafe free-guards in handle_reply (untagged union slot can never be safely freed by type) \u2014 restores prior MOVE_PTR-overwrite behavior. 2) Clear ctx->reply.u.get = NULL on ALL early-return paths of xce_get_with_condition and xce_resval (kill the dangling-stack-pointer leak at its source; also prevents a late OPCode_get reply writing through the dead stack via handle_get_reply). 3) Defense-in-depth: handle_get_reply drops a reply when ctx->reply.u.get is NULL. Regression test: test_handle_reply_ctrlstatus_does_not_free_foreign_slot (exposes xce_handle_reply, proves a foreign heap value in the shared union is not freed). VERIFIED 2026-06-24 (Opus): re-confirmed 3-layer fix present in working tree; RED proven by re-injecting the ctrlstatus free-guard -> ASan double-free at test_ctrlstatus.c:384 (free_CtrlStatus_ptr at controller.capnp.c:11892), then restored -> GREEN. Full libxce suite 291 Tests / 0 Failures / 0 ASan errors under ASAN_OPTIONS=detect_leaks=0.",
|
|
"tags": [
|
|
"asan",
|
|
"use-after-return",
|
|
"union-type-confusion",
|
|
"ha",
|
|
"failover",
|
|
"ctrlstatus",
|
|
"libxce",
|
|
"memory-safety",
|
|
"regression-61e1391",
|
|
"VERIFIED"
|
|
],
|
|
"related_bugs": [
|
|
"bug-646",
|
|
"bug-1060",
|
|
"bug-1067"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T18:30:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1078",
|
|
"timestamp": "2026-06-24T09:18:52.605Z",
|
|
"error_message": "Wrong reference: handle_reply should be xce_handle_reply",
|
|
"file": "src/lib/xcectx.c",
|
|
"root_cause": "Used \"handle_reply\" instead of \"xce_handle_reply\"",
|
|
"fix": "Changed handle_reply \u2192 xce_handle_reply",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T09:18:52.605Z"
|
|
},
|
|
{
|
|
"id": "bug-1079",
|
|
"timestamp": "2026-06-24T09:27:59.772Z",
|
|
"error_message": "Wrong reference: libxce_failover_client_hang should be project_libxce_failover_hang",
|
|
"file": "../../../../../claude/.claude/projects/-home-rshen-projects-xce-xce/memory/project_bug1077_reply_union_type_confusion.md",
|
|
"root_cause": "Used \"libxce_failover_client_hang\" instead of \"project_libxce_failover_hang\"",
|
|
"fix": "Changed libxce_failover_client_hang \u2192 project_libxce_failover_hang",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T09:27:59.772Z"
|
|
},
|
|
{
|
|
"id": "bug-1080",
|
|
"timestamp": "2026-06-24T10:24:07.439Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-sim-conformance/design.md",
|
|
"root_cause": "Had \"on_get_entry_term -> node.log[idx].term | 0\"",
|
|
"fix": "Changed to \"on_get_entry_term -> node.log[idx].term | 0\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-24T10:24:15.191Z"
|
|
},
|
|
{
|
|
"id": "bug-1081",
|
|
"timestamp": "2026-06-24T10:30:45.585Z",
|
|
"error_message": "Wrong reference: apply should be advanced",
|
|
"file": ".kiro/specs/raft-sim-conformance/design.md",
|
|
"root_cause": "Used \"apply\" instead of \"advanced\"",
|
|
"fix": "Changed apply \u2192 advanced",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-24T10:30:50.917Z"
|
|
},
|
|
{
|
|
"id": "bug-1082",
|
|
"timestamp": "2026-06-24T10:30:56.237Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-sim-conformance/design.md",
|
|
"root_cause": "Had \"vote/AE requests + responses;<br/>Drop/Duplicate/",
|
|
"fix": "Changed to \"vote/AE requests + responses,<br/>Drop/Duplicate/",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T10:30:56.237Z"
|
|
},
|
|
{
|
|
"id": "bug-1083",
|
|
"timestamp": "2026-06-24T11:45:52.473Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "No early return/throw for edge case: n > sizeof(v",
|
|
"fix": "Added guard clause: if (n > sizeof(v)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-24T11:46:08.548Z"
|
|
},
|
|
{
|
|
"id": "bug-1085",
|
|
"timestamp": "2026-06-24T12:00:01.924Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "No early return/throw for edge case: i != last",
|
|
"fix": "Added guard clause: if (i != last)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T12:00:01.924Z"
|
|
},
|
|
{
|
|
"id": "bug-1086",
|
|
"timestamp": "2026-06-24T12:13:27.532Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "No early return/throw for edge case: i < 0 || i >= c->bag_count",
|
|
"fix": "Added guard clause: if (i < 0 || i >= c->bag_count)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T12:13:27.532Z"
|
|
},
|
|
{
|
|
"id": "bug-1087",
|
|
"timestamp": "2026-06-24T12:22:22.094Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "No early return/throw for edge case: sa.role != RAFT_LEADER",
|
|
"fix": "Added guard clause: if (sa.role != RAFT_LEADER)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T12:22:22.094Z"
|
|
},
|
|
{
|
|
"id": "bug-1088",
|
|
"timestamp": "2026-06-24T12:30:35.436Z",
|
|
"error_message": "Wrong reference: test_sim_check_election_safety_fail_on_two_leaders should be test_sim_3_2_log_matching_shared_idx_term_requires_identical_prefix",
|
|
"file": "src/lib/testsuite/test_raft.c",
|
|
"root_cause": "Used \"test_sim_check_election_safety_fail_on_two_leaders\" instead of \"test_sim_3_2_log_matching_shared_idx_term_requires_identical_prefix\"",
|
|
"fix": "Changed test_sim_check_election_safety_fail_on_two_leaders \u2192 test_sim_3_2_log_matching_shared_idx_term_requires_identical_prefix",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T12:30:35.436Z"
|
|
},
|
|
{
|
|
"id": "bug-1089",
|
|
"timestamp": "2026-06-24T12:38:40.360Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "No early return/throw for edge case: sl.role != RAFT_LEADER",
|
|
"fix": "Added guard clause: if (sl.role != RAFT_LEADER)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T12:38:40.360Z"
|
|
},
|
|
{
|
|
"id": "bug-1090",
|
|
"timestamp": "2026-06-24T12:47:03.843Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "No early return/throw for edge case: shared > RAFT_SIM_MAX_LOG",
|
|
"fix": "Added guard clause: if (shared > RAFT_SIM_MAX_LOG)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T12:47:03.843Z"
|
|
},
|
|
{
|
|
"id": "bug-1091",
|
|
"timestamp": "2026-06-24T13:04:27.057Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "No early return/throw for edge case: c->trace_len >= RAFT_SIM_MAX_STEPS",
|
|
"fix": "Added guard clause: if (c->trace_len >= RAFT_SIM_MAX_STEPS)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T13:04:27.057Z"
|
|
},
|
|
{
|
|
"id": "bug-1094",
|
|
"timestamp": "2026-06-24T13:22:05.858Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "No early return/throw for edge case: c->bag[i].kind != RAFT_SIM_MSG_VOTE_RSP",
|
|
"fix": "Added guard clause: if (c->bag[i].kind != RAFT_SIM_MSG_VOTE_RSP)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T13:22:05.858Z"
|
|
},
|
|
{
|
|
"id": "bug-1095",
|
|
"timestamp": "2026-06-24",
|
|
"error_message": "Election Safety violation (two leaders at same term) surfaced by raft-sim-conformance step driver (task 4.2): a duplicated VOTE_RSP grant double-counts a single peer's vote",
|
|
"file": "src/lib/raft/raft.c",
|
|
"root_cause": "raft_on_vote_reply tallies grants with a COUNTER (s->votes_granted++) and explicitly ignores from_idx ((void)from_idx;), so DuplicateMessage of one peer's grant counts that peer twice and a candidate reaches quorum with a single real vote. Diverges from raft.tla where votesGranted is a SET (idempotent). Proven: 3-node, single peer grant duplicated -> candidate becomes LEADER with votes_granted=2.",
|
|
"fix": "FIXED (verified 2026-07-18 by validate-impl for raft-sim-conformance): src/lib/raft/raft.c raft_on_vote_reply now has a per-peer vote_replies[from_idx] idempotency guard (dedupes a DuplicateMessage grant) plus a term < s->term DropStaleResponse guard, landed together with bug-1096 in commit b5b7e01 (fix(raft): vote-reply per-peer dedup + stale-term drop). This buglog entry was stale (said NOT FIXED) even though the fix has been live since 2026-06-24 per tasks.md raft-sim-conformance Implementation Notes and bug-1096.fix; corrected here for consistency.",
|
|
"tags": [
|
|
"raft",
|
|
"vote-reply",
|
|
"idempotency",
|
|
"election-safety",
|
|
"split-brain",
|
|
"conformance",
|
|
"needs-library-fix",
|
|
"bug-851-family",
|
|
"dedup",
|
|
"fixed",
|
|
"stale-buglog-entry"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1096",
|
|
"bug-851"
|
|
],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-07-18T00:20:00.000Z",
|
|
"gitea_issue": 29
|
|
},
|
|
{
|
|
"id": "bug-1096",
|
|
"timestamp": "2026-06-24",
|
|
"error_message": "raft_on_vote_reply counts a stale-term vote-reply (term < currentTerm) toward the current election instead of dropping it",
|
|
"file": "src/lib/raft/raft.c",
|
|
"root_cause": "No DropStaleResponse: a reply with term < s->term fell through to replies_received++/votes_granted++, corrupting quorum accounting (raft.tla DropStaleResponse discards mterm < currentTerm).",
|
|
"fix": "FIXED (verified 2026-07-02): src/lib/raft/raft.c:832 has `if (reply_term != s->term)` guard before tallying, with an on_trace(\"vote_reply_stale_drop\", ...) at raft.c:455 \u2014 exactly the fix this bug's own second entry described. Landed under raft-sim-conformance / raft-commit-safety (both implemented, 18/18 + 23/23 tasks).",
|
|
"tags": [
|
|
"raft",
|
|
"vote-reply",
|
|
"stale-term",
|
|
"election-safety",
|
|
"split-brain",
|
|
"conformance",
|
|
"needs-library-fix",
|
|
"stale-report",
|
|
"fixed",
|
|
"bug-851-family",
|
|
"stale-response"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1095",
|
|
"bug-851"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-07-02T17:30:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1099",
|
|
"timestamp": "2026-06-24T14:08:44.250Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "No early return/throw for edge case: failing != RAFT_SIM_INV_NONE",
|
|
"fix": "Added guard clause: if (failing != RAFT_SIM_INV_NONE)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T14:08:44.250Z"
|
|
},
|
|
{
|
|
"id": "bug-1104",
|
|
"timestamp": "2026-06-24T14:28:33.169Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "Condition was: if (c->n >= 2 && c->nodes[0].commit_index >= 1 && c->n)",
|
|
"fix": "Changed to: if (c->n >= 2)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T14:28:33.169Z"
|
|
},
|
|
{
|
|
"id": "bug-1108",
|
|
"timestamp": "2026-06-24T14:38:06.432Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "No early return/throw for edge case: chk < 0",
|
|
"fix": "Added guard clause: if (chk < 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T14:38:06.432Z"
|
|
},
|
|
{
|
|
"id": "bug-1110",
|
|
"timestamp": "2026-06-24T14:51:30.855Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "No early return/throw for edge case: i == leader",
|
|
"fix": "Added guard clause: if (i == leader)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T14:51:30.855Z"
|
|
},
|
|
{
|
|
"id": "bug-1111",
|
|
"timestamp": "2026-06-24T15:13:15.333Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "No early return/throw for edge case: p == leader",
|
|
"fix": "Added guard clause: if (p == leader)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T15:13:15.333Z"
|
|
},
|
|
{
|
|
"id": "bug-1112",
|
|
"timestamp": "2026-06-24T15:15:03.882281Z",
|
|
"error_message": "ld: undefined reference to 'raft_sim_scenario_drop_dup_reorder' at test_raft.c:8288 \u2014 lib test binary fails to link",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "Commit e445404 (task 5.3 drop/dup/reorder) added the raft.h declaration + the test_sim_5_3 test but FORGOT to add the raft_sim_scenario_drop_dup_reorder implementation to raft_sim.c. Symbol is declared+referenced but never defined, breaking the link for the whole xcelib_test binary.",
|
|
"fix": "Pre-existing, outside task 5.4 boundary. Surfaced while validating task 5.4 (figure8). Needs task 5.3 implementation added to raft_sim.c. NOT fixed by 5.4.",
|
|
"tags": [
|
|
"raft-sim-conformance",
|
|
"link-error",
|
|
"task-5.3",
|
|
"undefined-reference",
|
|
"pre-existing"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T15:15:03.882281Z"
|
|
},
|
|
{
|
|
"id": "bug-1113",
|
|
"timestamp": "2026-06-24T15:16:52.683Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: /*; * sim_scen_catch_up_commit: drive bounded AppendEntries-to-a | Also: * on a CONNECTED quorum, yet raft_advance_commit must NOT co; * count alone \u2014 the current-term Figure-8 rule (raft.c G4) f",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-24T15:20:15.882Z"
|
|
},
|
|
{
|
|
"id": "bug-1115",
|
|
"timestamp": "2026-06-24T15:18:59.248Z",
|
|
"error_message": "Wrong operator: != should be ==",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "Used \"!=\" instead of \"==\"",
|
|
"fix": "Changed operator != \u2192 ==",
|
|
"tags": [
|
|
"auto-detected",
|
|
"operator-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T15:18:59.248Z"
|
|
},
|
|
{
|
|
"id": "bug-1116",
|
|
"timestamp": "2026-06-24T15:25:17.886Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "No early return/throw for edge case: i == leader",
|
|
"fix": "Added guard clause: if (i == leader)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T15:25:17.886Z"
|
|
},
|
|
{
|
|
"id": "bug-1117",
|
|
"timestamp": "2026-06-24T15:32:34.085Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/lib/raft/raft.c",
|
|
"root_cause": "Condition was: if (s->cbs->on_get_entry_term(s->ctx, agreed)",
|
|
"fix": "Changed to: if (0 && s->cbs->on_get_entry_term(s->ctx, agreed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-24T15:33:53.327Z"
|
|
},
|
|
{
|
|
"id": "bug-1120",
|
|
"timestamp": "2026-06-24T16:09:04.749Z",
|
|
"error_message": "Wrong reference: test_sim_6_1_seed_sweep should be test_sim_7_1_fault_switch_mechanism",
|
|
"file": "src/lib/testsuite/test_raft.c",
|
|
"root_cause": "Used \"test_sim_6_1_seed_sweep\" instead of \"test_sim_7_1_fault_switch_mechanism\"",
|
|
"fix": "Changed test_sim_6_1_seed_sweep \u2192 test_sim_7_1_fault_switch_mechanism",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T16:09:04.749Z"
|
|
},
|
|
{
|
|
"id": "bug-1123",
|
|
"timestamp": "2026-06-24T16:22:58.427Z",
|
|
"error_message": "Wrong reference: test_sim_6_1_seed_sweep should be test_sim_7_2_negative_both_directions",
|
|
"file": "src/lib/testsuite/test_raft.c",
|
|
"root_cause": "Used \"test_sim_6_1_seed_sweep\" instead of \"test_sim_7_2_negative_both_directions\"",
|
|
"fix": "Changed test_sim_6_1_seed_sweep \u2192 test_sim_7_2_negative_both_directions",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T16:22:58.427Z"
|
|
},
|
|
{
|
|
"id": "bug-1125",
|
|
"timestamp": "2026-06-24T16:42:32.261Z",
|
|
"error_message": "Wrong reference: test_sim_4_2_step_liveness_and_coverage should be test_sim_8_1_export_trace_named_and_gated",
|
|
"file": "src/lib/testsuite/test_raft.c",
|
|
"root_cause": "Used \"test_sim_4_2_step_liveness_and_coverage\" instead of \"test_sim_8_1_export_trace_named_and_gated\"",
|
|
"fix": "Changed test_sim_4_2_step_liveness_and_coverage \u2192 test_sim_8_1_export_trace_named_and_gated",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T16:42:32.261Z"
|
|
},
|
|
{
|
|
"id": "bug-1126",
|
|
"timestamp": "2026-06-24T16:43:39.427Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/lib/raft/raft_sim.c",
|
|
"root_cause": "Condition was: if (node_idx < 0 || node_idx >= c->n)",
|
|
"fix": "Changed to: if (getenv(\"RAFT_SIM_EXPORT\")",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-24T16:43:39.427Z"
|
|
},
|
|
{
|
|
"id": "bug-1127",
|
|
"timestamp": "2026-06-25T03:17:45.530Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_demotion_convergence.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-25T03:17:45.530Z"
|
|
},
|
|
{
|
|
"id": "bug-1128",
|
|
"timestamp": "2026-06-25T03:20:00.000Z",
|
|
"error_message": "test_demotion_replay_yields_committed_only flakes ~16% on overlayfs: boot recovery over surviving WAL must yield the committed prefix ONLY",
|
|
"file": "src/controller/testsuite/test_demotion_convergence.c",
|
|
"root_cause": "TWO compounding non-determinism sources, both fixture artifacts not product bugs: (1) overlayfs metadata incoherence \u2014 a freshly-opened persist_t fd over a just-ftruncate'd WAL intermittently reads the STALE pre-truncate size, so the cross-context fresh recovery replays the already-removed suffix; (2) DEEPER, fs-independent: the fixture wires a LIVE commit engine and on a single node (n_peers=1) the persist durable-advance callback (fsync worker -> on_durable_advance) commits the whole durable log, so persist_flush asynchronously raced committed_lsn UP from the test-set committed_boundary (5) to the appended tip (8) AFTER the test pinned it; the demotion seam reads committed_lsn at task time -> truncated to 8 not 5 -> current_lsn=9 > committed_boundary+1. DIAG proof: committed_boundary=5 live_committed=8 live_tip=9 on failing runs.",
|
|
"fix": "Test-only, two parts. (a) Detach the durable-advance commit wake (g_dc.persist.on_durable_advance = NULL) and re-pin committed_lsn = committed_boundary right before driving the demotion task, killing the commit-engine race deterministically (helps BOTH fs paths). (b) Hybrid gate by fs type via static dc_path_is_overlayfs() (statfs f_type == OVERLAYFS_SUPER_MAGIC 0x794c7630, defaults to real-fs path on statfs error): on a real fs keep the strong cross-context fresh boot-recovery assertion (fresh->current_lsn <= committed_boundary+1); on overlayfs skip that fd-incoherent step and assert the LIVE-context truncate effect (g_dc.persist.current_lsn <= committed_boundary+1, coherent under p->lock). Both branches prove the same property. Production persist.c truncate (ftruncate+fdatasync) untouched.",
|
|
"fix_validation": "Full controller suite 20/20 runs: 0 demotion_replay failures, 0 total failures. Group-only 60/60: 0 failures. Baseline (pre-fix) was 4/20. /tmp confirmed overlayfs (statfs magic 0x794c7630), so the overlayfs branch is the one exercised here.",
|
|
"tags": [
|
|
"test-flake",
|
|
"demotion-convergence",
|
|
"persist",
|
|
"overlayfs",
|
|
"ha-convergence-recovery",
|
|
"quiescence",
|
|
"wal-truncate",
|
|
"sandbox",
|
|
"commit-engine-race",
|
|
"deterministic",
|
|
"c"
|
|
],
|
|
"related_bugs": [
|
|
"bug-343",
|
|
"bug-704",
|
|
"bug-795",
|
|
"bug-828",
|
|
"bug-9799",
|
|
"bug-1060"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-25T04:30:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1133",
|
|
"timestamp": "2026-06-25T07:12:01.309Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-log-replication/spec.json",
|
|
"root_cause": "Had \"2026-06-21T11:00:00Z\"",
|
|
"fix": "Changed to \"2026-06-25T00:00:00Z\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"json"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-25T07:12:25.418Z"
|
|
},
|
|
{
|
|
"id": "bug-1134",
|
|
"timestamp": "2026-06-25T08:18:43.915Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/raft-apply-decoupling/facts-in-raft.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-25T08:18:43.915Z"
|
|
},
|
|
{
|
|
"id": "bug-1135",
|
|
"timestamp": "2026-06-25T09:26:49.441Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/raft-apply-decoupling/facts-in-raft.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-25T09:26:49.441Z"
|
|
},
|
|
{
|
|
"id": "bug-1136",
|
|
"timestamp": "2026-06-25T09:27:00.312Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/raft-apply-decoupling/brief.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-25T09:27:00.312Z"
|
|
},
|
|
{
|
|
"id": "bug-1138",
|
|
"timestamp": "2026-06-25T11:36:52.942Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/steering/roadmap.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-25T11:36:52.942Z"
|
|
},
|
|
{
|
|
"id": "bug-1139",
|
|
"timestamp": "2026-06-25T14:02:51.225Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-drive-async/research.md",
|
|
"root_cause": "Had `VTASK_IO`",
|
|
"fix": "Changed to `endpoint_block_tasks()`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 4,
|
|
"last_seen": "2026-06-25T14:09:24.614Z"
|
|
},
|
|
{
|
|
"id": "bug-1141",
|
|
"timestamp": "2026-06-25T15:12:16.193Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/raft-drive-async/research.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-25T15:12:16.193Z"
|
|
},
|
|
{
|
|
"id": "bug-1142",
|
|
"timestamp": "2026-06-25T15:13:00.445Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/steering/roadmap.md",
|
|
"root_cause": "Had `.kiro/specs/raft-drive-async/brief.md`",
|
|
"fix": "Changed to `delay_task_ms`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-25T15:13:00.445Z"
|
|
},
|
|
{
|
|
"id": "bug-1143",
|
|
"timestamp": "2026-06-25T23:37:38.579Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": ".kiro/specs/raft-drive-async/design.md",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: - Commit-advance under pool load (R4.5): with the vtask pool; - Snapshot/checkpoint concurrency (R1.1/1.3/1.5): concurrent",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-25T23:38:18.782Z"
|
|
},
|
|
{
|
|
"id": "bug-1144",
|
|
"timestamp": "2026-06-25T23:37:49.697Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-drive-async/design.md",
|
|
"root_cause": "Had `persist_checkpoint`",
|
|
"fix": "Changed to `wait_all_with_timeout`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-25T23:37:49.697Z"
|
|
},
|
|
{
|
|
"id": "bug-1145",
|
|
"timestamp": "2026-06-25T23:38:08.746Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/raft-drive-async/design.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-25T23:38:08.746Z"
|
|
},
|
|
{
|
|
"id": "bug-1147",
|
|
"timestamp": "2026-06-26T03:46:38.904419+00:00",
|
|
"error_message": "WAL trim_wal_segments deletes any closed segment regardless of standby catch-up cursor \u2192 lagging/empty-rejoin standby loses its needed log range with no snapshot backfill (permanent committed-prefix gap)",
|
|
"file": "src/controller/persist.c:1374 (trim_wal_segments)",
|
|
"root_cause": "trim_wal_segments bounds deletion ONLY by active_seg_lsn (the currently-open segment): `if (seg_start_lsn < active_seg_lsn) unlink()`. It consults no standby acked_lsn, no committed_lsn, no in-flight snapshot boundary. Strategy-A (cursor-bounded retention) discipline is absent. Strategy-B (entity-bearing snapshot install) is also not live \u2014 write_snapshot (persist.c:1247) writes only a 16-byte P0 sentinel, not materialized state. So a standby that lags by more than ~one open segment (down across segment rolls, slow link, >64MB lag, or empty rejoin from cursor=0) hits a log range that exists nowhere and cannot catch up.",
|
|
"fix": "FIXED (verified 2026-07-02): src/controller/persist.c trim_wal_segments() computes `floor = repl_trim_lsn(&p->repl, active_seg_lsn, p->config.snap_interval_s)` (min of active segment, all standby acked_lsn, disconnected-slot guards) and only unlinks segments below that floor \u2014 comment inline explicitly cites 'bug-1147 guard'. Landed under raft-drive-async task 3.2 (all leaf tasks complete).",
|
|
"tags": [
|
|
"durability",
|
|
"permanent-gap",
|
|
"stale-report",
|
|
"trim",
|
|
"bug-828",
|
|
"raft-drive-async",
|
|
"latent",
|
|
"catch-up",
|
|
"wal",
|
|
"fixed",
|
|
"snapshot",
|
|
"bug-795"
|
|
],
|
|
"related_bugs": [
|
|
"bug-795",
|
|
"bug-828",
|
|
"bug-1060"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-02T17:30:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1148",
|
|
"timestamp": "2026-06-26T03:46:51.038Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-drive-async/design.md",
|
|
"root_cause": "Had 's boundary or any standby'",
|
|
"fix": "Changed to `persist.c:1374`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T03:46:51.038Z"
|
|
},
|
|
{
|
|
"id": "bug-1149",
|
|
"timestamp": "2026-06-26T03:48:48.222Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/steering/roadmap.md",
|
|
"root_cause": "Had `/kiro-spec-design raft-drive-async`",
|
|
"fix": "Changed to `approved: false`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-26T03:49:01.467Z"
|
|
},
|
|
{
|
|
"id": "bug-1151",
|
|
"timestamp": "2026-06-26T04:31:53.879Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-drive-async/design.md",
|
|
"root_cause": "Had `commit_submit`",
|
|
"fix": "Changed to `commit.c`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-26T04:36:52.562Z"
|
|
},
|
|
{
|
|
"id": "bug-1152",
|
|
"timestamp": "2026-06-26T04:32:20.960Z",
|
|
"error_message": "Wrong reference: PeerCtrlDispatch should be LivenessAdmission",
|
|
"file": ".kiro/specs/raft-drive-async/design.md",
|
|
"root_cause": "Used \"PeerCtrlDispatch\" instead of \"LivenessAdmission\"",
|
|
"fix": "Changed PeerCtrlDispatch \u2192 LivenessAdmission",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T04:32:20.960Z"
|
|
},
|
|
{
|
|
"id": "bug-1153",
|
|
"timestamp": "2026-06-26T04:33:10.286Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/steering/roadmap.md",
|
|
"root_cause": "Had `COMMIT_WAIT_RESERVED=2`",
|
|
"fix": "Changed to `commit.c:16`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T04:33:10.287Z"
|
|
},
|
|
{
|
|
"id": "bug-1154",
|
|
"timestamp": "2026-06-26T04:37:18.052Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-drive-async/tasks.md",
|
|
"root_cause": "Had `VTASK_LIVENESS_RESERVED`",
|
|
"fix": "Changed to `R = clamp(n_peers \u2212 1, 1, n_vcpus \u2212 1)`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-26T04:42:01.556Z"
|
|
},
|
|
{
|
|
"id": "bug-1155",
|
|
"timestamp": "2026-06-26T04:47:49.937Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'testsuite/test_waldump.c'",
|
|
"fix": "Changed to 'testsuite/test_drive_async_config.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T04:47:49.937Z"
|
|
},
|
|
{
|
|
"id": "bug-1156",
|
|
"timestamp": "2026-06-26T04:48:34.246Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/include/config.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T04:48:34.246Z"
|
|
},
|
|
{
|
|
"id": "bug-1157",
|
|
"timestamp": "2026-06-26T04:48:50.005Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T04:48:50.005Z"
|
|
},
|
|
{
|
|
"id": "bug-1158",
|
|
"timestamp": "2026-06-26T04:49:04.568Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T04:49:04.568Z"
|
|
},
|
|
{
|
|
"id": "bug-1159",
|
|
"timestamp": "2026-06-26T04:49:44.821Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/cluster.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T04:49:44.821Z"
|
|
},
|
|
{
|
|
"id": "bug-1160",
|
|
"timestamp": "2026-06-26T04:57:57.877Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/raft-drive-async/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-26T04:57:57.877Z"
|
|
},
|
|
{
|
|
"id": "bug-1161",
|
|
"timestamp": "2026-06-26T05:02:36.720Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'testsuite/test_waldump.c'",
|
|
"fix": "Changed to 'testsuite/test_slowlane.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T05:02:36.720Z"
|
|
},
|
|
{
|
|
"id": "bug-1162",
|
|
"timestamp": "2026-06-26T05:06:30.148Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/include/xce/cluster_def.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T05:06:30.148Z"
|
|
},
|
|
{
|
|
"id": "bug-1163",
|
|
"timestamp": "2026-06-26T05:06:42.680Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/cluster.c",
|
|
"root_cause": "Condition was: if (ha_is_primary(&c->ha)",
|
|
"fix": "Changed to: if (c->slowlane.workers == NULL)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T05:06:42.680Z"
|
|
},
|
|
{
|
|
"id": "bug-1164",
|
|
"timestamp": "2026-06-26T05:06:53.129Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/cluster.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T05:06:53.129Z"
|
|
},
|
|
{
|
|
"id": "bug-1165",
|
|
"timestamp": "2026-06-26T06:51:00.808Z",
|
|
"error_message": "Wrong reference: test_request_send_propagation should be test_netio_bounded_connect",
|
|
"file": "src/lib/testsuite/test.c",
|
|
"root_cause": "Used \"test_request_send_propagation\" instead of \"test_netio_bounded_connect\"",
|
|
"fix": "Changed test_request_send_propagation \u2192 test_netio_bounded_connect",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T06:51:00.808Z"
|
|
},
|
|
{
|
|
"id": "bug-1166",
|
|
"timestamp": "2026-06-26T06:51:57.649Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/lib/netio.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T06:51:57.649Z"
|
|
},
|
|
{
|
|
"id": "bug-1168",
|
|
"timestamp": "2026-06-26T06:52:21.608Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/include/netio.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T06:52:21.608Z"
|
|
},
|
|
{
|
|
"id": "bug-1169",
|
|
"timestamp": "2026-06-26T07:16:36.377Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/include/vtaskmgr.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-26T07:17:06.235Z"
|
|
},
|
|
{
|
|
"id": "bug-1171",
|
|
"timestamp": "2026-06-26T07:18:02.307Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/lib/vtaskmgr.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T07:18:02.307Z"
|
|
},
|
|
{
|
|
"id": "bug-1172",
|
|
"timestamp": "2026-06-26T07:19:14.857Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/include/commit.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-26T07:19:30.679Z"
|
|
},
|
|
{
|
|
"id": "bug-1173",
|
|
"timestamp": "2026-06-26T07:19:45.059Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/commit.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-26T07:20:29.751Z"
|
|
},
|
|
{
|
|
"id": "bug-1174",
|
|
"timestamp": "2026-06-26T07:20:07.233Z",
|
|
"error_message": "Wrong operator: >= should be !=",
|
|
"file": "src/controller/commit.c",
|
|
"root_cause": "Used \">=\" instead of \"!=\"",
|
|
"fix": "Changed operator >= \u2192 !=",
|
|
"tags": [
|
|
"auto-detected",
|
|
"operator-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T07:20:07.233Z"
|
|
},
|
|
{
|
|
"id": "bug-1175",
|
|
"timestamp": "2026-06-26T07:20:41.448Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/cluster.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T07:20:41.448Z"
|
|
},
|
|
{
|
|
"id": "bug-1177",
|
|
"timestamp": "2026-06-26T07:47:19.731Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-26T07:47:39.153Z"
|
|
},
|
|
{
|
|
"id": "bug-1178",
|
|
"timestamp": "2026-06-26T07:48:00.209Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-26T07:48:57.917Z"
|
|
},
|
|
{
|
|
"id": "bug-1179",
|
|
"timestamp": "2026-06-26T07:51:01.491Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/testsuite/test_ha_liveness.c",
|
|
"root_cause": "No early return/throw for edge case: deadline.tv_nsec >= 1000000000L",
|
|
"fix": "Added guard clause: if (deadline.tv_nsec >= 1000000000L)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T07:51:01.491Z"
|
|
},
|
|
{
|
|
"id": "bug-1180",
|
|
"timestamp": "2026-06-26T07:51:10.764Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_ha_liveness.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T07:51:10.764Z"
|
|
},
|
|
{
|
|
"id": "bug-1183",
|
|
"timestamp": "2026-06-26T07:57:35.484Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T07:57:35.484Z"
|
|
},
|
|
{
|
|
"id": "bug-1184",
|
|
"timestamp": "2026-06-26T08:12:52.624Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_ha_liveness.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-26T08:12:59.952Z"
|
|
},
|
|
{
|
|
"id": "bug-1185",
|
|
"timestamp": "2026-06-26T08:13:19.511Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-26T08:15:04.588Z"
|
|
},
|
|
{
|
|
"id": "bug-1186",
|
|
"timestamp": "2026-06-26T08:15:44.315Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Condition was: if (cur_sctx && cur_sctx->peer_idx == sctx->peer_idx)",
|
|
"fix": "Changed to: if (0 && cur_sctx && cur_sctx->peer_idx == sctx->peer_)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-26T08:16:44.785Z"
|
|
},
|
|
{
|
|
"id": "bug-1188",
|
|
"timestamp": "2026-06-26T10:20:33.560Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-26T10:20:50.537Z"
|
|
},
|
|
{
|
|
"id": "bug-1189",
|
|
"timestamp": "2026-06-26T10:21:12.319Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 5,
|
|
"last_seen": "2026-06-26T10:23:40.982Z"
|
|
},
|
|
{
|
|
"id": "bug-1190",
|
|
"timestamp": "2026-06-26T10:24:21.473Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/cluster.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T10:24:21.473Z"
|
|
},
|
|
{
|
|
"id": "bug-1191",
|
|
"timestamp": "2026-06-26T10:27:00.557Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/testsuite/test_ha_liveness.c",
|
|
"root_cause": "No early return/throw for edge case: atomic_load(&g_pc_gate_on",
|
|
"fix": "Added guard clause: if (atomic_load(&g_pc_gate_on)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T10:27:00.557Z"
|
|
},
|
|
{
|
|
"id": "bug-1192",
|
|
"timestamp": "2026-06-26T10:27:14.358Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_ha_liveness.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T10:27:14.358Z"
|
|
},
|
|
{
|
|
"id": "bug-1193",
|
|
"timestamp": "2026-06-26T10:56:43.461Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/include/vtaskmgr.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T10:56:43.461Z"
|
|
},
|
|
{
|
|
"id": "bug-1194",
|
|
"timestamp": "2026-06-26T10:57:18.280Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/lib/vtaskmgr.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T10:57:18.280Z"
|
|
},
|
|
{
|
|
"id": "bug-1195",
|
|
"timestamp": "2026-06-26T10:57:44.750Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 4,
|
|
"last_seen": "2026-06-26T10:59:54.657Z"
|
|
},
|
|
{
|
|
"id": "bug-1196",
|
|
"timestamp": "2026-06-26T11:00:15.213Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_ha_liveness.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T11:00:15.213Z"
|
|
},
|
|
{
|
|
"id": "bug-1197",
|
|
"timestamp": "2026-06-26T00:00:00.000Z",
|
|
"error_message": "raft-drive-async finding-1 (FLAG-ON ONLY, dormant): enabling peerctrl_dispatch creates an endpoint UAF \u2014 raft_cb_become_follower runs on a pool worker and endpoint_fini()s all peer vote-eps (frees ep->data) while the single io_worker can concurrently read ep_j->data in peer_ctrl_msg_handler_inline for a same-batch queued event",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Moving peer-control off the sequential io_worker onto the pool co-locates teardown (frees ep->data) and inbound delivery (reads ep->data) on different threads with no unmonitor-before-free ordering. Safe today only because g_drive_async_peerctrl_dispatch_enabled defaults OFF.",
|
|
"fix": "SUPERSEDED 2026-06-30 by bug-1298 endpoint reference counting (commit 6e05dc1). The pool-reachable teardown-frees-peer-ep UAF class is now governed generally by endpoint_ref/endpoint_unref (refcnt + heap_alloc gate) acquired per ep-bound VTASK_IO in vtask_enq and released in run_task/taskq_item_killer \u2014 a queued vtask holds a ref so the io_worker cannot free the ep out from under the dispatcher. Re-validate when raft-drive-async flips g_drive_async_peerctrl_dispatch ON.",
|
|
"tags": [
|
|
"endpoint-quiescence",
|
|
"fixed",
|
|
"c",
|
|
"dispatch_inflight",
|
|
"task-3.4a",
|
|
"tearing_down",
|
|
"wrong-reference",
|
|
"raft-drive-async",
|
|
"task-3.1",
|
|
"use-after-free",
|
|
"flag-on-hazard",
|
|
"deferred",
|
|
"review-finding"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1198"
|
|
],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-30T14:30:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1199",
|
|
"timestamp": "2026-06-26T00:00:00.000Z",
|
|
"error_message": "raft-drive-async task 3.1: peer-control vtask enqueued-but-not-executed at vtaskmgr_fini leaks its io_packet_t (only the executed entry transfers ownership via iod->pkt=NULL)",
|
|
"file": "src/lib/vtaskmgr.c",
|
|
"root_cause": "taskq_item_killer called vtask_fini (frees task->data wrapper only), never the carried io_packet_t. The generic killer could not free the pkt unconditionally because the libxce client path (xcectx.c vtask_handle_msg) does NOT clear ep->fsm_in.pkt \u2014 its pkt lifetime is the endpoint's, so an unconditional free would double-free.",
|
|
"fix": "Added int owns_io_pkt to vtask_t (default 0 in vtask_init). taskq_item_killer frees the pkt ONLY when owns_io_pkt && vtype==VTASK_IO && pkt!=NULL. Controller peer_ctrl_dispatch_to_pool sets owns_io_pkt=1. libxce path keeps owns_io_pkt=0 -> unchanged, no double-free. Verified: leak count 808 unchanged vs baseline, 0 double-free under ASan.",
|
|
"tags": [
|
|
"raft-drive-async",
|
|
"task-3.1",
|
|
"memory-leak",
|
|
"vtaskmgr",
|
|
"packet-ownership",
|
|
"review-finding"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1077"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T00:00:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1198",
|
|
"timestamp": "2026-06-26T00:00:00.000Z",
|
|
"error_message": "raft-drive-async finding-2 (FLAG-ON ONLY, dormant): peer_ctrl_classify tags all peer-control work VTASK_LIVENESS, but the CTRL_PRIMARY repl-ack path can reach HA_REPL_SEND_SNAPSHOT->persist_checkpoint (blocking fdatasync) inline \u2014 a blocking op under the never-gated liveness reservation breaks deadlock-freedom",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "repl_ack_decode_and_dispatch -> ha_dispatch_repl_action_for_standby can run the snapshot send inline. LIVENESS is only correct once that long op is offloaded off the pool.",
|
|
"fix": "FIXED/CLOSED (verified 2026-07-02): src/controller/ha.c:5647 carries an explicit in-code 'CLOSED' banner comment \u2014 the bug-1197 endpoint_ref/endpoint_unref bracket around the lane dispatch means the repl-ack path's snapshot send is ALWAYS offloaded before peer_ctrl_classify can tag it VTASK_LIVENESS, so bug-1198 cannot recur. Both flags (peerctrl dispatch + snapshot offload) default ON since bug-1376 was fixed.",
|
|
"tags": [
|
|
"task-3.1",
|
|
"review-finding",
|
|
"stale-report",
|
|
"raft-drive-async",
|
|
"deferred",
|
|
"flag-on-hazard",
|
|
"fixed",
|
|
"deadlock-freedom",
|
|
"liveness-admission"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1197"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-02T17:30:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1202",
|
|
"timestamp": "2026-06-26T11:33:28.328Z",
|
|
"error_message": "Missing error handling in task",
|
|
"file": "src/controller/testsuite/test_e2e_checkpoint.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: /* Helper: check if a file exists in a directory ; static int file_exists_in(const char* dir, const char* name)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-26T11:34:53.637Z"
|
|
},
|
|
{
|
|
"id": "bug-1204",
|
|
"timestamp": "2026-06-26T11:35:37.597Z",
|
|
"error_message": "Wrong reference: file_exists_for_trim_test should be seg_file_exists",
|
|
"file": "src/controller/testsuite/test_e2e_checkpoint.c",
|
|
"root_cause": "Used \"file_exists_for_trim_test\" instead of \"seg_file_exists\"",
|
|
"fix": "Changed file_exists_for_trim_test \u2192 seg_file_exists",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T11:35:37.597Z"
|
|
},
|
|
{
|
|
"id": "bug-1205",
|
|
"timestamp": "2026-06-26T11:39:53.357Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-26T11:41:58.418Z"
|
|
},
|
|
{
|
|
"id": "bug-1206",
|
|
"timestamp": "2026-06-26T15:16:40.996Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_ha_liveness.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T15:16:40.996Z"
|
|
},
|
|
{
|
|
"id": "bug-1207",
|
|
"timestamp": "2026-06-26T15:28:19.885Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: ha_repl_send_snapshot_hook != NULL",
|
|
"fix": "Added guard clause: if (ha_repl_send_snapshot_hook != NULL)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T15:28:19.885Z"
|
|
},
|
|
{
|
|
"id": "bug-1210",
|
|
"timestamp": "2026-06-26",
|
|
"error_message": "raft-drive-async task 3.2 snapshot slow-lane offload flag g_drive_async_snapshot_offload defaulted ON (=1); header doc also said default ON",
|
|
"file": "src/controller/ha.c, src/controller/ha.h",
|
|
"root_cause": "Snapshot offload borrows a standby endpoint shared with the io_worker epoll loop (not owned, unlike reconnect_lane_fn). With the flag ON the send runs on a slow-lane thread while io_worker can RDHUP-free that endpoint => cross-thread UAF (bug-1197 family). Defaulting ON would ship that UAF; the borrowed-endpoint lifetime discipline is not established until task 3.4.",
|
|
"fix": "Default the flag OFF (dormant landing, same protocol as task 3.1 peerctrl dispatch). Inline path runs on io_worker, serialized with teardown -> no overlap. Rewrote both the ha.c definition comment and the ha.h accessor doc to state OFF is the production default and 3.4 is the gate that flips it ON. bug-1198 stays open by design until then.",
|
|
"tags": [
|
|
"raft-drive-async",
|
|
"task-3.2",
|
|
"snapshot",
|
|
"slow-lane",
|
|
"UAF",
|
|
"feature-flag",
|
|
"bug-1197",
|
|
"bug-1198",
|
|
"liveness"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1197",
|
|
"bug-1198",
|
|
"bug-1147"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26"
|
|
},
|
|
{
|
|
"id": "bug-1211",
|
|
"timestamp": "2026-06-26T15:49:46.434Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.h",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-26T15:49:59.034Z"
|
|
},
|
|
{
|
|
"id": "bug-1212",
|
|
"timestamp": "2026-06-26T15:50:27.084Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-26T15:52:41.021Z"
|
|
},
|
|
{
|
|
"id": "bug-1213",
|
|
"timestamp": "2026-06-26T15:51:29.747Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: ha_configpush_probe != NULL",
|
|
"fix": "Added guard clause: if (ha_configpush_probe != NULL)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T15:51:29.747Z"
|
|
},
|
|
{
|
|
"id": "bug-1214",
|
|
"timestamp": "2026-06-26T15:54:05.463Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_ha_liveness.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T15:54:05.463Z"
|
|
},
|
|
{
|
|
"id": "bug-1216",
|
|
"timestamp": "2026-06-26T16:54:57.384Z",
|
|
"error_message": "Wrong reference: ssl_handshake_done should be tearing_down",
|
|
"file": "src/include/netio.h",
|
|
"root_cause": "Used \"ssl_handshake_done\" instead of \"tearing_down\"",
|
|
"fix": "Changed ssl_handshake_done \u2192 tearing_down",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T16:54:57.384Z"
|
|
},
|
|
{
|
|
"id": "bug-1217",
|
|
"timestamp": "2026-06-26T16:55:15.332Z",
|
|
"error_message": "Wrong reference: ssl_handshake_done should be tearing_down",
|
|
"file": "src/lib/netio.c",
|
|
"root_cause": "Used \"ssl_handshake_done\" instead of \"tearing_down\"",
|
|
"fix": "Changed ssl_handshake_done \u2192 tearing_down",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T16:55:15.332Z"
|
|
},
|
|
{
|
|
"id": "bug-1218",
|
|
"timestamp": "2026-06-26T16:55:48.690Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: ectx",
|
|
"fix": "Added guard clause: if (ectx)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T16:55:48.690Z"
|
|
},
|
|
{
|
|
"id": "bug-1222",
|
|
"timestamp": "2026-06-26T17:44:25.670Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'testsuite/test_waldump.c'",
|
|
"fix": "Changed to 'testsuite/test_ha_dispatch_integration.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26T17:44:25.670Z"
|
|
},
|
|
{
|
|
"id": "bug-1224",
|
|
"timestamp": "2026-06-26",
|
|
"error_message": "raft-drive-async 3.4b integration tests (test_ha_dispatch_integration.c) hang intermittently \u2014 controller_unit_test never completes (timeout-killed)",
|
|
"file": "src/controller/testsuite/test_ha_dispatch_integration.c",
|
|
"root_cause": "Test teardown race: P1/P2/P3 released a parked vtask body (gate_open) then immediately called vtaskmgr_fini, which tears down workers via pthread_cancel. The tests polled a run-counter incremented MID-body, so fini raced the just-released body still unwinding (esp. P2 REQ_BLOCK bodies in vtaskmgr_blocking_release racing blk_lock teardown) \u2192 flaky deadlock. slowlane_fini is graceful (join) so the lane side was safe; vtaskmgr_fini (cancel) was the hazard.",
|
|
"fix": "Add end-of-body completion counters (g_pc_completed on both pc_probe paths incl. the park path; g_block_done at the end of block_task_entry) and poll them to the full expected count AFTER gate_open and BEFORE vtaskmgr_fini, so every pool body has fully returned (worker idle in cbuf_get) before the cancel-based fini. Verified deterministic 5/5 isolated runs + full suite EXIT=0, ASan-clean.",
|
|
"tags": [
|
|
"raft-drive-async",
|
|
"task-3.4b",
|
|
"test",
|
|
"flaky",
|
|
"vtaskmgr_fini",
|
|
"pthread_cancel",
|
|
"teardown-race",
|
|
"deadlock"
|
|
],
|
|
"related_bugs": [
|
|
"bug-924"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26"
|
|
},
|
|
{
|
|
"id": "bug-1225",
|
|
"timestamp": "2026-06-26",
|
|
"error_message": "/xce-test-ha live failover soak (ASAN build, real fs ~/tmp): FAIL round 4 \"cluster did not reconverge to 3-of-3 after restarting ctrl-2\"",
|
|
"file": ".claude/skills/xce-test-ha/run-ha-soak.sh (wait_for_full_convergence)",
|
|
"root_cause": "Pre-existing HA-core instability under 6-round CHAOTIC repeated failover, NOT a raft-drive-async regression. BASELINE-CONFIRMED: the same soak against pre-Phase-3 binaries (commit 21e26a1, release/non-ASAN) ALSO fails at round 4 (baseline symptom: no-new-primary election stall; current symptom: round-4 reconverge + committed-prefix divergence at LSN 9). Both builds preserve committed JOBS (zero job loss in all completed rounds). The committed-prefix divergence is the documented open bug-851/795 family (chaotic-failover silent divergence; separate HA-core spec). raft-drive-async Phase 3 flags are default-OFF (inert); the live trim-guard only preserves more WAL.",
|
|
"fix": "Not a raft-drive-async bug (baseline-confirmed). 4.2 regression sweep PASSES for this spec: no NEW failure introduced. Pre-existing bug-851 chaotic-failover divergence + bug-1042 reconverge flakiness remain open for a separate HA-core effort.",
|
|
"tags": [
|
|
"ASAN",
|
|
"baseline-confirmed",
|
|
"bug-851",
|
|
"false-negative",
|
|
"not-a-regression",
|
|
"raft-drive-async",
|
|
"reconverge",
|
|
"soak",
|
|
"task-4.2",
|
|
"xce-test-ha"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1042",
|
|
"bug-924"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-26"
|
|
},
|
|
{
|
|
"id": "bug-1226",
|
|
"timestamp": "2026-06-27T02:53:39.273Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".claude/skills/xce-test-ha/run-ha-soak.sh",
|
|
"root_cause": "Had \"$REPO/src/xce.build/controller/xce_controller\"",
|
|
"fix": "Changed to \"${XCE_HA_BIN:-$REPO/src/xce.build/controller/xce_",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"sh"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-27T02:53:39.273Z"
|
|
},
|
|
{
|
|
"id": "bug-1227",
|
|
"timestamp": "2026-06-27T03:04:05.891Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/raft-drive-async/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-27T03:04:05.891Z"
|
|
},
|
|
{
|
|
"id": "bug-1228",
|
|
"timestamp": "2026-06-27T04:13:35.943Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-ha-core-safety/design.md",
|
|
"root_cause": "Had `; no silent retention of a stale-term entry.\n- In",
|
|
"fix": "Changed to `; no silent retention of a stale-term entry.\n- In",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-27T04:13:47.424Z"
|
|
},
|
|
{
|
|
"id": "bug-1233",
|
|
"timestamp": "2026-06-27T04:59:57.805Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": ".claude/skills/xce-test-ha/run-ha-soak.sh",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: # \u2500\u2500 Chaotic-mode primitives (count outcomes into the verdic; # Run `walcompare --report` across all three members and ADD | Also: # \u2500\u2500 Chaotic mode: overlapping-kill rounds \u2192 isolated verdic; # Opt-in (--chaotic / XCE_HA_MODE=chaotic). Kills land insid",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"sh"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-27T05:00:54.066Z"
|
|
},
|
|
{
|
|
"id": "bug-1234",
|
|
"timestamp": "2026-06-27T05:00:06.726Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".claude/skills/xce-test-ha/run-ha-soak.sh",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"sh"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-27T05:00:06.726Z"
|
|
},
|
|
{
|
|
"id": "bug-1236",
|
|
"timestamp": "2026-06-27T09:27:45.080Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-ha-core-safety/design.md",
|
|
"root_cause": "Had `raft_on_append_entries_request`",
|
|
"fix": "Changed to `research.md`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-27T09:31:54.096Z"
|
|
},
|
|
{
|
|
"id": "bug-1237",
|
|
"timestamp": "2026-06-27T09:28:07.944Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": ".kiro/specs/raft-ha-core-safety/design.md",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: - **Technical debt addressed:** the silent empty-payload shi | Also: - `.claude/skills/xce-test-ha/run-ha-soak.sh` (and `SKILL.md; - `src/controller/` log init (only if the client-probe appro | Also: | Catch-up Payload Integrity | Adapter | Stream a non-empty ; | Persist Conflict Guard | Persist | `(term,lsn,payload-crc) | Also: - The live-repro gate (task 1.3) has **already run and refut; - A green synthetic unit test over a still-red soak is not a",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 5,
|
|
"last_seen": "2026-06-27T09:32:08.493Z"
|
|
},
|
|
{
|
|
"id": "bug-1243",
|
|
"timestamp": "2026-06-27T10:02:56.820Z",
|
|
"error_message": "Wrong operator: == should be <<",
|
|
"file": ".claude/skills/xce-test-ha/run-ha-soak.sh",
|
|
"root_cause": "Used \"==\" instead of \"<<\"",
|
|
"fix": "Changed operator == \u2192 <<",
|
|
"tags": [
|
|
"auto-detected",
|
|
"operator-fix",
|
|
"sh"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-27T10:02:56.820Z"
|
|
},
|
|
{
|
|
"id": "bug-1244",
|
|
"timestamp": "2026-06-27T10:04:31.979Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".claude/skills/xce-test-ha/run-ha-soak.sh",
|
|
"root_cause": "Had \"no primary elected within 45s (check $TOP/logs)\"",
|
|
"fix": "Changed to \"no primary elected within ~90s via client probe (",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"sh"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-27T10:04:31.979Z"
|
|
},
|
|
{
|
|
"id": "bug-1246",
|
|
"timestamp": "2026-06-27T10:07:37.692Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".claude/skills/xce-test-ha/SKILL.md",
|
|
"root_cause": "Had `no primary elected within 45s`",
|
|
"fix": "Changed to `no primary elected within ~90s via client probe`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-27T10:07:37.692Z"
|
|
},
|
|
{
|
|
"id": "bug-1247",
|
|
"timestamp": "2026-06-27T10:25:38.366Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "No early return/throw for edge case: !p || lsn == 0",
|
|
"fix": "Added guard clause: if (!p || lsn == 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-27T10:25:38.366Z"
|
|
},
|
|
{
|
|
"id": "bug-1249",
|
|
"timestamp": "2026-06-27T10:45:00.686Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: /* (a) non-empty incoming whose payload differs at an existi; * \u2014 a genuine payload conflict. Branch on tip vs below-tip.",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-27T10:45:20.669Z"
|
|
},
|
|
{
|
|
"id": "bug-1250",
|
|
"timestamp": "2026-06-27T10:45:34.063Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-27T10:45:34.063Z"
|
|
},
|
|
{
|
|
"id": "bug-1252",
|
|
"timestamp": "2026-06-27T10:47:06.628Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "Condition was: if (lsn != tip_lsn)",
|
|
"fix": "Changed to: if (trc0 != 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-27T10:47:06.628Z"
|
|
},
|
|
{
|
|
"id": "bug-1254",
|
|
"timestamp": "2026-06-27T11:14:27.133Z",
|
|
"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 2.3 \u2014 cross-term catch-up streamer payload integrity ; * | Also: /* Task 2.3 cross-term catch-up streamer payload integrity:; * CORE RED \u2014 the streamer must never ship a non-empty cro",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-27T11:18:03.504Z"
|
|
},
|
|
{
|
|
"id": "bug-1255",
|
|
"timestamp": "2026-06-27T11:28:45.351Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/config_repl.c",
|
|
"root_cause": "No early return/throw for edge case: !pbuf",
|
|
"fix": "Added guard clause: if (!pbuf)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-27T11:28:45.351Z"
|
|
},
|
|
{
|
|
"id": "bug-1264",
|
|
"timestamp": "2026-06-29T04:13:02.187Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/meson.build",
|
|
"root_cause": "Had 'testsuite/test_waldump.c'",
|
|
"fix": "Changed to 'testsuite/test_ha_partition.c'",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-29T04:13:02.187Z"
|
|
},
|
|
{
|
|
"id": "bug-1266",
|
|
"timestamp": "2026-06-29T04:25:39.111Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/testsuite/test_ha_partition.c",
|
|
"root_cause": "No early return/throw for edge case: peer_idx == g_partition_peer_idx && g_reconnect_gate",
|
|
"fix": "Added guard clause: if (peer_idx == g_partition_peer_idx && g_re)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-29T04:25:39.111Z"
|
|
},
|
|
{
|
|
"id": "bug-1269",
|
|
"timestamp": "2026-06-30T01:47:07.635Z",
|
|
"error_message": "Missing await",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Async call without await \u2014 returned Promise instead of value",
|
|
"fix": "Added await to async call",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-30T01:47:07.635Z"
|
|
},
|
|
{
|
|
"id": "bug-1271",
|
|
"timestamp": "2026-06-30T02:25:32.055Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": ".kiro/specs/raft-ha-core-safety/tasks.md",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block | Also: - _Depends: 1.5, 6.2, 5.2, 5.3_; - _Blocked: first soak run (HEAD 01419e1, Phase-2+5 fixes) i",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-06-30T02:26:08.789Z"
|
|
},
|
|
{
|
|
"id": "bug-1272",
|
|
"timestamp": "2026-06-30T02:25:00Z",
|
|
"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": "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": [
|
|
"prevote",
|
|
"ha",
|
|
"liveness",
|
|
"chaotic-soak",
|
|
"environment",
|
|
"election",
|
|
"bug-924",
|
|
"corrected",
|
|
"7.2",
|
|
"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-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"
|
|
},
|
|
{
|
|
"id": "bug-1281",
|
|
"timestamp": "2026-06-30T03:25:00Z",
|
|
"error_message": "Restart-stability bug: a restarted xce_controller becomes unable to participate at chaotic round 4. Release build SIGSEGVs ('Segmentation fault (core dumped) --myname ctrl-3'); under gdb the SAME corruption manifests as a WEDGED inbound-accept/iomgr path (last accept 03:42:03 while the election timer keeps firing) so two restarted survivors can't exchange PreVotes -> permanent round-N election stall.",
|
|
"file": "src/controller (restart/recovery/election path \u2014 exact site unknown, no backtrace)",
|
|
"root_cause": "ROOT-CAUSED via gdb SIGQUIT all-thread bt: an ABBA lock-order deadlock in src/lib async dispatch. io_worker (netio.c:672) holds ep->lock then blocks on q->lock (dataq_enq); vdispatcher dataq_deq (dataq.c:65) holds q->lock then blocks on ep->lock via the vtask_eligible->endpoint_is_task_blocked (netio.c:1001) match callback. io_worker dies -> node stops accepting/answering PreVotes -> round-4 stall. In release the same ep/q race corrupts -> SIGSEGV. See bug-1282 (the actual dispatch defect).",
|
|
"fix": "The crash/hang IS bug-1282 (UPSTREAM raft-drive-async dispatch deadlock). raft-ha-core-safety 7.2 stays blocked until bug-1282 is fixed upstream, then re-run the gate. No raft-ha-core-safety code change.",
|
|
"tags": [
|
|
"7.2",
|
|
"iomgr",
|
|
"gdb",
|
|
"election",
|
|
"crash",
|
|
"5.4",
|
|
"restart",
|
|
"recovery",
|
|
"heisenbug",
|
|
"accept-hang",
|
|
"restart-stability",
|
|
"segfault",
|
|
"chaotic-soak"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1272",
|
|
"bug-1282",
|
|
"bug-924"
|
|
],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-30T04:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1279",
|
|
"timestamp": "2026-06-30T03:33:06.273Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-ha-core-safety/tasks.md",
|
|
"root_cause": "Had 's persist flusher jams on `",
|
|
"fix": "Changed to `xce_controller`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-30T03:33:06.273Z"
|
|
},
|
|
{
|
|
"id": "bug-1280",
|
|
"timestamp": "2026-06-30T03:57:32.784Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-ha-core-safety/tasks.md",
|
|
"root_cause": "Had \"Task 7.2 on ~/tmp\"",
|
|
"fix": "Changed to \"Task 7.2/5.4 \u2014 UNIFIED root cause\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-30T03:57:32.785Z"
|
|
},
|
|
{
|
|
"id": "bug-1282",
|
|
"timestamp": "2026-06-30T04:17:08.329Z",
|
|
"error_message": "ABBA lock-order deadlock under chaotic churn: io_worker (ep->lock then dataq_enq wants q->lock) vs vdispatcher dataq_deq (q->lock then vtask_eligible->endpoint_is_task_blocked wants ep->lock). Wedges io_worker -> controller stops accepting connections; in release the race corrupts -> SIGSEGV.",
|
|
"file": "src/lib/dataq.c:65 (dataq_deq holds q->lock across match cb) + src/lib/vtaskmgr.c:255 (vtask_eligible) + src/lib/netio.c:1001 (endpoint_is_task_blocked takes ep->lock) + src/lib/netio.c:672 (io_worker holds ep->lock across vtask_enq->dataq_enq)",
|
|
"root_cause": "dataq_deq runs its match callback while holding q->lock, and the callback (vtask_eligible->endpoint_is_task_blocked) acquires ep->lock \u2014 inverting the ep->lock->q->lock order io_worker uses. Two-thread ABBA deadlock, deterministic under round-4 chaotic churn. Confirmed via gdb all-thread backtrace on two independently-wedged nodes.",
|
|
"fix": "FIXED (commit 25e741d): promoted endpoint_t.busy from a 1-bit bitfield to _Atomic int; endpoint_block_tasks/endpoint_unblock_tasks/endpoint_is_task_blocked now lockless (release/acquire), removing the ep->lock acquire from the vtask-eligibility path that ran under q->lock. Verified: post-fix gdb soak has ZERO __lll_lock_wait threads + no endpoint_is_task_blocked in any lock path; controller_unit_test all green. Mirrors dispatch_inflight (bug-1197). NOTE: a SEPARATE release-only restart segfault (bug-1283) remains and still blocks 7.2.",
|
|
"tags": [
|
|
"deadlock",
|
|
"lock-order",
|
|
"abba",
|
|
"vtaskmgr",
|
|
"dataq",
|
|
"netio",
|
|
"io_worker",
|
|
"vdispatcher",
|
|
"raft-drive-async",
|
|
"async-io",
|
|
"upstream",
|
|
"async-fix",
|
|
"md"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1281"
|
|
],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-30T04:20:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1283",
|
|
"timestamp": "2026-06-30T04:17:58.579Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-ha-core-safety/tasks.md",
|
|
"root_cause": "Had `xce_controller`",
|
|
"fix": "Changed to `src/lib`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-30T04:17:58.579Z"
|
|
},
|
|
{
|
|
"id": "bug-1285",
|
|
"timestamp": "2026-06-30T08:24:48.860Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-ha-core-safety/tasks.md",
|
|
"root_cause": "Had `vtask_eligible`",
|
|
"fix": "Changed to `endpoint_is_task_blocked`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-30T08:24:48.860Z"
|
|
},
|
|
{
|
|
"id": "bug-1286",
|
|
"timestamp": "2026-06-30T05:30:00Z",
|
|
"error_message": "xce_controller SIGSEGV in ha_dispatch_gate during chaotic round-4 restart \u2014 Thread received SIGSEGV at ha.c:3194 (atomic_load &ha->role) with ha=0x3ff0 (garbage). The release-only crash that blocks raft-ha-core-safety 7.2; DISTINCT from the bug-1282 deadlock (which is fixed).",
|
|
"file": "src/controller/cluster.c:251 (myreq_handler) + src/controller/ha.c:3194 (ha_dispatch_gate)",
|
|
"root_cause": "NULL ep->owner. myreq_handler does `cluster_t* c = (cluster_t*)ep->owner;` then `ha_dispatch_gate(&c->ha, opcode)`. On a chaotic restart an inbound endpoint dispatches a walCatchupEntry (op 37) vtask while ep->owner==NULL, so c=NULL and &c->ha = NULL+offsetof(cluster_t,ha) = 0x3ff0 \u2014 a garbage pointer ha_dispatch_gate dereferences (atomic_load &ha->role, ha.c:3194) -> SIGSEGV. Backtrace (debug -O0 -g3 under gdb): ha_dispatch_gate(ha=0x3ff0,opcode=37) <- myreq_handler cluster.c:251 <- vtask_entry cluster.c:693 <- run_task/vcpu_entry. ep->owner is NULL because the accept/dispatch path runs a request before owner is wired (or owner cleared mid-flight during teardown).",
|
|
"fix": "FIXED 2026-06-30 (commit 5db734a). NULL-guard `c = ep->owner` in myreq_handler (cluster.c): a chaotic-restart walCatchupEntry (op 37) vtask ran with ep->owner==NULL \u2192 &c->ha==0x3ff0 deref crash at ha.c:3194. Guard returns early when owner unset. Verified: round-4 restart SIGSEGV gone; controller_unit_test green.",
|
|
"tags": [
|
|
"segfault",
|
|
"null-deref",
|
|
"ep-owner",
|
|
"myreq_handler",
|
|
"cluster.c",
|
|
"ha_dispatch_gate",
|
|
"restart",
|
|
"7.2",
|
|
"ROOT-CAUSED"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1282",
|
|
"bug-1281",
|
|
"bug-1197"
|
|
],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-06-30T14:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1290",
|
|
"timestamp": "2026-06-30T09:15:12.861Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-ha-core-safety/tasks.md",
|
|
"root_cause": "Had 't crash) \u2014 STILL blocks the gate; likely an endpo",
|
|
"fix": "Changed to 't crash) \u2014 is now **ROOT-CAUSED** (via the new `",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-30T09:15:12.861Z"
|
|
},
|
|
{
|
|
"id": "bug-1292",
|
|
"timestamp": "2026-06-30T09:33:08.918Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-ha-core-safety/tasks.md",
|
|
"root_cause": "Had `1+2*njobs`",
|
|
"fix": "Changed to `c = ep->owner`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-30T09:33:08.918Z"
|
|
},
|
|
{
|
|
"id": "bug-1295",
|
|
"timestamp": "2026-06-30T13:19:42.706Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: jmax > 0",
|
|
"fix": "Added guard clause: if (jmax > 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-30T13:19:42.706Z"
|
|
},
|
|
{
|
|
"id": "bug-1296",
|
|
"timestamp": "2026-06-30T13:21:00.000Z",
|
|
"error_message": "10-round chaotic soak FAIL at round 7: all 3 nodes in RDHUP\u2192PreVote\u2192timeout\u2192repeat livelock \u2014 zero pre_vote_reply_in events (not denials, silence). ctrl-3 sent 20+ PreVote rounds with NO reply received; ctrl-1 and ctrl-2 same loop. Rounds 1-6 PASS clean (all elections + job-verification succeeded); round 7 kills ctrl-2 (term=9 primary), restarts ctrl-3 (no convergence wait \u2014 chaotic). 2 surviving nodes (ctrl-1, ctrl-3) both start PreVote; neither processes the other's request \u2192 mutual timeout \u2192 RDHUP fires again \u2192 repeat forever.",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "TASK 5.6 dueling-candidate PreVote cross-denial \u2014 DISTINCT from the earlier PreVote-WINS + real-election split-vote (which had both nodes winning PreVote then deadlocking in RequestVote). Here PreVote itself starves: each node's PreVote handler likely drops/ignores inbound PreVote requests while in its own PreVote round (no reply sent, not even denial). The task 5.6 RDHUP guard (commit 25e741d+) only prevents restarting failover while in CTRL_ELECTING \u2014 it does NOT fix the core problem where two nodes enter simultaneous PreVote rounds and each starves the other's reply. The priority stagger (bug-606) helps when 3 nodes are alive (one grants to break symmetry), but with only 2 survivors (the third restarting without convergence in chaotic mode), both deny each other and the stagger is insufficient.",
|
|
"fix": "FIXED 2026-06-30 (subsumed by tasks 5.6 commit 81cb09a + 5.7 commit 74784b2). The RDHUP->PreVote->timeout liveloc was the same fixed-watchdog resonance as bug covered by 5.7: per-campaign election watchdog re-randomized to [T,2T] (Ongaro 3.4) + don't-preempt-in-flight-election (5.6). CONFIRMED by a 10-round chaotic soak: 10/10 rounds elect a new primary in a single term increment (4->13), zero term escalation, round 7+ (the old liveloc point) all clean.",
|
|
"tags": [
|
|
"raft-ha-core-safety",
|
|
"election-liveness",
|
|
"prevote-cross-denial",
|
|
"dueling-candidates",
|
|
"task-5.6",
|
|
"chaotic-soak",
|
|
"round-7-stall"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1281",
|
|
"bug-1282",
|
|
"bug-1286",
|
|
"bug-1292"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-30T14:30:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1297",
|
|
"timestamp": "2026-06-30T13:28:01.170Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: jmax > 0",
|
|
"fix": "Added guard clause: if (jmax > 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-30T13:28:01.170Z"
|
|
},
|
|
{
|
|
"id": "bug-1298",
|
|
"timestamp": "2026-06-30T13:36:00-07:00",
|
|
"error_message": "AddressSanitizer: heap-use-after-free READ size 4 at endpoint_is_task_blocked netio.c:1008 (vtask dispatcher T3) \u2014 endpoint freed by endpoint_killer cluster.c:813 (io_worker T2); ctrl-3 ABORTs mid-chaotic-soak round 3\u21924, dropping the cluster to 1/3 (no quorum) so round 4 'NO new primary within window'",
|
|
"file": "src/lib/netio.c / src/lib/vtaskmgr.c / src/controller/cluster.c",
|
|
"root_cause": "Teardown-vs-dispatch race: io_worker (T2) tears down a connection on error \u2014 handle_endpoint_error \u2192 zarray_del \u2192 endpoint_killer free()s the endpoint_t \u2014 while the vtask dispatcher (T3) is concurrently scanning the dataq (dataq_deq_first_match \u2192 vtask_eligible \u2192 endpoint_is_task_blocked) and reads ep->busy on that just-freed endpoint. The endpoint is freed while still referenced by a pending vtask in the dataq; nothing drains/guards the ep's queued vtasks before the free, and no refcount keeps it alive across the dispatcher read. Same netio surface as bug-1282 (ABBA, ep->busy made lockless) and the bug-1197 dispatch_inflight precedent; the bug-1282 lockless read removed the (incidental) lock contention so the dispatcher reaches the read faster, exposing the latent UAF.",
|
|
"fix": "FIXED (commit 6e05dc1): added endpoint_t reference count (refcnt _Atomic + heap_alloc flag). endpoint_get starts refcnt=1 (owner); vtask_enq takes a per-vtask ref before publishing the task to the dispatcher, run_task/taskq_item_killer release it; every heap-ep teardown site drops its owner ref via endpoint_unref (last unref fini+frees). The dispatcher can now read ep->busy on a queued vtask without the io_worker freeing it underneath. Embedded eps (heap_alloc=0) never freed by unref. Validated: 182 unit tests/0 fail; 6-round ASAN chaotic soak ZERO ASan reports, ctrl-3 survives round 4, all rounds elect.",
|
|
"tags": [
|
|
"netio",
|
|
"vtaskmgr",
|
|
"use-after-free",
|
|
"asan",
|
|
"endpoint-teardown",
|
|
"concurrency",
|
|
"raft-ha-core-safety",
|
|
"soak",
|
|
"quorum",
|
|
"bug-1282-family",
|
|
"FIXED"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1282",
|
|
"bug-1197",
|
|
"bug-1286"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-30T14:25:00-07:00"
|
|
},
|
|
{
|
|
"id": "bug-1299",
|
|
"timestamp": "2026-06-30T13:39:09.194Z",
|
|
"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-30T13:39:09.194Z"
|
|
},
|
|
{
|
|
"id": "bug-1304",
|
|
"timestamp": "2026-06-30T14:24:36.874Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/raft-ha-core-safety/research.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-30T14:24:36.874Z"
|
|
},
|
|
{
|
|
"id": "bug-1306",
|
|
"timestamp": "2026-06-30T14:31:00-07:00",
|
|
"error_message": "6-round chaotic-failover soak FAIL: committed_job_loss=4 committed_divergence=7 (rounds 4-6). Committed job 0-0-1782829181-1 permanently absent on reachable primary from round 4 on, across 3 elected primaries; rounds 1-3 clean.",
|
|
"file": "src/lib/hook.c (xce_run_hooks); job.c:603 gate is correct",
|
|
"root_cause": "SHARPENED 2026-06-30 (waldump+log bisect of the 10-round soak): NOT the catch-up prefix-gap/entity-snapshot mechanism. xce_run_hooks (src/lib/hook.c:134-157) returns only the LAST-registered hook's rc (rc overwritten each loop iter; break is BEFORE_EVENT-only). The durable-majority gate works: a term-9 leader's job at LSN 30 timed out commit (peers mid-restart, repl_wait_majority_ack -> commit_submit -> -ETIMEDOUT), persist_job_hook_fun returned -ETIMEDOUT, but a later-registered JOB AFTER_EVENT hook (sched/apiserver) returned 0 and CLOBBERED it -> handle_jobsubmit saw hook_rc==0 -> replied 'jobsubmit ok' for an uncommitted entry -> term-10 leader legally overwrote LSN 30 (term-10 NOOP) -> committed-job-loss. Violates the Commit Durability invariant (reply-success => majority-durable). Evidence: all 3 WALs gapless/CRC-intact/full payloads; lost job only on ctrl-1@LSN30 term9 vs term10 NOOP on majority; ctrl-1 log has the WAIT-deadline-expired WARNs and NO 'rejecting job' line.",
|
|
"fix": "FIXED 2026-06-30 (raft-apply-decoupling item #1 down payment). Extracted the WAL append + majority-commit barrier out of persist_job_hook_fun's WAIT branch into an explicit persist_submit_wal_and_commit(p, jlist); handle_jobsubmit now calls it directly and reads the commit rc DIRECTLY (rejects on <0 before notifying), so the -ETIMEDOUT can no longer be clobbered by a later notify hook's 0 in xce_run_hooks. The JOB_NEW AFTER hook is now notification-only. PROVEN: 10-round chaotic soak committed_job_loss 5 -> 0 (same election code, A/B isolates the durability fix). Unit: +test_job_hook_new_is_notify_only; persist_hooks 19/0, e2e_hooks 3/0, commit_barrier_reply 22/0, commit_durability 38/0. Remaining soak FAIL is committed_divergence (transient catch-up lag, present=2) + a separate round-4 election escalation tail (5.7 class) \u2014 neither is job loss.",
|
|
"tags": [
|
|
"ha-commit-durability",
|
|
"pre-existing",
|
|
"not-a-regression",
|
|
"soak",
|
|
"task-5.9",
|
|
"committed-job-loss",
|
|
"commit-durability",
|
|
"term-boundary-divergence",
|
|
"catch-up-gap",
|
|
"failover",
|
|
"hook-rc-clobber",
|
|
"ack-before-majority",
|
|
"data-loss"
|
|
],
|
|
"related_bugs": [
|
|
"bug-795",
|
|
"bug-828",
|
|
"bug-851",
|
|
"bug-1298"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-30T17:40:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1307",
|
|
"timestamp": "2026-06-30T15:05:00.000Z",
|
|
"error_message": "Task 5.7 election-resonance jitter (74784b2) introduced data-safety REGRESSION: 6-round chaotic soak shows 7 committed divergences (LSNs 8,12,16,19) + 4 committed job losses (job 0-0-1782831451-1). Previous run (pre-5.7, commit 81cb09a) had ZERO divergences and ZERO job losses through 6 rounds. LSN 19 divergence is present=3 (ALL 3 members have different content at same LSN \u2014 silent divergence, textbook bug-851). Election liveness improved (all 6 rounds complete vs stalled at round 7), but the jitter defeats the election-safety balance: faster-starting node wins before catching up on committed prefix \u2192 Leader Completeness violation.",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Task 5.7 jittered watchdog ([T,2T] randomized) lets a less-complete node start and win an election before catching up on the full committed prefix from the dead primary. With the original fixed watchdog, both survivors fired RDHUP simultaneously \u2192 cross-denied \u2192 the library's priority stagger resolved the tie safely (the fresher node won after deterministic desynchronization). With jitter, one node can fire much earlier (near T) and the other much later (near 2T) \u2192 the early node campaigns with an incomplete log \u2192 voters grant based on stale view \u2192 winner truncates committed entries it never held. The 5.3 in_catch_up release (which drops the vote-deny when the primary is dead) opens a window where a still-catching-up candidate can win \u2014 with the new jitter timings this window is hit frequently.",
|
|
"fix": "CONFIRMED FIXED via live re-soak (2026-07-03): ran the exact reproducing scenario \u2014 6-round chaotic soak (overlapping kill-the-primary, real ext4 at ~/tmp, ASAN controller binary) \u2014 that originally showed 7 committed divergences + 4 job losses. This run: 21 jobs submitted, 0 committed_divergence, 0 committed_job_loss, PASS across all 6 rounds (terms 3->9, all 3 nodes rotated through primary). Matches the earlier circumstantial evidence (raft-ha-core-safety Phase 5 fully complete + prior soak-clean sessions) with a fresh, direct confirmation run \u2014 no residual doubt.",
|
|
"tags": [
|
|
"data-safety-regression",
|
|
"task-5.7",
|
|
"chaotic-soak",
|
|
"leader-completeness-violation",
|
|
"confirmed-via-soak",
|
|
"committed-job-loss",
|
|
"election-liveness",
|
|
"bug-1296-followup",
|
|
"committed-divergence",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1296",
|
|
"bug-1281",
|
|
"bug-1282",
|
|
"bug-1286",
|
|
"bug-851"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-03T03:15:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1308",
|
|
"timestamp": "2026-06-30T21:22:32.991Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-ha-core-safety/tasks.md",
|
|
"root_cause": "Had `research.md`",
|
|
"fix": "Changed to 't-preempt-in-flight-election; reduced term churn)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-06-30T21:22:32.991Z"
|
|
},
|
|
{
|
|
"id": "bug-1310",
|
|
"timestamp": "2026-06-30T18:40:00Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "No early return/throw for edge case: p == NULL || jlist == NULL",
|
|
"fix": "Added guard clause: if (p == NULL || jlist == NULL)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c",
|
|
"election-liveness",
|
|
"rdhup",
|
|
"term-escalation",
|
|
"debounce",
|
|
"5.10b",
|
|
"raft"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1296",
|
|
"bug-1306"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-07-01T00:24:06.562Z"
|
|
},
|
|
{
|
|
"id": "bug-1312",
|
|
"timestamp": "2026-07-01T00:29:56.872Z",
|
|
"error_message": "Wrong reference: test_job_hook_start_writes_wal_entry should be test_job_hook_new_is_notify_only",
|
|
"file": "src/controller/testsuite/test_persist_hooks.c",
|
|
"root_cause": "Used \"test_job_hook_start_writes_wal_entry\" instead of \"test_job_hook_new_is_notify_only\"",
|
|
"fix": "Changed test_job_hook_start_writes_wal_entry \u2192 test_job_hook_new_is_notify_only",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-01T00:29:56.872Z"
|
|
},
|
|
{
|
|
"id": "bug-1313",
|
|
"timestamp": "2026-07-01T00:42:13.591Z",
|
|
"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-07-01T00:42:13.591Z"
|
|
},
|
|
{
|
|
"id": "bug-1315",
|
|
"timestamp": "2026-07-01T01:26:38.341Z",
|
|
"error_message": "Wrong reference: unistd should be time",
|
|
"file": "src/controller/testsuite/test_ha_rdhup_integration.c",
|
|
"root_cause": "Used \"unistd\" instead of \"time\"",
|
|
"fix": "Changed unistd \u2192 time",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-01T01:26:38.341Z"
|
|
},
|
|
{
|
|
"id": "bug-1319",
|
|
"timestamp": "2026-07-01T04:04:13.051Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-entity-snapshots/design.md",
|
|
"root_cause": "Had \"collect+encode jobs\\n(RTTI_LOCK_READ on jobmgr)\"",
|
|
"fix": "Changed to \"collect+encode jobs\\n(table READ lock + per-job R",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-07-01T04:04:56.893Z"
|
|
},
|
|
{
|
|
"id": "bug-1320",
|
|
"timestamp": "2026-07-01T04:47:19.662Z",
|
|
"error_message": "Wrong reference: test_ha_partition should be test_persist_snapshot_entities",
|
|
"file": "src/controller/testsuite/controller_test.c",
|
|
"root_cause": "Used \"test_ha_partition\" instead of \"test_persist_snapshot_entities\"",
|
|
"fix": "Changed test_ha_partition \u2192 test_persist_snapshot_entities",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-01T04:47:19.662Z"
|
|
},
|
|
{
|
|
"id": "bug-1326",
|
|
"timestamp": "2026-07-01T06:17:52.049Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/testsuite/test_persist_snapshot_entities.c",
|
|
"root_cause": "No early return/throw for edge case: fd < 0",
|
|
"fix": "Added guard clause: if (fd < 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-01T06:17:52.049Z"
|
|
},
|
|
{
|
|
"id": "bug-1327",
|
|
"timestamp": "2026-07-01T06:18:39.877Z",
|
|
"error_message": "Wrong reference: pthread should be fcntl",
|
|
"file": "src/controller/testsuite/test_persist_snapshot_entities.c",
|
|
"root_cause": "Used \"pthread\" instead of \"fcntl\"",
|
|
"fix": "Changed pthread \u2192 fcntl",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-01T06:18:39.877Z"
|
|
},
|
|
{
|
|
"id": "bug-1328",
|
|
"timestamp": "2026-07-01T06:33:25.117Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/testsuite/test_persist_snapshot_entities.c",
|
|
"root_cause": "No early return/throw for edge case: fd < 0",
|
|
"fix": "Added guard clause: if (fd < 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-01T06:33:25.117Z"
|
|
},
|
|
{
|
|
"id": "bug-1330",
|
|
"timestamp": "2026-07-01T07:24:22.541Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/testsuite/test_ha_liveness.c",
|
|
"root_cause": "No early return/throw for edge case: cleared == 0",
|
|
"fix": "Added guard clause: if (cleared == 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-01T07:24:22.541Z"
|
|
},
|
|
{
|
|
"id": "bug-1331",
|
|
"timestamp": "2026-07-01T07:46:42.046Z",
|
|
"error_message": "Wrong return value",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "Was returning: load_snapshot(p, path, lsn);",
|
|
"fix": "Now returns: rc;",
|
|
"tags": [
|
|
"auto-detected",
|
|
"return-value",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-01T07:46:42.046Z"
|
|
},
|
|
{
|
|
"id": "bug-1340",
|
|
"timestamp": "2026-07-01T09:55:17.967Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "No early return/throw for edge case: !p || checkpoint_lsn == 0",
|
|
"fix": "Added guard clause: if (!p || checkpoint_lsn == 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-01T09:55:17.967Z"
|
|
},
|
|
{
|
|
"id": "bug-1343",
|
|
"timestamp": "2026-07-01T13:27:42.519Z",
|
|
"error_message": "Missing error handling in every",
|
|
"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 6.1 integration: leader->standby replication carries; * payload) faithfully end-to-end across BOTH live in-term re",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-07-01T13:27:51.887Z"
|
|
},
|
|
{
|
|
"id": "bug-1348",
|
|
"timestamp": "2026-07-01T14:10:48.987Z",
|
|
"error_message": "Wrong reference: test_pre_vote_catch_up_denies should be test_pre_vote_catch_up_grants_when_primary_unreachable",
|
|
"file": "src/controller/testsuite/test_ha_vote_gate.c",
|
|
"root_cause": "Used \"test_pre_vote_catch_up_denies\" instead of \"test_pre_vote_catch_up_grants_when_primary_unreachable\"",
|
|
"fix": "Changed test_pre_vote_catch_up_denies \u2192 test_pre_vote_catch_up_grants_when_primary_unreachable",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-01T14:10:48.987Z"
|
|
},
|
|
{
|
|
"id": "bug-1349",
|
|
"timestamp": "2026-07-01T14:24:21.310Z",
|
|
"error_message": "Wrong condition in logic",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Condition was: if (atomic_load_explicit(&ha->in_catch_up, memory_orde)",
|
|
"fix": "Changed to: if (0 && atomic_load_explicit(&ha->in_catch_up, memory)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"logic-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-01T14:24:21.310Z"
|
|
},
|
|
{
|
|
"id": "bug-1355",
|
|
"timestamp": "2026-07-02T03:03:21.985Z",
|
|
"error_message": "Wrong reference: myconf_t should be uint32_t",
|
|
"file": "src/include/myconf.h",
|
|
"root_cause": "Used \"myconf_t\" instead of \"uint32_t\"",
|
|
"fix": "Changed myconf_t \u2192 uint32_t",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-02T03:03:21.985Z"
|
|
},
|
|
{
|
|
"id": "bug-1357",
|
|
"timestamp": "2026-07-02T03:03:51.842Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/main.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-02T03:03:51.842Z"
|
|
},
|
|
{
|
|
"id": "bug-1362",
|
|
"timestamp": "2026-07-02T03:50:14.650Z",
|
|
"error_message": "Wrong reference: persist_config_t should be uint32_t",
|
|
"file": "src/include/persist.h",
|
|
"root_cause": "Used \"persist_config_t\" instead of \"uint32_t\"",
|
|
"fix": "Changed persist_config_t \u2192 uint32_t",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-02T03:50:14.650Z"
|
|
},
|
|
{
|
|
"id": "bug-1363",
|
|
"timestamp": "2026-07-02T03:50:42.583Z",
|
|
"error_message": "Wrong reference: WAL_SEGMENT_SIZE_BYTES should be p",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "Used \"WAL_SEGMENT_SIZE_BYTES\" instead of \"p\"",
|
|
"fix": "Changed WAL_SEGMENT_SIZE_BYTES \u2192 p",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-07-02T03:50:52.480Z"
|
|
},
|
|
{
|
|
"id": "bug-1364",
|
|
"timestamp": "2026-07-02T03:52:09.933Z",
|
|
"error_message": "Wrong reference: myconf_t should be uint32_t",
|
|
"file": "src/include/myconf.h",
|
|
"root_cause": "Used \"myconf_t\" instead of \"uint32_t\"",
|
|
"fix": "Changed myconf_t \u2192 uint32_t",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"h"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-02T03:52:09.933Z"
|
|
},
|
|
{
|
|
"id": "bug-1369",
|
|
"timestamp": "2026-07-02T03:57:52.302Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".claude/skills/xce-test-ha/run-ha-soak.sh",
|
|
"root_cause": "Had \"MODE=force-snapshot \u2014 forcing one full-checkpoint",
|
|
"fix": "Changed to \"MODE=force-snapshot \u2014 forcing one full-checkpoint",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"sh"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-02T03:57:52.302Z"
|
|
},
|
|
{
|
|
"id": "bug-1370",
|
|
"timestamp": "2026-07-02T04:10:10.430Z",
|
|
"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-07-02T04:10:10.430Z"
|
|
},
|
|
{
|
|
"id": "bug-1372",
|
|
"timestamp": "2026-07-02T04:39:29.527Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/testsuite/test_config_repl.c",
|
|
"root_cause": "No early return/throw for edge case: fd < 0",
|
|
"fix": "Added guard clause: if (fd < 0)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-02T04:39:29.527Z"
|
|
},
|
|
{
|
|
"id": "bug-1376",
|
|
"timestamp": "2026-07-02T05:10:00.000Z",
|
|
"error_message": "raft-drive-async: cluster hangs silently (no crash, no ASAN report) during a --force-snapshot soak with g_drive_async_snapshot_offload + g_drive_async_peerctrl_dispatch_enabled both ON: a freshly-wiped empty node cold-starts, self-elects, then goes silent after 'peer_ctrl_dispatch_to_pool: vtask pool not wired -- running inline' is immediately followed by cluster_init_phase2 wiring the pool while raft_cb_become_follower's deferred-teardown vtasks (bug-1197's mechanism) are being enqueued -- the process never logs another line and is eventually killed by the test harness timeout.",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "peer_ctrl_msg_handler (ha.c) held ep->dispatch_inflight incremented across the ENTIRE peer_ctrl_dispatch_to_pool call, including its inline fallback (the common cold-start shape when ha->pool is not yet wired). That inline body can reach raft_cb_become_follower, which -- now that cluster_init_phase2 ran synchronously earlier in the SAME call chain and wired the pool -- tears down its own loser vote-ep (the very ep whose reply triggered this call) via the deferred path (vote_ep_teardown_async), whose endpoint_mark_tearing_down spins waiting for dispatch_inflight==0 on that SAME ep. That count is held only by this exact call, on this exact thread, and cannot reach 0 until the spin itself returns -- a permanent self-deadlock. Confirmed live via a gdb thread backtrace (GDB_WRAP debug seam added to run-ha-soak.sh, launching the target node directly under `gdb --batch` so it becomes ptrace-legal as gdb's own direct child, then SIGINT to gdb once the log went stale for a bounded interrupt + full backtrace): frame `peer_ctrl_dispatch_to_pool` showed pool=0x0 at dispatch time; the same ep pointer appeared in the nested vote_ep_teardown_async -> endpoint_mark_tearing_down frame, spinning on sched_yield().",
|
|
"fix": "Moved the ep->dispatch_inflight release into peer_ctrl_dispatch_to_pool itself, at the exact right point per exit path: released BEFORE calling the inline body on every fallback path (pool==NULL, OOM, enqueue failure) -- safe because io_worker is single-threaded and the inline path never enqueues anything, so there is no pool-worker race left to protect against once inline execution is committed to -- and only AFTER the (non-blocking) enqueue completes on the success path, preserving the original protection for the genuinely concurrent pool-worker case. New unit test test_vep_self_teardown_does_not_deadlock (test_ha_vep_teardown.c) uses a bounded-timeout pthread_timedjoin_np so a regression fails loud instead of hanging the suite; RED confirmed via a temporary manual revert (Expected 0 Was 110 == ETIMEDOUT) before restoring the fix. Live-verified with both g_drive_async_snapshot_offload and g_drive_async_peerctrl_dispatch_enabled flipped ON: --force-snapshot soak (the exact repro shape) completes without hanging across repeated runs, confirmed real snapshot installs, committed_divergence=0, committed_job_loss=0; a 6-round --chaotic soak with both flags ON also passed clean; full controller suite green throughout. Both flags now default ON in production (raft-drive-async tasks 3.1/3.2 closed).",
|
|
"tags": [
|
|
"raft-drive-async",
|
|
"cold-start",
|
|
"vtask-pool",
|
|
"self-deadlock",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1197",
|
|
"bug-1298",
|
|
"bug-1310"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-02T00:20:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1380",
|
|
"timestamp": "2026-07-02T07:16:35.420Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-drive-async/tasks.md",
|
|
"root_cause": "Had `, differential-verified: this specific soak scena",
|
|
"fix": "Changed to `, differential-verified). (4) Re-ran `",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-07-02T07:17:36.171Z"
|
|
},
|
|
{
|
|
"id": "bug-1381",
|
|
"timestamp": "2026-07-02T00:35:00.000Z",
|
|
"error_message": "raft-drive-async task 3.3 (config-push slow-lane offload) blocked: push_config_transport_only has a pre-existing endpoint-lifetime race, independent of the g_drive_async_configpush_offload flag -- it grabs raw endpoint_t* pointers for every registered standby under c->ha.lock, releases the lock, then spawns one pthread per standby (push_thread) that reads/writes those endpoints unprotected for up to CONF_PUSH_TIMEOUT_MS. If a standby RDHUP-disconnects during that window, the io_worker's teardown path (endpoint_killer -> endpoint_unref, the bug-1298 refcount system) can free the endpoint while a push_thread is still using it -- a UAF. This is NOT specific to the lane offload: the transport fan-out spawns its own independent OS threads regardless of which caller (inline drive-thread or lane worker) invokes it, so the documented 'runs inline on io_worker so teardown and push are serialized on one thread' rationale for keeping the flag OFF does not actually hold -- the race exists in the inline path today too.",
|
|
"file": "src/controller/config_repl.c",
|
|
"root_cause": "push_config_transport_only (config_repl.c ~line 1366) takes c->ha.lock only long enough to copy standby ep pointers into a push_ctx_t array, then releases the lock before pthread_create-ing one push_thread per standby. Those threads read/write the raw endpoint_t* for the full duration of the send + wait_all_with_timeout(CONF_PUSH_TIMEOUT_MS), with no ref taken on the endpoints and no coordination with concurrent teardown (handle_endpoint_error -> zarray_del -> endpoint_killer -> endpoint_unref). Unlike the snapshot-lane fix (bug-1197/bug-1376 session), no endpoint_ref/endpoint_unref bracket protects this fan-out.",
|
|
"fix": "FIXED. push_config_transport_only (config_repl.c) now takes endpoint_ref() on each standby ep while the pointer is snapshotted under c->ha.lock, mirroring the snapshot-lane fix (bug-1197/bug-1376). Every ref has exactly one matching endpoint_unref(): from push_thread after it finishes using ctx->ep (new close in push_thread itself), or from push_config_transport_only inline if pthread_create fails for that standby, or from a cleanup loop if the threads[] allocation fails entirely. A concurrent RDHUP teardown (endpoint_killer -> endpoint_unref) can now only drop the OWNER reference while a push is in flight -- it can no longer free ep out from under push_thread. New regression test test_configpush_transport_holds_endpoint_ref_across_send (test_config_repl.c) uses a new push_thread_send_hook test seam (same pattern as xce_wal_stream_request_hook) to park a push_thread mid-send, simulate the owner teardown, and assert ep survives with refcnt intact. RED->GREEN verified via temporary revert (Expected 2 Was 1 with the ref-take removed); full controller suite green (230/230) after restore.",
|
|
"tags": [
|
|
"raft-drive-async",
|
|
"configpush",
|
|
"endpoint-lifetime",
|
|
"uaf-suspect",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1197",
|
|
"bug-1298",
|
|
"bug-1376"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-02T00:35:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1382",
|
|
"timestamp": "2026-07-02T07:23:50.910Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-drive-async/tasks.md",
|
|
"root_cause": "Had `snapshot_lane_fn`",
|
|
"fix": "Changed to `configpush_offload`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-07-02T07:24:12.475Z"
|
|
},
|
|
{
|
|
"id": "bug-1383",
|
|
"timestamp": "2026-07-02T07:31:28.737Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/testsuite/test_config_repl.c",
|
|
"root_cause": "No early return/throw for edge case: waited >= timeout_ms",
|
|
"fix": "Added guard clause: if (waited >= timeout_ms)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-02T07:31:28.737Z"
|
|
},
|
|
{
|
|
"id": "bug-1384",
|
|
"timestamp": "2026-07-02T07:37:33.427Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-drive-async/tasks.md",
|
|
"root_cause": "Had ` (test_ha_liveness.c). Blocked on **bug-1381** (o",
|
|
"fix": "Changed to ` (test_ha_liveness.c). **bug-1381 CLOSED 2026-07-",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-07-02T07:37:48.507Z"
|
|
},
|
|
{
|
|
"id": "bug-1386",
|
|
"timestamp": "2026-07-02T08:15:00.000Z",
|
|
"error_message": "/xce-test-ha --force-snapshot round: after a wiped ctrl-2 rejoins empty and the primary sends a full-checkpoint snapshot, ctrl-2 sometimes never logs a completed install (\"HA: snapshot loaded/legacy\" line absent) though the cluster still reconverges to 3-of-3 -- OR the cluster fails to reconverge to 3-of-3 at all. Reproduced with g_drive_async_configpush_offload BOTH ON (0/3 pass) and OFF (1/2 pass) on the same freshly-built xce.build binary, so it is independent of that flag -- discovered while validating the bug-1381 configpush flip.",
|
|
"file": "src/controller/config_repl.c",
|
|
"root_cause": "ha_send_snapshot_to_standby (config_repl.c, ~line 2596) loops over up to 12 65536-byte chunks calling xce_snapshot_chunk_req_raw(ep, &chunk, buf, chunk_len) WITHOUT checking or propagating its return value. xce_snapshot_chunk_req_raw -> endpoint_enq can return -ECONNRESET (e.g. if the standby endpoint is mid-teardown or reconnecting during the empty-rejoin window) but the loop keeps incrementing offset/chunk_index regardless, and the function still logs \"transfer complete\" and returns rc=0 at the end. Confirmed via ctrl-2 log evidence: primary logs start+complete for a 735546-byte (12-chunk) snapshot within ~2ms, but ctrl-2 only ever receives a handful of leading chunks (2 in one run, 5 in another) before the stream silently stops -- no ERROR on either side.",
|
|
"fix": "FIXED 2026-07-02 (config_repl.c): ha_send_snapshot_to_standby's chunk loop now captures the return value of xce_snapshot_chunk_req_raw (production path) and xce_snapshot_chunk_hook (XCE_TESTING path) into send_rc, breaks the loop on send_rc != 0, and propagates it as the function's rc instead of silently continuing. The 'transfer complete' INFO log is now strictly gated on rc==0; a failure path now logs a WARN with checkpoint_lsn/total_size/sent-offset/chunk_index/rc for observability. No receive-side timeout/re-request mechanism was added (out of scope, no existing seam) \u2014 the existing per-peer snapshot_inflight[] flag already clears unconditionally on send-thread exit (snapshot_lane_fn, ha.c) and the next heartbeat's SEND_SNAPSHOT decision naturally re-triggers a fresh transfer to a peer whose applied_lsn never advanced, so the existing retry cadence recovers once the endpoint is healthy again. New RED->GREEN unit test test_snapshot_transfer_stops_and_propagates_send_failure (test_config_repl.c) injects a mid-loop -ECONNRESET via the existing xce_snapshot_chunk_hook seam (new snaptest_fail_after_hook) and asserts rc == -ECONNRESET and exactly 2 chunks attempted (not the false-'complete' 3). RED confirmed via temporary revert ('Expected -104 Was 0'); GREEN restored, full controller_unit_test suite clean (0 failures across all groups).",
|
|
"tags": [
|
|
"raft-drive-async",
|
|
"snapshot-transfer",
|
|
"silent-failure",
|
|
"force-snapshot-soak",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1197",
|
|
"bug-1376",
|
|
"bug-1381"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-02T09:30:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1388",
|
|
"timestamp": "2026-07-02T08:19:04.015Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/testsuite/test_config_repl.c",
|
|
"root_cause": "No early return/throw for edge case: g_snaptest_chunk_count >= 16",
|
|
"fix": "Added guard clause: if (g_snaptest_chunk_count >= 16)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-02T08:19:04.015Z"
|
|
},
|
|
{
|
|
"id": "bug-1389",
|
|
"timestamp": "2026-07-02T09:05:00.000Z",
|
|
"error_message": "/xce-test-ha --force-snapshot: after bug-1386's fix (sender now correctly reports success only on true completion), the force-snapshot soak still FAILs. ctrl-2's log shows all 12 chunks of a 735546-byte snapshot received, then `ha_handle_snapshot_chunk: persist_load_snapshot failed rc=-5` / `handle_snapshot_transfer: chunk 11 rc=-5` (rc=-5=-EIO). ctrl-1 (sender) correctly logs 'transfer complete' both times \u2014 the send genuinely succeeded, full byte count. This is NOT bug-1386 (that was a chunk DROP producing a truncated/short transfer). Byte-comparing the primary's source checkpoint file against the exact bytes ctrl-2 assembled into snap.part -> snap-{lsn}.bin (same run, two separate checkpoint LSNs 0x75 and 0x76, both reproduced) shows: identical total size (735546==735546) but DIFFERENT CONTENT \u2014 the received file diverges from the sender's file starting exactly at a SNAPSHOT_CHUNK_SIZE (65536-byte) chunk boundary, then the content is a byte-SHIFTED copy of the correct data (same repeating job-frame strings, same occurrence count, just offset) that re-synchronizes with the source at a later offset. The shift direction/magnitude differs between the two independent attempts (-912 bytes resyncing at 262144 vs +4684 bytes resyncing at ~458752) \u2014 nondeterministic, not a fixed structural bug.",
|
|
"file": "src/lib/request.c (suspected: xce_snapshot_chunk_encode_raw capnp Data encode) or src/controller/ha.c (ha_handle_snapshot_chunk per-chunk append)",
|
|
"root_cause": "NOT YET PINNED to an exact line \u2014 root cause is a chunk-CONTENT-corruption bug in the OPCode_snapshotTransfer chunk pipeline, most likely in the capnp raw-Data encode/decode path for the 64KB `payload :Data` field (xce_snapshot_chunk_encode_raw, request.c:630-671, uses the same capn_new_list8/capn_setv8 pattern as bug-847 \u2014 'WAL Catch-Up Streaming Silently Corrupts Payloads at capnp Segment Boundary' \u2014 a proven prior case of this exact capnp pattern corrupting raw-byte payloads at a segment boundary). Ruled out as NOT the cause: (1) receiver-side concurrent chunk processing \u2014 vtaskmgr's per-endpoint FIFO (endpoint_block_tasks/endpoint_unblock_tasks) guarantees chunk N+1 cannot dispatch until chunk N's ha_handle_snapshot_chunk (including its fopen/fwrite/fclose) fully returns; (2) sender buf-reuse race \u2014 xce_snapshot_chunk_encode_raw copies bytes into the capnp segment synchronously before ha_send_snapshot_to_standby's loop re-fread()s the shared buf; (3) fixed-size packet-pool truncation \u2014 alloc_packet (netio.c:416-432) mallocs fresh per packet, sized to capn_size(&c), no shared buffer to overflow into. persist_load_snapshot (persist.c:2440 -> load_snapshot at 2325 -> load_snapshot_entities at 2222) is NOT the bug \u2014 it correctly rejects the corrupted file via one of its length-sanity -EIO guards (most likely persist.c:2240-2241, the job-frame payload_len-vs-file_size guard); format_version/job_count field-order misparse was considered and ruled out (load_snapshot consumes and validates format_version at persist.c:2399-2413 before ever calling load_snapshot_entities).",
|
|
"fix": "FIXED 2026-07-02 (ha.c, ha.h). Root cause pinned via live crc32 instrumentation (TRACE logs at both ha_send_snapshot_to_standby's send point and ha_handle_snapshot_chunk's receive point, correlated by snapshot_lsn+chunk_index): every chunk's CONTENT crossed the wire byte-for-byte intact (crc32 matched exactly for all 12 chunks) \u2014 the corruption was never in capnp encode/decode/transport at all. The real bug: OPCode_snapshotTransfer chunks of one transfer are dispatched across the vtask pool and are NOT guaranteed to arrive/execute in chunk_index order (live soak log showed arrival order 0,1,3,4,2,5,6,7,8,9,10,11 across cpu#0-3 workers), but ha_handle_snapshot_chunk appended every chunk's bytes to snap.part in ARRIVAL order (fopen \"ab\"/fwrite) instead of at the chunk's own chunk_offset (a field already carried on the wire but never used for anything). Reordered chunks landed at the wrong file position: same total byte count, wrong content from the first reordered chunk's offset onward \u2014 exactly the observed 'byte-shifted, resyncing later, nondeterministic magnitude' signature. Fix: (1) write each chunk via pwrite(fd, payload, len, chunk->chunk_offset) instead of append \u2014 order-independent and safe for concurrent writers (positioned writes to disjoint byte ranges of the same fd don't race). (2) Track completion via a new ha_state_t.snapshot_recv_count/snapshot_recv_total pair (guarded by the existing ha->lock) instead of finalizing on 'this call happens to carry is_last' \u2014 under out-of-order arrival, is_last can be processed before an earlier chunk; finalize now fires only once every chunk 0..N-1 has actually been written, and snapshot_recv_total is claimed (reset to 0) by whichever thread crosses the completion threshold so a late straggler chunk can never double-finalize. chunk_index==0 still resets both the stale-file unlink and the new counters (Req 4.4 unchanged). New RED->GREEN unit test test_snapshot_recv_out_of_order_chunks_assemble_correctly (test_config_repl.c) replays the exact non-sequential delivery order and asserts byte-identical assembly; RED confirmed via temporary revert (Expected 0 Was -22, job_count field corrupted by the misordered chunk boundary); GREEN restored, full controller suite clean (0 failures). Also added 2 new deterministic full-size (65536-byte) capnp encode/decode round-trip tests (test_wal_wire.c) that definitively cleared the capnp/transport layer before the real cause was found \u2014 permanent regression coverage, the prior test only covered a 300-byte payload. New xce_test snapverify/snapdiff subcommands (built as part of this investigation) were instrumental in diagnosing this live. Live-validated: 3/3 --force-snapshot rounds PASS (genuine 'HA: snapshot loaded ... full job/queue entity restoration' installs confirmed, zero divergence/loss) + 6-round --chaotic PASS.",
|
|
"tags": [
|
|
"raft-drive-async",
|
|
"snapshot-transfer",
|
|
"data-corruption",
|
|
"capnp",
|
|
"force-snapshot-soak",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1386",
|
|
"bug-847",
|
|
"bug-1197"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-07-02T12:10:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1393",
|
|
"timestamp": "2026-07-02T12:05:51.415Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-drive-async/tasks.md",
|
|
"root_cause": "Had `~/tmp/xce-ha-deploy/controller/ctrl-{1,2}/data/sn",
|
|
"fix": "Changed to `ha_send_snapshot_to_standby`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-02T12:05:51.415Z"
|
|
},
|
|
{
|
|
"id": "bug-1395",
|
|
"timestamp": "2026-07-02T13:25:19.081Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/raft-drive-async/tasks.md",
|
|
"root_cause": "Had `[~]`",
|
|
"fix": "Changed to `[x]`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-07-02T13:25:28.568Z"
|
|
},
|
|
{
|
|
"id": "bug-1396",
|
|
"timestamp": "2026-07-02T14:00:00.000Z",
|
|
"error_message": "ha-commit-durability task 6.1 (cold-restart-all real-fs reproduction, src/tools/test-commit-durability.sh on a genuine ext4 deploy dir, ~/tmp not overlay): run 5 of 5 reported `expect-jobs: expected 19, actual 20` after a full cold-stop-all + cold-start-all cycle \u2014 the cluster had ONE MORE committed job than the harness's own ACKED_FILE (deduplicated via `sort -u`) tracked. All 19 tracked job IDs individually verified present (`expect-job` loop all `ok`); the 20th job's identity was not captured (cluster had already been torn down by the script's EXIT trap by the time this was investigated). This is the OPPOSITE of bug-661/795's symptom (loss) \u2014 an unexplained EXTRA job, not a missing one. 4 of the other 5 runs (and every prior round within run 5 itself, rounds 1-8) showed correct exact-count durability with zero anomalies.",
|
|
"file": "src/tools/test-commit-durability.sh (harness) or controller job-recovery path (unconfirmed which)",
|
|
"root_cause": "NOT INVESTIGATED \u2014 deprioritized because it doesn't match the loss scenario task 6.1 was probing for, and reproducing it requires re-running with a 'joblist' capture at the exact expect-jobs failure point (the script doesn't dump the full list on a count mismatch, only the count). Two live hypotheses, unconfirmed: (a) harness-side race \u2014 ACKED_FILE's write (submit_n) and run_cold_restart_recovery's read (`committed=$(sort -u ACKED_FILE | grep -c .)`) are not synchronized against a submission whose ack arrives asynchronously after the harness moves on, so a genuinely-committed job simply never got recorded in ACKED_FILE \u2014 a test-harness bookkeeping gap, not a controller bug; (b) a genuine job-duplication bug on the controller's recovery/replay path creating an extra job entry with a fresh ID. Also observed in this run's ctrl-1.log: repeated unrelated `handle_jobsubmit fail to lock job 63-15--1-1015808[32751]` errors and one `job not durable (rc=-110) \u2014 rejecting submission` for a DIFFERENTLY-FORMATTED job ID (not this harness's `0-0-<timestamp>-0` convention) \u2014 almost certainly a stray unrelated process hitting the same cluster ports in the shared sandbox, not this test's own traffic, but flagged here in case it's connected.",
|
|
"fix": "STILL NOT ROOT-CAUSED for the original exact symptom (successful query, count=20 vs expected=19) \u2014 2 fresh repro attempts (2026-07-09, 3 rounds each, real ext4 fs under ~/tmp) did not reproduce an extra job; both runs showed the tracked count exactly matched after the fix below. HOWEVER, both attempts DID hit a DIFFERENT, related bug in the exact same assert_job_count() check: right after the cold-restart-all election, the aggregate expect-jobs/joblist query itself FAILED outright with 'xce_joblist: Unknown error 10014' / 'could not determine job count' (a query FAILURE, not a wrong-but-successful count) \u2014 this is the identical client-side race as bug-1422 (libxce's failover retry loop, client_failover.c, can exhaust its 20-attempt budget in a rapid post-election retry storm and surface a stale E_XCE_STANDBY). Confirmed as a false alarm both times: the very next per-id assert_no_loss check (individual expect-job calls) found every job present. Fixed assert_job_count() with the same bounded-retry pattern used for bug-1422 (3 attempts, 2s settle) \u2014 re-run after the fix: 7 passed, 0 failed, clean. This closes the QUERY-FAILURE false-negative class in this check, and makes the harness reliable enough to actually catch the ORIGINAL extra-job symptom if it recurs (previously a query failure and a genuine extra-job count were indistinguishable at a glance; now the retry-exhausted case self-heals and no longer masks a real mismatch). The original 'extra job' phenomenon itself remains open/unconfirmed \u2014 needs a longer run (original was 1-of-5 full 8-round soaks) to have a realistic chance of firing again.",
|
|
"tags": [
|
|
"ha-commit-durability",
|
|
"low-priority",
|
|
"cold-restart-all",
|
|
"job-count-mismatch",
|
|
"harness-instrumented",
|
|
"unconfirmed",
|
|
"related-fix-applied"
|
|
],
|
|
"related_bugs": [
|
|
"bug-661",
|
|
"bug-1422"
|
|
],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-07-09T10:45:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1397",
|
|
"timestamp": "2026-07-02T13:57:56.610Z",
|
|
"error_message": "Function not marked async",
|
|
"file": ".kiro/specs/ha-commit-durability/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-07-02T13:57:56.610Z"
|
|
},
|
|
{
|
|
"id": "bug-1398",
|
|
"timestamp": "2026-07-02T13:58:18.885Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-commit-durability/tasks.md",
|
|
"root_cause": "Had `/kiro-validate-impl`",
|
|
"fix": "Changed to `src/tools/test-commit-durability.sh ~/tmp/xce-dur",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-02T13:58:18.885Z"
|
|
},
|
|
{
|
|
"id": "bug-1399",
|
|
"timestamp": "2026-07-02T14:03:20.814Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/controller/CLAUDE.md",
|
|
"root_cause": "Had `xce-test-e2e-primitives`",
|
|
"fix": "Changed to `ha-commit-durability`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-02T14:03:20.814Z"
|
|
},
|
|
{
|
|
"id": "bug-1400",
|
|
"timestamp": "2026-07-02T14:20:00.000Z",
|
|
"error_message": "xce_test cmd_jobsub SEGVs (ASAN) on `jobsub sleep 1` \u2014 positional args instead of required getopt flags (-u/-q/-c). getopt silently ignores unrecognized positional args, leaving submit.command/queue etc. NULL, and something downstream derefs a NULL field.",
|
|
"file": "src/controller/testsuite/test.c (cmd_jobsub, ~line 1748)",
|
|
"root_cause": "CONFIRMED STALE for the reported SEGV: git blame shows NULLSTR guards for submit.user/submit.queue/submit.start_info->cmdline were added 2025-11-05 (commit 41f56fa6), long before this bug was logged 2026-07-02 \u2014 'jobsub sleep 1' getopt-returns -1 immediately on the non-option 'sleep' token, then hits the -EINVAL guard at test.c:1838 before any NULL deref. No SEGV path exists in current code; the buglog entry was stale (fix landed under a different/untracked change, buglog never updated). A REAL, separate defect was found in the same function: submit.start_info (calloc'd test.c:1767) was never freed on any of the 4 early-return validation paths (getopt default case + the 3 NULLSTR checks) \u2014 a ~128-byte leak per malformed jobsub invocation.",
|
|
"fix": "SEGV claim: not applicable, already fixed pre-existing. Leak: refactored cmd_jobsub (test.c) to `goto cleanup` on all 4 early-return validation failures instead of a bare `return -EINVAL`, reusing the existing FREEUP(submit.user/queue/resreq/start_info->cmdline/exdata/start_info) block via a new `cleanup:` label \u2014 mirrors the `goto clean` idiom already used in queue_ctrl() (queue.c). Verified: controller ASAN build + full controller_unit_test suite green (0 failures) after the change.",
|
|
"tags": [
|
|
"stale-report",
|
|
"low-priority",
|
|
"test-client-only",
|
|
"input-validation",
|
|
"crash",
|
|
"cmd_jobsub",
|
|
"fixed",
|
|
"xce_test"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-02T16:00:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1401",
|
|
"timestamp": "2026-07-02T14:25:00.000Z",
|
|
"error_message": "ASAN LeakSanitizer: every ctrlstatus reply leaks memory in decode_CtrlStatus_ptr (lib/controller.capnp.c:11873) \u2014 observed during ha-heartbeat-committed-propagation task 4.1 live validation: 120 bytes/1 alloc after a single ctrlstatus call, 12360 bytes/103 allocs after ~a dozen calls (roughly proportional to call count).",
|
|
"file": "src/lib/controller.capnp.c (decode_CtrlStatus_ptr, generated codec) or its caller in request.c/xcecli",
|
|
"root_cause": "CONFIRMED via codegraph + generated codec trace: src/include/client.h:119 defined `xce_free_ctrlstatus(s)` as `free_CtrlStatus(s)` \u2014 the generated free_CtrlStatus() only frees the FIELDS INSIDE the xce_ctrlstatus_t (clusterName/primaryName/responderName/configChecksum/peers list), matching decode_CtrlStatus(). But the real client reply path (xce_handle_reply -> MOVE_PTR from the decoded RequestReply -> xce_ctrlstatus) populates the struct via decode_CtrlStatus_PTR(), which calloc's the xce_ctrlstatus_t itself (controller.capnp.c:11873) before calling decode_CtrlStatus() to fill it. Only free_CtrlStatus_ptr() (which calls free_CtrlStatus() THEN free()s the struct and nulls the caller's pointer) matches that allocation. free_RequestReply/free_Request/MOVE_PTR were all confirmed symmetric and correct \u2014 the bug was isolated to this one macro definition. Existing unit tests never caught it because they call free_CtrlStatus(&out) directly on a stack struct, never exercising the xce_free_ctrlstatus() macro used by real client code.",
|
|
"fix": "src/include/client.h:119 changed to `#define xce_free_ctrlstatus(s) free_CtrlStatus_ptr(&(s))`. Added regression test test_xce_free_ctrlstatus_frees_the_struct_itself (src/lib/testsuite/test_ctrlstatus.c), which decodes via decode_CtrlStatus_ptr (the real allocation path, not the stack-struct helper the other roundtrip tests use) and frees via the xce_free_ctrlstatus macro. RED confirmed: reverting the fix reproduces the exact reported leak signature (LeakSanitizer: 120 bytes in 1 object, decode_CtrlStatus_ptr calloc). GREEN after fix: 285 lib tests / 0 failures / 0 leaks. Controller ASAN build + controller_unit_test also green post-fix (client.h is shared).",
|
|
"tags": [
|
|
"asan",
|
|
"fixed",
|
|
"low-priority",
|
|
"controller-status",
|
|
"ctrlstatus",
|
|
"memory-leak"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-02T16:00:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1402",
|
|
"timestamp": "2026-07-02T14:21:35.080Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/controller-status/tasks.md",
|
|
"root_cause": "Had `/xce-deploy-ha`",
|
|
"fix": "Changed to `~/tmp`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-07-02T14:22:28.117Z"
|
|
},
|
|
{
|
|
"id": "bug-1405",
|
|
"timestamp": "2026-07-03T00:08:25.320Z",
|
|
"error_message": "Wrong reference: test_xcecli_ctrlstatus_null_ctx_typed_failure should be test_xce_free_ctrlstatus_frees_the_struct_itself",
|
|
"file": "src/lib/testsuite/test_ctrlstatus.c",
|
|
"root_cause": "Used \"test_xcecli_ctrlstatus_null_ctx_typed_failure\" instead of \"test_xce_free_ctrlstatus_frees_the_struct_itself\"",
|
|
"fix": "Changed test_xcecli_ctrlstatus_null_ctx_typed_failure \u2192 test_xce_free_ctrlstatus_frees_the_struct_itself",
|
|
"tags": [
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-03T00:08:25.320Z"
|
|
},
|
|
{
|
|
"id": "bug-1406",
|
|
"timestamp": "2026-07-03T08:00:00.000Z",
|
|
"error_message": "controller_unit_test SIGSEGV (full run, no --run filter): Thread 1 crashes in SSL_CTX_free() called from iomgr_fini() during test_ha_vep_teardown.c:271 (test_vep_teardown_runs_after_inflight), which runs at controller_test.c main() TEST(test_ha_vep_teardown). Kills the whole binary before any later-registered TEST() can run, so a bare `controller_unit_test` invocation with no --run filter never reaches a final summary and the exit code is 139 (SIGSEGV), not a Unity pass/fail count.",
|
|
"file": "src/controller/testsuite/test_ha_vep_teardown.c",
|
|
"root_cause": "ROOT-CAUSED 2026-07-09: iomgr_init() (src/lib/netio.c:1168-1184) only ever initialized iomgr_t's `lock` and `epoll_fd` fields -- it never set `ssl_ctx` (or `worker`). Every production caller embeds iomgr_t inside a calloc'd/static context struct (cluster_t.iomgr, xce_ctx_t.iomgr), which masked the gap. test_ha_vep_teardown.c stack-allocates `iomgr_t iomgr;` at 4 call sites (lines 235, 294, 349, 476) WITHOUT a memset -- unlike the sibling libxce tests (test_netio_arm_failure.c:52, test_request_send_propagation.c:34) which explicitly `memset(&iomgr, 0, sizeof(iomgr))` before iomgr_init, establishing the real (undocumented) contract. Left un-zeroed, `ssl_ctx` holds whatever garbage bit pattern occupies that stack slot -- non-deterministic across runs/process history (confirmed intermittent: some full-suite runs exit 0, others SIGSEGV, matching the reported non-strictly-deterministic behavior). iomgr_fini()'s `if (iomgr->ssl_ctx != NULL) SSL_CTX_free(...)` guard then passes on that garbage pointer, and SSL_CTX_free() dereferences a wild address -> SIGSEGV. Proven deterministically with a standalone repro (poisoned an iomgr_t with 0xAB, called the real iomgr_init()+iomgr_fini() from libxce.a) producing an identical backtrace (SSL_CTX_free <- iomgr_fini netio.c:1262 <- caller). gdb backtrace from the original report: SSL_CTX_free (libssl.so.3) <- iomgr_fini (netio.c:1262) <- test_vep_teardown_runs_after_inflight (test_ha_vep_teardown.c:271) <- UnityDefaultTestRun <- test_ha_vep_teardown (test_ha_vep_teardown.c:630) <- main (controller_test.c). Not a double-free/UAF and not a cross-test state leak -- iomgr_set_ssl_ctx() is never called anywhere in test_ha_vep_teardown.c, so no real SSL_CTX ownership is even in play; it is purely uninitialized-memory read.",
|
|
"fix": "FIXED 2026-07-09: src/lib/netio.c iomgr_init() now explicitly sets `iomgr->ssl_ctx = NULL;` and `iomgr->worker = 0;` before touching lock/epoll_fd, so iomgr_init() fully establishes iomgr_t's invariants itself instead of assuming the caller pre-zeroed the struct -- mirrors the same file's do_endpoint_init(), which already fully initializes every endpoint_t field rather than relying on calloc. Verified safe for all production callers (xcectx.c, myapp.c, cluster.c): every one calls iomgr_set_ssl_ctx() AFTER iomgr_init(), never before, so clearing ssl_ctx in iomgr_init cannot clobber a caller-supplied value. No test file was modified -- the library-level fix protects every current and future caller, including the 4 unguarded stack declarations in test_ha_vep_teardown.c. Verified: (1) standalone ASAN repro poisoning the stack before iomgr_init now shows ssl_ctx == NULL post-init and iomgr_fini() returns cleanly instead of crashing; (2) rebuilt controller_unit_test and ran the full suite (no --run filter) repeatedly under ASAN (detect_leaks=0) with zero SIGSEGVs across all runs -- one full run captured 265 Tests / 0 Failures / 0 Ignored, with all 6 tests in the test_ha_vep_teardown group (including test_vep_teardown_runs_after_inflight) passing their own assertions, not just failing to crash.",
|
|
"tags": [
|
|
"testsuite",
|
|
"controller",
|
|
"segv",
|
|
"ssl",
|
|
"iomgr",
|
|
"pre-existing",
|
|
"raft-apply-decoupling",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-07-09T12:45:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1407",
|
|
"timestamp": "2026-07-03T08:00:00.000Z",
|
|
"error_message": "controller_unit_test: test_commit_advance_retry_clears_push_before_commit_fence FAILS (\"Expected TRUE Was FALSE\") when running --run test_config_repl (RUN_TEST site: test_config_repl.c:4008). NOTE: Unity's own printed file:line prefix for this failure is misleading/stale (shows test_repl_unit.c:1543 or controller_test.c:1543 depending on which other suites ran earlier in the same process) -- Unity.TestFile is apparently not re-set per test_xxx(void) group in this harness, only Unity.CurrentTestLineNumber is accurate. The true source is test_config_repl.c.",
|
|
"file": "src/controller/testsuite/test_config_repl.c",
|
|
"root_cause": "DEFINITIVELY ROOT-CAUSED 2026-07-03: this was never a source-code bug. It was a stale/corrupted incremental-build artifact in the main worktree's shared `build/` directory, which had been incrementally `ninja -C build`-rebuilt across 5 sequential tasks (1.1-1.5) without ever a fresh `meson setup`. Proof (four independent measurements, isolated via separate `git worktree add` + fresh `meson setup` + `ninja`, never mutating the main worktree in place): (1) pre-feature commit 17b210c, fresh build: 0 failures, 3/3 runs. (2) commit 9b4b805 (task-1.4 HEAD, IDENTICAL source to the failing main-worktree binary), fresh build in a separate worktree: 0 failures, 3/3 runs. (3) main worktree's stale incrementally-rebuilt `build/`, same 9b4b805 commit: 100% failure, 8/8 runs across two investigation sessions. (4) main worktree after `rm -rf build && meson setup --buildtype=debug -Db_sanitize=address && ninja -C build` (full clean rebuild, same source, same commit): 0 failures, 3/3 runs. This conclusively isolates the failure to the incremental build state, not the code. This is a DIFFERENT gotcha from bug-924 (which is about the `meson test` driver hanging on overlayfs fdatasync) -- this one is `ninja -C build`'s incremental compilation silently producing a wrong/stale binary despite reporting success, likely a header-dependency tracking gap on this overlayfs-backed worktree. The prior 'CLOSED' (task 1.4, 70/70) and 'REOPENED' (task 1.5, 10/10 fail) statuses were BOTH real, contradictory, correct measurements of the SAME source code in DIFFERENT incremental-build states -- neither implementer did anything wrong; the build itself was non-deterministic relative to source content.",
|
|
"fix": "CLOSED 2026-07-03 (high confidence, this time backed by cross-checked fresh-build isolation, not just an in-place re-run). No source-code fix needed -- `test_commit_advance_retry_clears_push_before_commit_fence` has apparently been correct since at least commit 3ecb724 (pre-feature). ACTION ITEM for all future tasks in this series: do not trust `ninja -C build` incremental results alone when a test result looks surprising or contradicts a very recent prior measurement on the same commit -- rebuild with `rm -rf build && meson setup build --buildtype=debug -Db_sanitize=address && ninja -C build` (or isolate via a throwaway `git worktree add` + fresh setup) before concluding a regression exists. Added to `.wolf/cerebrum.md` Do-Not-Repeat.",
|
|
"tags": [
|
|
"testsuite",
|
|
"controller",
|
|
"commit-engine",
|
|
"build-environment",
|
|
"false-positive",
|
|
"raft-apply-decoupling",
|
|
"closed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-924"
|
|
],
|
|
"occurrences": 5,
|
|
"last_seen": "2026-07-03T13:00:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1408",
|
|
"timestamp": "2026-07-03T21:00:00.000Z",
|
|
"error_message": "raft-apply-decoupling task 3.1 round-1 handle_jobsubmit(): when an array job submission has >1 element and ONE element fails post-commit construction (create_job()/makeJob_() returns NULL, e.g. a jobid collision that slipped past jobid_range_exists() pre-check TOCTOU, or a plain calloc failure), the function returned the construction error IMMEDIATELY after the per-element construct loop, before ever building the AFTER_EVENT notify jlist or firing HOOK_DETAIL_JOB_NEW -- even for SIBLING array elements that constructed successfully and are already durably committed on a majority.",
|
|
"file": "src/controller/job.c",
|
|
"root_cause": "handle_jobsubmit()'s post-commit construction loop set construct_rc<0 on any failed create_job() call but used continue (not break) to keep constructing remaining siblings correctly -- however, immediately AFTER the loop, \"if (construct_rc < 0) { reply error; return; }\" fired BEFORE the jlist-build + xce_run_hooks(HOOK_AFTER_EVENT, HOOK_DETAIL_JOB_NEW) block, so a single failed element suppressed notification for every successfully constructed sibling in the same array submission. Both the scheduler and apiserver are purely event-driven off this hook with no periodic reconciliation, so the stranded siblings (real, durable, present in c->jobmgr) were invisible until the next controller restart replayed the WAL.",
|
|
"fix": "Moved the construct_rc<0 early-return in handle_jobsubmit() (src/controller/job.c) to AFTER the jlist-build + xce_run_hooks(HOOK_AFTER_EVENT, HOOK_DETAIL_JOB_NEW, ...) block instead of before it. The jlist-build loop already only finds jobs that key_find() locates in c->jobmgr, so a failed-to-construct element is naturally and silently absent from jlist with no extra bookkeeping -- the hook now fires unconditionally for every successfully constructed element regardless of a sibling's construct_rc, and the client-facing reply still reports the construct_rc error afterward. Added regression test test_jobsubmit_array_partial_construct_failure_notifies_survivors in src/controller/testsuite/test_commit_barrier_reply.c: drives handle_jobsubmit with a 2-element array on a worker pthread, ACKs element 0's WAL entry, then deterministically reproduces the TOCTOU outcome by inserting a stand-in job directly into c->jobmgr for element 1's jobid (via the existing cbrp_make_job helper) strictly after jobid_range_exists() has already run and strictly before the construction loop can run (element 1's commit is still pending on a withheld ACK) -- makeJob_()'s own key_find() then legitimately returns EEXIST for element 1. A new test hook capture (cbrp_jobnew_capture_fn, registered via xce_add_hook) records every jobid delivered through HOOK_AFTER_EVENT/HOOK_DETAIL_JOB_NEW so the test can assert element 0 was both constructed AND notified despite element 1 failing. RED-phase confirmed against the pre-fix code (job 9201 construction failed with errno=17/EEXIST as designed, and the notification assertion for job 9200 failed as predicted). CORRECTION (round-2 review): under the standard verification invocation (--run test_commit_barrier_reply, the full 25-test group), the failing TEST_ASSERT_TRUE_MESSAGE at test_commit_barrier_reply.c longjmps past this test's own inline cbrp_teardown() call (Unity TEST_ABORT semantics) -- the SAME longjmp-past-teardown pathology already documented for round 1's withheld-commit test, not a clean assertion FAIL. It leaks live persist/commit-engine background threads into the next test's setup, producing a deterministic HANG under the full-group command (reproduced 3/3 times, both threads blocked in futex_do_wait). A clean, fast FAIL was only observed when this test was isolated from the other 24 tests in the group -- that isolated form is what the original write-up described. GREEN after the fix (reordering removes the failure entirely, so this hang mode never triggers in the fixed code): both pre-existing single-element jobsubmit tests and the full 25-test test_commit_barrier_reply group plus the full controller_unit_test binary pass (0 failures) via the standard --run invocation. Hardened afterward: the test now captures its assertion-relevant booleans (cbrp_job_exists/cbrp_jobnew_notified) into locals and calls cbrp_teardown() unconditionally before asserting on the captured locals, so a future regression in this exact test can no longer skip cleanup and hang sibling tests.",
|
|
"tags": [
|
|
"raft-apply-decoupling",
|
|
"task-3.1",
|
|
"handle_jobsubmit",
|
|
"array-job-submit",
|
|
"notification",
|
|
"commit-barrier",
|
|
"toctou",
|
|
"round-2-remediation",
|
|
"test-longjmp-past-teardown"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-03T21:00:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1409",
|
|
"timestamp": "2026-07-04T17:00:00.000Z",
|
|
"error_message": "test_demotion_convergence hung/spun (18.5M+ log lines, timeout kill) once commit.c's commit_resolve_pending unconditionally called the new persist_apply_pump_kick",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "apply_pump_drain()'s recheck-then-clear retry loop ignored persist_apply_pump_run()'s return code: on a genuine read failure (e.g. committed_lsn advanced in a test fixture with no real WAL bytes on disk for that LSN, rc=-ENOENT), last_applied_lsn never advances, so the very next re-check inside the SAME drain loop sees identical unresolved work and immediately reclaims the scheduled flag and retries forever -- a tight busy loop with no backoff, hammering disk reads and the logger.",
|
|
"fix": "apply_pump_drain() now checks persist_apply_pump_run()'s rc immediately after clearing apply_pump_scheduled; a negative rc returns immediately instead of re-checking for more work and reclaiming the flag. The failure is already logged loudly inside persist_apply_pump_run itself. A future, genuinely NEW kick (a later real commit-advance event) retries then, at that event's natural cadence, never in a busy spin.",
|
|
"tags": [
|
|
"raft-apply-decoupling",
|
|
"task-6.1",
|
|
"apply-pump",
|
|
"busy-loop",
|
|
"infinite-loop",
|
|
"commit-resolve-pending",
|
|
"regression-sweep"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-04T17:00:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1410",
|
|
"timestamp": "2026-07-04T17:00:00.000Z",
|
|
"error_message": "test_apply_pump's spy hook recorded jobid=0 for HOOK_DETAIL_JOB_UPDATE/HOOK_DETAIL_JOB_NEW instead of the real jobid",
|
|
"file": "src/controller/testsuite/test_apply_pump.c",
|
|
"root_cause": "The hook's per-subscriber `data`/cls pointer (bound at xce_add_hook registration time) is separate from the va_list's own variadic arguments. apply_committed_entry's notify calls pass (cluster_t*, payload) as the actual varargs -- the spy hook read the FIRST va_arg as the payload pointer directly, skipping the leading cluster_t* argument every real dispatch call (job.c, persist.c) always sends first.",
|
|
"fix": "Added `(void)va_arg(ap, cluster_t*);` before extracting the real payload (xlist_t*/job_t*) in both HOOK_DETAIL_JOB_NEW and HOOK_DETAIL_JOB_UPDATE cases, mirroring persist_job_hook_fun's own established va_arg consumption order.",
|
|
"tags": [
|
|
"raft-apply-decoupling",
|
|
"task-6.1",
|
|
"test-only",
|
|
"va_arg",
|
|
"hook-system"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-04T17:00:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1411",
|
|
"timestamp": "2026-07-04T17:00:00.000Z",
|
|
"error_message": "AddressSanitizer global-buffer-overflow in dataq_enq when test_apply_pump.c called persist_submit_job_fact with a real 3-member repl setup",
|
|
"file": "src/controller/testsuite/test_apply_pump.c",
|
|
"root_cause": "repl_broadcast tried to enqueue onto the dummy standby `int` stand-ins (g_tap_hep_a/b, opaque identity handles only) as if they were real endpoint_t* objects, overflowing past the 4-byte int into adjacent globals -- the fixture omitted the repl_broadcast_send_hook interception test_commit_barrier_reply.c's cbrp_setup already uses to keep repl_broadcast from ever dereferencing those dummy pointers.",
|
|
"fix": "Added the identical repl_broadcast_send_hook = tap_drop_send_hook (a no-op stub returning success) in tap_setup/tap_teardown, mirroring test_commit_barrier_reply.c's cbrp_drop_send_hook exactly.",
|
|
"tags": [
|
|
"raft-apply-decoupling",
|
|
"task-6.1",
|
|
"test-only",
|
|
"asan",
|
|
"repl-broadcast",
|
|
"fixture"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-04T17:00:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1412",
|
|
"timestamp": "2026-07-04T17:00:00.000Z",
|
|
"error_message": "test_apply_pump.c failed to compile: 'unknown type name RETAIN', stray bytes, __gnuc_va_list errors cascading from an unrelated location",
|
|
"file": "src/controller/testsuite/test_apply_pump.c",
|
|
"root_cause": "A doc comment contained the literal substring 'WAL_JOB_*/RETAIN' -- the '*' immediately followed by '/' forms a real C block-comment terminator, closing the file's top doc comment many lines early and turning the rest of the comment text into stray code tokens.",
|
|
"fix": "Reworded to 'a WAL_JOB_SUBMIT WAIT-mode entry mixed with WAL_JOB_{START,FINISH} RETAIN-mode facts', removing the accidental */ sequence. Lesson: never write '<TOKEN>*/<TOKEN>' inside a C block comment, even when '*' is meant as a wildcard/glob character.",
|
|
"tags": [
|
|
"raft-apply-decoupling",
|
|
"task-6.1",
|
|
"test-only",
|
|
"comment-terminator",
|
|
"build-break"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-04T17:00:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1413",
|
|
"timestamp": "2026-07-04T17:00:00.000Z",
|
|
"error_message": "test_apply_pump's burst-ordering test hung the NEXT test (longjmp-past-teardown) after a wrong off-by-one assertion (expected lsn_before+3, actual watermark is lsn_before+2 for 3 appended entries) failed",
|
|
"file": "src/controller/testsuite/test_apply_pump.c",
|
|
"root_cause": "A TEST_ASSERT failure mid-test longjmps past the rest of the function body, including the explicit tap_teardown() call at the end -- leaving the fsync thread/tmpdir/hooksys from the failed test alive when the next test's tap_setup() ran, hanging it. Root trigger was a genuine off-by-one in the test's own math (current_lsn before N appends is the FIRST assigned lsn, not one less than it; the watermark after N appends is first_lsn + N - 1, not first_lsn + N).",
|
|
"fix": "Fixed the off-by-one (first_lsn + 2 == watermark for 3 appends starting at first_lsn). Restructured all three tests in the file to capture every assertion-relevant observable into local variables BEFORE any TEST_ASSERT call, and to call tap_teardown() unconditionally before running any assertion -- the exact pattern already established in this codebase for task 3.1's identical hazard (tasks.md Implementation Notes, task 3.1 round 2/3).",
|
|
"tags": [
|
|
"raft-apply-decoupling",
|
|
"task-6.1",
|
|
"test-only",
|
|
"longjmp-past-teardown",
|
|
"off-by-one",
|
|
"test-hygiene"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1408"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-04T17:00:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1414",
|
|
"timestamp": "2026-07-04T18:00:00.000Z",
|
|
"error_message": "raft-apply-decoupling task 6.1 round 1 REJECTED: FINISH (LSN N) then a POST_EXEC-stage FAIL (LSN N+1) for the same job, with FAIL received before FINISH applies, corrupts the job to RUN|EXIT|PERR (0x106) instead of the correct DONE|PERR (0x108) once both apply in LSN order -- DONE is silently lost and a stray RUN bit appears.",
|
|
"file": "src/controller/job.c, src/controller/persist.c, src/include/wal_types.h, src/include/persist.h, src/controller/include/cluster.h",
|
|
"root_cause": "record_job_fail_fact (job.c) and record_job_update_fact (postdone) precomputed a FINAL absolute state at RECEIPT time (scratch-copy merge for FAIL, inline backstop+PDONE merge for postdone) and baked it into wal_jobstate_t.state -- correct only when receipt and apply are the same event. Once task 6.1 deferred apply past the commit barrier, a second in-flight fact for the same job (e.g. FINISH) could apply BETWEEN this fact's receipt and its own apply, making the receipt-time snapshot stale by the time apply_committed_entry's generic apply_job_update_transition() did its blind absolute overwrite -- silently clobbering whatever the other fact had just applied.",
|
|
"fix": "Repurposed wal_jobstate_t._pad (previously always-zero, unused) as a discriminator: _pad==0 still means legacy absolute state (job_ctrl's mark_job_fail/mark_job_update live paths, which mutate+capture under one lock atomically -- no staleness risk, unchanged); a nonzero _pad (WAL_JOB_FAIL_STAGE_FLAG|stage for FAIL, WAL_JOB_UPDATE_POSTDONE_MARK for postdone) marks the entry for apply-time recomputation. apply_committed_entry (persist.c) now dispatches WAL_JOB_FAIL/WAL_JOB_UPDATE on this bit, calling the REAL apply_job_fail_transition() / new apply_job_postdone_transition() (job.c) against the job's ACTUAL current state at apply time instead of a stale baked value. New persist_submit_job_fact_ex(p,type,jobid,state,pad) primitive added; persist_submit_job_fact becomes a pad=0 thin wrapper so zero existing call sites needed changes. Also fixed 2 pre-existing test_commit_barrier_reply.c tests that asserted the old wire format directly (cbrp_count_jobstate_entries reading state bits) -- extended the helper to a _ex variant exposing _pad, updated assertions to check the new marker plus a direct call to the guard core on a scratch job_t. New regression test test_apply_pump_fail_racing_finish_merges_against_current_state in test_apply_pump.c drives FINISH then FAIL through the real receipt handlers with both entries durably appended but unapplied, then a single covering ACK; RED-confirmed byte-for-byte (Expected 264 Was 262) against the reverted round-1 code, GREEN after the fix.",
|
|
"tags": [
|
|
"raft-apply-decoupling",
|
|
"task-6.1",
|
|
"round-2",
|
|
"job-state-corruption",
|
|
"merge-staleness",
|
|
"deferred-apply",
|
|
"wal-wire-format",
|
|
"wal_jobstate_t",
|
|
"_pad-discriminator"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1413"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-04T18:00:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1415",
|
|
"timestamp": "2026-07-04T19:30:00.000Z",
|
|
"error_message": "raft-apply-decoupling task 6.2 review finding (NOT reproduced under the test suite's pool-less fixtures, NOT fixed): a real vtaskmgr pool (n_vcpus > 1) can run the commit continuation's dispatch (job_commit_resolve_adapter -> jobsubmit_commit_continuation -> persist_register_pending_apply) and the apply pump's kick (persist_apply_pump_kick -> apply_pump_drain -> persist_apply_pump_run) on two DIFFERENT worker threads with no completion-order guarantee, even though commit_resolve_pending() enqueues them in that order. If the apply-pump task happens to finish first, persist_take_pending_apply() finds nothing registered yet for that lsn (0, correct no-op per its own contract), applies the entry, and advances last_applied_lsn past it -- then when the continuation task finally runs and calls persist_register_pending_apply() for that now-already-applied lsn, the registration is permanently orphaned: the walk only ever revisits [last_applied_lsn+1..committed_lsn], so nothing will ever call persist_take_pending_apply() for that lsn again. Net effect: the job is correctly constructed and visible in c->jobmgr, but the client that submitted it never receives a reply -- silently, forever.",
|
|
"file": "src/controller/commit.c (commit_resolve_pending, commit_resolve/dispatch_continuation), src/controller/persist.c (persist_apply_pump_kick, persist_apply_pump_run)",
|
|
"root_cause": "commit_resolve_pending() (commit.c ~793-835, landed by task 1.2/6.1) resolves every ready continuation via commit_resolve() -> dispatch_continuation(), which for a real pool (ce->pool != NULL) enqueues the continuation onto vtaskmgr via vtask_enq_classified(VTASK_LIVE_BLOCK) and returns WITHOUT waiting for it to run; commit_resolve_pending() then calls persist_apply_pump_kick(ce->p, ce->pool), which enqueues a SECOND, independent VTASK_LIVE_BLOCK task onto the SAME pool. vtaskmgr.c's dispatcher (vdispatcher_entry) hands queued tasks to whichever vcpu worker thread is next idle (pick_idle_vcpu/pick_eligible_task) -- with n_vcpus > 1 (the only realistic production configuration; every test fixture in this spec deliberately never calls commit_set_pool, so ce->pool stays NULL and both dispatches run synchronously inline instead, which is why no test in this suite reproduces the race), two tasks enqueued back-to-back can be picked up by two different idle vcpus at nearly the same time, and their COMPLETION order depends on each task's own runtime (a disk-reading WAL-scan-and-apply walk vs. a calloc+mutex-guarded list insert) -- not their enqueue order. This is a pre-existing structural gap from task 1.2 (async continuation dispatch) + task 6.1 (apply-pump-kick wired into the same choke point, same pool) that had no observable consequence until task 6.2 added a real consumer (persist_take_pending_apply) whose registration can now race the very entry it targets.",
|
|
"fix": "FIXED round 2 (task 6.2): persist_register_pending_apply() (persist.c) now self-heals option (b) from this entry's own proposed fixes -- before linking a new node onto pending_applies, it checks `lsn <= persist_last_applied_lsn(p)`; if the apply pump's walk has already applied `lsn` (last_applied_lsn already at or past it), `on_applied(ctx, lsn)` fires immediately and synchronously on the CALLING thread instead of being linked for a walk pass that will never revisit that lsn. Race-safe in both interleavings: when the walk has not reached `lsn` yet, the check is false and registration proceeds exactly as before (unchanged behavior, verified against the full existing regression suite); when the walk already passed `lsn`, its own persist_take_pending_apply() call for that lsn already ran and found nothing (that is precisely how we know registration is late), so the immediate inline fire can never double-fire alongside it. New deterministic regression test `test_apply_pump_late_pending_apply_registration_self_heals` (test_apply_pump.c) wires a REAL multi-vcpu vtaskmgr_t (n_vcpus=4) via commit_set_pool -- the one test in this spec to do so -- and forces the exact bad interleaving via a barrier (the test's stand-in commit continuation polls persist_last_applied_lsn() until the apply pump has already applied the lsn, THEN registers), rather than relying on natural timing luck. Verified genuine RED (fails with 'Expected 1 Was 0' against the unfixed check, confirming the hang is real and reproducible) -> GREEN (fires exactly once, resource released exactly once, no orphaned registration) after the fix. Full regression sweep (test_apply_pump, test_commit_barrier_reply, test_apply_reapply_idempotency, test_commit_resolve, test_commit_admission_pool, test_demotion_convergence) shows zero new failures -- the only 2 failures present (test_jobsubmit_returns_before_commit_and_registers_pending_apply, test_jobsubmit_array_mixed_outcome_no_phantom_job_for_failed_elements, both in test_commit_barrier_reply.c) are pre-existing/expected per task 6.1's own Implementation Notes (their assertion text predates task 6's apply pump landing; task 7.3's job to update), confirmed identical before and after this fix by reverting to the pre-round-2 baseline and re-running.",
|
|
"tags": [
|
|
"raft-apply-decoupling",
|
|
"task-6.2",
|
|
"vtaskmgr",
|
|
"race-condition",
|
|
"orphaned-registration",
|
|
"lost-reply",
|
|
"commit_resolve_pending",
|
|
"persist_apply_pump_kick",
|
|
"fixed",
|
|
"self-healing"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1409"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-04T23:30:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1416",
|
|
"timestamp": "2026-07-05T06:15:00.000Z",
|
|
"error_message": "[xce-test-ha] FAIL: factstream round 1: cluster did not reconverge to 3-of-3 after restarting ctrl-1 -- root cause: persist_recover: APPLY_DIVERGENT -- materialized state does not match the committed log tip (expected last_applied_lsn=72 new_job_count=23); persist_recover_loud_fence_if_unrecoverable: UNRECOVERABLE, staying alive/non-promotable",
|
|
"file": "src/controller/persist.c (persist_verify_apply_correctness / persist_recover, cluster.c cluster_init_phase2)",
|
|
"root_cause": "Found live via the new raft-apply-decoupling task 7.2 kill-mid-fact-stream soak scenario (--factstream), reproduced 4/4 runs (ASAN debug build, paced-wave ASAN build, release build, and a cleanup-suppressed debug postmortem run) in this sandboxed environment. cluster_init_phase2() calls cluster_open_listener() (which starts accepting network I/O, including replicated/catch-up WAL traffic from an already-serving primary) BEFORE persist_recover() runs its boot-time apply-correctness verification (task 5.1, Req 8.1/8.2). Under a slow/contended boot (observed: persist_recover firing ~36s after process start instead of the normal ~5s, plausibly due to heavy concurrent nix-develop/test-process CPU contention in this sandbox), a standby's listener can already be live and processing real traffic for tens of seconds before its own persist_recover() call finally executes. persist_verify_apply_correctness() (persist.c ~3597) reads p->last_applied_lsn and live-queries count_jobmgr_entries(p->cluster) AFTER replay_wal completes -- both of these are also mutated by the LIVE apply pump (raft-apply-decoupling task 6.1, wired through commit_resolve_pending) reacting to replicated commit-advance events. If live traffic is already flowing and being applied through the live pump DURING the extended pre-persist_recover window, the live-read 'actual' values used by persist_verify_apply_correctness can reflect state beyond what persist_recover's own single WAL-scan pass computed as 'expected', producing a DIVERGENT verdict even though no real apply defect exists -- confirmed via ctrlstatus probes showing committedLsn identical (79) and no actual data loss across all 3 nodes; the fence engaged correctly per its own fail-loud design (stayed alive, non-promotable, kept retrying) but two of three nodes (including the node that went on to win the next election, term=5, first_boot=1) were fenced at the exact moment persist_recover ran. This matches task 5.1's own documented residual-risk note (tasks.md Implementation Notes, task 5.1 entry): 'the position check is diagnostically tautological for THIS SPECIFIC call site today... this will change once task 6's live apply pump gives expectation and actual state a real chance to diverge across threads/time' -- that predicted future divergence has now materialized under a slow-boot + concurrent-live-traffic combination that only a scenario driving traffic this early/aggressively after cluster boot (the factstream scenario) exercises; existing soak scenarios (chaotic/sequential/force-snapshot) submit far fewer jobs, more slowly, and do not reliably land traffic inside a slow node's pre-recovery window. REFINED after further reproduction (10/10 runs total, across ASAN/release builds and job counts from 8 to 20): the trigger is specifically the RESTART/catch-up path, not the initial multi-node cold boot. A standalone control test (3 nodes, no kill, 20s settle before any traffic) submitted jobs and drove jstart/jfinish/jfail cleanly with zero APPLY_DIVERGENT -- confirming the race needs a node that was DOWN while the cluster kept moving (i.e. an actual failover), not merely a fast cold boot: the returning node's persist_recover()/cluster_init_phase2 vtask must complete while it is ALSO receiving a compressed catch-up replication burst covering everything it missed while down, and that burst's volume is inherent to 'kill mid-fact-stream' (the whole point of the scenario) -- a run-ha-soak.sh-side pacing fix cannot eliminate the trigger the way it did for the (separately real but distinct) initial-boot instance the settle-delay mitigation addresses. Reproduced identically down to 8 fact-stream jobs with 2-job/1s-gap waves, so the trigger threshold is low. This plausibly explains why no prior soak scenario in this spec's history (chaotic/sequential/force-snapshot, all using NJOBS=3 by default, un-paced but small) ever surfaced it: none combine a real kill-during-traffic failover with this much job+fact volume until raft-apply-decoupling task 7.2's factstream scenario. Also independently added test.c's print_jobinfo state_raw hex field (task 7.2) and confirmed via a live probe that apply_job_fail_transition correctly applies EXIT|PERR bits even when job_state_str's RUN-checked-first priority ordering hides them in the pretty-printed state string (job showed 'state: RUN' / 'state_raw: 0x106' after a jstart+jfail-without-jfinish sequence) -- a separate, minor, likely pre-existing (not introduced by raft-apply-decoupling) display-only quirk in job_state_str, also not fixed here (out of boundary), but which the factstream phantom-check was updated to work around by reading state_raw instead of the ambiguous pretty string.",
|
|
"fix": "FIXED (round 2, raft-apply-decoupling task 7.2 review remediation). Root cause confirmed exactly as hypothesized in the prior entry's candidate #2: persist_verify_apply_correctness() compared a WAL-scan-derived 'expected' snapshot against a LIVE re-read of last_applied_lsn/count_jobmgr_entries(), while TWO live mutation paths could write those same values concurrently -- the live apply pump (persist_apply_pump_run, driven by persist_apply_pump_kick off any of commit.c's 6 committed_lsn-advance sites) and the standby live-replication apply path (ha_apply_single_entry / ha_apply_term_entry_via_library in ha.c). Fixed via a new _Atomic bool persist_t.recovery_complete gate (persist.h/persist.c): persist_apply_pump_kick() now no-ops while the gate is closed; ha_apply_single_entry/ha_apply_term_entry_via_library now skip ONLY the in-memory apply_wal_entry() call while closed (durability write + replication ACK + applied_lsn advance are never gated, preserving the existing persist-before-apply-before-ACK contract and bug-1043's durability/materialization decoupling precedent). persist_recover() closes the gate at entry and reopens it (plus issues one deliberate persist_apply_pump_kick catch-up pass) right before returning, regardless of verdict -- covering any direct unit-test caller. ROUND 2 FINDING during live verification: this alone was insufficient -- a node stuck retrying its own election as a losing/timing-out candidate can receive and durably apply live-replicated entries via the ungated (persist_init default=true) path for tens of seconds BEFORE cluster_init_phase2() ever calls persist_recover() for the first time, reproducing the identical false-DIVERGENT symptom via an earlier entry point that persist_recover()'s own bracket cannot see. Closed by adding persist_mark_recovery_pending(&c.persist) in myapp_run() (myapp.c), called immediately after persist_init()/persist_start() succeed and BEFORE ha_start_election_async()/cluster_run() can process any network traffic -- closing the gate from the earliest safe moment in the real boot sequence. persist_init()'s default stays TRUE (ungated) so none of this spec's ~20 existing unit-test fixtures that construct a persist_t directly (bypassing myapp_run entirely) are affected; persist_mark_recovery_pending is never called outside myapp.c. Verified: live 3-node factstream soak (2 rounds, kill+restart both rounds) now PASSes clean with zero APPLY_DIVERGENT/UNRECOVERABLE across 5 persist_recover() calls (2 initial-boot delayed by the SAME pre-existing election-instability condition that originally exposed the round-2 gap, 2 post-kill restarts, all APPLY_CLEAN); broader controller_unit_test sweep (23 groups incl. test_apply_correctness_verification's 3 real-divergence tests, test_apply_pump/_integration, test_ha_core_safety, test_demotion_convergence) shows zero new failures (only the 2 pre-existing, documented task-6.1/6.2 test_commit_barrier_reply.c failures remain, task 7.3's job). Real-divergence detection independently re-confirmed intact (test_apply_divergent_decision_forces_unconditional_fence, test_apply_divergent_loud_fence_sets_sticky_flag_and_stays_alive, test_real_replay_divergence_sets_unrecoverable_fence all still PASS).",
|
|
"tags": [
|
|
"raft-apply-decoupling",
|
|
"task-7.2",
|
|
"xce-test-ha",
|
|
"factstream",
|
|
"persist_recover",
|
|
"APPLY_DIVERGENT",
|
|
"false-positive-candidate",
|
|
"boot-race",
|
|
"concurrency",
|
|
"live-regression-found",
|
|
"fixed",
|
|
"recovery-complete-gate",
|
|
"myapp-boot-sequencing"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1409",
|
|
"bug-1415"
|
|
],
|
|
"occurrences": 11,
|
|
"last_seen": "2026-07-05T07:45:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1417",
|
|
"timestamp": "2026-07-07T09:30:00.000Z",
|
|
"error_message": "[xce-test-ha --chaotic] FAIL round 4/10: election stall after killing ctrl-1 \u2014 ctrl-2 PreVote wins but real election times out despite ctrl-3 granting RequestVote",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "vote_reply_dispatch passes local votes_idx (compressed, excludes self) directly to raft_on_vote_reply which expects ABSOLUTE peer index (includes self). For self_idx=1 (ctrl-2), ctrl-3's vote (absolute=2, local=1) lands in vote_replies[1]=ctrl-2's own self-slot \u2192 treated as duplicate \u2192 vote silently dropped. With ctrl-1 dead in chaotic mode, ctrl-2 only has self-vote (1 < quorum 2) \u2192 eternal timeout. Self_idx=0 and self_idx=2 are partially/fully immune due to index alignment luck. ha_repl_ack_abs_peer_idx() already exists (ha.c:3779) with correct mapping and passing tests \u2014 vote_reply_dispatch just doesn't call it.",
|
|
"fix": [
|
|
"FIXED (src/controller/ha.c vote_reply_dispatch, ~line 5233): raft_on_vote_reply now receives ha_repl_ack_abs_peer_idx(ha, 1, idx) instead of the raw compressed local idx. ha_repl_ack_abs_peer_idx (ha.c:3779, already existed + unit-tested for the heartbeat-ACK path) performs the exact inverse of raft_cb_send_vote_request send-side remap: votes_idx < self_idx ? votes_idx : votes_idx + 1. ha_record_vote_reply (immediately preceding line) is UNCHANGED -- it correctly wants the compressed idx for ctx->votes[]. Confirmed pre_vote_reply_dispatch needs NO equivalent fix: raft_cb_send_pre_vote_request (ha.c:301) already stores the ABSOLUTE peer_idx in vctx->peer_idx for the PreVote path (explicit code comment there), matching raft_on_pre_vote_reply/pre_vote_replies[] absolute-index expectation -- only the real-vote send path (raft_cb_send_vote_request, ha.c:175) stores compressed. RED->GREEN: new unit test test_bug1417_middle_index_real_vote_from_peer2_not_dropped (test_ha_vote_send.c) drives a REAL 3-node election (self_idx=1) through raft_start_election then a genuine peer-2 grant via vote_reply_msg_handler_for_test (the actual decode/dispatch path, not the xce_vote_reply_hook bypass every other real-vote test in this file uses) -- reproduced Expected 2 Was 1 pre-fix, GREEN post-fix (votes_granted=2, role=RAFT_LEADER). Verified: full 79-group controller_unit_test sweep 0 new failures; 10-round --chaotic xce-test-ha soak PASS (committed_divergence=0, committed_job_loss=0, 18 jobs). Soak surfaced an UNRELATED, pre-existing --chaotic harness bug (run-ha-soak.sh run_chaotic_rounds: DOWN variable is not cleared on a skip-this-round no-primary-to-kill path, so a subsequent round calls start_node on the same already-running node without killing it first -- 6 stacked ctrl-2 processes observed piling up over rounds 5-10) -- confirmed via git diff this script was untouched by this fix, logged separately, NOT fixed here (out of bug-1417 boundary)."
|
|
],
|
|
"tags": [
|
|
"vote",
|
|
"raft",
|
|
"self_idx",
|
|
"index-mapping",
|
|
"chaotic-failover",
|
|
"off-by-one",
|
|
"fixed",
|
|
"ha",
|
|
"ha_repl_ack_abs_peer_idx",
|
|
"election"
|
|
],
|
|
"related_bugs": [
|
|
"bug-828"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-07T10:20:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1419",
|
|
"timestamp": "2026-07-07T14:00:00.000Z",
|
|
"error_message": "[xce-test-ha --chaotic] genuine, reproducible election-liveness stall (not the bug-1418 harness process-stacking artifact, which was a separate, now-fixed issue): after 2+ overlapping kills, the surviving 2-node set can permanently deadlock -- neither node can ever become primary again for the rest of the run.",
|
|
"file": "src/controller/persist.c (apply-correctness verification) + src/controller/ha.c (PreVote freshness gate) + WAL duplicate-submit mechanism (unlocated)",
|
|
"root_cause": "Direct log/WAL analysis (waldump on the affected node's data dir) during a live repro superseded two prior, less-precise theories filed as bug-1418 (a shell-script process-stacking artifact, unrelated and separately fixed; and an unverified ha->term/ha->raft.term \"term desync\" claim that does not match the code -- raft_begin_pre_vote/ha_start_prevote_async both read s->term == ha->raft.term directly, there is no separate stale-field read on the PreVote path).\n\nACTUAL mechanism observed: waldump on ctrl-3's WAL (the node with the longest/freshest log after the chaotic kill sequence) showed \"duplicate submits: 3 (byte-identical: 0)\" -- the SAME jobid appended to the WAL twice with DIFFERING payloads (different subtime, different CRC), e.g. lsn=13 and lsn=14 both jobid=0-0-1783418222-0 but distinct subtime/PCRC. This is NOT bug-845's mechanism (that fix, landed 2026-06-23, was for byte-IDENTICAL double-hook-registration dupes and is confirmed still working -- these are non-identical). count_jobmgr_entries() legitimately sees these as 2 distinct job-table mutations (or the entity count otherwise fails to match the WAL-replay-derived expectation), so persist_recover()'s post-replay apply-correctness check (task 5.1, Req 8.1/8.2) correctly fires APPLY_DIVERGENT -> the loud, sticky, non-promotable fence (raft-apply-decoupling Req 8.3/8.4) -- this fencing behavior is WORKING AS DESIGNED, not itself a bug.\n\nThe resulting LIVENESS bug: with the fenced node holding the only sufficiently-fresh (longest) log, the other surviving node can never win the PreVote freshness gate against it (correctly, per Raft/PreVote semantics -- it really is behind), while the fenced node itself can win Raft elections (quorum_reached/became_leader observed at terms 27/30/32 in logs) but its own raft_cb_become_leader promotion gate refuses CTRL_PRIMARY every time (apply_divergent=1). With the third node dead (killed by the chaotic driver) and never restarted long enough to catch up, NO node can ever become primary again -- a genuine, reproducible liveness deadlock, distinct from (and downstream of) the WAL duplicate-submit root cause. Confirmed via direct log grep across ctrl-1.log/ctrl-3.log at the exact stall timestamps (09:57:16 divergence detected, repeating \"PreVote DENIED ... reason=freshness\" and \"promotion REFUSED ... apply_divergent=1\" through 10:05+); NOT root-caused via speculation.",
|
|
"fix": "FIXED (2026-07-07). Layer (1), the WAL duplicate-non-identical-submit mechanism: raft-apply-decoupling task 3.1 deferred job/entity construction in c->jobmgr until AFTER commit (apply_committed_entry, post-commit apply pump), but jobid_range_exists() -- the sole dup guard in handle_jobsubmit -- only checks c->jobmgr. A submission that is durably WAL-appended and awaiting its commit outcome does not yet exist in c->jobmgr, so a client-side retry for the SAME jobid (XCECLI_FAILOVER_CALL/xce_failover_classify's idempotent-replay contract resends on a transport error or failover-mid-flight) sailed straight past the guard and appended a second, non-identical WAL_JOB_SUBMIT entry (different subtime/CRC) for the same jobid -- exactly the 'duplicate submits: N (byte-identical: 0)' signature waldump showed. Fix: src/controller/job.c adds a process-lifetime in-flight-jobid-range registry (s_inflight_submits, guarded by s_inflight_submits_lock) that handle_jobsubmit atomically check-and-claims (inflight_range_try_add) immediately after the existing jobid_range_exists check, and releases (inflight_range_remove) from jobsubmit_async_ctx_release. Regression test test_jobsubmit_resubmit_before_resolution_rejected_no_dup_wal_entry added to test_commit_barrier_reply.c (RED->GREEN confirmed). Committed fe4352f.\n\nLayer (2), the PreVote-freshness/apply-divergence liveness deadlock: initially framed as needing a fundamental safety/liveness design tradeoff among 3 unpalatable options (force-promote a divergent node / truncate committed-but-unapplied entries / relax the freshness gate) -- this framing was WRONG, corrected after user pushback (\"kill-mid-apply should be recoverable per Raft protocol\", \"I do not think break FSM invariant is a good idea\"). Root-caused instead to a concrete, scoped bug: persist_checkpoint() (persist.c:2261-2263, now fixed) stamped p->checkpoint_lsn from p->current_lsn (the physical WAL append tip) instead of p->last_applied_lsn (the true 'jobmgr reflects up through here' cursor, persist.h:344-363 documents these as DISTINCT once apply is decoupled from commit). write_snapshot() serializes live c->jobmgr, so a checkpoint taken while the async apply pump lags behind the WAL tip mislabels the snapshot: on restart, last_applied_lsn is re-seeded FROM checkpoint_lsn and replay resumes strictly above it, silently skipping committed-but-not-yet-applied entries that jobmgr never actually received -- the real mechanism behind kill-mid-apply producing a permanent APPLY_DIVERGENT fence. Confirmed apply_committed_entry() is fully deterministic/idempotent (rules out non-determinism) and write_snapshot() is crash-atomic at the file level (temp+fdatasync+rename, rules out torn-file corruption) -- the bug is purely a mislabeled watermark, not a structural divergence. Fix: persist_checkpoint() now reads checkpoint_lsn from last_applied_lsn and holds apply_pump_lock across the label-capture + write_snapshot() call so the label and the jobmgr state it describes are captured atomically w.r.t. the live apply pump (the pump only ever moves last_applied_lsn/jobmgr forward, so freezing it here rules out the label ever claiming more than jobmgr actually holds). test_checkpoint_sets_checkpoint_lsn updated (now simulates apply catch-up explicitly, since a cluster-less unit-test persist_t never runs the apply pump); new regression test test_checkpoint_lsn_tracks_last_applied_not_current_lsn added to test_persist_checkpoint.c (RED confirmed pre-fix: checkpoint_lsn took the WAL tip=7 instead of the simulated applied cursor=2; GREEN after). Full 78-group/782-test controller_unit_test sweep: 0 failures.\n\nADDENDUM (2026-07-08, post-fix re-soak): a fresh chaotic soak on a rebuilt binary (both layers included) cleared rounds 1-4 (previously stalled at round 4) but still hit a fresh APPLY_DIVERGENT fence at round 5. Deep dive (waldump + log correlation + code trace) proved BOTH layer 1 and layer 2 are working correctly and are NOT the cause: added test_jobsubmit_resubmit_after_full_resolution_rejected_no_second_job (test_commit_barrier_reply.c) proving the post-resolution dedup window is also airtight (-EEXIST, no second WAL entry) -- both known dedup windows are provably race-free. The round-5 duplicate jobid was traced instead to a TEST-HARNESS-ONLY defect: xce_test (test.c:1868) hardcoded idgen(&idctx, 0, 0, ...) (clusterId=apiserverId=0) and run-ha-soak.sh's submit_jobs() spawns a fresh xce_test process per retry attempt, resetting idgen's static idctx.sequence to 0 each time -- two unrelated job submissions from two fresh processes landing in the same wall-clock second collide on an identical jobid (ts+tag+seq all equal). Confirmed NOT a production risk: apiserver's GenerateJobID (clib.go) holds one process-lifetime idgen_ctx_t via sync.Once and each deployed apiserver instance has its own distinct apiserverId, so config.h's jobid bit-layout (cluster/apiserver bits) already partitions production's namespace. Fixed by folding getpid() into the harness's apiserverId (test.c:1868) so cross-process collisions become structurally impossible there too; filed as bug-1420. bug-1419 itself (both production layers) stands as correctly fixed -- this addendum exists so a future session doesn't misread the round-5 re-soak stall as evidence layer 1/2 are insufficient.",
|
|
"tags": [
|
|
"ha",
|
|
"election",
|
|
"raft",
|
|
"apply-divergence",
|
|
"promotion-gate",
|
|
"chaotic-failover",
|
|
"liveness",
|
|
"wal-duplicate-submit",
|
|
"checkpoint-lsn",
|
|
"kill-mid-apply",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1417",
|
|
"bug-1060",
|
|
"bug-845",
|
|
"bug-1418",
|
|
"bug-1420"
|
|
],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-07-08T04:00:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1420",
|
|
"timestamp": "2026-07-08T04:00:00.000Z",
|
|
"error_message": "xce_test CLI harness generates colliding jobids across separate process invocations within the same wall-clock second, surfacing as a spurious APPLY_DIVERGENT fence in chaotic HA soak (misattributed at first to bug-1419's controller-side dedup logic).",
|
|
"file": "src/controller/testsuite/test.c",
|
|
"root_cause": "idgen() (src/lib/idgen.c) derives jobid from a per-context {timestamp (1s resolution), sequence (reset to 0 whenever the second rolls over or the context is freshly initialized)} pair, plus caller-supplied clusterId/apiserverId bits (src/include/config.h: 6+4 bits respectively) that are meant to partition the jobid namespace across independent generators. xce_test's cmd_jsub called idgen(&idctx, 0, 0, arsize, ...) -- both partition fields hardcoded to 0 -- so every xce_test process shares the SAME (degenerate, unpartitioned) jobid space. run-ha-soak.sh's submit_jobs() (run-ha-soak.sh:446) spawns a fresh xce_test process per submit/retry attempt (`printf script | xtest`, xtest() = `timeout 60 \"$XT\"`), and idgen_ctx_init() resets sequence=0 on every fresh process start. Two unrelated job submissions from two different xce_test process launches landing in the same wall-clock second therefore compute an IDENTICAL jobid (ts, tag, seq all equal) -- a genuine, reproducible collision between logically distinct jobs, not a retry of the same one. This is NOT a production defect: apiserver's GenerateJobID (src/frontend/apiserver/backend/clib.go) initializes its idgen_ctx_t exactly once per process via sync.Once (sequence only resets on an actual apiserver restart, far rarer than per-request), and each deployed apiserver instance is assigned its own distinct apiserverId, so config.h's bit layout already partitions the production jobid namespace across instances even in the rare restart-collision case.",
|
|
"fix": "Folded getpid() into the harness's apiserverId at the idgen() call site (test.c:1868): idgen(&idctx, 0, (size_t)((uint64_t)getpid() & MAX_APISERVER_ID), arsize, &(jobsubmit.jobid)) -- gives every xce_test process invocation its own slice of the same namespace partitioning production already relies on, making a same-second cross-process collision structurally impossible. Mechanical, test-tool-only change; no production code touched. Verified via clean rebuild of both xce_test and controller_unit_test targets (no coupling, no regressions).",
|
|
"tags": [
|
|
"test-harness",
|
|
"jobid",
|
|
"idgen",
|
|
"chaotic-soak",
|
|
"false-positive",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1419"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-08T04:00:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1421",
|
|
"timestamp": "2026-07-08T06:55:15.000Z",
|
|
"error_message": "Sequential HA soak regression: no primary elected at term>8 by round 6 (initially suspected to stem from the bug-1417 fix); root-caused 2026-07-09 as the primary never discovering a follower's higher term via AppendEntries-reject responses",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "ha_raft_on_repl_ack only routes AE-reply term-adoption for success=1 ACKs; AE rejects (success=0) never reach raft_on_append_entries_reply. That function additionally drops any reply with reply_term != s->term (raft.c:832-833, stale-term drop) before it can adopt a higher term. Net effect: once a follower is ahead in term (e.g. it steps down from PreVote to CTRL_STANDBY at a higher term while an existing primary keeps campaigning/replicating at its old term), every AppendEntries the stale primary sends is rejected with ae_reject_stale, the primary never learns the higher term, and it can never regain write-quorum (needs 2/3, only self-vote counts) \u2014 a permanent livelock. First surfaced as an election regression (sequential soak: no primary elected at term>8 by round 6, chaotic stalled at round 5) suspected to be caused by the bug-1417 vote-index-mapping fix; re-reproduced 2026-07-09 as a round-4 sequential stall (primary ctrl-2 term=6, follower ctrl-3 term=7, 490 ae_reject_stale events, primary writable_lsn stuck at 17), which pinned the exact mechanism above.",
|
|
"fix": "Added two fallback term-discovery vectors that fire regardless of AE-reject outcome. (1) StateReport heartbeat-reply now carries the standby's current term (controller.capnp +term field @2, typemap.h state_report_t +term, ha_nop_reply_state_report populates it from ha->term) so the primary learns a higher term on every convergence cycle. (2) New library entry point raft_on_higher_term_observed(s, observed_term) mirrors UpdateTerm (strictly-greater-than only; touches term/voted_for/role; on_persist before on_become_follower for durability ordering) and is called from repl_ack_decode_and_dispatch on both the heartbeat state-report branch and the WAL-NACK branch (ha.c). Primary now steps down instead of retrying AppendEntries against a follower that rejects forever. Validated: 265 controller + 287 lib unit tests pass (zero regressions); 10-round sequential soak PASS (33 jobs, zero loss, all 3 nodes led ctrl-1/ctrl-2/ctrl-3); 10-round chaotic soak PASS (33 jobs, zero committed divergence, zero committed job loss).",
|
|
"tags": [
|
|
"ha",
|
|
"raft",
|
|
"term-desync",
|
|
"liveness",
|
|
"election-regression",
|
|
"ae-reject",
|
|
"replication",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1417",
|
|
"bug-1418",
|
|
"bug-851"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-07-09T08:50:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1422",
|
|
"timestamp": "2026-07-09T10:14:14.000Z",
|
|
"error_message": "40-round sequential HA soak FAIL at round 36: verify_no_loss reported '0/111 jobs confirmed present' right after a fresh election (new primary ctrl-1, term=40) \u2014 xce_test's expect-job got E_XCE_STANDBY (10014) from a fresh client session whose own wait-primary had JUST confirmed ctrl-1 as serving 45ms earlier",
|
|
"file": ".claude/skills/xce-test-ha/run-ha-soak.sh",
|
|
"root_cause": "False-positive test-harness failure, NOT real committed-job loss: ctrl-1's own controller log confirms it stayed CTRL_PRIMARY throughout the window and successfully committed the 3 new post-failover jobs (log_append/ae_reply_success/commit_advanced at 10:14:22-23). ha_dispatch_gate's CTRL_PRIMARY branch (ha.c:3451-3531) unconditionally permits OPCode_get (joblist) even while fenced, so ctrl-1 itself could not have returned E_XCE_STANDBY for this query \u2014 the reply must have come from a standby (ctrl-2, just killed, or ctrl-3) that the client's failover retry loop landed on. Root cause traced to client_failover.c's xcecli_retry_next/xcecli_retry_decide (client_failover.c:305-319): E_XCE_STANDBY classifies as XCE_FO_RETRY_NOW (client_failover.c:59-60, prompt rotate, no backoff), and the 20-attempt retry budget (3 masters) should reliably reach the real primary \u2014 but when the WHOLE budget is exhausted while every recent classification was RETRY_NOW (as opposed to RETRY_BACKOFF), xcecli_retry_decide's budget-exhaustion branch (line 312-318) does NOT override *rc the way it does for RETRY_BACKOFF exhaustion (which maps to the distinct -E_XCE_NOT_READY, line 316-317) \u2014 it just returns false with *rc left at whatever the last attempt's raw status was (here, a stray E_XCE_STANDBY from a standby hit during the rapid post-election retry storm). verify_no_loss() (run-ha-soak.sh) then did a single one-shot check with zero retry at the driver level, unlike the job-submit loop just above it in the same file which already retries on this exact 'primary likely just promoted, regaining write-quorum' condition (run-ha-soak.sh:483-486). Only surfaced at round 36 of a 40-round run \u2014 narrow enough timing that shorter 6-10 round soaks across many prior sessions never hit it.",
|
|
"fix": "Added a bounded retry (3 total attempts, 2s settle sleep between) around the WHOLE verify_no_loss() check in run-ha-soak.sh, mirroring the existing submit-retry loop's rationale: a job still missing after a real settle window + 2 retries is a genuine loss, not this client-side retry-storm race. Did not touch client_failover.c (the battle-tested libxce-failover retry/rotation library with many other production consumers) \u2014 fixing at the test-driver level is safer and fully local. Re-ran both 40-round soaks after the fix: sequential PASS (123 jobs, zero loss, all 3 nodes led) and chaotic PASS (123 jobs, zero committed divergence, zero committed job loss).",
|
|
"tags": [
|
|
"xce-test-ha",
|
|
"false-positive",
|
|
"client-failover",
|
|
"retry-budget-exhaustion",
|
|
"E_XCE_STANDBY",
|
|
"test-harness",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-854",
|
|
"bug-1421"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-09T10:15:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1418",
|
|
"timestamp": "2026-07-09T10:30:00.000Z",
|
|
"error_message": "Final resolution pass over bug-1418 (all 4 prior occurrences): the two contributing factors from the 2026-07-07T18:20 analysis (term desync + apply-divergence promotion-gate liveness deadlock) are both now resolved, not by the originally-proposed gate relaxation.",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Re-audited both factors against the CURRENT code (post raft-apply-decoupling 32/32, post bug-1421): (1) TERM DESYNC \u2014 ha_start_prevote_async (ha.c:6715) already computes its prospective term from ha->raft.term + 1, not the stale ha->term the original analysis described; ha.c:1009-1010 explicitly syncs ha->term from the raft term on every relevant transition. This half was already fixed independently of bug-1418's own tracked fix. (2) APPLY-DIVERGENCE LIVENESS DEADLOCK \u2014 the promotion gate (ha.c raft_cb_become_leader ~line 1130, and promotion_fence_timeout_fn ~line 876) unconditionally refuses promotion while persist_apply_verdict()==APPLY_DIVERGENT, by deliberate design (raft-apply-decoupling task 5.3, Req 8.4: a divergent local materialization must never be trusted to self-clear via any live/structural condition, including durable_floor>=cluster_hwm \u2014 only a fresh persist_recover() replay may clear it). The buglog's own previously-proposed fix (relax the gate to self-apply when durable_floor>=cluster_hwm) would have violated this intentional invariant and risked serving genuinely divergent state to clients. Instead, raft-apply-decoupling's tasks 5.1 (checkpoint_lsn mislabeled from WAL tip instead of the logical applied cursor, causing a false APPLY_DIVERGENT on an ordinary crash-during-checkpoint) and 7.2/bug-1416 (a boot-time TOCTOU where a returning node's persist_recover() replay-verify raced the live apply pump / live-replication apply path, producing a false APPLY_DIVERGENT on the restart/catch-up path specifically \u2014 the exact scenario bug-1418's residual occurrence hit: 'apply pump lagged behind WAL tip during kill') closed the false-positive detection paths that were producing spurious APPLY_DIVERGENT verdicts in the first place. A genuine (non-false-positive) divergence still correctly fences forever by design.",
|
|
"fix": "[Consolidated 2026-08-15: this ID previously had 4 duplicate entries in buglog.json (a pgrep-guard test-harness fix, a partial term-desync analysis, and a stale mid-investigation 'NOT FIXED' snapshot -- all superseded by this final resolution pass, which already accounted for all 3 in its own analysis). Collapsed to this single entry; the other 3 removed.]\n\nNo code change to the promotion gate itself \u2014 it is intentionally correct and must stay unconditional. The actual fix is the combination of already-shipped upstream work: bug-1421 (AE-reject term-discovery blindspot, this session) + raft-apply-decoupling tasks 5.1/5.3/7.2 (false-APPLY_DIVERGENT elimination, closed prior to this session). Validated: two 40-round soaks today (sequential 123 jobs zero-loss all-3-nodes-led; chaotic 123 jobs zero-committed-divergence zero-job-loss) \u2014 an order of magnitude more election churn than the original 10-round soak that first surfaced bug-1418 \u2014 produced zero apply-divergent promotion refusals and zero liveness deadlocks. Further corroborated by the 30-round sequential+chaotic regression run immediately after this entry.",
|
|
"tags": [
|
|
"ha",
|
|
"raft",
|
|
"apply-divergence",
|
|
"promotion-gate",
|
|
"chaotic-failover",
|
|
"liveness",
|
|
"term-desync",
|
|
"resolved-via-upstream",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1417",
|
|
"bug-1419",
|
|
"bug-1421",
|
|
"bug-1416"
|
|
],
|
|
"occurrences": 5,
|
|
"last_seen": "2026-07-09T10:30:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1423",
|
|
"timestamp": "2026-07-09T13:58:16.000Z",
|
|
"error_message": "30-round sequential HA soak FAIL at round 5: post-failover submit did not get 3 acks after 5 retry attempts (15s+). Root-caused as a genuine permanent election deadlock, not a client-side false positive: ctrl-3 won PreVote and entered CTRL_ELECTING (real election, term=10) with ctrl-1 dead and ctrl-2 alive, then never showed another HA state-machine event for 2+ minutes (until the harness killed the cluster on FAIL) \u2014 stuck in CTRL_ELECTING forever. Meanwhile ctrl-2 endlessly retried its own PreVote every ~15-17s, correctly denied every time by ctrl-3 on freshness grounds, but that denial never unstuck ctrl-3's already-in-flight real election.",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "raft_cb_send_vote_request (ha.c, sends the real RequestVote RPC to each peer) has two failure branches \u2014 endpoint_connect() failing and iomgr_monitor() failing \u2014 that are exactly what happens when the RPC target is a dead/unreachable peer (here, ctrl-1, killed at the start of round 5). The endpoint_connect failure branch only called the legacy handle_request_vote_reply() when `c == NULL` (unit-test mode) \u2014 in PRODUCTION (c always non-NULL) a connect failure to a dead peer was silently dropped with NO notification to the raft library at all. The iomgr_monitor failure branch called handle_request_vote_reply() unconditionally, including in production \u2014 but per vote_reply_dispatch's own design comment, handle_request_vote_reply is the LEGACY/ctx-done-signaling path; 'raft_on_vote_reply remains the SOLE production promotion driver' (vote_reply_dispatch calls ha_record_vote_reply + raft_on_vote_reply, NOT handle_request_vote_reply). Net effect: a candidate's vote request to a dead peer never registers as a 'reply' with the production raft library's raft_state_t.replies_received counter. raft.c's Step 6 fast-path ('all peers have replied, no quorum \u2192 become follower and retry', gated on replies_received == n_peers-1) can therefore NEVER trigger whenever any configured peer is down \u2014 with quorum=2 in a 3-node cluster and one peer dead, replies_received caps at 1 (only the live peer's real reply, if any) and can never reach n_peers-1=2. Recovery then depends ENTIRELY on the raw per-campaign election_timeout (5-10s, ha_jittered_election_delay) firing via delaymgr \u2014 in the observed failure, no election_timeout_fn trace appeared in the log at all for the full 2+ minute window, leaving the candidate permanently wedged.",
|
|
"fix": "Routed both raft_cb_send_vote_request failure branches (connect failure and monitor failure) through vote_reply_dispatch(ha, ectx, votes_idx, term, vote_granted=0, 0, 0) in production (c != NULL) \u2014 the exact same call a genuine vote reply makes (ha_record_vote_reply + raft_on_vote_reply), so a dead/unreachable peer now correctly counts as 'replied, not granted' immediately on connect/monitor failure instead of only via the timeout. Test mode (c == NULL) keeps the legacy handle_request_vote_reply call unit tests depend on. Added a forward declaration of the previously-file-local-only vote_reply_dispatch near the top of ha.c so raft_cb_send_vote_request (defined much earlier in the file) can call it. Verified: full controller_unit_test suite clean (755 PASS / 0 Fail, exit 0) both before and after removing temporary diagnostic logging used during root-cause; re-ran the exact failing scenario \u2014 30-round sequential HA soak PASS (93 jobs, zero loss, all 3 nodes led) and 30-round chaotic HA soak PASS (93 jobs, zero committed divergence, zero committed job loss) \u2014 both previously hit this stall reliably (round 5 of the sequential run, 100% reproduction before the fix).",
|
|
"tags": [
|
|
"ha",
|
|
"raft",
|
|
"election",
|
|
"liveness-deadlock",
|
|
"vote-request",
|
|
"dead-peer",
|
|
"quorum",
|
|
"permanent-stall",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1417",
|
|
"bug-1418",
|
|
"bug-1421"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-09T14:40:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1424",
|
|
"timestamp": "2026-07-09T17:00:00.000Z",
|
|
"error_message": "PreVote twin of bug-1423: raft_cb_send_pre_vote_request's connect/monitor failure branches (a dead/unreachable peer) never registered a reply with the raft library's PreVote tally, in EITHER test or production mode (worse than the real-vote path, which at least handled test mode).",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Same missing-registration pattern as bug-1423, in raft_cb_send_pre_vote_request instead of raft_cb_send_vote_request. Found while auditing for the analogous gap after fixing bug-1423. Lower severity than bug-1423: PreVote has an unconditional round-timeout fallback (ha_prevote_round_timeout_fn, confirmed firing reliably every round across dozens of observed rounds in the bug-1423 investigation logs) that always resolves the round regardless of tally completeness, so this was never a permanent-deadlock class bug like bug-1423 was \u2014 just a latency waste: every PreVote round against a down peer burns the full round timeout instead of concluding as soon as the live peer(s) reply.",
|
|
"fix": "Routed both failure branches through pre_vote_reply_dispatch(ha, c, peer_idx, granted=0) \u2014 the same production PreVote-reply path a real reply uses (raft_on_pre_vote_reply) \u2014 mirroring bug-1423's fix exactly. Added a forward declaration near the top of ha.c (pre_vote_reply_dispatch is defined much later in the file). Verified: full controller_unit_test suite clean (0 Fail, exit 0) after the change.",
|
|
"tags": [
|
|
"ha",
|
|
"raft",
|
|
"prevote",
|
|
"dead-peer",
|
|
"latency",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1423"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-09T17:05:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1425",
|
|
"timestamp": "2026-07-09T21:15:00.000Z",
|
|
"error_message": "Intermittent (~2 of 9 attempts) client hang in the synchronous jobsub (COMMIT_MODE_WAIT) path shortly after a fresh single-node election.",
|
|
"file": "src/controller/persist.c or src/controller/commit.c (unrooted)",
|
|
"root_cause": "NOT ROOT-CAUSED. Flagged during raft-apply-decoupling task 7.4's throughput benchmark work. Reproduced identically on both the pre-fix and post-fix (task 6.1 apply-pump) binaries \u2014 confirmed unrelated to that fix. Resembles but is not confirmed identical to the closed bug-1416 boot-race class (persist_recover() replay-verify racing the live apply pump / live-replication apply path).",
|
|
"fix": "[UPDATE 2026-08-16] Live investigation (single-node deploy via /xce-deploy-ha, controller_unit_test's own fix build): found a RELIABLE reproduction recipe the original ~2/9-sequential-attempts description never had, and narrowed the root cause to a specific mechanism, but did NOT land a fix -- reporting findings honestly per the explicit scope of this investigation pass.\n\nRELIABLE REPRO (not sequential -- CONCURRENT): deploy a fresh single-node cluster, poll the log for CTRL_PRIMARY, then fire 9 xce_test client processes (each: connect + one jobsub) SIMULTANEOUSLY (backgrounded, not sequential) immediately after election. Reproduced in 3 of 4 rounds (1-3 of 9 concurrent clients failing per round, closely matching the original ~2/9 ratio) -- 0/45 reproductions when the SAME 9 attempts were fired sequentially instead (one xce_test process at a time). Concurrency at connect time, not raw timing after election, is the actual trigger.\n\nSYMPTOM, precisely: the failing client's xcecli_jobsubmit() (client.c, wrapped in XCECLI_FAILOVER_CALL) returns rc>=0 (success-shaped, NOT a negative error) after exactly ~10.0-10.1s, with the output jobid=0 (never written) instead of the submitted JobId -- test.c's cmd_jobsub (bug-786's own guard) correctly catches this as 'no clean ack' rather than misreporting success, so no data is actually lost/corrupted -- but the client hangs ~10s before getting a clear answer, matching the bug's own description exactly.\n\nCONFIRMED CLIENT-SIDE, not server-side: cross-referenced the controller's own log (fresh --logfile per round) against the 9 concurrent attempts -- server-side WAL only ever shows 8 job-submit entries committed (lsn sequence has no gaps, no admission-cap rejection WARN, no error of any kind) when 9 concurrent clients attempted -- the failing 9th request never reaches handle_jobsubmit at all. Ruled out the obvious admission-cap suspect: commit.c's COMMIT_MODE_WAIT admission control (cap=n_vcpus-VTASK_LIVENESS_RESERVED=3 on this 4-vcpu deploy) never logged its 'WAIT rejected, admission cap exhausted' WARN in any reproduction -- 8 concurrent WAITs completing well under the cap is plausible given each takes <100ms server-side once received.\n\nTHE ~10s NUMBER, precisely sourced: xceapi.c's xce_jobsubmit() (the innermost call XCECLI_FAILOVER_CALL wraps) has a HARDCODED cbuf_deadline_10s() wait on cbuf_timedget waiting for a reply to land in the single-slot ctx->wbuf. Read cbuf_timedget itself (mylock.c) -- confirmed CORRECT, it returns -ETIMEDOUT (negative) on a genuine timeout, which xce_jobsubmit correctly propagates as a negative rc. So a bare cbuf_timedget timeout cannot by itself explain the observed rc>=0-with-jobid=0 shape; something in the retry/rotate/recover layer ABOVE it must be involved.\n\nNARROWED SUSPECT (not confirmed): client_internal.h's own documented CI1 hazard -- 'handle_disconnect may have injected a stale status into the single-slot ctx->wbuf ... xcecli_ctx_recover drains any pending entry with a non-blocking cbuf_tryget so the next attempt's cbuf_get cannot consume a prior-attempt reply' -- but this drain only runs when xce_failover_rotate() succeeds (client_failover.c:130-153, mirrored by xcecli_retry_next per its own doc comment: 'only recover when the rotate succeeded'). On this single-candidate cluster, rotate reconnects to the SAME (only) node via a real xce_ctx_reconnect() -- plausible this usually succeeds (ruling out the simplest 'rotate never succeeds on single-node, drain never runs' theory) but NOT independently verified under the exact concurrent-connect contention this repro needs; a transient reconnect failure specifically during the connection-establishment storm (9 simultaneous TLS handshakes against a listener seconds old) could leave a stale wbuf entry undrained, which a LATER retry's cbuf_timedget could then either (a) consume immediately (fast, not 10s -- doesn't match) or (b) never resolve at all if the drain path interacts badly with an in-flight send, leaving the single wbuf slot permanently empty until the full 10s deadline. Did not instrument (fprintf/gdb) the actual attempt count or wbuf state during a live failing run to confirm this mechanism specifically -- xce_test's own -vvv flag produced no additional client-side retry/rotate trace output (goes through a different, unwired logger in this CLI context), and adding real instrumentation would need a fresh lib rebuild + re-repro cycle not completed in this pass.\n\nNOT YET DONE: instrument xcecli_retry_next/xce_jobsubmit directly (attempt count, wbuf drain outcome, rotate rc, per-attempt elapsed) and re-run the now-reliable concurrent-burst repro to catch the exact mechanism in the act -- this is the recommended next step, using the repro recipe above (no gdb needed; the reproduction is now reliable enough for print-based debugging). Confirmed unrelated to raft-apply-decoupling task 6.1's apply-pump fix (reproduces identically on that spec's pre-fix and post-fix binaries per the original entry) and to this session's bug-1428/1426/1474/1472-remainder fixes (none touch xceapi.c/client.c/client_failover.c's client-side retry path).\n\n[Original entry]\nNOT FIXED. Worked around via retry for task 7.4's benchmarking purposes only. Needs a dedicated root-cause investigation with the same live-repro rigor bug-1416 got (gdb-attach via GDB_WRAP seam, or targeted debug logging around the commit-wait barrier right after a fresh single-node election).\n\n[UPDATE 2026-08-16, part 2] FIXED. Root-caused via static code trace (no gdb/instrumentation needed after all): XCECLI_FAILOVER_CALL's idempotent-replay rule (client_failover.c, xce_failover_classify -- 'a duplicate on a re-sent write means the replay guard already applied our write, treat as success') can normalize a retried resend that hits the server's EEXIST/inflight-collision rejection into overall success (rc==0) -- but that rejection reply carries NO payload (handle_jobsubmit's EEXIST/inflight-collision branches reply with RequestReply_data_nodata, job.c:1441-1467), so xce_jobsubmit() (xceapi.c) never populates its *jobid output on the winning (dup) attempt, and never did on the earlier failing attempt either (its raw status was already negative). Net: xcecli_jobsubmit() can return rc>=0 with *jobid left at the caller's initial value (0) -- matching the confirmed symptom exactly (rc>=0, jobid=0, ~10.0-10.1s: one full 10s cbuf_timedget deadline on the failing first attempt, then a fast dup-rejection reply on the resend).\n\nFIX (TDD): added jobsubmit_finalize_jobid(uint64_t* jobid, uint64_t submitted_jobid, int overall_rc) (src/lib/client_internal.h declaration, src/lib/client.c definition), called from xcecli_jobsubmit() right after XCECLI_FAILOVER_CALL returns. Sets *jobid = submit->jobid (the CLIENT-generated id already on the wire -- job ids are client-generated via idgen(); the controller commits/echoes this exact value verbatim on every genuine success reply, bug-786/job.c:1439) whenever overall_rc >= 0, otherwise leaves *jobid untouched. Deliberately placed at the jobsubmit-specific wrapper layer, not the generic classify/decide layer (which is correctly type-erased and has no concept of jobid) -- test.c's cmd_jobsub (bug-786's own gate, comparing returned jobid == locally-generated jobsubmit.jobid) was ALREADY the right verification signal and needed no changes. 3 new pure unit tests in test_libxce_retry.c (test_jobsubmit_finalize_populates_jobid_on_success/leaves_jobid_untouched_on_failure/null_jobid_safe) -- socket-free, following this codebase's established direct-state-simulation test style for I/O-adjacent logic (test_netio_on_connected.c's precedent) rather than mocking a live connection.\n\nLIVE VALIDATION: full ASAN rebuild (0 compiler errors; controller_unit_test 1101 tests, 2 pre-existing unrelated test_config_repl.c failures; libxce test suite 1/1 OK, all 3 new tests PASS). Deployed a fresh single-node cluster and ran the same concurrent-burst repro as the original investigation (fresh election -> 9 simultaneous xce_test jobsub clients) for 5 rounds / 45 total clients: 0 'no clean ack' failures, 45/45 clean acks with jobid matching the submitted id (vs. the original repro's 1-3/9 failures in 3 of 4 rounds pre-fix). Honest caveat: this is probabilistic/timing-dependent (like the original repro), so 45/45 clean is strong but not airtight proof the exact race window is unreachable -- the fix is correct by construction regardless (it closes the *jobid gap for EVERY path that can produce rc>=0, not just the one race that was reproduced), so residual risk is limited to a still-undiscovered SEPARATE mechanism producing the same symptom, not this one going unfixed.",
|
|
"tags": [
|
|
"ha",
|
|
"commit-engine",
|
|
"election",
|
|
"intermittent",
|
|
"raft-apply-decoupling-followup",
|
|
"live-repro-found",
|
|
"concurrent-connect-trigger",
|
|
"fixed",
|
|
"root-caused",
|
|
"tdd-red-green"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1416"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-08-16T11:10:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1426",
|
|
"timestamp": "2026-07-09T21:15:00.000Z",
|
|
"error_message": "trim_wal_segments's retention floor has no awareness of the local apply pump's own lag \u2014 a reachable scenario since apply-lag-behind-commit is raft-apply-decoupling's entire premise.",
|
|
"file": "src/controller/persist.c (trim_wal_segments, apply_pump_read_entry cache)",
|
|
"root_cause": "Identified during raft-apply-decoupling task 7.4's apply-pump segment-read cache fix (round-2 review finding): the new fast-path cache can (POSIX unlink-keeps-fd-alive) silently advance last_applied_lsn past already-deleted data if the pump is lagging when trim_wal_segments fires. Currently bounded by the pre-existing APPLY_DIVERGENT boot fence (deferred loud fencing on next restart, not silent corruption) \u2014 a real behavior change from the pre-cache code, not literally risk-free, but not an active defect either. Same family as an already-tracked standby-cursor variant (per task 7.4's own notes).",
|
|
"fix": "FIXED (TDD RED->GREEN). trim_wal_segments() now caps its trim floor at the local apply pump's own progress (last_applied_lsn), not just remote standby-acked positions: floor = min(repl_trim_lsn's standby/disconnect-guard floor, last_applied_lsn+1). The +1 matters -- repl_trim_lsn's floor treats equality as 'still needed, preserve' (a standby acked through LSN N might still need that segment for retry/resync), but the LOCAL apply cursor's equality case means the opposite: last_applied_lsn==N means this process is DONE with entry N and will never re-read it, so a segment starting exactly at N is safe to delete. Feeding last_applied_lsn+1 into the same shared 'seg_start_lsn < floor' comparison gets correct delete-on-equal semantics for this term without a second, differently-shaped check. This closes the real gap: apply_pump_read_entry()'s fast-path cache holds an open fd into whatever segment it's currently reading; POSIX unlink-keeps-fd-alive meant a lagging pump could keep reading via that stale fd even after trim_wal_segments deleted the segment out from under it (no immediate corruption, since the fd's data was still valid) -- but a FRESH read of the same range (a restart's persist_recover() replay, or the pump's own cache falling back to its slow path after an unrelated miss) would find the segment already gone, producing a genuine APPLY_DIVERGENT-class gap between what the live process quietly caught up to and what a fresh read of disk state can see. Regression test (test_e2e_checkpoint.c's test_trim_guard_preserves_unapplied_local_segments): no standbys registered (so the pre-fix floor alone would allow trimming everything below the active segment) but last_applied_lsn deliberately lags behind one segment -- proves the already-applied segment IS trimmed (no unnecessary retention) while the not-yet-applied one is preserved (the actual guard). Also had to advance last_applied_lsn in the 3 pre-existing trim tests in the same file (test_checkpoint_wal_trim_after_checkpoint, test_trim_guard_preserves_standby_segments, test_trim_without_standbys_proceeds_normally), which call persist_wal_async directly (bypassing the whole apply path) and so never advance last_applied_lsn on their own -- without the added stamp, this fix would have correctly-but-unexpectedly blocked ALL trimming in those fixtures, since last_applied_lsn defaults to 0. Full controller_unit_test suite: 1099 tests, 2 pre-existing unrelated failures (bug-1561), no regressions.\n\n[Original entry]\nNOT FIXED \u2014 deliberately deferred. task 7.4's own scope explicitly excluded redesigning trim_wal_segments's retention-floor awareness of apply-pump lag; documented via an accurate code comment instead. A future fix would give trim_wal_segments a floor input derived from the local apply cursor, not just standby-acked LSNs.",
|
|
"tags": [
|
|
"ha",
|
|
"persistence",
|
|
"wal-trim",
|
|
"apply-pump",
|
|
"low-priority",
|
|
"raft-apply-decoupling-followup",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-09T21:15:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1427",
|
|
"timestamp": "2026-07-09T21:15:00.000Z",
|
|
"error_message": "APPLY_DIVERGENT's entity-count correctness check (persist_verify_apply_correctness) covers job entities only \u2014 worker entities can diverge (worker_from_capnp()/restore_worker() genuinely creates a new worker on a WAL_WORKER_CTRL/HOOK_DETAIL_WORKER_JOIN entry when absent) but this is currently invisible to the check.",
|
|
"file": "src/controller/persist.c (persist_verify_apply_correctness, count_jobmgr_entries)",
|
|
"root_cause": "Disclosed, accepted scope gap from raft-apply-decoupling task 5.1's own design: the entity-count check was scoped to jobs only (queues correctly excluded \u2014 config-derived, WAL_QUEUE_CTRL never creates a new one, verified by two review rounds). Workers were never brought in scope. Not a regression \u2014 a known, deliberate boundary, just not yet extended.",
|
|
"fix": "FIXED (TDD RED->GREEN). Extended persist_verify_apply_correctness() with a worker-count check mirroring the existing job-count check exactly: added count_workermgr_entries() (persist.c, mirrors count_jobmgr_entries()), a new expected_new_worker_count field on apply_expectation_t (persist.h), and a new workermgr_count_before_replay parameter threaded through persist_verify_apply_correctness()/persist_recover(). The harder part: apply_committed_entry()'s WAL_WORKER_CTRL case previously always returned 0 regardless of outcome (JOIN-creates-new, UPDATE-applies-to-existing, and idempotent-noop were all indistinguishable to callers), so replay_wal() had no signal to tally new worker joins from. Fixed by making worker_from_capnp() (worker.c) return 1 specifically for a genuine new-worker creation (discarding restore_worker()'s raw idx, which can legitimately be 0 and would have collided with the update-applied case) and propagating that rc through apply_committed_entry() instead of the hardcoded 0 -- verified no caller of either function depended on the exact prior return value (only sign and -EEXIST were ever checked). replay_wal() tallies apply_rc==1 for WAL_WORKER_CTRL exactly like it already does for WAL_JOB_SUBMIT. New regression tests: test_verify_apply_correctness_detects_worker_count_mismatch (test_apply_correctness_verification.c, mirrors the existing job-count-mismatch test) proves a worker-count divergence is now caught as APPLY_DIVERGENT -- RED before this fix (no worker check existed at all), GREEN after. Also updated test_apply_committed_entry.c's test_ace_worker_ctrl_join_restores_and_notifies, which asserted rc==0 for a genuine JOIN creation under the old (now-corrected) contract -- now asserts rc==1 with an explanatory message. Full controller_unit_test suite: 1097 tests, 2 pre-existing unrelated failures (bug-1561), no regressions.\n\n[Original entry]\nNOT FIXED. Extend persist_verify_apply_correctness() with a worker-count check mirroring count_jobmgr_entries() if/when a worker-creation divergence needs to be closed (task 5.1's own forward note).",
|
|
"tags": [
|
|
"ha",
|
|
"persistence",
|
|
"apply-divergent",
|
|
"worker",
|
|
"low-priority",
|
|
"raft-apply-decoupling-followup",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-09T21:15:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1428",
|
|
"timestamp": "2026-07-09T21:15:00.000Z",
|
|
"error_message": "Narrow TOCTOU residual in persist_register_pending_apply() (task 6.2, part of bug-1415's fix) \u2014 not reliably exercised by any current test.",
|
|
"file": "src/controller/persist.c (persist_register_pending_apply)",
|
|
"root_cause": "Flagged during raft-apply-decoupling task 6.2 as a non-blocking fast-follow while closing bug-1415. Specific race window not fully documented in tasks.md's own notes; needs a fresh look at the function to characterize exactly what window remains and whether it's reachable in production timing.",
|
|
"fix": "FIXED (characterized then TDD RED->GREEN, per the entry's own 3-step plan). Characterized the exact window: persist_register_pending_apply()'s self-heal check (an UNLOCKED read of last_applied_lsn) ran BEFORE acquiring pending_applies_lock, separate from the locked insert that followed. Window: this thread reads last_applied_lsn (sees 'not yet applied') -> BEFORE it locks and inserts, the apply pump's thread advances last_applied_lsn past this lsn AND completes its own persist_take_pending_apply(lsn) call (finding nothing, since this thread hasn't inserted yet) -> this thread then inserts a node the pump will never revisit -- permanently orphaned, identical failure mode to bug-1415 (a hang, on_applied never fires) via a different, narrower trigger window. Production reachability: yes -- persist_register_pending_apply() is called from a different thread/vtask than the apply pump's walk (commit.c's continuation dispatch vs persist_apply_pump_run, per the function's own pre-existing doc comment), with no synchronization between them before this fix beyond the already-locked insert. Fix: moved the self-heal check inside pending_applies_lock, so the whole check-then-(insert-or-self-heal) sequence is one atomic critical section against persist_take_pending_apply's own locked scan-and-remove -- either this thread's check now runs before the pump's take (sees 'not yet applied', inserts, and the pump's later take, now forced to wait on the same lock, finds the freshly-inserted node) or after (sees 'already applied', self-heals instead of inserting, and the pump's take correctly finds nothing) -- never the interleaved gap that orphaned it. Regression test (test_apply_pump.c's test_register_pending_apply_race_against_concurrent_apply_self_heals): deterministic reproduction via controlled state (a main thread holding pending_applies_lock forces the register call to observe last_applied_lsn only after the lock's own update, removing dependence on real-time race timing) -- RED under the pre-fix code (on_applied never fires, node orphaned on pending_applies), GREEN under the fix (self-heals correctly, no orphan). Full controller_unit_test suite: 1098 tests, 2 pre-existing unrelated failures (bug-1561), no regressions.\n\n[Original entry]\nNOT FIXED \u2014 explicitly deferred as a fast-follow, not a blocker for task 6.2 or the spec's closure. Needs: (1) characterize the exact TOCTOU window, (2) determine production reachability, (3) add a regression test that exercises it before fixing.",
|
|
"tags": [
|
|
"ha",
|
|
"persistence",
|
|
"apply-pump",
|
|
"toctou",
|
|
"unconfirmed",
|
|
"raft-apply-decoupling-followup",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1415"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-09T21:15:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1429",
|
|
"timestamp": "2026-07-10",
|
|
"error_message": "controller_unit_test suite TIMEOUT (300s, killed by SIGTERM) during /xce-build controller run immediately after uncommitted edits to persist.c, ha_convergence.c, config_repl.c (delaymgr-inline blocking I/O moved to VTASK_LIVE_BLOCK vtasks with inline-fallback-on-failure). Compile succeeded with zero errors (only pre-existing warnings). meson test summary: Ok:0 Fail:0 Timeout:1. Last test output before the hang was test_demotion_replay_yields_committed_only (test_commit_barrier_reply.c) printing overlayfs-SKIP, followed by a burst of HA FSM / persist_apply_pump_run log lines ending in \"HA quorum lost: connected=0 required=1\", then total silence for the remaining ~294s until SIGTERM. No ASAN/crash report -- looks like a genuine hang/deadlock, not a crash.",
|
|
"file": "src/controller/persist.c, src/controller/ha_convergence.c, src/controller/config_repl.c",
|
|
"root_cause": "NOT YET ROOT-CAUSED. Suspect the new delaymgr-trampoline -> vtask_enq_classified(pool, task, VTASK_LIVE_BLOCK) path blocks waiting for vtask completion that never arrives inside the controller_unit_test harness (e.g. vtask thread pool not pumped/started for this test fixture, or a lock-ordering deadlock between the delaymgr thread and the vtask worker). Ruled out: disk space is not exhausted (162G free, 81% used) so this is NOT the bug-924 ENOSPC/overlayfs-fdatasync pattern despite ~8182 leftover /tmp/xce_* dirs being present.",
|
|
"fix": "NOT FIXED -- reported to user for diagnosis; no code changes made in this session.",
|
|
"tags": [
|
|
"vtask",
|
|
"VTASK_LIVE_BLOCK",
|
|
"delaymgr",
|
|
"timeout",
|
|
"hang",
|
|
"deadlock-suspected",
|
|
"controller-tests",
|
|
"persist.c",
|
|
"ha_convergence.c",
|
|
"config_repl.c"
|
|
],
|
|
"related_bugs": [
|
|
"bug-924"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-10"
|
|
},
|
|
{
|
|
"id": "bug-1430",
|
|
"timestamp": "2026-07-10T07:12:00Z",
|
|
"error_message": "AddressSanitizer: heap-use-after-free on address ... WRITE of size 4 ... #0 ha_prevote_cancel_round_timeout ../controller/ha.c:6712 #1 ha_start_prevote_async ../controller/ha.c:6889 #2 ha_failover_stagger_fn ../controller/ha.c:7259 -- crashed 2 of 3 nodes during a live chaotic HA soak (10-round overlapping-kill mode)",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "ha_prevote_round_timeout_fn (the delaymgr task body for a PreVote round's timeout) only cleared the static s_prevote_round_ctx pointer inside its 'round still in progress' branch (ha->raft.pre_vote_in_progress true). When a round instead got decided via a reply arriving through raft_on_pre_vote_reply (which clears pre_vote_in_progress without touching s_prevote_round_ctx) and the round-timeout task fired afterward anyway (a benign, expected race), the function fell straight through to free(ctx) with s_prevote_round_ctx still pointing at that about-to-be-freed memory. The next PreVote round's ha_start_prevote_async defensively calls ha_prevote_cancel_round_timeout() before arming its own timer, reading the dangling pointer and writing to old->cancelled -- UAF. Same call stack (single delaymgr thread T8) on both crashing nodes, all-100%-reproducible under chaotic-mode's rapid overlapping restarts.",
|
|
"fix": "ha_prevote_round_timeout_fn now does a CAS (atomic_compare_exchange_strong_explicit matching s_prevote_round_ctx against this specific ctx, clearing to NULL) UNCONDITIONALLY as the first action, before either branch -- so the static pointer is never left dangling regardless of which path is taken. Brings it in line with the already-correct pattern used by the sibling function raft_election_timeout_fn (same file), which unconditionally clears its own stored ctx pointer before checking cancelled.",
|
|
"tags": [
|
|
"asan",
|
|
"use-after-free",
|
|
"prevote",
|
|
"delaymgr",
|
|
"chaotic-soak",
|
|
"raft"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1423",
|
|
"bug-1424"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-07-10T07:12:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1431",
|
|
"timestamp": "2026-07-10T10:02:00Z",
|
|
"error_message": "chaotic HA soak: committed_job_loss=5-8 across 10 rounds (VERDICT result=FAIL) after raft-apply-decoupling task 16 gated standby apply strictly on commit; committed_divergence stayed 0 and all jobs eventually reappeared at final settlement -- a visibility-latency gap, not true data loss",
|
|
"file": "src/controller/ha.c, src/controller/persist.c, src/include/persist.h",
|
|
"root_cause": "Two stacked gaps in raft_cb_become_leader promotion, both masked pre-task-16 by eager apply-on-WAL-receipt: (1) persist_truncate_wal_above only sets p->committed_lsn on branches of truncate_wal_above_locked that perform a REAL truncation; its common no-op early-return (leader own log already covers safe_lsn) left committed_lsn stuck at its pre-election value, so newly-computed safe_committed_lsn was never applied to the actual commit watermark. (2) Even after fixing (1) with a durable_lsn-capped store, a newly-promoted leader whose own fsync had not yet caught up to its own WAL tip (group-commit batches fsync on a timer) stayed capped below safe_lsn indefinitely -- nothing re-drove the promotion advance once the flusher eventually synced, since fsync_worker on_durable_advance only re-evaluates the commit engines PENDING per-entry continuations, and a standby has none for replicated entries.",
|
|
"fix": "New function persist_promotion_advance_committed(p, safe_lsn) (persist.c, declared in persist.h) called from raft_cb_become_leader right after persist_truncate_wal_above: unconditionally advances p->committed_lsn toward safe_lsn (monotonic), forcing a synchronous flusher_flush_once(p) first if durable_lsn < safe_lsn (safe/bounded -- by Raft Leader Completeness the new leaders own WAL tip is always >= safe_lsn, so the bytes are already on disk and only need fdatasync). Reduced but did not fully close the soak failures alone -- see bug-1432 for the second half of the fix.",
|
|
"tags": [
|
|
"raft",
|
|
"promotion",
|
|
"committed_lsn",
|
|
"chaotic-soak",
|
|
"apply-decoupling",
|
|
"durability"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1432"
|
|
],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-07-10T10:10:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1432",
|
|
"timestamp": "2026-07-10T10:15:00Z",
|
|
"error_message": "chaotic HA soak still FAIL (committed_job_loss=8) after bug-1431 force-flush fix; jobs above the conservative 2-voter safe_committed_lsn floor stayed invisible via expect-job for ~3.1s post-promotion, matching the primary heartbeat interval (3000ms) almost exactly",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "ha_start_primary_heartbeat armed the periodic heartbeat via delay_task_ms(interval_ms, -1, primary_heartbeat_fn, c), whose FIRST invocation fires only after interval_ms elapses (standard periodic-timer semantics) -- despite the functions own long-standing comment claiming to start the heartbeat immediately. A freshly-promoted leader therefore waited a full heartbeat interval before ever sending a NOP to a reconnecting/catching-up standby, so it could not learn that standbys true applied_lsn (via the heartbeat-reply stateReport, ha_process_standby_state) for up to 3s. That knowledge gates when catch-up WAL streaming starts and, in turn, the per-entry majority-ack that advances committed_lsn past the elections conservative safe_committed_lsn floor (jobs above that floor were legitimately majority-committed via the OLD primary before it died, per Leader Completeness, but the new leader cannot expose them without fresh quorum corroboration -- a correct Raft Figure-8 safety requirement, not a bug in itself).",
|
|
"fix": "ha_start_primary_heartbeat now calls primary_heartbeat_fn(c) synchronously once, immediately, before arming the periodic delay_task_ms timer -- matching the functions own documented intent. primary_heartbeat_fn only performs non-blocking async sends (xce_ha_heartbeat_req), so this is safe inline with no thread-role change. Single fix point covers all 3 promotion call sites (raft_cb_become_leader, ha_promote_to_primary, and the third raft-driven-decision-loop site) since all route through ha_start_primary_heartbeat. Closed the gap: 10-round chaotic soak went from committed_job_loss=8 to committed_job_loss=0, committed_divergence=0, result=PASS; 10-round sequential soak + leadership-coverage also PASS (36 jobs, zero loss).",
|
|
"tags": [
|
|
"raft",
|
|
"heartbeat",
|
|
"promotion",
|
|
"delaymgr",
|
|
"chaotic-soak",
|
|
"latency"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1431"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-07-10T10:26:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1433",
|
|
"timestamp": "2026-07-10T10:59:00Z",
|
|
"error_message": "controller-invariant-audit (2026-07-10, /xce-audit-invariants) async-I/O-thread-role dimension: bug-1431 round-2 force-flush fix (persist_promotion_advance_committed calling flusher_flush_once, a blocking fdatasync) is reachable via the real multi-node winning-vote-reply dispatch path on a VTASK_LIVENESS-classified vtask worker -- a task class the design documents as never admission-gated / never expected to block. This is the same bug class as bug-1198 (HA_REPL_SEND_SNAPSHOT persist_checkpoint on VTASK_LIVENESS), which was previously closed by offloading the blocking work off that worker class entirely.",
|
|
"file": "src/controller/persist.c, src/controller/ha.c",
|
|
"root_cause": "raft_cb_become_leader (the .on_become_leader raft-library callback) is invoked synchronously from within peer_ctrl_msg_handler -> peer_ctrl_dispatch_to_pool -> peer_ctrl_classify (ha.c ~5935-5940), which HARDCODES VTASK_LIVENESS for every inbound peer-control packet including vote replies -- the doc comment above it explicitly states \"everything this handler dispatches is liveness work today\" and was written BEFORE this session added a blocking fdatasync call reachable from that same path. ha_dispatch_election_start/raft_election_start_vtask_entry (the VTASK_LIVE_BLOCK dispatch used for the RDHUP-failover and single-node self-grant election-START triggers) does NOT cover the separate, later \"win the election / become leader\" event, which fires on vote-REPLY arrival via a completely different dispatch chain.",
|
|
"fix": "Removed the flusher_flush_once force-flush from persist_promotion_advance_committed entirely -- round-3 (durable-capped only, no blocking calls) plus the already-shipped bug-1432 immediate-first-heartbeat fix together close the original visibility-latency gap non-blockingly (confirmed by two live soaks: 6-round chaotic committed_job_loss=0/committed_divergence=0 PASS, 6-round sequential+leadership-coverage PASS). TRACKED RESIDUAL (not fixed this session): persist_apply_pump_run_sync (added earlier this session for the bug-1043-family apply-lag fix, also called from raft_cb_become_leader on the same VTASK_LIVENESS path) does bounded pread() of recently-written WAL segments -- lower practical risk than fdatasync (almost always page-cache-hot) but still, strictly, blocking I/O on a never-blocks task class. Removing it is NOT safe (reopens bug-1043-family job loss). Proper fix needs either reclassifying the winning-vote-reply case in peer_ctrl_classify or dispatching promotion tail onto a fresh VTASK_LIVE_BLOCK vtask -- both larger changes deferred to a dedicated follow-up with its own soak-validation pass. Comments at both call sites corrected to stop falsely claiming VTASK_LIVE_BLOCK safety.",
|
|
"tags": [
|
|
"raft",
|
|
"promotion",
|
|
"vtask",
|
|
"thread-role",
|
|
"liveness",
|
|
"audit-finding",
|
|
"bug-1198-class"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1431",
|
|
"bug-1432",
|
|
"bug-1198"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-10T10:59:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1434",
|
|
"timestamp": "2026-07-10T10:56:00Z",
|
|
"error_message": "controller-invariant-audit (2026-07-10, /xce-audit-invariants) Raft TLA+ checklist dimension: persist_promotion_advance_committed and ha_standby_advance_committed_and_apply can race on persist_t.committed_lsn during the promotion window before role flips to CTRL_PRIMARY, via an unlocked load-then-conditional-store pattern in both functions -- a losing racer could clobber a larger value with a smaller one, regressing committed_lsn (violates the documented commitIndex-monotonic invariant).",
|
|
"file": "src/controller/persist.c, src/controller/ha.c",
|
|
"root_cause": "raft_cb_become_leader calls persist_promotion_advance_committed BEFORE setting ha->role = CTRL_PRIMARY (the role store sits ~170 lines later in the function). During that window this node is still nominally non-primary, so ha_apply_wal_catchup_entry (still processing an in-flight WAL catch-up entry on another thread, e.g. if this node was mid-catch-up when it won the election) can legitimately call ha_standby_advance_committed_and_apply concurrently with the promotion path own committed_lsn advance. Both did atomic_load(committed_lsn); if(target<=cur) return; atomic_store(committed_lsn, target) with no lock and no CAS, a classic lost-update race under concurrent writers.",
|
|
"fix": "Added persist_committed_lsn_advance_atomic(persist_t*, uint64_t target) (persist.c, declared in persist.h) -- a CAS retry loop (atomic_compare_exchange_weak_explicit) that is safe against any number of concurrent callers with no lock required, and can never regress committed_lsn regardless of interleaving. Both persist_promotion_advance_committed and ha_standby_advance_committed_and_apply now route through this shared helper. Validated: build clean (19/19 unit test suites pass), 6-round chaotic soak PASS (0 loss, 0 divergence), 6-round sequential+leadership-coverage soak PASS.",
|
|
"tags": [
|
|
"raft",
|
|
"committed_lsn",
|
|
"race-condition",
|
|
"monotonicity",
|
|
"audit-finding",
|
|
"CAS"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1431"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-10T10:56:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1435",
|
|
"timestamp": "2026-07-12T04:45:15Z",
|
|
"error_message": "40-round sequential /xce-test-ha FAIL at round 36/40: verify_no_loss reported 0/111 jobs confirmed after 3 attempts; xce_joblist client call returned E_XCE_STANDBY (10014) against freshly-elected primary ctrl-1 (term=41) moments after wait-primary succeeded on the same session",
|
|
"file": "src/controller/ha.c (raft_state_t entry points), src/controller/ha.h (new raft_lock field), src/controller/cluster.c (raft_on_vote_request/raft_on_pre_vote_request call sites)",
|
|
"root_cause": "ROOT-CAUSED (2026-07-12, static analysis + full call-graph trace, not live-reproduced under a debugger due to timing rarity -- see confidence note in fix). ha_dispatch_gate's CTRL_STANDBY branch is the ONLY production site that can return -XCE_ERR_STANDBY for a GET/joblist request (confirmed by exhaustive read of ha.c:3699-3865); under CTRL_PRIMARY, OPCode_get is unconditionally allowed regardless of quorum/fence state. So the answering node's ha->role was genuinely CTRL_STANDBY at the moment ha_dispatch_gate ran -- this was NOT a client-side discovery/retry-budget problem (ruled out: XCECLI_FAILOVER_CALL's retry loop -- src/lib/client_failover.c -- correctly retries E_XCE_STANDBY up to max_retries=20 with zero backoff via XCE_FO_RETRY_NOW, and its final surfaced rc staying exactly -E_XCE_STANDBY on budget exhaustion is the DOCUMENTED behavior for a RETRY_NOW-classified cause, not a symptom of a broken retry loop). The MISSING INFO 'xcecli failover: attempt N' log lines (zero matches across the whole 40-round run) are explained by the fact that libxce's wait-primary REPL command (cmd_wait_primary, testsuite/test.c) does its OWN silent primary-discovery/redirect-follow loop (xcecli_ctrlstatus_primary) that never calls the shared xcecli_retry_next/INFO-logging path -- once wait-primary hands off a live, correctly-connected-to-primary ctx, subsequent ops normally succeed on attempt 0 with nothing to log; this is a red herring, not a clue to a client bug. The REAL mechanism is a genuine, unsynchronized DATA RACE in raft_state_t (the embedded Raft consensus struct, ha->raft): raft_on_vote_reply/raft_on_vote_request/raft_on_pre_vote_reply/raft_on_pre_vote_request/raft_begin_pre_vote/raft_start_election/raft_check_and_start_election/raft_on_election_timeout/raft_on_higher_term_observed all read+mutate raft_state_t's PLAIN (non-atomic) fields (term, role, votes_granted, replies_received, election_decided, vote_replies[], pre_vote_* tally) with ZERO locking -- the raft library (src/lib/raft/raft.c) is written assuming a single-threaded/serialized caller (the classic Raft single-event-loop model). But the raft-drive-async feature (peer_ctrl_dispatch_to_pool in ha.c, default ON via g_drive_async_peerctrl_dispatch_enabled=1) dispatches each peer-control message (including RequestVoteReply from each individual voter) as an independent VTASK_LIVENESS vtask onto the shared vtaskmgr pool; peer_ctrl_dispatch_to_pool's own per-endpoint serialization (bind_vtask) only orders messages arriving on the SAME endpoint -- it does NOT serialize messages from DIFFERENT peers' endpoints against each other. So two vote replies from two different voters (e.g. ctrl-2 grants, ctrl-3 grants or denies) for the SAME election CAN be processed concurrently on two different pool worker threads, both calling raft_on_vote_reply(&ha->raft, ...) on the shared struct with no lock. Traced exact race for the observed symptom: worker A processes voter1's grant, reaches quorum (votes_granted=2>=2), sets election_decided=1, fires on_become_leader -> raft_cb_become_leader -> ha->role=CTRL_PRIMARY (term=41, matching ctrl-1's own logs exactly). Worker B, running concurrently (no synchronization), processes voter2's reply and -- racing on the unprotected votes_granted/replies_received/election_decided reads -- can independently satisfy raft_on_vote_reply's Step 6 'all replied, no quorum' branch (replies_received==n_peers-1 && votes_granted<quorum, read before worker A's increment is visible to it) and fire on_become_follower -> raft_cb_become_follower -> ha->role=CTRL_STANDBY for the SAME term, an instant after promotion, with no further election and no fresh log line calling out a 'demotion' that anyone was specifically looking for. Every subsequent client GET request then correctly, faithfully hits ha_dispatch_gate's CTRL_STANDBY branch and is rejected with -XCE_ERR_STANDBY -- explaining why the failure PERSISTED across all retries/attempts across multiple seconds (nothing else ever corrects role back to PRIMARY once flipped -- no bug, no external trigger, it just stays CTRL_STANDBY). This also explains why the bug needed ~36 rounds to surface once: it requires two vote replies to genuinely overlap in processing time on two different pool workers, a narrow, load/scheduling-dependent timing window. Verified raft-drive-async is on by default (g_drive_async_peerctrl_dispatch_enabled=1) and confirmed via full call-graph trace that raft_cb_become_leader/raft_cb_become_follower (the synchronously-fired callbacks) never themselves call back into another raft_* entry point (no re-entrancy via the callbacks), and that no existing ha->lock-held critical section ever calls into a raft_* function (so lock-order is always raft_lock-then-ha->lock, never reversed -- no ABBA risk versus the two pre-existing lock-order bugs in this exact area, bug-652 and bug-1282). CONFIDENCE: HIGH on mechanism (every piece of evidence in the original investigation -- ctrl-1's own healthy term=41 promotion log, zero ASAN errors, commit_advanced continuing for seconds after, the missing xcecli-failover logs, every retry returning the SAME E_XCE_STANDBY class -- is fully and specifically explained by this race, with no residual unexplained facts), but NOT live-reproduced under a debugger/instrumented build in this session (the race is timing-rare, needed ~36 rounds to surface once in the original soak) -- this is a well-evidenced, fully-traced static diagnosis, not a confirmed-via-repro one.",
|
|
"fix": "Added a new dedicated ha_state_t field `raft_lock` (pthread_mutex_t, PTHREAD_MUTEX_RECURSIVE -- src/controller/ha.h) serializing every mutating/reading entry point into raft_state_t on the election/vote path: raft_on_vote_reply (ha.c vote_reply_dispatch), raft_on_vote_request + raft_on_pre_vote_request (cluster.c, inbound vote RPCs), raft_on_pre_vote_reply + raft_begin_pre_vote (ha.c pre-vote dispatch), raft_start_election + raft_check_and_start_election x3 call sites (ha.c election-start paths, inline and vtask-dispatched), raft_on_election_timeout (ha.c delaymgr callback), and raft_on_higher_term_observed x2 (ha.c heartbeat-reply and WAL-NACK term-discovery paths). Initialized/destroyed in ha_init/ha_fini. Deliberately RECURSIVE (not a plain mutex): raft_on_pre_vote_reply's WON branch and raft_begin_pre_vote's single-node-win branch synchronously call ha_enter_real_election -> ha_start_election_async -> raft_start_election on the SAME thread within the same call chain (a legitimate same-thread nesting, not a race) -- a plain non-recursive mutex would self-deadlock on that path exactly like the precedent bug-652 (ha->lock self-deadlock from synchronous re-entry). Deliberately scoped to the ELECTION/VOTE path only, NOT the AE/commit-replication path (raft_log_append, raft_on_append_entries_request/reply, raft_advance_commit) -- ha_primary_log_append/raft_log_append is reachable from concurrent client-write vtasks with no visible lock either, which may be a SEPARATE, analogous concurrency gap, but touching the write/durability path carries much higher regression risk and wasn't the demonstrated mechanism for this specific symptom; flagging it as a follow-up investigation, not silently ignoring it. Verified no lock-order regression: no existing ha->lock-held critical section calls into any raft_* function (grepped and read all 9 ha->lock call sites), so raft_lock is always acquired before, never after, ha->lock -- consistent single order, no ABBA (cf. bug-1282, bug-652). Build: nix develop ./src -- bash src/tools/xce-build.sh controller -- clean compile, zero new warnings (3 pre-existing unrelated warnings in ha.c/cluster.c confirmed via git diff hunk-range check to be outside every edited region), controller_unit_test meson suite Ok:1 Fail:0 in 32.38s with no hang/timeout (a hang would have surfaced a recursive-mutex misuse or missed ha_init path, per the bug-1224/bug-1429 precedent of dispatch-related test hangs in this exact area -- none occurred). NOT live-reproduced/soak-validated in this session (explicitly deferred by the user to a separate follow-up 40-round /xce-test-ha run) -- this is a well-evidenced, carefully-scoped static fix for a data race, not a repro-confirmed one; flagged honestly as best-effort-but-high-confidence rather than 100%-certain.",
|
|
"tags": [
|
|
"ha",
|
|
"raft",
|
|
"raft-drive-async",
|
|
"data-race",
|
|
"raft_state_t",
|
|
"vote-reply",
|
|
"election",
|
|
"verify_no_loss",
|
|
"xce-test-ha",
|
|
"E_XCE_STANDBY",
|
|
"concurrency",
|
|
"peer_ctrl_dispatch_to_pool",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-608",
|
|
"bug-1197",
|
|
"bug-1198",
|
|
"bug-1417",
|
|
"bug-652",
|
|
"bug-1282"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-12T04:45:15Z"
|
|
},
|
|
{
|
|
"id": "bug-1436",
|
|
"timestamp": "2026-07-12T05:50:00Z",
|
|
"error_message": "40-round sequential /xce-test-ha FAIL at round 36/40: xce_joblist: Connection reset by peer, immediately after wait-primary confirmed ctrl-2 serving in 46ms. RE-OPENED 2026-07-12 ~14:00-16:00Z after a live re-test (fresh isolated 40-round run, no concurrent soak) reproduced the IDENTICAL failure with ctrl-2 confirmed NEVER killed (same PID throughout, continuous RAFT/heartbeat log activity, still answering other clients after the failure) -- disproving the process-collision theory as the (sole) root cause. ROOT-CAUSED FOR REAL via live capture (tcpdump unavailable in sandbox -- no CAP_NET_RAW; used direct -vvv log correlation on a live reproduction instead) 2026-07-12 ~16:00-16:15Z. FIXED.",
|
|
"file": "src/lib/client_internal.h (new XCECLI_FAILOVER_CALL_COUNT macro), src/lib/client.c (xcecli_reslist/xcecli_workerlist/xcecli_joblist/xcecli_resval/xcecli_jobinfo switched to it). .claude/skills/xce-test-ha/run-ha-soak.sh's node_pattern()/run_pattern() workdir-scoping fix (prior pass) remains a legitimate, independent improvement -- KEPT, not reverted.",
|
|
"root_cause": "TWO ROOT CAUSES, both now addressed. (1) SUPERSEDED/PARTIAL (kept as a real but non-exclusive fix): the original pass diagnosed this as run-ha-soak.sh's unscoped `pkill -9 -x xce_controller` letting a second concurrent soak invocation silently SIGKILL the first run's live primary. That fix (node_pattern()/run_pattern() workdir-scoped pgrep/pkill) is a genuine improvement and stays in place, but a FRESH, FULLY ISOLATED 40-round soak re-run (deploy dir xce-test-ha-40-v2, confirmed via `ps aux` before/during/after that no second soak was ever running) STILL FAILED at round 36/40 with the byte-identical signature, and ctrl-2's own log proved it was never killed (constant PID, unbroken RAFT event stream, still serving OTHER clients seconds after the failure) -- so process collision was real but was NOT the (sole) mechanism behind every occurrence. (2) THE ACTUAL ROOT CAUSE (found via live reproduction, not archaeology): `xcecli_joblist`/`xcecli_reslist`/`xcecli_workerlist`/`xcecli_resval`/`xcecli_jobinfo` (src/lib/client.c) are all built on `xce_get_with_condition` (src/lib/xceapi.c), which returns a NON-NEGATIVE ROW COUNT on success (`rc = getreply.nrows`) -- NOT the uniform '0 = success, negative = XCE/errno-style status' convention every OTHER xcecli_* wrapper follows. All of them were routed through the generic `XCECLI_FAILOVER_CALL` macro (client_internal.h), which unconditionally feeds the raw EXPR return value into `xce_failover_classify()` (client_failover.c) -- a function that recognizes retriable/terminal outcomes purely by MAGNITUDE (E_XCE_* codes >=10001, and POSIX errno values it deliberately accepts in EITHER sign via `fo_abs()`: ECONNRESET=104, ETIMEDOUT=110, ECONNREFUSED=111). A joblist reply whose row count happens to equal one of these magnitudes is silently misclassified as a transport failure on EVERY call with that exact count, even though the read fully succeeded -- forcing a spurious `xce_failover_rotate()` to the next configured master. Since get-class ops are primary-only, landing on a standby correctly (but pointlessly) fails with E_XCE_STANDBY and rotates again; the whole cycle repeats for every subsequent same-sized call in the same verify_no_loss batch, burning the finite `max_retries` budget (20, XCE_RETRY_DEFAULTS) on self-inflicted reconnect churn. run-ha-soak.sh's sequential mode submits NJOBS=3 per round, so the tracked job count follows the arithmetic progression 3+3*round -- of the three dangerous POSIX magnitudes (104, 110, 111), ONLY 111 is a multiple of 3, and it is hit for the FIRST time at EXACTLY round 36 (3+3*36=111=ECONNREFUSED) -- explaining both why this is genuinely rare (requires an exact numeric collision, not a generic race) and why it always surfaced at round 36 specifically for this test's job-count cadence. LIVE PROOF: a fresh, fully isolated 40-round soak (deploy dir xce-test-ha-40-bug1436-live) failed AGAIN at round 36/40 with 111 tracked jobs; the target primary's own -vvv log (ctrl-2, PID confirmed continuously alive via a parallel 1s-resolution forensic process/connection poller) showed a clear, damning pattern for the ENTIRE 'verify' client session: `cluster.c:786 server sock 4 accepted 10` (a BRAND NEW TCP connection) immediately before EVERY SINGLE `opcode get` request, followed by two `xce_reply` sends (the >100-row chunked-get path, xce_reply_get pktlimit=100) and then `cluster.c:64` (the TRACE line inside `handle_endpoint_error`, i.e. the connection being torn down) -- one full accept-serve-close cycle PER expect-job call, ~1799 accepts total on that one short-lived primary PID alone -- confirming the client was silently reconnecting on every single (mostly-successful) get call, exactly the reconnect storm this mechanism predicts, not a misreading of the log by a prior investigation pass. The run's own retry-storm messages ('verify_no_loss attempt 1/3: recheck failed... likely post-election client retry-storm race') were themselves an accurate but previously-misinterpreted symptom of this bug. Confirmed via codegraph_explore + direct reads of src/lib/client.c, src/lib/client_internal.h, src/lib/client_failover.c, src/lib/xceapi.c, src/lib/request.c (xce_reply_get chunking), src/controller/opget.c (do_reply_joblist/check_controller), src/lib/netio.c (endpoint_enq/handle_error/handle_output -- confirmed NOT independently implicated: zero `endpoint_update_epoll` WARN lines anywhere in the failing run's ctrl-2.log), and the existing `src/lib/testsuite/test_libxce_retry.c` StatusClassifier taxonomy tests (which confirm `xce_failover_classify` is INTENTIONALLY designed to accept genuine status codes in either sign -- the bug is that 5 call sites fed it a row count instead of a status code, not that the classifier itself is wrong). Two purpose-built synthetic repro harnesses (hammer2.sh: fixed 60-job list, ~5400+ calls with periodic real primary kills; hammer3.sh: fixed 495-job list, ~1500+ calls with periodic real primary kills) both ran clean with ZERO failures, because neither ever held the tracked job count at exactly 104/110/111 -- which in hindsight is the confirming, not disconfirming, result: the bug requires an EXACT count collision, not raw connection-churn volume, so a fixed-size synthetic repro that never lands on the magic number cannot hit it no matter how much volume it generates. That negative result is what motivated pivoting to the real /xce-test-ha harness (which naturally sweeps through every job count via its round-based growth) as the reproduction vehicle, per the live-capture mandate.",
|
|
"fix": "Added `XCECLI_FAILOVER_CALL_COUNT(ac, EXPR)` to src/lib/client_internal.h -- a sibling of `XCECLI_FAILOVER_CALL` for xce_get-family calls. It only enters the retry/classify loop when EXPR's raw result is NEGATIVE (`while ((_fc_rc < 0) && xcecli_retry_next(...))`); any non-negative result (0 or a genuine row count of ANY magnitude) is unconditionally treated as success and returned as-is, so it can never be misread as a retriable/terminal status code. A dead ctx (XCE_CTX_ERR) is still handled correctly: the per-op XCE_CTX_RUN guard in xceapi.c makes EXPR itself return a negative -EINVAL in that state, which enters the loop and is reclassified by xcecli_retry_decide's dead-connection branch exactly as before. Switched the 5 count-returning call sites in src/lib/client.c to the new macro: xcecli_reslist, xcecli_workerlist, xcecli_joblist (the confirmed live-reproduced offender), xcecli_resval (same xce_get_with_condition pattern, same latent risk), and xcecli_jobinfo (returns a fixed 1 on success -- lower risk since it never collides with a recognized magnitude and was previously misclassified as TERMINAL, which is harmless because TERMINAL does not rotate/rewrite rc, but fixed anyway for correctness/consistency rather than relying on that coincidence). Did NOT touch `xce_failover_classify` itself or any of the other 14 XCECLI_FAILOVER_CALL call sites (hello, join, jobdispatch, jobsubmit, clusterconf, ctrlstatus, update_resvals, update_jusage, jobctrl, queuectrl, hostctrl, runtask, set_pend_reason, clear_reason) -- all of those genuinely follow the 0/status-code convention the classifier is designed for, confirmed via test_libxce_retry.c's existing StatusClassifier taxonomy tests, which still pass unmodified (xcelib_test: 293 Tests 0 Failures 0 Ignored). controller_unit_test: 926 PASS / 0 FAIL / 0 Ignored (direct-binary run, ANSI-stripped grep census, exit 0). Did NOT touch run-ha-soak.sh further (its bug-1436-prior-pass workdir-scoping fix stays, unrelated to this mechanism) and did NOT add a client-side retry-more band-aid -- the actual defect was a classification-layer bug misinterpreting legitimate success data as a transport error, not a genuinely unavoidable transient condition, so the correct fix is at the classification boundary, not the retry budget.",
|
|
"tags": [
|
|
"ha",
|
|
"connection-reset",
|
|
"econnreset",
|
|
"xce-test-ha",
|
|
"sequential-mode",
|
|
"round-36-recurrence",
|
|
"libxce-failover",
|
|
"client_failover.c",
|
|
"xce_failover_classify",
|
|
"xcecli_joblist",
|
|
"status-code-magnitude-collision",
|
|
"ECONNREFUSED-111",
|
|
"reconnect-storm",
|
|
"ROOT-CAUSED",
|
|
"FIXED",
|
|
"live-repro"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1435",
|
|
"bug-1418",
|
|
"bug-854",
|
|
"bug-646"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-07-12T16:12:54Z"
|
|
},
|
|
{
|
|
"id": "bug-1437",
|
|
"timestamp": "2026-07-13T00:55:00Z",
|
|
"error_message": "Verification run of lib build + xcelib_test --run test_jobj_hardening (ASAN_OPTIONS=detect_leaks=1) after user changed 4x .datakiller=destroy -> .datakiller=dereference in src/lib/testsuite/test_jobj_hardening.c (to fix a leak in the kvmgr-of-job_t test fixture, since job_t.destroy is NULL in RTTI typeinfo and teardown only runs via job_dereference): Unity reports 5/5 PASS, 0 Failures, 0 Ignored, but LeakSanitizer STILL reports two leaks totaling 247 bytes and the process exits 1 (no halt_on_error/abort_on_error set, so no SIGABRT with plain detect_leaks=1 -- differs from the meson full-suite run which sets abort_on_error=1 and gets killed by signal 6).",
|
|
"file": "src/lib/testsuite/test_jobj_hardening.c",
|
|
"root_cause": "TWO leaks detected, only one already known. (1) Direct leak of 240 bytes via calloc -> makeInstance -> makeJob_ (../lib/jobj.c:768) -> makeJob (../lib/jobj.c:789) -> test_job_init_propagates_makeJobsub_failure (test_jobj_hardening.c:133) -- this IS the already-diagnosed, out-of-repo makeInstance-does-not-free-on-negative-init-rc characteristic (vendored rtti library), unrelated to the datakiller fix. (2) Direct leak of 7 bytes via strdup -> hard_build_accounts (test_jobj_hardening.c:269) -> test_job_destroy_does_not_leak_accounts (test_jobj_hardening.c:328) -- this is a SEPARATE, NEW leak signature not previously logged, and it is attributed to the exact test (test_job_destroy_does_not_leak_accounts) that the datakiller=dereference fix was meant to make leak-free. NOT YET DIAGNOSED WHY: could be an unrelated small leak in the hard_build_accounts helper itself (e.g. a strdup()d account string never freed regardless of datakiller correctness), or could indicate the datakiller fix is incomplete. Not investigated further per explicit user instruction to build/run/report only, no fixing.",
|
|
"fix": "NOT FIXED IN THIS SESSION -- user explicitly instructed build+run+report only, no code changes. Logging the raw finding so the next session does not have to rediscover it: the accounts-leak test still leaks (7 bytes, strdup, hard_build_accounts) even after the .datakiller=dereference change, though it is a much smaller leak than the pre-existing 240-byte makeInstance one and does not cause any Unity test FAILURE (LSAN leak detection is a separate pass/fail axis from Unity PASS/FAIL in this harness). RECURRENCE 2026-07-16 (2nd occurrence, mechanical-validation pass for job-array-single-wal-record spec, dimension A/full-suite reconfirmation): full lib test binary run (ASan) again reports 638 PASS / 0 FAIL at the Unity level, but LeakSanitizer aborts the process at exit with the same 240-byte makeInstance->makeJob_ (jobj.c:768) leak signature, triggered via test_job_init_propagates_makeJobsub_failure (test_jobj_hardening.c:133). Confirmed this is the SAME pre-existing vendored-rtti-library characteristic already diagnosed in this entry's root_cause (1), not a new leak and not introduced by this feature's production code -- the feature's own new test is simply the first test in the suite to deliberately drive job_init() to fail after makeInstance() has already allocated, so it is the first to trip the latent characteristic. Still NOT FIXED (out of scope for a validation-only pass); flagging that under meson's full-suite invocation (abort_on_error=1) this leak turns into a SIGABRT / non-zero exit code for the lib test binary, so a naive exit-code-only CI gate would read this as a lib-suite failure even though zero Unity assertions fail and zero new markers/regressions exist in feature code.",
|
|
"tags": [
|
|
"jobj",
|
|
"test_jobj_hardening",
|
|
"leak",
|
|
"asan",
|
|
"lsan",
|
|
"datakiller",
|
|
"dereference",
|
|
"hard_build_accounts",
|
|
"test_job_destroy_does_not_leak_accounts",
|
|
"unverified-fix",
|
|
"kvmgr",
|
|
"job-array-single-wal-record",
|
|
"mechanical-validation",
|
|
"reconfirmed"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-07-16T05:24:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1438",
|
|
"timestamp": "2026-07-14T09:36:00Z",
|
|
"error_message": "test_job_array_submit_appends_exactly_one_wal_entry_and_one_continuation: Expected 11 Was 5 (WAL type mismatch); subsequent test hung all 3 threads on futex_do_wait",
|
|
"file": "src/controller/testsuite/test_commit_barrier_rollout.c",
|
|
"root_cause": "jap_read_last_wal_hdr()/jap_read_last_wal_payload() were copied from read_last_wal_hdr() in test_ha_role_lifecycle.c, which computes the header offset as seg_offset - sizeof(hdr). That arithmetic is only correct for zero-payload entries (its only prior caller was a WAL_NOOP test). Every WAL_JOB_ARRAY_SUBMIT entry carries a nonzero capnp payload, so seg_offset - sizeof(hdr) landed inside the payload bytes, not the header -- read garbage decoded as a bogus type (5 == WAL_JOB_STOP). The first array test's TEST_ASSERT_EQUAL_UINT32 failure then longjmp'd out of the test body BEFORE reaching jap_teardown(), leaking that test's persist_t (background WAL-sync thread still running) into the next test's jap_setup() memset -- corrupting a live mutex mid-flight and deadlocking all 3 threads on futex_do_wait in the very next test.",
|
|
"fix": "Replaced the back-computed-offset helpers with jap_read_wal_hdr_at()/jap_read_wal_entry_at(), which take the entry's start offset EXPLICITLY. Callers now snapshot g_jap.seg_offset immediately before each persist_submit_job_array_async() call and pass that snapshot in, instead of trying to infer the header position from the post-append offset.",
|
|
"tags": [
|
|
"job-array-single-wal-record",
|
|
"wal",
|
|
"test-helper",
|
|
"offset-arithmetic",
|
|
"deadlock",
|
|
"futex"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-14T09:36:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1439",
|
|
"timestamp": "2026-07-14T13:15:00Z",
|
|
"error_message": "lib/controller.capnp.h:4170:43: error: unknown type name 'LimitCon'; lib/controller.capnp.h:1: error: unterminated #ifndef \u2014 during ninja compile of lib/libxce.a.p/utils.c.o, cascading into ~440 bogus errors (glibc math.h storage-class errors, utils.h ectx_t redefinition) for the rest of that one translation unit",
|
|
"file": "src/xce.build/lib/controller.capnp.h (generated by [5/190] Generating lib/controllercapnp.[ch] custom command)",
|
|
"root_cause": "SUSPECTED (not confirmed): parallel-build race \u2014 gcc appears to have read lib/controller.capnp.h while the custom-command generation step was still writing it (non-atomic write, no write-to-tmp+rename). Evidence: re-inspecting the SAME on-disk file immediately after the failed build shows correct, well-formed content at line 4170 (get_LimitConfig(struct LimitConfig*, LimitConfig_list, int i);) and balanced #ifndef/#endif (9/9) \u2014 i.e. the finished file is NOT actually corrupt, only what gcc read mid-write was. Not yet reproduced a second time to confirm.",
|
|
"fix": "NONE APPLIED \u2014 this run was build+report only (nix develop ./src -- xce-build.sh controller), not a fix task. Build failed via set -euo pipefail before any tests ran; no controller/xce_controller, controller_unit_test, or xce_test binaries were produced. Next step if it recurs: check meson.build custom_target() for lib/controller.capnp.[ch] has correct output declarations / add explicit depends on all consumers, or file upstream against capnpc-c invocation for atomic output. RECURRENCE 2026-07-16 (2nd occurrence, CONFIRMS the race, different symptom): clean build (rm -rf xce.build) of `nix develop ./src --command bash src/tools/xce-build.sh controller asan` at HEAD 2a76940. This time gcc failed with `fatal error: controller.capnp.h: No such file or directory` (not corrupted content) for hook.c.o, threshold.c.o, xlist.c.o, utils.c.o, window.c.o, xceapi.c.o, wrap.c.o \u2014 all 7 consumers of utils.h#include controller.capnp.h. Critically, ninja's own completion log shows `[12/191] Generating lib/controllercapnp.[ch]` printed AFTER jobs [5..11] (the 7 failed compiles) had already completed/failed. This proves the custom_target that generates lib/controller.capnp.h has no dependency edge forcing it to run before these 7 specific compile units \u2014 confirms the suspected root cause in the original entry (missing depends()/output declaration in meson.build), not just a non-atomic-write timing fluke. Still NOT fixed (build+report only task, no source edits authorized). controller_unit_test and xce_test were never produced this run (clean build wiped the prior binaries and the new build failed before relinking). RECURRENCE 2026-07-17 (3rd occurrence, kiro-validate-impl smoke-boot build for job-array-single-wal-record): fresh (non-clean) build of `nix develop ./src --command bash src/tools/xce-build.sh controller` at HEAD ea8d9d3 failed on the FIRST invocation with yet another symptom of the same race: `fatal error: opening dependency file controller/controller_unit_test.p/ha.c.o.d: No such file or directory` AND simultaneously `fatal error: opening dependency file lib/libxce.a.p/meson-generated_.._controller.capnp.c.o.d: No such file or directory` for two unrelated targets at once ([187/192] and [188/192]) -- gcc could not open its OWN .o.d dependency-file output path, not an input header this time, reinforcing this is a general ninja/meson parallel-build filesystem race in this sandbox, not specific to controller.capnp.h generation. WORKAROUND CONFIRMED AGAIN: simply re-running the identical build command with no source changes succeeded cleanly (85/85 targets, controller_unit_test 3/3 OK), producing fresh xce_controller/xce_test binaries. Do-not-repeat: if xce-build.sh fails with any \"fatal error: opening dependency file ... .o.d: No such file or directory\" or \"controller.capnp.h: No such file or directory\", just retry the same command once before treating it as a real build break -- do not start debugging source code. RECURRENCE 2026-07-20 (4th occurrence, xce-build.sh all asan build+report task validating bug-1453/1454 C-side changes, HEAD after commit 619f41f): clean build failed on FIRST invocation with fatal error: controller.capnp.h: No such file or directory for xlist.c.o, htab.c.o, window.c.o, xstring.c.o, hook.c.o, wrap.c.o, threshold.c.o, xceapi.c.o, utils.c.o, zarray.c.o (10 consumers of utils.h#include controller.capnp.h) -- ninja log again shows [16/353] Generating lib/controllercapnp.[ch] printed AFTER the failed compiles. WORKAROUND CONFIRMED AGAIN (4th time): identical retry with zero source changes succeeded cleanly, 353/353 ninja targets, all 9 meson test suites OK (0 Fail), test_cluster (part of libxce test suite) and scheduler tests all passed. Still unfixed at the meson.build dependency-edge level -- do-not-repeat guidance holds: always retry once before treating this as a real regression. RECURRENCE 2026-07-26 (5th occurrence, build+report task validating bug-1474 repl.c fix via `nix develop ./src --command bash src/tools/xce-build.sh all asan`, HEAD c0b0c7d): TWO consecutive races in the same session, different symptoms each time. 1st invocation (clean build): classic capnp.h race -- hook.c.o etc. failed 'controller.capnp.h: No such file or directory' with the generator's status line ([6/361] Generating lib/controllercapnp.[ch]) printed AFTER the failed compiles -- identical to prior occurrences. 2nd invocation (retry, clean build): build progressed all the way to [361/361] (last job, frontend/apiserver's go_build) which FAILED with `/usr/bin/ld: cannot find -lxce: No such file or directory`; lib/libxce.a was confirmed absent from src/xce.build/lib/ immediately after the failure, and no 'Linking static target lib/libxce.a' line ever appeared in the ninja log for that invocation. NEW symptom variant: this is the first occurrence of the race hitting a Go custom_target (apiserver's CGO link against libxce.a) rather than a C compile/link step -- apiserver's CGO_LDFLAGS references @BUILD_ROOT@/lib/libxce.a only via an env-var string, which is suspected to carry no explicit ninja dependency edge on the lib archive target, letting the go_build job be eligible to run before the archive step completes. 3rd invocation (retry, clean build) succeeded cleanly: 361/361 ninja targets, meson test Ok:9 Fail:0, scheduler manual test 15/15 pass, frontend Go tests (apiserver + xcecli) all ok, xceadmin pytest 166 passed, producing fresh xce_controller/xce_test (confirmed containing the bug-1474 'reusing guard-holding slot' WARN string) and a fresh xceadmin/.venv/bin/xceadmin. WORKAROUND CONFIRMED AGAIN (do not debug source on first or second failure): simply retry the identical xce-build.sh command with no changes; this session needed up to 2 retries (3 total invocations) before a clean pass, still well within the established do-not-repeat guidance. Do-not-repeat addendum: the race is not limited to C compile/link edges -- it can also strand a Go custom_target waiting on a C static archive (apiserver <- lib/libxce.a) referenced only via env-var string interpolation, not a declared meson `depends:`/`link_with:` edge. Still unfixed at the meson.build dependency-edge level.",
|
|
"tags": [
|
|
"ninja-race",
|
|
"controller",
|
|
"parallel-build-race",
|
|
"build-failure",
|
|
"unresolved",
|
|
"retry-fixes-it",
|
|
"ninja",
|
|
"missing-dependency-edge",
|
|
"reproduced",
|
|
"capnp",
|
|
"go-apiserver-link"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 5,
|
|
"last_seen": "2026-07-26T04:29:00Z",
|
|
"gitea_issue": 30
|
|
},
|
|
{
|
|
"id": "bug-1440",
|
|
"timestamp": "2026-07-15T09:35:00Z",
|
|
"error_message": "use of cgo in test wire_dispatch_test.go not supported / FAIL apiserver/backend [setup failed]",
|
|
"file": "src/frontend/apiserver/backend/wire_dispatch_test.go",
|
|
"root_cause": "Go toolchain hard restriction, not an environment/CGO_CFLAGS/nix issue: cmd/go's module indexer (GOROOT share/go/src/cmd/go/internal/modindex/read.go, ~line 589, inside the per-file import scan) explicitly checks `if imp.path == \"C\" { if isTest { badGoFile(name, fmt.Errorf(\"use of cgo in test %s not supported\", name)) } }`. Any `_test.go` file that directly does `import \"C\"` is rejected outright the moment CGO is active for that file (CGO_ENABLED=1 and the file's build tag, here `//go:build cgo`, is satisfied) -- this is golang/go#13938, a long-standing toolchain limitation, confirmed by reading the actual installed Go 1.25.5 source in the nix shell. Because wire_dispatch_test.go and clib.go/convert.go/peers_test.go/handler_test.go/convert_test.go/heartbeat_test.go (the last four carry no build tag, so they build under BOTH cgo and !cgo) all live in the same package, the ENTIRE apiserver/backend package fails as `[setup failed]` under `make test-backend` (CGO_ENABLED=1) -- this also silently prevented the pre-existing cgo-buildable tests (handler_test.go, convert_test.go, peers_test.go, heartbeat_test.go) from running, even though none of them regressed on their own. The `!cgo`-tagged files (integration_test.go, control_host_test.go, stub_funcs_test.go) are unaffected since they're excluded from the CGO_ENABLED=1 file set entirely; `make test` (CGO_ENABLED=0) passed clean (apiserver/backend ok, 1.510s) confirming no regression on the non-cgo path.",
|
|
"fix": "NOT FIXED -- user explicitly instructed build/run/report only, no source edits. Reported fix path for the user: remove `import \"C\"` (and any direct `C.xxx` calls) from wire_dispatch_test.go itself; move the cgo-dependent helpers (buildEncodedJobArrayPush, deliverViaRealDispatchChain, and the `/* ... */ import \"C\"` preamble with the wire_test_* static C helpers) into a new non-test `.go` file in the same package (e.g. clib_wire_test_helpers.go, `//go:build cgo`), exposing plain-Go-signature functions the _test.go file can call without itself using cgo directly. This mirrors the established pattern already used for other CGO test-only helpers in this package. Because the file was rejected before type-checking, it is unknown whether wire_dispatch_test.go has any further errors (undefined C symbols, type mismatches) beyond this first, blocking one -- those can only be discovered after this structural fix.",
|
|
"tags": [
|
|
"cgo",
|
|
"go-test",
|
|
"toolchain-limitation",
|
|
"wire_dispatch_test",
|
|
"job-array-single-wal-record",
|
|
"backend-package",
|
|
"build-error",
|
|
"golang-go-13938"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-15T09:35:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1441",
|
|
"timestamp": "2026-07-15T09:40:00Z",
|
|
"error_message": "backend/wire_dispatch_support.go:154:8: could not determine what C.go_push_handler refers to / FAIL apiserver/backend [build failed]",
|
|
"file": "src/frontend/apiserver/backend/wire_dispatch_support.go",
|
|
"root_cause": "cgo declaration visibility is per-file, not per-package: go_push_handler is exported to C only via clib.go's own preamble comment (\"extern int go_push_handler(xce_request_t*, void*);\" immediately followed by \"//export go_push_handler\" on the Go func), and that extern declaration lives nowhere in any shared header -- it is a plain comment inside clib.go's /* ... */ block, not client.h/netio.h/request.h/controller.capnp.h. cgo processes each file's own preamble independently to build that file's C.xxx symbol table, so wire_dispatch_support.go (which #includes client.h/netio.h/request.h/controller.capnp.h but does NOT itself declare go_push_handler) has no visibility into that extern, even though both files are in the same Go package and both carry //go:build cgo. This surfaced only after fixing bug-1440's toolchain-level rejection (moving import \"C\" out of the _test.go file) and after separately discovering make test-backend also needs CGO_CFLAGS/CGO_LDFLAGS manually derived to match src/frontend/apiserver/meson.build (pkg-config --cflags/--libs for librtti, c-capnproto, openssl, tinylog, plus -I/src/include -I/src/build/lib -L/src/build/lib -lxce -pthread -lm) since the nix devshell itself does not export them and make test-backend invokes go test directly rather than through the meson/go_build path that normally injects them.",
|
|
"fix": "NOT FIXED -- user explicitly instructed build/run/report only, no source edits. Reported fix path for the user: add the same \"extern int go_push_handler(xce_request_t*, void*);\" declaration to wire_dispatch_support.go's own cgo preamble (matching clib.go's exact signature), OR move that extern declaration into a shared header both files already include. Because the toolchain stops at first error, it is unknown whether wire_dispatch_support.go/wire_dispatch_test.go have any FURTHER errors (e.g. C.free_JobSubmit_ptr signature, C.extract_data, C.xce_encode/xce_decode field access) beyond this first blocking one -- those can only be discovered after this fix. Separately (env-only, no source change): make test-backend also requires CGO_CFLAGS/CGO_LDFLAGS to be exported manually before invoking make, mirroring meson.build's pkg-config-derived flags -- the bare Makefile command alone (as documented) does not produce a working CGO_ENABLED=1 build in this worktree.",
|
|
"tags": [
|
|
"cgo",
|
|
"wire_dispatch",
|
|
"go_push_handler",
|
|
"cross-file-declaration",
|
|
"job-array-single-wal-record",
|
|
"test-backend",
|
|
"CGO_CFLAGS"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1440"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-15T09:40:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1442",
|
|
"timestamp": "2026-07-15T09:50:00Z",
|
|
"error_message": "AddressSanitizer: attempting double-free on 0x...1b0 in thread T0 -- fires immediately on TestWireDispatch_OnePushProducesNRecordsAndLogsOnce, aborts the whole backend.test binary before it can print PASS/FAIL, so TestWireDispatch_RedeliveryCreatesNoNewRecordsAndLogsNothing never runs at all",
|
|
"file": "src/frontend/apiserver/backend/wire_dispatch_support.go",
|
|
"root_cause": "NOT ROOT-CAUSED (build/run/report only, no fix attempted per user instruction). bug-1441 (C.go_push_handler cross-file cgo resolution) is now fixed, and a separate missing `import \"apiserver/store\"` in wire_dispatch_test.go was fixed as a trivial compile error, so the build now succeeds and the test actually runs -- and immediately hits a real ASan double-free at runtime, not a build failure. Leading hypothesis (unverified): wireDispatchDeliver() (lines 122-180) calls go_push_handler(&decoded, nil) at line 164, whose defer C.free_Request(req) (clib.go) frees *decoded including its Request_body_datamsg payload -- the comment at lines 166-172 asserts free_Dataset() is 'a documented no-op for every table' (citing task 5.3b's residual-gap note) and therefore safe for wireDispatchDeliver to ALSO free ds.rows via free_JobSubmit_ptr() and ds itself at lines 173-177. A 16-byte double-free immediately after go_push_handler returns is consistent with that no-op assumption being wrong for the Data_data_jobArray-derived dataset table specifically (i.e. free_Dataset() actually does free ds->rows or ds itself for this table, and wire_dispatch_support.go's explicit cleanup then frees the same memory again). NOT CONFIRMED -- needs a symbolized ASan backtrace (frames are bare hex addresses in this build) or manual trace of free_Dataset()/free_Request() to confirm which free is the duplicate.",
|
|
"fix": "FIXED and VERIFIED 2026-07-15T09:55:00Z. Root cause confirmed: go_push_handler's internal `defer C.free_Request(req)` (clib.go) calls free_Request(&decoded), whose Request_body_datamsg case calls free_Dataset_ptr(&decoded.body.datamsg) -- free_Dataset_ptr() (controller.capnp.c, generated) unconditionally free()s the dataset_t container pointer it is given, even though free_Dataset() itself is an empty no-op (never touches ->rows). So `ds` becomes a dangling pointer the instant go_push_handler returns -- the earlier NOT-ROOT-CAUSED hypothesis was correct in spirit but had the wrong culprit function (free_Dataset_ptr, not free_Dataset). wireDispatchDeliver() (wire_dispatch_support.go) had two bugs: (1) read ds.rows AFTER calling go_push_handler = use-after-free, (2) separately called C.free(ds) again = double-free on the same 16-byte region ASan caught. Fix: capture `rows := ds.rows` BEFORE calling go_push_handler (line 175), use that captured value afterward instead of re-reading ds.rows, and removed the redundant C.free(unsafe.Pointer(ds)) call entirely since go_push_handler's internal free_Request already frees it. Verified via full ASan CGO rebuild (make test-backend under nix develop ./src with CGO_CFLAGS/CGO_LDFLAGS = -fsanitize=address -g -DWITH_DEBUG=1 + pkg-config librtti/c-capnproto/openssl/tinylog): TestWireDispatch_OnePushProducesNRecordsAndLogsOnce and TestWireDispatch_RedeliveryCreatesNoNewRecordsAndLogsNothing both PASS with zero ASan errors; full ./backend/... suite (91 subtests, convert/handler/heartbeat/peers/wire_dispatch/auth) all PASS, zero regressions; make test (CGO_ENABLED=0) also fully green.",
|
|
"tags": [
|
|
"cgo",
|
|
"wire_dispatch",
|
|
"asan",
|
|
"double-free",
|
|
"use-after-free",
|
|
"job-array-single-wal-record",
|
|
"test-backend",
|
|
"go_push_handler",
|
|
"free_Dataset",
|
|
"free_Dataset_ptr"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1441"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-15T09:55:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1443",
|
|
"timestamp": "2026-07-16T02:05:00Z",
|
|
"error_message": "OPEN, NOT A CRASH -- discovered as a design-time/test-proven gap, not a runtime failure report. restore_job_array()'s final bulk-insert pass into c->jobmgr can itself fail partway through (e.g. realloc() exhaustion growing c->jobmgr's backing table). Because the underlying xkvmgr_type store has no key_del, an already-inserted prefix [0, k) cannot be rolled back and is left permanently, genuinely visible in c->jobmgr -- individually addressable (status/cancel/completion all work via direct jobid lookup) -- while the function honestly returns a negative errno (never silently claims success). Critically, that prefix is never included in out_new_jobs, so HOOK_DETAIL_JOB_NEW never fires for it, not on this attempt or on any later successful retry of the same LSN (the per-index idempotent-skip logic on retry treats the already-inserted prefix as 'already exists', excluding it from the retry's own out_new_jobs too). Practical consequence: these array elements exist and are queryable forever, but never reach the scheduler's or API-server's push and so are never actually scheduled to run -- a silent, permanent no-op job, not merely a bookkeeping gap. requirements-coverage validation (kiro-validate-impl, 2026-07-16) confirmed this is a literal violation of Requirement 2.3 ('a standby shall never observe a single array WAL record in a partially-applied form') and Requirement 9.4 ('shall not construct a partial/divergent set of elements'), and its shadow extends to 9.5 (self-heal, since the orphaned prefix never gets a fresh chance to hook-fire even once the retry succeeds) and 9.6 (the capstone fault-injection test deliberately targets the fully-atomic construction-phase seam instead of this bulk-insert seam, precisely because asserting 'zero partial elements' against this seam would be dishonest).",
|
|
"file": "src/controller/job.c (restore_job_array(), bulk-insert phase)",
|
|
"root_cause": "No capacity-reservation or rollback primitive exists anywhere in this codebase's kv.c/kvmgr.c/zarray.c stack -- c->jobmgr (xkvmgr_type) grows its backing table via realloc() with no pre-check, and once key_add() has inserted an element there is no key_del to undo it. restore_job_array()'s design (scratch-build every element first, then one bulk-insert pass under a single write-lock) makes construction-phase failures fully atomic (nothing ever touches c->jobmgr until every element is ready), but the bulk-insert pass itself is NOT covered by that atomicity guarantee -- it is the one place a late-stage resource-exhaustion failure can leave real, permanent state behind that the function's own success/failure contract cannot fully describe. Discovered and documented during task 3.1's original implementation review (job-array-single-wal-record spec), re-confirmed live-testable via test_rja_bulk_insert_failure_reports_error_not_false_success (test_job_array_apply.c), and re-surfaced by name during the spec's final /kiro-validate-impl requirements-coverage pass.",
|
|
"fix": "FIXED and VERIFIED 2026-07-16 (commit dcf9f39, job-array-single-wal-record task 7.1, user-directed follow-up after the GO decision). Added kvmgr_reserve()/xzarray_reserve() -- new, purely-additive primitives in kvmgr.c/zarray.c following the existing kvmgr_capture_keys() template (bare extern function, no RTTI vtable slot, caller-holds-write-lock contract) -- that pre-grow c->jobmgr's backing xzarray for the whole array before the bulk-insert pass begins, closing the dominant N-scaling realloc-exhaustion trigger structurally. Discovered and fixed a genuine, previously-unknown off-by-one in the existing, unmodified xzarray_ensure_items(): its strict less-than sufficiency check (mincap < caps) means reserving exactly array_size and then performing array_size real stores still triggers one more growth cycle on the LAST store; reserving array_size + 1 is the exact minimal correct compensation, independently re-derived and confirmed with concrete arithmetic by adversarial review. For the now-much-narrower residual case (kvtab_add()'s own small per-entry hash-chain-node allocation, or a content-based -EEXIST collision -- both non-N-scaling, honestly still theoretically possible and documented as such, NOT claimed to be eliminated): restore_job_array() now populates out_new_jobs with whatever prefix was genuinely inserted before a mid-pass failure, and apply_committed_entry()'s WAL_JOB_ARRAY_SUBMIT case fires HOOK_DETAIL_JOB_NEW for that non-empty partial prefix even when the overall return is negative, while still propagating the negative rc so the LSN correctly halts and the Live Apply Resource Fence still engages for the remaining un-constructed indices -- a genuinely-inserted element is never left un-pushed/un-scheduled again. Verified: retry-double-notify risk traced and confirmed absent (pre-existing per-index idempotent-skip logic excludes already-inserted indices from any subsequent attempt's out_new_jobs); apply_wal_entry()'s dead-code standby path confirmed genuinely untouched; full controller/lib/scheduler test suites clean, zero regressions in any other consumer of the shared kvmgr.c/zarray.c code. Full detail in tasks.md's Implementation Notes, task 7.1 entry.",
|
|
"tags": [
|
|
"job-array-single-wal-record",
|
|
"restore_job_array",
|
|
"bulk-insert",
|
|
"partial-visibility",
|
|
"requirement-2.3",
|
|
"requirement-9.4",
|
|
"requirement-9.5",
|
|
"requirement-9.6",
|
|
"key_del",
|
|
"kv.c",
|
|
"kvmgr.c",
|
|
"open-gap",
|
|
"kiro-validate-impl"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-16T02:05:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1444",
|
|
"timestamp": "2026-07-16T02:48:18Z",
|
|
"error_message": "persist_recover: APPLY_DIVERGENT -- materialized state does not match the committed log tip (expected last_applied_lsn=5 new_job_count=3); a hidden apply defect is present (ha-commit-durability recover_verdict=RECOVER_CLEAN) / persist_recover: UNRECOVERABLE -- post-replay apply-correctness verification is DIVERGENT ... Staying ALIVE and PERMANENTLY non-promotable (refusing to serve divergent state) and RETRYING catch-up indefinitely -- reproduced live during job-array-single-wal-record task 6.1's HA soak scenario the FIRST time a node is killed and restarted after ANY WAL_JOB_ARRAY_SUBMIT record has ever been committed to its local WAL (e.g. after a 2-element array submission).",
|
|
"file": "src/controller/persist.c (replay_wal(), ~line 3902-3904; consumed by persist_recover()/persist_verify_apply_correctness(), ~line 3960-3991)",
|
|
"root_cause": "replay_wal()'s post-replay apply-correctness expectation counter only tallies WAL_JOB_SUBMIT entries toward new_job_submits_out: `if (hdr.type == WAL_JOB_SUBMIT && new_job_submits_out && apply_rc == 1) (*new_job_submits_out)++;` (persist.c ~3902-3904). It has NO corresponding branch for WAL_JOB_ARRAY_SUBMIT (the new record type job-array-single-wal-record/task 1.1 introduced), even though apply_committed_entry()'s WAL_JOB_ARRAY_SUBMIT case (persist.c ~2809-2851, restore_job_array()) constructs N new job_t entries per record, not 1. So expected_new_job_count silently undercounts by N for every array record replayed during boot -- while persist_verify_apply_correctness() (persist.c ~3982-3988) measures actual_new_jobs via a REAL jobmgr entry-count delta (count_jobmgr_entries before/after), which correctly reflects the N elements. The mismatch (actual_new_jobs != expected_new_job_count) trips APPLY_DIVERGENT on every single restart of every node whose local WAL contains a WAL_JOB_ARRAY_SUBMIT entry above its checkpoint -- deterministic and 100% reproducible, not a race or resource-exhaustion condition. persist_recover_loud_fence_if_unrecoverable then classifies this as UNRECOVERABLE, permanently non-promotable-fencing that node for the rest of its process life (own boot-time verification re-runs identically on every subsequent restart too, since the miscounting bug reproduces every time). This is a NEW, separate gap from this spec's three self-flagged residual items (task 3.1 bulk-insert partial-visibility / bug-1443, task 4.2 boot-replay-doesn't-respect-apply-failures gap, task 5.3b's small per-commit leak) -- it lives in a DIFFERENT, pre-existing mechanism (raft-apply-decoupling task 5.1's post-replay apply-correctness verification / ha-commit-durability's Req 8.1-8.4), which this spec's own task list never touched to account for the new WAL_JOB_ARRAY_SUBMIT type. Practical severity: in any cluster where a job array has EVER been submitted, every ordinary node restart (routine maintenance, crash-restart, rolling upgrade) permanently non-promotable-fences that node; over enough restarts across a 3-node cluster this can leave ZERO nodes eligible for promotion -- a serious HA-availability regression, not a cosmetic log line. Discovered live via job-array-single-wal-record task 6.1's HA soak harness (.claude/skills/xce-test-ha/run-ha-soak.sh, new --array-soak mode) -- specifically NOT reproducible by this spec's existing white-box unit tests (task 2.3/3.4), which never drive a real persist_recover()/replay_wal() boot cycle after committing an array record.",
|
|
"fix": "FIXED and VERIFIED (2026-07-15/16, commit 16747aa, task 6.0a of job-array-single-wal-record) -- independently root-caused by a separate implementation pass on the same branch, inserted as a blocking task ahead of 6.1/6.2/6.3 per explicit user sign-off after the exact same bug was live-reproduced during this task's own --array-soak run. Fix matches the shape predicted below almost exactly: replay_wal()'s tally gained a `WAL_JOB_ARRAY_SUBMIT` branch that adds `apply_rc` (the genuine per-record new-element count apply_committed_entry()'s array case already returns, not the flat/undercounted +1 the WAL_JOB_SUBMIT branch uses) to *new_job_submits_out when apply_rc > 0, mirroring the existing WAL_JOB_SUBMIT pattern. Verified via: (a) new unit tests in test_apply_correctness_verification.c with an independently-reproduced RED-before-fix/GREEN-after-fix cycle; (b) two from-scratch live 3-node HA soak re-runs (--array-soak), one by the fixing pass's implementer and one by its independent reviewer, both showing zero APPLY_DIVERGENT across all three of this bug's trigger paths (restart-mid-small-array, standby election-path recovery fallback, restart-mid-large-array) with one-WAL-record/one-commit-barrier and per-element status/cancel/completion all confirmed post-failover. Full detail in .kiro/specs/job-array-single-wal-record/tasks.md's Implementation Notes, task 6.0a entry. This buglog entry was originally filed (independently, before its author discovered the fix already existed on the branch) with fix=NOT FIXED; corrected here once the duplication was noticed, since the underlying finding is accurate and well-characterized and deserves its own tracked entry (task 6.0a's fix was documented in tasks.md but never separately logged here) -- kept as a distinct entry from bug-1443 (a different, still-open gap in the same feature) rather than merged or deleted.",
|
|
"tags": [
|
|
"job-array-single-wal-record",
|
|
"persist_recover",
|
|
"replay_wal",
|
|
"apply_verify_correctness",
|
|
"APPLY_DIVERGENT",
|
|
"boot-replay",
|
|
"ha-availability",
|
|
"non-promotable-fence",
|
|
"xce-test-ha",
|
|
"array-soak",
|
|
"task-6.1",
|
|
"raft-apply-decoupling",
|
|
"ha-commit-durability"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1443"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-16T02:48:18Z"
|
|
},
|
|
{
|
|
"id": "bug-1445",
|
|
"timestamp": "2026-07-17T09:47:00Z",
|
|
"error_message": "A node's very first promotion-eligibility evaluation in a fresh process runs before that node's own first persist_recover()/replay_wal() call, so the Live Apply Resource Fence (job-array-single-wal-record tasks 4.1-4.3, extended to boot replay by task 7.2) is invisible to that one specific check. A node that would otherwise correctly fence itself non-promotable on a resource-exhaustion apply failure during its first-ever boot replay can instead pass its first promotion check looking fully eligible, because the fence flag hasn't been set yet at the point that first gate runs.",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "ha.c's promotion-gate eligibility check (ha.c:1303-1408) runs before persist_recover()'s first-ever replay_wal() call (ha.c:1427-1439) on a freshly-started process. Every promotion evaluation AFTER a process's first one is correctly protected (persist_apply_resource_fenced() is threaded into both the periodic fence-release check and the election-time check per task 4.3) -- this is a narrow ordering gap specific to the single very-first evaluation of a brand-new process, discovered and documented (not fixed) during job-array-single-wal-record task 7.2's own review, out of that task's persist.c-only file boundary.",
|
|
"fix": "FIXED and VERIFIED (2026-07-17, src/controller/ha.c). raft_cb_become_leader()'s is_first_boot block now re-checks persist_apply_resource_fenced(&c->persist) immediately after cluster_init_phase2() completes (the call that triggers this process's own first persist_recover()/replay_wal()) -- if that first replay just engaged the fence, promotion is refused (same pattern as the pre-existing refusal branch: WARN log + ha_arm_promotion_fence_timer() + return), instead of falling through to CTRL_PRIMARY on a decision made before that first replay ever ran. Every later election is unaffected -- is_first_boot is false by then, so the earlier eligibility gate (ha.c:1337) already covers it correctly. Scope check: confirmed ha_elect_evaluate_and_signal (the OTHER election path, ha.c ~5030) is dead in production for the promotion outcome -- every live call site of handle_request_vote_reply passes vote_granted=0 (bug-828 already redirected the real grant-recording path to the record-only ha_record_vote_reply, which never signals it) -- so raft_cb_become_leader is confirmed the sole live promotion path and this fix's scope is complete, not partial. TDD: new test test_first_boot_promotion_evaluates_own_first_replay_fence (src/controller/testsuite/test_job_array_replay_fence.c) wires ha_phase2_hook to a stub that calls persist_recover() for real, reproducing production ordering exactly (a never-recovered persist_t entering the election path with ha->phase2_done==0) -- RED-confirmed failing pre-fix at the exact predicted assertion (role_after_election==CTRL_PRIMARY), GREEN-confirmed passing post-fix. Full controller_unit_test binary (bundles every testsuite/test_*.c including test_convergence_verification.c, test_ha_cluster.c, test_p1_integration.c) green: 16/16 tests in this file, 0 regressions cluster-wide.",
|
|
"tags": [
|
|
"job-array-single-wal-record",
|
|
"ha.c",
|
|
"promotion-gate",
|
|
"live-apply-resource-fence",
|
|
"boot-replay",
|
|
"first-boot",
|
|
"persist_recover",
|
|
"replay_wal",
|
|
"ordering-bug",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1443"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-17T10:45:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1446",
|
|
"timestamp": "2026-07-18T00:47:00Z",
|
|
"error_message": "/kiro-validate-impl ha-commit-durability: test-commit-durability.sh --deterministic reported 3/3 FAIL ('DURABILITY GAP -- primary acked with 0 fdatasync in-window'), i.e. a false RED that looked like a regression of the spec's core invariant on the current build.",
|
|
"file": "src/tools/test-commit-durability.sh (det_probe_once / date usage) -- test harness only, NOT a product file",
|
|
"root_cause": "This sandbox's /sbin/date is BusyBox date, which does NOT support GNU date's %N (nanoseconds) format directive -- 'date +%H:%M:%S.%N' literally emits the unexpanded string 'HH:MM:SS.%N' (confirmed by direct invocation). det_probe_once() captures t0/t1 with this call to bound the submit-to-ack window, then _hms_to_sod() converts them to seconds-of-day for the in-window fdatasync count. With the literal '%N' suffix the sub-second component is unparseable/degenerate, so the computed window fails to contain the real fdatasync timestamp even though it lands in the same wall-clock second -- producing syncs=0 (RED) regardless of actual ordering. This is an environment tooling gap (BusyBox vs GNU date), not a code regression: the script assumes GNU date is on PATH.",
|
|
"fix": "NOT a product bug, no source fix applied (out of this validation's scope; script is owned by xce-test-e2e-primitives per this spec's task 1.3 boundary note). Diagnosed by cross-checking strace's own microsecond timestamps (which DO work correctly, e.g. 'fdatasync(10) = 0' at 00:47:01.128244) against the controller's committed_lsn advance log lines (commit_advance_locked '1 -> 2' at 00:47:01,144) for the same three probes: fdatasync consistently preceded the commit-advance (that gates the client ack) by 16-43ms in all 3 probes -- i.e. the real durable-before-ack ordering the spec requires DOES hold on the current build; the script's verdict was the false signal, not the product. Recommend the script detect/require GNU date (or use 1784335901.164264 / a C helper) rather than assuming %N support, so it fails loud on an incompatible date instead of silently producing a false RED.",
|
|
"tags": [
|
|
"test-harness",
|
|
"false-positive",
|
|
"busybox",
|
|
"date",
|
|
"kiro-validate-impl",
|
|
"ha-commit-durability",
|
|
"deterministic-mode"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-18T00:47:00Z",
|
|
"gitea_issue": 31
|
|
},
|
|
{
|
|
"id": "bug-1447",
|
|
"timestamp": "2026-07-18T01:05:02Z",
|
|
"error_message": "/kiro-validate-impl raft-drive-async: 10-round SEQUENTIAL HA soak (the fully-supported single-failover lifecycle, hard-fail-on-any-loss) failed at round 9/10 -- 'FAIL: round 9: post-failover submit did not get 3 acks' (0/3 acked across 5 retry attempts). Root traced to ctrl-3 (a standby) crashing: AddressSanitizer DEADLYSIGNAL SEGV on address 0x40 (near-null, READ) in openssl's ssl3_read_bytes <- tls_get_message_header <- state_machine <- handle_ssl_handshake (src/lib/netio.c:548) <- io_handler (netio.c:588) <- io_worker (netio.c:633), thread T2 (an io_worker thread). With ctrl-1 already killed (the round's own kill target) and ctrl-3 now also dead, no 2-of-3 quorum remained for ctrl-2 (freshly elected PRIMARY, term=11) to commit writes -- explaining the observed 0/3-acks symptom as a downstream consequence, not the primary defect.",
|
|
"file": "src/lib/netio.c (handle_ssl_handshake / io_handler / io_worker -- crash site, shared iomgr epoll dispatch); src/controller/ha.c (ha_connect_prep_peer/ha_connect_finish_peer/reconnect_lane_fn, raft-drive-async Task 2.1/2.2 reconnect-offload -- suspected trigger); src/controller/cluster.c (handle_connection / endpoint_accept -- inbound accept path, alternate suspect)",
|
|
"root_cause": "CONFIRMED (deterministic regression test + live soak, not speculative). The earlier 'unsynchronized concurrent SSL_do_handshake from two io_worker threads' hypothesis is WRONG and is retracted: iomgr_start() creates exactly ONE io_worker thread per iomgr_t (src/lib/netio.c:iomgr_start), and a single controller process has exactly one such iomgr/thread for all peer connections -- there is no second io_worker thread to race against.\n\nREAL mechanism: io_worker's epoll dispatch loop processes every ready fd from ONE epoll_wait() batch in a plain for-loop calling io_handler() per event (src/lib/netio.c, old io_worker ~line 612-640). A handler for an EARLIER event in that SAME batch can free a DIFFERENT endpoint that also has a ready event LATER in the SAME batch. In production this is exactly src/controller/ha.c:8257-8331 on_standby_connected(), the handshake-complete callback for a freshly-reconnected outbound standby channel (raft-drive-async Task 2.1/2.2's reconnect-offload path): when it detects a stale duplicate outbound channel to the same peer (ha.c:8286-8303, 'Different ep, same peer -> stale duplicate to evict'), it calls iomgr_unmonitor() (ha.c:8320-8321) then endpoint_unref() (ha.c:8327) on the STALE endpoint. iomgr_unmonitor()'s epoll_ctl(EPOLL_CTL_DEL) only stops a FUTURE epoll_wait() from returning events for that fd -- it does NOT invalidate an event for that SAME stale endpoint that is already sitting in the CURRENT batch's stack-local events[] array (very plausible during a reconnect burst, where several peer connections' fds become ready close together right after a new primary election). endpoint_unref() reaching refcnt 0 immediately SSL_free()s ep->ssl and free()s the endpoint_t. The loop's next iteration then calls io_handler() for that now-freed endpoint -- a heap-use-after-free that reads freed memory as 'ep', and (if it still looks like a plausible pointer chain) hands a freed/reused ep->ssl to SSL_do_handshake(), producing exactly the observed ASAN DEADLYSIGNAL SEGV deep inside OpenSSL's ssl3_read_bytes rather than an immediate top-of-function null-ssl crash.\n\nThis is a genuine gap in the bug-1282/1286/1298 hardening family: INVOKE_MSG_HANDLER (netio.h) already refs/unrefs an endpoint around its OWN msg_handler call (bug-1298 note in that macro's comment) so a handler cannot free the SAME ep it is currently dispatched on -- but that bracket never covered a DIFFERENT, already-batched endpoint torn down as a side effect (on_standby_connected's cross-endpoint eviction). io_worker's own epoll dispatch loop held no reference of any kind on the endpoints in its batch. Reproduced deterministically (no live soak needed to hit it) via a new unit test that drives io_worker's real batch-dispatch loop with a synthetic 2-event epoll batch where event 0's handler endpoint_unref()s event 1's endpoint -- confirmed RED pre-fix: ASAN heap-use-after-free at src/lib/netio.c:587 (io_handler reading ep->ssl_handshake_done), freed by src/lib/netio.c:843 (endpoint_unref) called from the injected handler, exactly mirroring the production on_standby_connected -> stale endpoint eviction -> later-batched io_handler() read chain.",
|
|
"fix": "FIXED (2026-07-18). src/lib/netio.c: extracted io_worker's per-batch dispatch into a new static io_worker_dispatch_batch(struct epoll_event*, int) (~line 639-654), called from io_worker's while(1) loop in place of the old inline for-loop. It now takes an endpoint_ref() on every endpoint in the batch BEFORE dispatching any of them, dispatches all events via io_handler() as before, then endpoint_unref()s every endpoint only AFTER the whole batch has been processed -- mirroring the SAME endpoint_ref/endpoint_unref bracket idiom this codebase already uses for the vtask dispatch path (bug-1298) and INVOKE_MSG_HANDLER (netio.h), applied here to io_worker's own epoll dispatch loop, the one dispatcher that didn't yet have it. With this bracket, on_standby_connected's endpoint_unref() on a stale duplicate can only drop that endpoint's refcount from 2 (owner + io_worker's batch ref) to 1 during the batch -- never to 0 -- so the free is deferred until io_worker's own trailing unref runs after the ENTIRE batch (including that endpoint's own later event) has been safely dispatched. ref/unref are the existing lock-free _Atomic-int operations (netio.c endpoint_ref/endpoint_unref) with no I/O and no lock acquisition, so this adds zero blocking risk to the io_worker hot path (satisfies the async-io steering rule against blocking in vtask/event-loop handlers). Also added a small always-compiled test seam, io_worker_dispatch_batch_for_test() (netio.c + netio.h) -- not XCE_TESTING-gated because netio.c compiles once into libxce.a with no per-target defines (unlike controller/ha.c, which the controller test binary compiles directly with -DXCE_TESTING), so it follows this file's existing convention of unconditionally exporting its internals (endpoint_ref, endpoint_unref, endpoint_mark_tearing_down, etc. are all plain public functions already).\n\nRegression test: src/lib/testsuite/test_netio_batch_dispatch_uaf.c (test_batch_dispatch_survives_cross_endpoint_eviction), registered in src/lib/meson.build and src/lib/testsuite/test.c. Drives io_worker_dispatch_batch_for_test() with a synthetic 2-event batch: event 0 -> an endpoint whose conn_handler calls endpoint_unref() on event 1's endpoint (simulating on_standby_connected's stale-duplicate eviction); event 1 -> an endpoint with refcnt==1 (its only ref is the one event 0's handler drops) whose conn_handler just records that it ran. TDD verified: RED confirmed pre-fix (ASAN heap-use-after-free at netio.c:587 in io_handler, object freed at netio.c:843 endpoint_unref from the injected handler -- captured verbatim before the fix was restored); GREEN confirmed post-fix (both handlers run safely, exit 0, re-confirmed again standalone after both live soaks completed). Full regression: libxce lib suite 294/0/0 (xcelib_test, ASAN, ~/xce.build), controller_unit_test 972/0/0 with zero AddressSanitizer/heap-use-after-free/heap-buffer-overflow/double-free/SEGV hits in the full test log. Live verification beyond the unit test: two independent fresh sequential 10-round /xce-test-ha HA soaks on real ext4 (/home/claude/tmp/xce-bug1447-verify-1: 10/10 rounds, 33 jobs, zero job loss, all 3 nodes led; /home/claude/tmp/xce-bug1447-verify-2: 10/10 rounds, 36 jobs, zero job loss, all 3 nodes led including a forced-election leadership-coverage check on ctrl-3) -- both fully clean, zero crashes, and an explicit grep of every node's logs in both runs for the bug-1447 signature (AddressSanitizer/DEADLYSIGNAL/SEGV/ssl3_read_bytes/handle_ssl_handshake) found zero matches.",
|
|
"tags": [
|
|
"ASAN",
|
|
"FIXED",
|
|
"SEGV",
|
|
"endpoint_ref",
|
|
"handle_ssl_handshake",
|
|
"io_worker",
|
|
"kiro-validate-impl",
|
|
"netio.c",
|
|
"on_standby_connected",
|
|
"openssl",
|
|
"raft-drive-async",
|
|
"reconnect-offload",
|
|
"regression-test",
|
|
"round-9",
|
|
"same-batch-uaf",
|
|
"sequential-soak",
|
|
"ssl3_read_bytes"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1282",
|
|
"bug-1286",
|
|
"bug-1298"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-18T14:30:00.000Z",
|
|
"gitea_issue": 32
|
|
},
|
|
{
|
|
"id": "bug-1448",
|
|
"timestamp": "2026-07-18T01:54:00Z",
|
|
"error_message": "/kiro-validate-impl ha-heartbeat-committed-propagation: the xce-build skill's own documented pattern (\"dispatch via a plain Agent-tool call, run_in_background: false, wait for it\") produced an INCOMPLETE build -- ninja log ends with 'ninja: build stopped: interrupted by user.' at 85/192 targets, roughly 14 minutes after launch with zero nix/meson/ninja processes still running and no error in the log. The synchronous Agent call returned to the caller almost immediately (~38s) with text claiming 'The build is running in the background... I'll wait for it to complete' -- i.e. the subagent itself spawned an internal Bash run_in_background job and then ended its own turn, rather than blocking until the command finished.",
|
|
"file": "src/tools/xce-build.sh (skill invocation pattern, not the script itself); .claude/skills/xce-build/SKILL.md's 'Always dispatch the build via the Agent tool' instruction",
|
|
"root_cause": "Same defect family as the already-documented xce-test-ha/run-ha-soak.sh 'context: fork' SIGHUP-teardown bug (fixed 2026-07-08), but manifesting through a DIFFERENT mechanism: xce-build's skill doc explicitly avoids 'context: fork' and claims a plain Agent-tool dispatch is safe -- but that safety claim implicitly assumes the subagent's own Bash tool call blocks synchronously for the whole build. In practice the subagent chose to run the long nix/meson/ninja command via its OWN internal run_in_background Bash call and then finished its turn, un-detached (no setsid/nohup/disown) -- so when that subagent's session/turn ended, the still-attached background job's process group got interrupted (ninja saw SIGINT/SIGHUP-equivalent, logged literally as 'interrupted by user'). A second SendMessage asking the same agent to 'wait for it now' resumed a session with nothing left alive to wait for.",
|
|
"fix": "Relaunched the build via a fresh Agent dispatch whose ONLY instruction was to run `setsid nohup nix develop ./src --command bash src/tools/xce-build.sh controller asan </dev/null >LOG 2>&1 & disown` and return immediately (fire-and-forget), then polled LOG/binary-mtimes independently from the main session via the Monitor tool. That build completed cleanly in ~10 minutes (85/85 ninja targets, clean link, meson test suite started normally) with no interruption. General fix for any long shell command dispatched through the Agent tool that must outlive the dispatching subagent's own turn: always explicit setsid+nohup+disown, never rely on the subagent's internal run_in_background alone or on run_in_background:false at the Agent-tool-call level to guarantee synchronous blocking all the way through.",
|
|
"tags": [
|
|
"xce-build",
|
|
"Agent-tool",
|
|
"run_in_background",
|
|
"nohup",
|
|
"setsid",
|
|
"disown",
|
|
"subagent-teardown",
|
|
"kiro-validate-impl",
|
|
"ha-heartbeat-committed-propagation",
|
|
"process-detach"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-18T01:54:00Z",
|
|
"gitea_issue": 33
|
|
},
|
|
{
|
|
"id": "bug-1449",
|
|
"timestamp": "2026-07-18T09:56:00.000Z",
|
|
"error_message": "[xce-test-ha] FAIL: round 1: no new primary elected after kill (no serving primary at term>2) -- hit once during ha-elect-ctx-lifecycle kiro-validate-impl soak, did NOT reproduce on immediate retry (10/10 clean)",
|
|
"file": ".claude/skills/xce-test-ha/run-ha-soak.sh (sequential mode round-1 kill timing) / src/controller/ha.c ha_on_primary_ctrl_fd_rdhup (ha-config-bootstrap Req 2.8 voter-only guard, working as designed)",
|
|
"root_cause": "Test-harness timing race, not a code defect. Root-caused from the controller logs (not assumed): cold-start election was unusually slow this run -- ctrl-1 only reached CTRL_PRIMARY (term=2) ~10.1s after process start (raft_cb_become_leader). Immediately on becoming primary it began its config-push handshake to both standbys (on_standby_connected: 'outbound standby connection to peer[N] established, ctrlhello sent', same ~10.1s timestamp). The driver's round-1 kill fired only ~1.7s later (its budget is 'submit 3 jobs + verify + walcompare' after primary is detected, no floor on how fast that completes) -- before either standby had received and applied the pushed config. Both standbys were still at config tag=0 when ctrl-1 died, so ha_on_primary_ctrl_fd_rdhup correctly refused to start PreVote/RDHUP re-election per ha-config-bootstrap's own Req 2.8 guard ('no local config (tag=0, n_peers=3) -- voter only, not starting PreVote/RDHUP re-election; awaiting configured primary'), leaving the cluster with no primary and no candidate. This is the guard working exactly as designed against an unconfigured standby self-electing -- the actual gap is that run-ha-soak.sh's sequential mode has no wait for initial 3-of-3 config convergence before round 1's first kill (unlike its wait for FULL reconvergence between later rounds). Sequential mode's round-1 timing has apparently never lined up this unluckily in any of the many other Group-1 kiro-validate-impl soaks run earlier the same session (ha-wal-replication, ha-heartbeat-committed-propagation, ha-prevote, raft-sim-conformance, libxce-failover, ha-entity-snapshots, ha-commit-durability, ha-term-safety, controller-status, job-array, job-array-single-wal-record) -- all of which use the same driver script unmodified and ran clean.",
|
|
"fix": "FIXED (.claude/skills/xce-test-ha/run-ha-soak.sh). Added a round-1-only config-convergence gate that mirrors wait_for_full_convergence's exact polling style (same alive-count guard via pgrep -c -f \"$(run_pattern)\", same STABLE_TICKS=2-consecutive-converged-probes, same sleep 2 backoff, same ~90s/30-iteration bound, same log()/fail() convention) but gates on a NEW signal, cluster_config_converged (all 3 nodes report a non-zero configVersion via a new node_config_tag() single-node ctrlstatus client probe, mirroring node_probe's technique), instead of the existing cluster_committed_converged (committed-prefix catch-up) -- the two convergence signals are independent, and only the config-tag one covers the ha-config-bootstrap Req 2.8 voter-only guard. Added functions node_config_tag() / cluster_config_converged() / wait_for_initial_config_convergence() right after wait_for_full_convergence (~line 556). Call site inserted right after the chaotic-mode branch's closing `fi` and before the 'Steps 7-10 looped' round loop (~line 1897), so it applies only to the sequential/default path (chaotic mode intentionally tolerates this race by design -- 'no new primary' is a COUNTED outcome there, never a hard fail, so it was correctly left untouched). Diff: +77 lines, 0 lines removed -- no C source touched. VERIFIED: 3 back-to-back --sequential 6-round soaks on a genuine ext4 path (/home/claude/tmp, confirmed via `mount`/`df -T`, not overlayfs -- bug-924), all 3 PASS (6 rounds/24 jobs/zero loss/all 3 nodes led, identical verdict each run), and the new 'waiting for 3-of-3 initial config convergence before round 1' / 'confirmed' log lines appeared correctly ahead of every round 1. Cross-checked the actual cold-start timing from controller logs across all 3 runs to size the margin: election (raft_cb_become_leader -> CTRL_PRIMARY) took 10.3-11.7s after process start each run, and the config-push (handle_repl_config_push on both standbys) landed only 40-46ms after election every time -- i.e. the actual condition resolves in well under 100ms, while the new gate's minimum dwell is ~4s (2 ticks x 2s) and its ceiling is ~90s, giving roughly 2 orders of magnitude of margin over the observed timing, not just enough for these 3 runs' luck.",
|
|
"tags": [
|
|
"ha-elect-ctx-lifecycle",
|
|
"xce-test-ha",
|
|
"run-ha-soak.sh",
|
|
"ha-config-bootstrap",
|
|
"test-harness",
|
|
"flaky",
|
|
"timing-race",
|
|
"config-push",
|
|
"round-1",
|
|
"sequential-mode"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-18T13:00:00.000Z",
|
|
"gitea_issue": 34
|
|
},
|
|
{
|
|
"id": "bug-1450",
|
|
"timestamp": "2026-07-18",
|
|
"error_message": "xce-audit-invariants controller pass (dim: async I/O thread-role) found ha_demotion_convergence_fn scheduled directly as a delaymgr task body with no vtask/slow-lane hop: it truncates the WAL (persist_truncate_wal_above, file I/O under p->lock) then calls ha_self_restart (tlog_exit synchronous log flush + execv) -- all inline on the delaymgr thread, the SAME single thread that drives heartbeats and election timeouts cluster-wide for the whole cluster.",
|
|
"file": "src/controller/ha_convergence.c, src/controller/ha.h",
|
|
"root_cause": "ha_demotion_convergence_fn (ha_convergence.c) ran its full body -- truncate + self-restart -- synchronously on whatever thread invoked it (the delaymgr worker in production). A prior fix attempt (2026-07-10, see bug-1429) tried moving this to a VTASK_LIVE_BLOCK vtask via c->ha.pool and deadlocked controller_unit_test, because c->ha.pool is never initialized/started by this file's lightweight unit-test fixtures (dc_setup), so a vtask enqueued VTASK_LIVE_BLOCK blocked forever waiting for a worker that never existed; that attempt was reverted.",
|
|
"fix": "Split ha_demotion_convergence_fn into a dispatcher (fast admin work: single-flight CAS on new ha_state_t field demotion_convergence_inflight, then slowlane_submit) and a new demotion_lane_fn slow-lane worker body running the actual truncate+self-restart (extracted into ha_demotion_convergence_do_run) -- the SAME established slow-lane pattern already used for snapshot send / config-push / peer connect in ha.c (ha_snapshot_send_dispatch, ha_config_push_offloadable, ha_connect_to_peer), not the vtask pool that deadlocked before. New feature flag g_drive_async_demotion_offload (ha_set_demotion_offload_for_test / ha_demotion_offload_enabled, ha.h/ha_convergence.c) gates the offload. IMPORTANT: defaulting this flag to ON (1) was tried first and reproduced a NEW real hang -- raft_cb_become_follower (which schedules this task) is exercised by a very broad set of pre-existing controller_unit_test fixtures across many files that never call slowlane_init, so the offloaded work was silently queued on an uninitialized c->slowlane (queued, never run -- no live workers) and downstream code waiting on the now-never-happening completion hung. Reverted the default to OFF (0), matching the ORIGINAL rollout discipline of the three reference offloads (all shipped OFF-by-default, flipped ON only in a later dedicated compatibility-audit pass -- raft-drive-async task 3.4). The mechanism is correct and covered by dedicated tests (test_demotion_offload_task_returns_promptly / test_demotion_inline_task_blocks_RED in test_demotion_convergence.c) that explicitly flip the flag ON against a fixture with a real slowlane_init'd lane. Flipping the cluster-wide default to ON is a follow-up compatibility audit across the full test suite, explicitly out of scope for this fix. Verified: standalone controller_unit_test binary run directly (bypassing meson) reports 976 Tests 0 Failures 0 Ignored, no hang/timeout.",
|
|
"tags": [
|
|
"async-io",
|
|
"thread-role-violation",
|
|
"delaymgr",
|
|
"slowlane",
|
|
"ha_convergence.c",
|
|
"demotion",
|
|
"raft-drive-async-pattern",
|
|
"xce-audit-invariants",
|
|
"controller-tests"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1429",
|
|
"bug-1451"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-18",
|
|
"gitea_issue": 25
|
|
},
|
|
{
|
|
"id": "bug-1451",
|
|
"timestamp": "2026-07-18",
|
|
"error_message": "xce-audit-invariants controller pass (dim: async I/O thread-role) found ha_catchup_continuation_fn scheduled directly as a delaymgr task body with no vtask/slow-lane hop: catchup_stream_range -> ha_stream_wal_to_standby does blocking WAL file reads + socket writes to a standby directly on the delaymgr thread. Flagged as the MORE URGENT of the two violations -- catch-up can stream a variable, potentially large amount of WAL data, so it can block delaymgr (and therefore heartbeats to every OTHER peer) for an unbounded, unpredictable time, a real spurious-election risk.",
|
|
"file": "src/controller/config_repl.c, src/controller/ha.h",
|
|
"root_cause": "ha_catchup_continuation_fn (config_repl.c) ran its full body -- re-derive target, then catchup_stream_range's blocking WAL reads/socket writes -- synchronously on whatever thread invoked it (the delaymgr worker in production). Source comment at config_repl.c confirmed a prior VTASK_LIVE_BLOCK vtask-pool attempt here (2026-07-10) also deadlocked controller_unit_test and was reverted (bug-1429), tracked as a known open violation.",
|
|
"fix": "Split ha_catchup_continuation_fn into a dispatcher (fast admin work: slowlane_submit keyed by peer_idx+1) and a new catchup_lane_fn slow-lane worker body running the original streaming logic unchanged -- the SAME established slow-lane pattern used for snapshot/config-push/reconnect in ha.c, not the vtask pool. c->ha.catchup_inflight[peer_idx] (set by ha_walack_on_ack before scheduling) remains the authoritative per-standby single-flight guard; the lane's own per-key dedup is a redundant backstop, mirroring ha_connect_to_peer's reconnect offload. New feature flag g_drive_async_catchup_offload (ha_set_catchup_offload_for_test / ha_catchup_offload_enabled, ha.h/config_repl.c) gates the offload. Defaulting this flag to ON (1) was tried first and reproduced a real hang: test_convergence_verification.c's pre-existing ACK-driven catch-up fixtures (which directly exercise this exact code path via ha_walack_continuation_for_test) never call slowlane_init, so offloaded work was silently queued and never ran, hanging controller_unit_test at ~90s+ (confirmed reproducible both via meson and a direct standalone binary run with SIGQUIT timeout). Reverted the default to OFF (0), matching the same rollout discipline as bug-1450's demotion-convergence fix and the three original raft-drive-async reference offloads. Mechanism covered by dedicated tests (test_catchup_offload_probe_runs_promptly / test_catchup_inline_probe_blocks_RED in test_config_repl.c) using a REAL, started, single-worker delaymgr (delaymgr_init+delaymgr_start, not just an un-started fixture) plus a probe task queued behind the continuation to directly prove the delaymgr thread is/isn't blocked. Flipping the cluster-wide default to ON is a follow-up compatibility audit, out of scope for this fix. Verified: standalone controller_unit_test binary run directly reports 976 Tests 0 Failures 0 Ignored, no hang/timeout.",
|
|
"tags": [
|
|
"async-io",
|
|
"thread-role-violation",
|
|
"delaymgr",
|
|
"slowlane",
|
|
"config_repl.c",
|
|
"catchup-continuation",
|
|
"raft-drive-async-pattern",
|
|
"xce-audit-invariants",
|
|
"controller-tests",
|
|
"spurious-election-risk"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1429",
|
|
"bug-1450"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-18",
|
|
"gitea_issue": 35
|
|
},
|
|
{
|
|
"id": "bug-1452",
|
|
"timestamp": "2026-07-18T00:00:00Z",
|
|
"error_message": "AddressSanitizer: SEGV on unknown address 0x000000000038 in commit_advance_locked (controller/commit.c:208), called from commit_on_durable_advance (commit.c:341) <- fsync_worker (persist.c:399), a background ASAN thread started by persist_start (persist.c:723) inside test_persist_truncate.c's make_fresh_persist / test_truncate_above_resolves_pending_continuations_as_failed. Reproduced by temporarily flipping BOTH g_drive_async_demotion_offload and g_drive_async_catchup_offload (bug-1450/1451) from their default 0 to 1 and running the standalone controller_unit_test binary directly (976-test suite) -- crashed immediately, before completing the suite. Confirmed absent with both flags at their committed default of 0: the same binary/build (just reverted) completed cleanly, 976 Tests 0 Failures 0 Ignored, twice.",
|
|
"file": "src/controller/commit.c (crash site, commit_advance_locked); src/controller/persist.c (fsync_worker background thread, apply_committed_entry/restore_job/makeJob chain also appears in a related non-crashing stack from the same investigation); src/controller/ha_convergence.c + config_repl.c (g_drive_async_demotion_offload / g_drive_async_catchup_offload -- the flags whose flip triggers this)",
|
|
"root_cause": "ROOT-CAUSED 2026-07-19: the g_drive_async_demotion_offload/g_drive_async_catchup_offload flags were a RED HERRING -- this exact SEGV signature (NULL deref in the fsync_worker -> commit_on_durable_advance -> commit_advance_locked chain) was already independently observed on 2026-07-07, long before those flags existed (see memory: 'Pre-existing ASAN SEGV in test_persist_truncate Unrelated to Bug-1417 Work'). The flags only perturbed thread-scheduling timing enough to make a PRE-EXISTING, always-latent test-teardown race fire more reliably; they do not participate in the crash's causal chain at all. Actual root cause: in src/controller/testsuite/test_persist_truncate.c, the three continuation-related tests (test_truncate_above_resolves_pending_continuations_as_failed, test_truncate_noop_does_not_resolve_pending_continuations, test_truncate_concurrent_burst_resolves_above_cutoff_exactly_once) called `commit_engine_fini(&ce)` BEFORE `teardown_persist(p)` (which calls `persist_stop(p)`) -- the exact opposite of the contract documented in commit_engine_fini's own comment (commit.c:464-468: 'Callers are expected to have stopped the flusher (persist_stop) first'). Because persist_stop had not yet run, the fsync_worker background thread was still alive and could be mid-flight invoking the durable-advance callback (fsync_worker, persist.c:398-399, calls p->on_durable_advance(p->durable_cb_ctx) with NO lock held) concurrently with commit_engine_fini destroying ce->lock/ce->cond and, as its final step, setting ce->p = NULL. This produces a genuine TOCTOU data race with no synchronization between the two threads: commit_on_durable_advance's own guard (`if (ce == NULL || ce->p == NULL) return;`) can read ce->p as still non-NULL (racing ahead of or concurrent with commit_engine_fini's teardown), pass the guard, and then commit_advance_locked's SEPARATE, later re-read of ce->p (commit.c:208, `atomic_load(&ce->p->committed_lsn)`) observes the NOW-NULLED value written by the concurrently-running commit_engine_fini on the main thread -- producing a NULL-pointer dereference at exactly offset 0x38 (offsetof(persist_t, committed_lsn)), matching the crash address bit-for-bit. persist_set_durable_cb's unhook (called from commit_engine_fini) is 'defensive and cheap' per its own comment but is NOT sufficient on its own without persist_stop's pthread_join guaranteeing the flusher thread cannot be in-flight at all -- confirmed by the fact that persist_set_durable_cb existed and ran in this path the whole time and the crash still occurred.",
|
|
"fix": "FIXED 2026-07-19 (commit pending): added an explicit `persist_stop(p);` call immediately before `commit_engine_fini(&ce);` in all three affected test functions in test_persist_truncate.c (previously commit_engine_fini ran first, then teardown_persist -> persist_stop ran second -- backwards from the documented contract). persist_stop joins the fsync_worker thread, so by the time commit_engine_fini tears down ce->lock/ce->cond/ce->p, no thread can be mid-callback referencing them. teardown_persist's own internal persist_stop(p) call becomes a safe idempotent no-op on the second invocation (fsync_thread_running is already 0 and wal_fd is already -1, so both of its internal branches skip). No production code changed -- this was purely a test-fixture ordering bug, not a bug in commit.c/persist.c itself. Verified: full ASAN controller_unit_test suite (976 tests) run 6 times total (1 via meson + 5 standalone direct binary runs per project convention of not trusting meson's aggregate alone) -- 976 Tests 0 Failures 0 Ignored on every run, zero ASAN reports (SEGV/UAF/etc.), all 8 test_persist_truncate.c tests PASS every run. NOTE for a future session: the identical commit_engine_fini-before-persist_stop ordering also exists in test_demotion_convergence.c (line 233 commit_engine_fini(&g_dc.commit) before line 235 persist_stop(&g_dc.persist), against a real persist_start'd fixture) -- same latent race, not yet observed to crash there (likely a narrower window against a static/global fixture rather than a per-test stack fixture), out of scope for this fix but worth a follow-up sweep of all commit_engine_fini call sites.",
|
|
"tags": [
|
|
"ha_convergence.c",
|
|
"config_repl.c",
|
|
"commit.c",
|
|
"persist.c",
|
|
"test_persist_truncate.c",
|
|
"teardown-ordering",
|
|
"toctou-race",
|
|
"commit_engine_fini",
|
|
"persist_stop",
|
|
"raft-drive-async-pattern",
|
|
"xce-audit-invariants",
|
|
"controller-tests",
|
|
"ASAN",
|
|
"SEGV",
|
|
"FIXED",
|
|
"root-caused"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1429",
|
|
"bug-1450",
|
|
"bug-1451"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-19",
|
|
"gitea_issue": 36
|
|
},
|
|
{
|
|
"id": "bug-1453",
|
|
"timestamp": "2026-07-20T00:00:00.000Z",
|
|
"error_message": "Unnecessary CA certificate plumbing across C daemons and Go CLI \u2014 ca_cert_path fields, --ca-cert flags, and CACert config are dead or misleading; TLS verification is SSL_VERIFY_NONE everywhere",
|
|
"file": "multiple \u2014 see root_cause",
|
|
"root_cause": "XCE design uses server-side TLS only (encryption without peer certificate verification). The CA cert plumbing was intended for future P3 mTLS hardening but was never implemented: (1) C-side: zero SSL_CTX_load_verify_locations calls in entire codebase \u2014 ca_cert_path in xce/cluster.h:35 is set by controller/worker/scheduler but never loaded into any SSL_CTX; do_connect() production path in cluster.c:73 is a NULL-returning stub; (2) Go-side: HTTPS is disabled by default; xcecli uses trust-on-first-use pinning of the server leaf cert (not a CA) stored via a misleadingly-named CACert field; falls back to InsecureSkipVerify:true. Design docs (persistence-and-ha-design.md:1700) explicitly tag peer verification as optional P3 hardening, confirming current encryption-only posture is intentional.",
|
|
"fix": "DONE. C-side: removed ca_cert_path field from xce_cluster_config_t (src/include/xce/cluster.h); do_connect()/xce_connect_fn_t dropped the ca_cert param (src/lib/cluster.c); removed ca_cert_path non-empty check from xce_cluster_config_validate(); removed --ca-cert flag from worker (src/worker/src/main.c) and scheduler (src/scheduler/src/main.c); removed ca_cert_path population from src/controller/main.c:279-281; updated src/lib/testsuite/test_cluster.c mock_connect signature + fixture. Go-side: deleted xcecli/cmd/auth/cert/{cert.go,parser.go} (self-signed cert TOFU-pinning helper); removed CACert field from config.go APIServerInfo and models/logon.go LogonResponse; removed SetRootCAs/loadRootCAs from common/request/request.go and certPath param from Get/Post/DeleteRequestFromAPIServer; updated all ~18 xcecli cmd/* call sites; updated cmd/auth/logon.go to drop the https cert-fetch block; removed TestSetRootCAs_*/TestBuildTLSLogic from request_test.go. Verified: full C build (all components, ASAN) 353/353 targets, meson test suite 9/9 OK; xcecli go build/vet/test all PASS; grep -rn 'CACert|SetRootCAs|loadRootCAs|ca_cert' src/ clean (only historical design-doc mentions remain in src/docs/*.md, left as-is).",
|
|
"tags": [
|
|
"dead-code",
|
|
"tls",
|
|
"ca-cert",
|
|
"cleanup",
|
|
"controller",
|
|
"worker",
|
|
"scheduler",
|
|
"xcecli",
|
|
"apiserver",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-20",
|
|
"gitea_issue": 26
|
|
},
|
|
{
|
|
"id": "bug-1454",
|
|
"timestamp": "2026-07-20T00:00:00.000Z",
|
|
"error_message": "Scheduler --peers correctly wired for initial controller discovery; minor issues: nmasters=1 (no EndpointRotator) and leaked ctx on HA path",
|
|
"file": "src/scheduler/src/scheduler.c",
|
|
"root_cause": "VERIFICATION: --peers IS correctly parsed via xce_parse_peers() (main.c:129), stored via sched_set_cluster_cfg() (main.c:156), and iterated in sched_init() HA loop (scheduler.c:462-493) BEFORE sched_init \u2014 init ordering is correct. Narrowed findings: (1) nmasters=1 per attempt (line 468) \u2014 manual candidate loop instead of filling config->masters[] from all candidates so libxce EndpointRotator never engages. Functional but suboptimal. (2) Leaked apictx on HA path \u2014 xcecli_ctx_init at line 454 allocates sched->apictx, then HA loop at line 472 re-inits without xcecli_ctx_fini on the first allocation. On standby-failure branches (lines 480, 492) cleanup is correct. OUT OF SCOPE: runtime reconnect/rejoin after controller death belongs to .kiro/specs/component-failover-adoption/ (requirements + design approved, tasks 3.1/3.2 not yet approved).",
|
|
"fix": "DONE (leak fix only). Fixed the confirmed defect: sched_init() called xcecli_ctx_init(&sched->apictx, config) unconditionally, then on the HA path re-called xcecli_ctx_init() inside the candidate loop without freeing the first ctx -> leaked one xcecli_ctx_t per sched_init() call. Fix: xcecli_ctx_fini(sched->apictx) added immediately before the HA loop starts (src/scheduler/src/scheduler.c), since the loop's first iteration always replaces it. Verified via full ASAN build: all 5 scheduler meson test suites + libxce suite pass, no regression. REJECTED the nmasters>1+EndpointRotator suggestion: memory obs 11825 (this session) confirms scheduler/worker deliberately use the candidates[]-loop path instead of filling config->masters[], so changing that would contradict the established design, not fix a bug. Runtime reconnect/rejoin gap remains out of scope, deferred to component-failover-adoption spec (unchanged from original triage).",
|
|
"tags": [
|
|
"scheduler",
|
|
"peers",
|
|
"verified-working",
|
|
"minor-ctx-leak",
|
|
"nmasters",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-20",
|
|
"gitea_issue": 37
|
|
},
|
|
{
|
|
"id": "bug-1455",
|
|
"timestamp": "2026-07-20T00:00:00.000Z",
|
|
"error_message": "Scheduler --peers silently ignored: sched_init() memset(sched,0,...) wipes sched->cluster_cfg that main.c populated via sched_set_cluster_cfg() just before calling sched_init(), so the HA candidate loop's candidates_count check always reads 0 and falls back to the hardcoded localhost:9990 single-host path regardless of --peers.",
|
|
"file": "src/scheduler/src/scheduler.c, src/scheduler/src/main.c, src/scheduler/include/scheduler.h",
|
|
"root_cause": "sched_set_cluster_cfg(&sched, &cluster_cfg) at main.c was called before sched_init(&sched, &config, handler); sched_init's first action is memset(sched, 0, sizeof(*sched)), which zeroes the cluster_cfg field just written. sched_init's own internal HA-vs-single-host branch reads sched->cluster_cfg.candidates_count immediately after, so it always sees 0. User-reported regression found via code review after bug-1454's leak fix landed in the same function.",
|
|
"fix": "Restructured instead of patched around: sched_init() signature changed to take `const xce_cluster_config_t*` directly (assigned to sched->cluster_cfg AFTER the memset, inside sched_init, not before via a separate setter). Deleted sched_set_cluster_cfg() (no other callers). main.c hoists cluster_cfg/cluster_cfg_ptr to function scope and passes cluster_cfg_ptr (NULL or &cluster_cfg) straight into sched_init(). Also fixed an adjacent smell in the same HA loop: it used to mutate the caller's xce_client_config_t* config in place per candidate, leaving it in a surprising mutated state after sched_init returned \u2014 changed to a per-iteration local copy. Verified: full ASAN build (all components) 353/353 targets, meson 9/9 OK, manual scheduler testsuite 15/15, Go tests all pass. No test exercises sched_init's HA path with real --peers input (pre-existing gap, not introduced by this fix).",
|
|
"tags": [
|
|
"scheduler",
|
|
"peers",
|
|
"ha",
|
|
"config",
|
|
"api-design",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1454"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-20",
|
|
"gitea_issue": 38
|
|
},
|
|
{
|
|
"id": "bug-1456",
|
|
"timestamp": "2026-07-20T00:00:00.000Z",
|
|
"error_message": "Dangling pointer risk in sched_init() HA candidate loop: a later refactor (following bug-1454) changed the loop to build a per-iteration stack-local xce_client_config_t candidate_config and pass &candidate_config into xcecli_ctx_init().",
|
|
"file": "src/scheduler/src/scheduler.c",
|
|
"root_cause": "xcecli_ctx_init() (src/lib/client.c) stores the raw pointer it is given as ctx->conf \u2014 it does not copy the struct. That pointer is dereferenced later, long after sched_init() returns, by client_failover.c runtime reconnect/rotation logic (e.g. ac->conf->masters[next]). When the candidate loop used a stack-local xce_client_config_t per iteration, ctx->conf pointed at a stack frame that no longer existed once sched_init() returned \u2014 a classic dangling pointer that only manifests later during HA reconnect/rotation, making it easy to miss in a build+unit-test pass.",
|
|
"fix": "Reverted to mutating the caller-supplied xce_client_config_t* config parameter in place (config->nmasters, config->masters[0], config->master_ports[0]) instead of a stack-local copy. config is owned by main()'s stack frame, which lives for the whole process, so storing &config-derived state in ctx->conf is lifetime-safe. Added a comment in scheduler.c explaining why the stack-local-copy pattern is unsafe here, to prevent it from being reintroduced.",
|
|
"tags": [
|
|
"scheduler",
|
|
"ha",
|
|
"dangling-pointer",
|
|
"lifetime",
|
|
"client-config",
|
|
"fixed",
|
|
"regression-of-bug-1454"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1454",
|
|
"bug-1455"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-20",
|
|
"gitea_issue": 39
|
|
},
|
|
{
|
|
"id": "bug-1457",
|
|
"timestamp": "2026-07-20T22:56:00Z",
|
|
"error_message": "xce_controller with no --peers flag exits with -EINVAL from cluster_open_listener instead of starting as single-node primary",
|
|
"file": "src/controller/myapp.c",
|
|
"root_cause": "Discovered while independently reviewing clusterconfig-schema-split task 5.3 by building and running the actual pre-spec baseline (commit 94f50ce) for comparison. Single-node startup (no --peers) was ALREADY broken before this spec began: myapp_run() calls cluster_open_listener() before the primary config (cluster_config) is loaded from disk, so the pre-spec fallback branch (cluster_config->port, only reachable when cluster_config != NULL) always hit its else branch and returned -EINVAL, unconditionally, for every zero-flag single-node start. This invalidates part of clusterconfig-schema-split's premise (requirements.md's Introduction claimed cluster_config->port was 'the sole live port-sourcing mechanism for single-node deployments' and 'single-node controller startup SHALL continue to work exactly as it does today' \u2014 in reality it did not work today). Not caused by, or a regression from, clusterconfig-schema-split's changes \u2014 task 2.1's port-resolution rewrite (commit 1229f9a) incidentally fixed this as a side effect, since its hardcoded-default fallback no longer depends on cluster_config being loaded.",
|
|
"fix": "RESOLVED -- incidentally repaired by clusterconfig-schema-split task 2.1 (cluster_open_listener now falls back to a hardcoded XCE_CONTROLLER_DEFAULT_PORT constant instead of an unloaded cluster_config->port), not as a dedicated fix for this entry. Live-verified post-fix: single-node startup with no --peers now correctly binds port 9990 and reaches CTRL_PRIMARY. No further action needed unless a future audit wants to correct the historical claim in clusterconfig-schema-split's requirements.md/design.md that pre-spec single-node startup was previously working \u2014 it was not, for an unrelated reason (myapp_run's listener-open/config-load ordering).",
|
|
"tags": [
|
|
"controller",
|
|
"startup",
|
|
"single-node",
|
|
"pre-existing",
|
|
"myapp_run",
|
|
"cluster_open_listener",
|
|
"discovered-during-review",
|
|
"incidentally-fixed"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-20",
|
|
"gitea_issue": 27
|
|
},
|
|
{
|
|
"id": "bug-1458",
|
|
"timestamp": "2026-07-22T03:22:00Z",
|
|
"error_message": "tools/xce-build.sh: line 134: pip: command not found (inside nix develop ./src, running the new `xceadmin` build case, exit 127)",
|
|
"file": "src/nixSupport/xce.nix",
|
|
"root_cause": "admin-config-tool task 1.3 added python3Packages.{pycapnp,pyyaml,jsonschema,click,pytest,ruff} to xce.nix nativeBuildInputs per brief.md's Nix Environment section, but that list (copied verbatim from brief.md) omits python3Packages.pip. None of those packages transitively pull in a `pip` executable on PATH in a nix devShell built this way, so `pip install -e .` in the new xce-build.sh `xceadmin)` case failed immediately with command-not-found the first time it was actually exercised end-to-end inside `nix develop ./src`.",
|
|
"fix": "Added python3Packages.pip to xce.nix nativeBuildInputs alongside the other python3Packages.* additions. Verified via `nix develop ./src --command bash -c 'which pip; pip --version'`.",
|
|
"tags": [
|
|
"nix",
|
|
"xceadmin",
|
|
"python",
|
|
"pip",
|
|
"xce-build",
|
|
"admin-config-tool",
|
|
"task-1.3"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-22"
|
|
},
|
|
{
|
|
"id": "bug-1459",
|
|
"timestamp": "2026-07-22T03:45:00Z",
|
|
"error_message": "pip install -e . inside `nix develop ./src` fails: \"error: externally-managed-environment ... This command has been disabled as it tries to modify the immutable /nix/store filesystem\" (PEP 668)",
|
|
"file": "src/tools/xce-build.sh",
|
|
"root_cause": "The `xceadmin)` case (admin-config-tool task 1.3) ran bare `pip install -e .`/`pip install .` against the nix-provided python3 directly, matching brief.md's harness sketch. But nixpkgs' python3 site-packages lives under the read-only /nix/store, and nixpkgs patches pip to refuse writes there (PEP 668 externally-managed-environment guard) even with --break-system-packages in some configurations. brief.md's sketch was never actually exercised end-to-end against a real nix devShell before this task, so the guard was never hit.",
|
|
"fix": "Changed the `xceadmin)` case to create a throwaway venv (`$XCEADMIN_DIR/.venv`, recreated fresh every invocation) via `python3 -m venv --system-site-packages`, which inherits the nix-provided pycapnp/pyyaml/jsonschema/click/pytest (so pip never needs to rebuild those heavy binary deps from PyPI) while giving pip a normal writable site-packages to install xceadmin itself into. All subsequent commands (pip install, pytest) now run via $VENV_DIR/bin/pip and $VENV_DIR/bin/python. Verified end-to-end for both the default (editable) and release (pinned) profiles.",
|
|
"tags": [
|
|
"nix",
|
|
"xceadmin",
|
|
"python",
|
|
"pip",
|
|
"pep668",
|
|
"externally-managed-environment",
|
|
"xce-build",
|
|
"admin-config-tool",
|
|
"task-1.3"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1458"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-22"
|
|
},
|
|
{
|
|
"id": "bug-1460",
|
|
"timestamp": "2026-07-22T03:52:00Z",
|
|
"error_message": "Under `xce-build.sh xceadmin release` (pinned, non-editable install), the installed xcecommon package in site-packages has no schema_files/ directory at all \u2014 controller.capnp/c.capnp/JSON schemas are silently dropped from the wheel",
|
|
"file": "src/xceadmin/pyproject.toml",
|
|
"root_cause": "pyproject.toml had no [tool.setuptools.package-data] entry for xcecommon, so setuptools' default wheel build only includes *.py files. The xce-build.sh sync step correctly copies controller.capnp/c.capnp/*.schema.json into src/xcecommon/schema_files/ in the SOURCE tree, but `pip install .` (non-editable) builds a wheel from that source tree and, without package-data config, drops every non-.py file. An editable install (`pip install -e .`) never surfaces this because it resolves imports straight into the checked-out source tree, bypassing wheel packaging entirely \u2014 exactly the gap design.md's Testing Strategy 'Unit \u2014 schema bundling' note warned only a release-profile test run could catch (Requirement 5.5).",
|
|
"fix": "Added [tool.setuptools.package-data] xcecommon = [\"schema_files/*.capnp\", \"schema_files/json/*.schema.json\"] to src/xceadmin/pyproject.toml. Verified: after `xce-build.sh xceadmin release`, site-packages/xcecommon/schema_files/ now contains controller.capnp, c.capnp, and json/*.schema.json, byte-identical to the synced source copies.",
|
|
"tags": [
|
|
"xceadmin",
|
|
"python",
|
|
"packaging",
|
|
"setuptools",
|
|
"package-data",
|
|
"wheel",
|
|
"admin-config-tool",
|
|
"task-1.3",
|
|
"requirement-5.5"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1458",
|
|
"bug-1459"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-22"
|
|
},
|
|
{
|
|
"id": "bug-1461",
|
|
"timestamp": "2026-07-22T02:00:00Z",
|
|
"error_message": "pycapnp / capn-c: setting UpgradeConfigRequest.sha256 or .bytes raises capnp.lib.capnp.KjException: 'expected reader.type == STRUCT [6 == 10]; Value type mismatch' -- and the generated C accessors (UpgradeConfigRequest_get_sha256 etc.) were typed Data_ptr instead of a real byte blob",
|
|
"file": "src/schema/controller.capnp",
|
|
"root_cause": "controller.capnp declares `struct Data $C.mapname(\"xce_data_t\")` at line 355 (a tagged union of OPCode_get query-result shapes: schedjobs/schedworkers/jobs/workers/resources/resvals/jobArray). Cap'n Proto resolves unqualified type names lexically within a file, so this local struct SHADOWS the Cap'n Proto builtin `Data` blob type for every later `: Data` field declaration in the same file -- confirmed against the real compiled schema via `capnp compile -o-` + `capnp decode`, and against the actual capnpc-c generated C output (fields typed `Data_ptr`/`XceData_ptr`, a struct-pointer wrapper, using `capn_getp`/`encode_Data_ptr`/`decode_Data_ptr`/`free_Data_ptr`, instead of the correct `capn_data` blob type + `capn_get_data`). Affected 7 fields across 6 structs, several HA-critical: UpgradeConfigRequest.sha256/.bytes, ReplConfigReply.sha256/.bytes, ReplConfigPushRequest.sha256/.bytes, ReplEnvelope.payload (WAL replication envelope), SnapshotTransfer's chunk payload, WalCatchupEntry.payload/.batchPayloads (WAL catchup), CtrlHelloRequest.key. Production C code had already worked around this for years via hand-rolled raw capn_ptr manipulation (see request.c's own comment: \"Pull sha256 and bytes via raw capn_list8 access (NOT decode_Data which would corrupt via xce_data_t)\") -- the bug was known-and-routed-around, never fixed at the root, because nothing before xceadmin's pycapnp-based dynamic reflection needed the generated codec/accessors to work correctly for these fields (the C raw-workaround functions never called them). Two fields, `getdata` (RequestReply's OPCode_get reply payload) and `pushmsg` (Request's generic OPCode_push payload), correctly and intentionally referenced the LOCAL struct Data all along -- their surrounding dispatch code (Data_data_jobArray/jobs/workers/etc. switches in apiserver.c/opget.c/sched.c/handler.c/xceapi.c/helper.c) depends on it.",
|
|
"fix": "Renamed `struct Data` to `struct XceData` in controller.capnp (kept `$C.mapname(\"xce_data_t\")` so the generated C typedef name is unchanged), and explicitly repointed `getdata`/`pushmsg` at `XceData` by name (since removing the shadow means bare `Data` now correctly means the builtin blob, which those two fields do NOT want). Updated every derived-identifier reference (`Data_ptr`->`XceData_ptr`, `Data_data_<variant>`->`XceData_data_<variant>`, `struct Data`->`struct XceData`, `read_/write_/new_/encode_/decode_/free_Data(_ptr)?`->the `XceData` equivalents) across 19 hand-written files spanning controller, lib, scheduler, and the Go apiserver/xcecli CGo bindings (generated controller.capnp.c/.h regenerate automatically, never hand-edited). Fixed 5 call sites in src/lib/request.c (extract_data_bytes's parameter + 4 local variables) that had been declared XceData_ptr but now legitimately receive capn_data from the now-correct UpgradeConfigRequest_get_sha256/_get_bytes/ReplConfigPushRequest_get_sha256/_get_bytes accessors -- a pure type-name swap with zero logic change, since Data_ptr/XceData_ptr and capn_data share the identical {capn_ptr p} memory layout (confirmed: request.c already had a comment noting this exact equivalence). Verified via full rebuild+test of lib (1/1), controller (3/3, including the job-array push regression tests), scheduler (15/15), and the Go apiserver+xcecli backends (all packages green), plus a direct pycapnp round-trip proving UpgradeConfigRequest.sha256/.bytes now encode/decode correctly. Unblocks admin-config-tool task 3.3 (xceadmin.push's push_config()).",
|
|
"tags": [
|
|
"capnp",
|
|
"schema",
|
|
"controller.capnp",
|
|
"shadowing",
|
|
"type-collision",
|
|
"wal-replication",
|
|
"snapshot-transfer",
|
|
"admin-config-tool",
|
|
"task-3.3",
|
|
"xceadmin",
|
|
"cross-component"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-22"
|
|
},
|
|
{
|
|
"id": "bug-1462",
|
|
"timestamp": "2026-07-23T03:04:50.000Z",
|
|
"error_message": "ctrl-3 conf/ empty after HA failover deploy at /tmp/xce-ha-deploy -- config never replicated, but WAL/jobs replicated fine",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "Post-election baseline for ha->committed_config_tag (raft_cb_become_leader, ha.c:1279, set to safe_tag from ha_compute_safe_committed_lsn, ha.c:744-802) is computed as the MAJORITY-SAFE FLOOR across granted voters' self-reported tags (median of sorted tags, same conservative math used for WAL safe_committed_lsn). On a cluster where no admin config push has ever happened live (deploy-ha.sh places cluster.bin on disk pre-boot, not via a live push), every peer voter reports tag=0 except the newly-elected primary itself (self_tag=nonzero, e.g. 860cfd4f59ef9381) -- so the majority-floor computation picks 0, even though the primary demonstrably has a real, valid, currently-loaded config. This 0-floor is CORRECT for WAL LSN safety (a leader must not assume unacknowledged entries are durable) but WRONG for config_tag: a node's own actively-loaded config is not speculative the way an unacknowledged WAL entry is.\n\nEffect: the ONLY path that successfully pushes config after promotion is the one-shot, promotion-instant fan-out (ha.c:1583-1602) to vote endpoints still connected AT THAT EXACT MOMENT (ectx->votes[i].ep != NULL) -- it correctly bypasses committed_config_tag and reads myconf->config_version_tag directly. Any standby that is NOT connected at that instant (a late joiner reconnecting seconds later via on_standby_connected, or any future reconnect/ restart for the rest of the term) relies entirely on the ONGOING heartbeat-driven decision loop (ha_dispatch_repl_action_for_standby -> ha_evaluate_repl_action, ha.c:3633-3663 / 3194-3199: 'if standby_tag < committed_tag -> HA_REPL_PUSH_CONFIG'). Since committed_config_tag is permanently floored at 0 for the rest of the term (nothing advances it except a live admin xceadmin config push via config_commit_change -> push_config_to_standbys, config_repl.c:1524/1556-1558, which never happens in a normal deploy-ha.sh-deployed cluster), standby_tag(0) < committed_tag(0) is false forever -> HA_REPL_PUSH_CONFIG never fires for that standby. Meanwhile WAL/job replication is unaffected since it correctly tracks committed_lsn (a genuinely-advancing value, set from real job commits), not the broken config_tag floor -- exactly matching the observed symptom (jobs replicate, config does not).\n\nReproduced live: /tmp/xce-ha-deploy, peers ctrl-1=9901/ctrl-2=9902/ctrl-3=9903 (src/build.dbg/controller/xce_controller). ctrl-1 promoted primary at term=2 via PreVote failover (ha_compute_safe_committed_lsn logged safe_committed_lsn=0 safe_config_tag=0 'from 2 granted voters'). ctrl-2 (already-connected vote ep[0]) received handle_repl_config_push 45ms after promotion (one-shot path). ctrl-3 connected 3s later as 'late-joiner standby peer[2]' (ha.c on_standby_connected), got WAL-caught-up correctly (ha_process_standby_state: standby[2] converged: config_tag=0 applied_lsn=1 committed_tag=0 committed_lsn=1) but NEVER received a config push -- ctrl-1's full log has zero further push_config/repl_config lines after promotion, and ctrl-3's log stays stuck at 'CTRL_STANDBY -- waiting for primary to connect and push config'. ctrl-3/conf/ is empty on disk (no cluster.bin.*, no current pointer) while ctrl-1/ctrl-2 both have cluster.bin.860cfd4f59ef + current.",
|
|
"fix": "FIXED 2026-07-23. Implemented candidate direction (a): added ha_promotion_config_tag_floor(safe_tag, self_tag) (ha.h/ha.c, declared beside ha_promotion_truncate_floor) returning safe_tag > self_tag ? safe_tag : self_tag -- mirrors bug-1060's WAL-truncation clamp pattern but for config_tag instead of LSN. raft_cb_become_leader (ha.c ~1279) now clamps committed_config_tag to this floor instead of the raw majority-safe tag, so a newly-elected primary's own actively-loaded config tag is never dropped back to a stale majority-of-zero baseline. RED test added: test_promotion_config_tag_never_drops_below_own_loaded_config (testsuite/test_ha_election.c), covers the exact bug-1462 repro (safe_tag=0, self_tag=0x860cfd4f59ef9381 -> floor=self_tag), the equal case, safe_tag-above-self_tag case, and fresh-boot (0,0)->0. Unit suite green 977/977, zero regressions. Live regression: 20-round sequential soak (xce-test-ha, ~/tmp/xce-ha-soak-seq) PASS -- 63 jobs, zero job loss, all 3 nodes (ctrl-1/ctrl-2/ctrl-3) cycled through leadership across 20 promotions, 9m00.8s wall-clock. 20-round chaotic (overlapping-kill) soak (~/tmp/xce-ha-soak-chaos) also PASS -- VERDICT mode=chaotic rounds=20 jobs=57 committed_divergence=0 committed_job_loss=0 excluded_bug854_discovery=8 excluded_bug924_fdatasync=0 result=PASS (the 8 excluded bug-854 hits are client primary-discovery misses during overlapping-kill windows, not server-side loss). Confirms the fix holds under both normal and double-fault-within-reconvergence-window failover.",
|
|
"tags": [
|
|
"ha",
|
|
"config-replication",
|
|
"late-joiner",
|
|
"committed_config_tag",
|
|
"raft-promotion",
|
|
"auto-detected"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1060"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-23T03:29:19.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1463",
|
|
"timestamp": "2026-07-23T06:37:00.000Z",
|
|
"error_message": "xcecli build fails: ../common/request/request.go:143:32: undefined: tls / :144:13: undefined: loadRootCAs -- FAILED: [code=1] frontend/xcecli/xcecli",
|
|
"file": "src/frontend/xcecli/common/request/request.go, src/frontend/xcecli/cmd/jobs/peek.go",
|
|
"root_cause": "Commit 94f50ce6 (bug-1453, CA-cert-plumbing removal) deleted the crypto/tls import, loadRootCAs, and SetRootCAs from request.go and stripped certPath from GetRequestFromAPIServer/PostRequestToAPIServer/DeleteRequestFromAPIServer plus their ~18 call sites, but missed GetJobOutput() (still referenced tls.Config{RootCAs: loadRootCAs(certPath)} with no import) and its sole caller cmd/jobs/peek.go, which still called apiClient.SetRootCAs(serverInfo.CACert) (SetRootCAs no longer exists anywhere) and passed serverInfo.CACert (the CACert field was already removed from APIServerInfo in config/config.go). Go compiles per-package, so once common/request failed to compile, the compiler never got far enough to surface peek.go's own two dangling references in the same build run -- they were latent until request.go compiled again.",
|
|
"fix": "FIXED 2026-07-23. request.go: removed GetJobOutput's dead TLS block, dropped certPath from its signature (token, jobID, params). peek.go: removed the SetRootCAs call, updated the GetJobOutput call site to the new 3-arg signature. Also enabled NewAPIClient's previously-commented-out `c.Client.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true})` -- per user request (xcecli needs to actually connect to an https API server) and per bug-1453's own documented design intent (\"server-side TLS only, encryption without peer certificate verification\"), since prior to this no xcecli method set any TLS config at all, meaning ANY https:// apiserver URL (self-signed/auto-generated cert, the common case) would have failed Go's default cert verification -- this was broader than just GetJobOutput. Added crypto/tls import accordingly. Documented both the api-server (http+https) and controller (server-side-cert-only, no client certs) TLS postures as a durable rule in .kiro/steering/security.md's Transport section, replacing a now-stale line claiming TLS is handled at the network layer. Verified: full `all debug` rebuild green (355/355 ninja targets), frontend/xcecli/xcecli binary produced with fresh mtime, no new warnings, no test fallout (grep for GetJobOutput/SetRootCAs/loadRootCAs across *_test.go in xcecli returns nothing).",
|
|
"tags": [
|
|
"xcecli",
|
|
"tls",
|
|
"https",
|
|
"dead-code",
|
|
"build-break",
|
|
"ca-cert-removal",
|
|
"auto-detected"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1453"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-23T06:58:42.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1464",
|
|
"timestamp": "2026-07-23T09:50:00Z",
|
|
"error_message": "deploy-ha.sh FAIL: Error: xceadmin binary not found -- run 'xce-build.sh xceadmin' or 'nix build .#xcecore' first (after controller had just been rebuilt and xceadmin had been built successfully earlier in the same session)",
|
|
"file": "src/tools/xce-build.sh",
|
|
"root_cause": "setup_build() unconditionally does rm -rf \"$BUILD_DIR\" before every single-component build (controller, xceadmin, etc.), and all components share the same default BUILD_DIR=xce.build for the asan profile. Building controller after xceadmin (or vice versa) wipes the previous component entirely out of the shared build dir -- only the most-recently-built component survives. Only COMPONENT=all does one setup_build() + a single unfiltered meson compile, so it is the only invocation that leaves multiple components coexisting.",
|
|
"fix": "No code change; workflow fix -- when a downstream task (HA soak deploy-ha.sh) needs both xce_controller/xce_test AND the xceadmin venv present simultaneously in xce.build, run '/xce-build all' (or '/xce-build all asan') once instead of separate '/xce-build controller' + '/xce-build xceadmin' invocations, since the second call's setup_build() rm -rf wipes what the first call produced.",
|
|
"tags": [
|
|
"build",
|
|
"xce-build.sh",
|
|
"meson",
|
|
"xceadmin",
|
|
"controller",
|
|
"ha-soak",
|
|
"workflow"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1486"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-07-31T03:48:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1465",
|
|
"timestamp": "2026-07-24T08:00:00Z",
|
|
"error_message": "test_snapent_checkpoint_job_content_roundtrip / test_snapent_checkpoint_concurrent_mutation_not_torn / test_snapent_checkpoint_queue_status_roundtrip: FAIL: checkpoint file must parse as a well-formed entity-bearing format_version=1 payload",
|
|
"file": "src/controller/testsuite/test_persist_snapshot_entities.c",
|
|
"root_cause": "config-upgrade-snapshot task 1 bumped persist.c's SNAPSHOT_FORMAT_VERSION from 1u to 2u (reserving the version for the HostAdminState/QueueAdminState capnp migration). test_persist_snapshot_entities.c (ha-entity-snapshots spec) defines its OWN independent SNAPENT_TEST_FORMAT_VERSION=1u constant to structurally validate checkpoint bytes it reads directly, bypassing load_snapshot by design (testing the write-side/task 2.1-2.2 boundary, not the restore boundary). persist_checkpoint() now always writes format_version=2, so the test's stale hardcoded 1u check correctly (if inconveniently) rejected every checkpoint as unrecognized -- this is the same fail-loud format-mismatch behavior Requirement 5.7 mandates, just tripping up a test written before the bump existed.",
|
|
"fix": "Updated SNAPENT_TEST_FORMAT_VERSION from 1u to 2u in test_persist_snapshot_entities.c (one #define site; both use sites at the job-frame and queue-frame readers already referenced the constant, not a separate hardcoded literal). Mirrors the same fix already applied to test_config_repl.c's three fake_fmt sites for the same version bump. No other code in that file changed -- it belongs to a different, already-shipped spec.",
|
|
"tags": [
|
|
"controller",
|
|
"persist.c",
|
|
"snapshot",
|
|
"format-version",
|
|
"test-regression",
|
|
"config-upgrade-snapshot",
|
|
"ha-entity-snapshots"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-24T08:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1466",
|
|
"timestamp": "2026-07-24T15:36:56.329888Z",
|
|
"error_message": "test_config_repl.c: test_committed_marker_survives_checkpoint_trim and test_commit_advance_retry_clears_push_before_commit_fence flaked/failed (persist_checkpoint returned -EBUSY; new_mlsn <= committed_at_old) after wiring config-upgrade-snapshot task 5's WAL_CONFIG_MARKER apply case",
|
|
"file": "src/controller/testsuite/test_config_repl.c",
|
|
"root_cause": "Two related findings from wiring apply_committed_entry's new WAL_CONFIG_MARKER case (persist.c, config-upgrade-snapshot task 5), which for the first time makes applying a config marker synchronously trigger a real checkpoint: (1) persist_apply_pump_kick's dispatch is a CAS race between the calling thread (inside commit_submit's synchronous commit_resolve_pending) and persist_start's independent fsync_worker thread (via commit_on_durable_advance) -- when the fsync thread wins, commit_submit's WAIT mode returns having waited only for COMMIT, not for the marker's now-real APPLY+CHECKPOINT side effect on that other thread, so a fixture's own subsequent persist_checkpoint()/LSN bookkeeping can race the still-in-flight background checkpoint. This race was always latent (applying a marker used to be a no-op) but was invisible until task 5 gave it a real, observable side effect. (2) DEEPER pre-existing architectural finding: persist_write_checkpoint_marker (called by any checkpoint, periodic or marker-triggered) appends its local-only, never-replicated WAL_CHECKPOINT entry by incrementing persist_t's current_lsn directly, WITHOUT going through ha_primary_log_append/raft_log_append -- this violates ha_primary_log_append's own documented co-tracking invariant 'p->current_lsn == s->log_len + 1 always holds' (ha.c:4057). Consequence: config_append_marker's returned lsn (sourced from raft's own s->log_len, which under-counts once a checkpoint has interleaved) becomes unreliable as an exact physical-position identifier for any marker appended after an earlier marker's checkpoint has run -- exactly the scenario Requirement 4.4 (overlapping markers) requires. Verified this does NOT corrupt on-disk data or commit/durability correctness: commit_advance_locked's majority_candidate_locked (commit.c) is driven entirely by persist_t's own durable_lsn/current_lsn, never by raft's s->log_len (that library value is documented as advisory-only for commit-ceiling purposes, ha-term-safety commit-ceiling-optA). The bug is confined to callers trusting the RETURNED lsn from config_append_marker/ha_primary_log_append for precise identity/ordering once a checkpoint has occurred earlier in the WAL. This is pre-existing (the periodic WAL-threshold checkpoint trigger has always had the same bypass) but was never observable before because periodic checkpoints require >=100 WAL records to fire, essentially never happening between two closely-spaced marker appends in a unit test; task 5's marker-triggered checkpoint fires on EVERY marker commit, making it the common case. SEVERITY CORRECTION (2026-07-24, kiro-review of task 5): the original \"advisory-only... does NOT affect correctness\" framing UNDERSTATES real risk. ha->raft.log_len (the same value as s->log_len) is a direct input to Raft RequestVote freshness comparisons (ha.c:258-261, my_last_log_index; ha.c:401-406, my_last_log_term via persist_entry_term(c, log_len)) -- NOT debug/advisory-only. ha_primary_log_append itself documents (ha.c:4054-4060) that its own LSN-assignment correctness RELIES on p->current_lsn == s->log_len + 1 holding; once a checkpoint marker breaks that invariant, the next primary append receives a library-assigned index that may no longer match its true physical WAL position, so persist_entry_term() lookups keyed by that index can resolve to the wrong WAL entry. Confirmed via kiro-review independent trace, not yet reproduced as a live failure. Pre-existing (not introduced by task 5 -- the periodic WAL-threshold checkpoint trigger already had this bypass; task 5 only made the interleaving common instead of rare). Still correctly out of config-upgrade-snapshot task 5's boundary to fix -- flagging with corrected severity for whoever next owns ha-term-safety/raft-log-replication so it is not deprioritized based on the original advisory-only framing.",
|
|
"fix": "(1) Added t42_wait_applied() (mirrors test_apply_pump.c's tap_wait_applied) and called it from t43_commit_marker and directly in test_committed_marker_survives_checkpoint_trim, polling persist_last_applied_lsn() before any LSN-sensitive step following a marker commit, closing the fsync-thread race. (2) Changed t43_append_marker_uncommitted to return the TRUE physical lsn read directly from persist_t (c->persist.current_lsn - 1) instead of trusting config_append_marker's returned (raft-library-derived, now-unreliable) lsn -- matching how production code that needs precise positioning (persist.c's apply seam, which receives lsn from the WAL entry's own on-disk header) already effectively does it. Did NOT attempt to fix the deeper co-tracking invariant gap in ha.c/raft.c (out of config-upgrade-snapshot task 5's scope -- would require raft-log-replication/ha-term-safety spec owners to add a log_len resync after any local-only checkpoint-marker append on a raft leader); flagged as a follow-up finding in the task 5 status report instead.",
|
|
"tags": [
|
|
"checkpoint",
|
|
"needs-owner",
|
|
"severity-corrected",
|
|
"persist.c",
|
|
"vote-freshness",
|
|
"config-upgrade-snapshot",
|
|
"raft-log-index",
|
|
"architectural-finding",
|
|
"race-condition",
|
|
"test-flake"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-24T15:36:56.329908Z"
|
|
},
|
|
{
|
|
"id": "bug-1467",
|
|
"timestamp": "2026-07-25T08:55:00Z",
|
|
"error_message": "Reviewer rejected config-upgrade-snapshot task 8.4: configcompare_paths() (configcompare.c/.h) was a correct, fully-tested library function but was not reachable from anywhere outside the unit test binary -- unlike its siblings walcompare/snapverify/snapdiff, it was never registered as an xce_test CLI subcommand in test.c. `echo help | xce_test` confirmed configcompare was missing from the command list.",
|
|
"file": "src/controller/testsuite/test.c",
|
|
"root_cause": "The prior implementer built and unit-tested configcompare_paths() as a library function but never wired a cmd_configcompare() wrapper into test.c's dispatcher (include, extern decl, top_commands[], client_commands[] entries, and the wrapper function itself) -- the step every other sibling tool in this family (walcompare, snapverify, snapdiff) already had.",
|
|
"fix": "Added #include \"configcompare.h\", extern int cmd_configcompare(int, char*[]) forward decl, a { \"configcompare\", cmd_configcompare, ... } entry in both top_commands[] and client_commands[], and a cmd_configcompare() wrapper (mirroring cmd_snapdiff's exact usage-message/return-value convention: argc<3 -> usage + -1, tool ran -> 0 on match / -1 on divergence) placed immediately after cmd_snapdiff's definition in test.c. Zero changes to configcompare.c/.h, snapverify.c/.h, test_configcompare.c, test_snapverify.c, controller_test.c, or meson.build (all previously reviewed and approved as-is). Verified: controller_unit_test build clean, 1022/1022 tests pass (pure regression check, no test files touched); `echo help | xce_test` lists configcompare; hand-built /tmp fixture member dirs (conf/current + conf/cluster.bin.<hex>) smoke-tested via piped stdin -- identical-content case printed 'IDENTICAL across 2 members' with exit 0, divergent-content case printed 'DIVERGENT -- member 1 differs from member 0' with exit 1.",
|
|
"tags": [
|
|
"config-upgrade-snapshot",
|
|
"task-8.4",
|
|
"configcompare",
|
|
"xce_test",
|
|
"cli-dispatch",
|
|
"reviewer-rejection",
|
|
"testsuite"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-25T08:55:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1468",
|
|
"timestamp": "2026-07-25T00:00:00Z",
|
|
"error_message": "OP_upgradeConfig sent by any network client is permanently rejected -- handle_upgrade_config() was unreachable via the wire dispatch path, exercised only by unit tests calling it directly. Independently diagnosed by the admin-config-tool spec's design.md (Boundary Commitments / Risks) as a blocking controller defect out of that spec's scope; re-discovered here while building config-upgrade-snapshot task 8.6's live OP_upgradeConfig client (no prior client existed to send it and hit the gate).",
|
|
"file": "src/controller/cluster.c",
|
|
"root_cause": "commit fd93997f (\"fix(election-iomgr-refactor): config replication and RDHUP failover chain\", 2026-05-31) inverted the OPCode_upgradeConfig primary/standby guard in myreq_handler's switch: it changed `if (!ha_is_primary(&c->ha)) reject` (correct: only primary can commit a config change) to `if (ha_is_primary(&c->ha)) reject` (rejects the ONLY role -- primary -- that ha_dispatch_gate() ever lets reach this switch case at all, since OPCode_upgradeConfig is absent from the CTRL_STANDBY/CTRL_INIT/CTRL_ELECTING allow-lists in ha_dispatch_gate, ha.c). The commit's own message text (\"standbys apply, not primaries\") reflects a since-superseded design where OP_upgradeConfig was a primary-to-standby push; do_upgrade_config_with_bytes (config_repl.c) was later substantially rewritten (ha-term-safety R7 / config-upgrade-snapshot task 7) into a client-to-primary admin op that drives config_commit_change(), but this dispatch guard was never updated to match, leaving handle_upgrade_config() reachable only by unit tests calling it directly -- never via the network.",
|
|
"fix": "Restored the pre-regression polarity in controller/cluster.c's myreq_handler OPCode_upgradeConfig case: reject with -EAGAIN when NOT primary (`if (!ha_is_primary(&c->ha))`), fall through to handle_upgrade_config() when primary. Updated the stale comment to describe the current client-to-primary semantics and cite ha_dispatch_gate as the actual primary-only enforcement point (this switch-level check is now explicitly documented as defensive redundancy). No change to config_repl.c/ha.c/persist.c materialization logic -- pure dispatch-routing fix.",
|
|
"tags": [
|
|
"config-upgrade-snapshot",
|
|
"task-8.6",
|
|
"upgradeConfig",
|
|
"cluster.c",
|
|
"dispatch-gate",
|
|
"regression",
|
|
"admin-config-tool",
|
|
"cross-spec"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-25T00:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1469",
|
|
"timestamp": "2026-07-25T13:05:00Z",
|
|
"error_message": "config-upgrade-snapshot task 8.6's live soak (--config-upgrade, run-ha-soak.sh) FAILED on its first real run: after a config upgrade committed successfully and genuinely interleaved with a 3-round chaotic kill/restart sequence (all 6 jobs survived, upgrade confirmed committed), the post-convergence materialized-state identity check failed -- snapdiff reported ctrl-1's latest checkpoint (snap-000000000000000b.capnp, LSN 11) as 51569 bytes vs ctrl-2/ctrl-3's identical 51621-byte file. This is a live, empirical reproduction of bug-857's originally-hypothesized failure mode (config upgrade leaves members with divergent materialized state), which bug-857's own buglog entry explicitly flagged as 'NOT empirically reproduced yet' and task 8.5 could only address at the unit level (test_bug857_regression.c, a DIFFERENT and already-fixed mechanism -- schedule_checkpoint's WAL-threshold trigger racing the marker boundary). This is a third, distinct mechanism, first observed here.",
|
|
"file": "src/controller/config_repl.c do_upgrade_config_with_bytes (~1611-1770)",
|
|
"root_cause": "Byte-level diff of the two checkpoint files (both LSN 11) shows the string 'soakupgrade' (the deliberately-added 5th queue's name, part of task 8.6's upgrade-target config) appears ONCE in ctrl-1's file (inside the embedded raw active-config-bytes blob, persist.c's read_active_config_bytes -- always a fresh disk re-read) but TWICE in ctrl-2/ctrl-3's files -- the second occurrence, present only on ctrl-2/ctrl-3, sits in a queue-ENTITY list section (immediately followed by the next queue's name 'lost_and_found', a runtime enumeration, not raw config text). So ctrl-1's checkpoint correctly embeds the NEW config bytes but its runtime QUEUE-ENTITY table still reflects the OLD (pre-upgrade) queue set. Traced to the code: do_upgrade_config_with_bytes (the handler that runs on whichever node ORIGINATES/commits the upgrade -- ctrl-1 was primary in term 2 when this upgrade was submitted, confirmed via its own log line 'do_upgrade_config_with_bytes: Config upgraded to tag=... (acked=2 standbys)') saves the new bytes to disk (conf_save_config) and bumps c->myconf->config_generation, but NEVER calls config_activate_committed()/load_primary_config() to actually re-parse the new bytes INTO c->myconf -- so the very struct the checkpoint writer presumably walks to emit the queue-entity list keeps the OLD parsed queue set. apply_committed_entry's WAL_CONFIG_MARKER case (persist.c) only calls persist_checkpoint_marker_triggered() then upgrade_materialization_verify() (ha.c) -- and upgrade_materialization_verify does NOT reload/activate config either, it only (a) checks whether some PRIOR checkpoint already referenced this marker (cfgref_present/tag/sha, circularly self-referential to the checkpoint it is meant to gate) and (b) hash-verifies the LIVE ON-DISK bytes -- neither check touches c->myconf's in-memory queue table, so the Activation Fence reports 'VERIFIED' (confirmed in ctrl-1's log, 'upgrade materialization VERIFIED... materialization complete') even though c->myconf itself was never refreshed. config_activate_committed (which DOES call load_primary_config, the only place that actually re-parses queues into c->myconf) is invoked only from handle_repl_config_push (a STANDBY receiving an out-of-band config-push) and from a member's own boot/recovery path -- confirmed empirically: ctrl-1's log shows ZERO config_activate_committed calls in its original (primary, term-2) process instance, but TWO calls in its restarted instance (12:59:16 and 12:59:39, after persist_recover reported APPLY_CLEAN at last_applied_lsn=11, i.e. loading the already-frozen stale checkpoint rather than replaying). Consequence: the node that ORIGINATES a config upgrade never refreshes its own in-memory queue table as part of that commit -- its checkpoint stays consistent with the OLD queue set until some LATER, independent event (restart+recovery, or an incoming config-push) happens to call config_activate_committed. Task 8.6's scenario kills the originating primary shortly after it commits (chaotic multi-kill interleaved with the upgrade, by design), so that self-correction never gets a chance to run, and no FURTHER WAL activity occurred to trigger a follow-up checkpoint that could have picked up a later-corrected queue table -- the divergent checkpoint file is permanently frozen.",
|
|
"fix": "PARTIALLY FIXED, then RE-INVESTIGATED (2026-07-25) -- correcting this entry's own earlier premature 'FIXED' claim. Two real findings:\n\n(1) GENUINE FIX, LANDED: apply_committed_entry's WAL_CONFIG_MARKER case (persist.c) was calling config_activate_committed(c) AFTER persist_checkpoint_marker_triggered() (the checkpoint write), not before -- meaning even when activation ran, it ran too late to affect the checkpoint it was meant to fix. Reordered to run BEFORE the checkpoint call (still guarded on c->myconf != NULL, still positioned before upgrade_materialization_verify per task 6.2's own sequencing need). Verified: full controller_unit_test suite 1025/1025 PASS, 0 failures, no crash (including the previously-SEGV-prone test_marker_apply_via_live_pump_checkpoints_at_marker_own_lsn and the bug-1469 regression test_wal_config_marker_apply_activates_originating_member_config).\n\n(2) DEEPER GAP FOUND, NOT FIXED -- genuinely out of task 8.6's scope: re-running the live --config-upgrade soak AFTER the reordering fix landed produced the IDENTICAL divergence signature (same ~52-byte checkpoint delta, same duplicated-vs-single 'soakupgrade' queue name pattern) on a DIFFERENT node this time (still one node showing stale queue state). Root-caused via direct code trace: config_activate_committed() -> load_primary_config() only re-parses bytes into myconf->cluster_config (config_repl.c:614-714) -- it NEVER touches c->qmgr, the RUNTIME queue table collect_queue_frames() (persist.c:1895, the checkpoint's queue-entity-list writer) actually walks. The ONLY code that populates c->qmgr from cluster_config->queues[] is build_queues() (queue.c:28), called EXACTLY ONCE per process lifetime from xce_config_init's HOOK_AFTER_EVENT branch (cluster.c, fired during cluster_init_phase2 at process boot/restart) -- and build_queues() is UNCONDITIONAL/blind-create (no existence check before calling create_queue/makeQueue for every queue in the config), so it is UNSAFE to simply re-call on a live cluster with existing queue objects (would attempt to recreate already-existing queues, risking duplicate-key/corruption semantics that were never designed for a live re-provisioning call). Consequence: NO MEMBER -- neither the config-upgrade originator NOR a replicating standby NOR any node's own live marker-apply of any kind -- has a working mechanism to add a NEWLY-INTRODUCED queue to its runtime qmgr without a full process restart. The apparent 'originating member vs standby' asymmetry in this bug's original report was COINCIDENTAL, not causal: whichever node's restart (inevitable during a chaotic multi-kill sequence, unrelated to which node 'originated' the upgrade) happened to occur AFTER the new config bytes were already on disk got the new queue for free via its own full boot sequence (xce_config_init -> build_queues); a node whose restart happened to land BEFORE that point, or that never restarted during the scenario at all, does not -- regardless of the fix in (1). This directly contradicts design.md's own stated goal for this spec ('No controller restart is required for a configuration upgrade after this change') for the specific case of a config upgrade that ADDS a queue: today it demonstrably STILL requires a coincidental restart to take effect on any given already-running member. requirements.md's own Design Invariant #1 ('Queues are config-provisioned... update-only restore is safe') is only true for the SNAPSHOT-INSTALL restore path (a fresh/behind joiner materializing a full checkpoint, restore_queue_state, queue.c:208) -- it was never validated against the LIVE no-restart marker-apply path this spec's Requirement 7/Introduction promises, and does not hold there.\n\nNOT fixed as part of config-upgrade-snapshot task 8.6: doing so properly requires new, carefully-designed production logic (a live-safe, idempotent 'sync qmgr from the freshly committed config' function -- e.g. mirroring restore_host_state's exact find-or-create-only shape, worker.c:477-536, adapted for queue_t/c->qmgr) PLUS a deliberate design decision this task is not positioned to make safely under its own time/scope budget: what happens to a queue REMOVED by an upgrade (delete the queue_t? re-home its jobs to lost_and_found -- bug-857's own originally-hypothesized-but-never-implemented mechanism? refuse the upgrade while jobs remain queued?) -- a decision requiring its own requirements/design pass, not an implementation detail. Flagging squarely for whoever owns tasks 1-7 (persist.c/config_repl.c/queue.c materialization logic) as a genuine, previously-undiscovered gap in this spec's core 'no controller restart required' promise, confirmed via TWO independent live soak runs (before and after the ordering fix) reproducing the identical byte-level signature.",
|
|
"tags": [
|
|
"config-upgrade-snapshot",
|
|
"task-8.6",
|
|
"bug-857",
|
|
"state-divergence",
|
|
"config_repl.c",
|
|
"do_upgrade_config_with_bytes",
|
|
"config_activate_committed",
|
|
"materialization",
|
|
"live-soak-finding",
|
|
"needs-owner",
|
|
"persist.c",
|
|
"partially-fixed",
|
|
"re-investigated",
|
|
"needs-design"
|
|
],
|
|
"related_bugs": [
|
|
"bug-857",
|
|
"bug-1466"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-25T13:05:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1470",
|
|
"timestamp": "2026-07-25T14:25:00Z",
|
|
"error_message": "controller_unit_test: test_commit_advance_retry_clears_push_before_commit_fence (test_config_repl.c:1854) FAILS (\"Expected TRUE Was FALSE\") DETERMINISTICALLY (4/4 runs: 1x via full xce-build.sh controller clean build + meson test, 3x direct re-invocation of the built controller_unit_test binary with no rebuild) on the bug-1469 fix commit (persist.c +91/test_config_repl.c +144, uncommitted worktree diff at time of this build). controller_unit_test overall: 1025 Tests 1 Failures 0 Ignored / meson summary Ok:2 Fail:1.",
|
|
"file": "src/controller/testsuite/test_config_repl.c",
|
|
"root_cause": "NOT YET DIAGNOSED. Distinguishing context vs the two prior entries for this same test name: bug-1407 (closed 2026-07-03) root-caused an earlier failure of this exact test to a STALE INCREMENTAL ninja build artifact in this worktree, conclusively fixed by a fresh cycle -- but this run WAS already a fresh clean build (xce-build.sh always does rm -rf + meson setup, confirmed src/tools/xce-build.sh:59-60), so bug-1407s explanation does not apply here. bug-1466 (2026-07-24) found a genuine CAS timing race between the commit-thread and persist_start()s fsync_worker thread that could affect this same test family after task 5s WAL_CONFIG_MARKER-triggers-real-checkpoint change, and claimed to fix it via t42_wait_applied() polling -- but the failure seen here (\"Expected TRUE Was FALSE\", a plain boolean assertion) is 100% reproducible across reruns of the same binary, which argues AGAINST a timing race (races are not usually 4/4 deterministic within one build) and FOR either (a) a residual gap in bug-1466s fix, or (b) a genuine regression introduced by the just-made bug-1469 persist.c change (adding an unconditional config_activate_committed() call inside apply_committed_entrys WAL_CONFIG_MARKER case, immediately before upgrade_materialization_verify()) altering ordering/state that this specific test asserts on. bug-1469s own buglog entry claims a prior direct-ninja verification run saw 1024/1024 PASS 0 failures on the same source -- so either that verification predates a subsequent edit, or ran under different build state; this needs reconciling before task 8.6 soak work continues.",
|
|
"fix": "NOT FIXED -- reported to the requesting task/session for triage; out of scope for the build-verification task that discovered it (was asked only to get a clean component build + report status, not to debug). Repro is cheap: nix develop ./src --command bash src/tools/xce-build.sh controller (full clean rebuild) or, faster, just rerun the already-built binary: ASAN_OPTIONS=detect_leaks=0 ./src/xce.build/controller/controller_unit_test 2>&1 | grep -A2 test_commit_advance_retry_clears_push_before_commit_fence. Full logs preserved this session at src/xce.build/meson-logs/testlog.txt (search test_config_repl.c:1854).",
|
|
"tags": [
|
|
"testsuite",
|
|
"controller",
|
|
"config-upgrade-snapshot",
|
|
"bug-1469",
|
|
"commit-engine",
|
|
"test-config-repl",
|
|
"needs-diagnosis",
|
|
"possible-regression"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1407",
|
|
"bug-1466",
|
|
"bug-1469"
|
|
],
|
|
"occurrences": 4,
|
|
"last_seen": "2026-07-25T14:25:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1471",
|
|
"timestamp": "2026-07-25T14:45:00Z",
|
|
"error_message": "config-upgrade-snapshot task 8.6 live --config-upgrade soak: after avoiding bug-1469's queue-creation gap (switched the upgrade-target config change from ADDING a queue to updating an existing queue's description text -- see bug-1469's updated entry), the materialized-state identity check (snapdiff of each member's latest checkpoint file, all at the same LSN) still fails, but now with a MUCH smaller divergence: exactly ONE byte differs (offset 42879/51161 bytes total) between ctrl-1 and ctrl-2/ctrl-3 (ctrl-2 and ctrl-3 are byte-IDENTICAL to each other). ctrl-1 has 0x50 at that offset; ctrl-2/ctrl-3 have 0x00.",
|
|
"file": "src/controller/persist.c collect_host_frames / capnp_encode_host_admin_state (~lines 141-162, 2028)",
|
|
"root_cause": "ROOT-CAUSED AND DISTINGUISHED (2026-07-25, follow-up investigation): the two prior hypotheses are now resolved -- Hypothesis 2 (uninitialized/non-zeroed capnp padding) is REFUTED, Hypothesis 1 (genuine content discrepancy) is CONFIRMED, and the true mechanism is a pre-existing, out-of-spec-boundary bug, NOT part of config-upgrade-snapshot. Evidence: (1) Wrote a byte-precise decoder in Python that walks the checkpoint's [host_count][{payload_len; capnp bytes}] host-frame section (same structural approach as snapverify.c task 8.4) and decodes each frame using the exact wire shape write_HostAdminState produces (HostAdminState_word_count=1, pointer_count=1: one 8-byte data word holding `status` via capn_write32 at data-section offset 0, one 8-byte pointer word for `name` Text). Decoding BOTH /tmp/xce-ha-configupgrade and /tmp/xce-ha-configupgrade-v2's preserved checkpoints for all 3 members shows: host[1] = 'cfgupgrade-host', ctrl-1 status=0x00500000, ctrl-2/ctrl-3 status=0x00000000 -- byte offset 42879 is byte index 2 of the little-endian `status` DATA FIELD itself (data-section file offset 42877-42880), NOT the 4-byte padding word that follows it (file offset 42881-42884), which is 0x00000000 IDENTICALLY across all 3 members in both reproductions. (2) 0x00500000 = XCE_WORKER_CLOSED (0x00100000) | XCE_WORKER_CLOSED_BY_ADMIN (0x00400000) -- exactly the bits worker.c:779 sets for HOST_CLOSE inside worker_ctrl(). This is semantically meaningful admin-closed status, not heap garbage. (3) Independently confirmed capn_init_malloc's segment allocator (create_local in the pinned c-capnproto build, /nix/store/.../capnpc-1.0.1/lib/libCapnC_Runtime.so, disassembled directly) calls calloc(1, size) -- zero-initializing -- so Hypothesis 2 was never physically possible for this library, consistent with the empirically-always-zero padding bytes. (4) Traced the actual mechanism: worker_ctrl() (worker.c:732-794) sets w->host.status on whichever member directly processes the hostctrl RPC (ctrl-1, primary at the time), then fires HOOK_DETAIL_WORKER_UPDATE, which persist.c:5722 maps to WAL_WORKER_CTRL and replicates. On EVERY member applying that WAL entry (standbys AND a member's own replay-from-WAL/restart path alike), persist.c:3724's case WAL_WORKER_CTRL calls worker_from_capnp() (worker.c:827-856) UNCONDITIONALLY, regardless of hook_detail (JOIN vs UPDATE vs DEAD all share this one apply path). worker_from_capnp's own idempotency guard (worker.c:847-853) does key_find() and returns -EEXIST if a worker with that name ALREADY EXISTS -- WITHOUT applying any of the just-decoded fields, including status. persist.c:3732-3733 then treats -EEXIST as 'idempotent re-apply, no hook' and silently returns 0, discarding the decoded status update entirely. Since cfgupgrade-host was JOINED (a prior, separate WAL_WORKER_CTRL/HOOK_DETAIL_WORKER_JOIN entry) BEFORE it was admin-closed, by the time the UPDATE entry replicates/replays, the worker already exists on every standby -- so the close never lands there. This is NOT specific to config upgrades, checkpoints, or any config-upgrade-snapshot code: it reproduces for ANY `hostctrl -c`/`hostctrl -o` issued against an already-joined host on ANY XCE HA cluster, with zero dependency on a config upgrade ever being submitted. `git log -L` on worker_from_capnp confirms it was introduced 2026-05-08 in commit 9b6a91a8 ('feat: implement restore_job/worker_from_capnp for WAL recovery'), ~2.5 months before config-upgrade-snapshot's spec work began (first spec commit visible ~2026-06-24); no config-upgrade-snapshot task touches this apply path (the spec's own worker.c addition, restore_host_state from commit 5b1600a8, is a wholly separate function used only by the SNAPSHOT-INSTALL restore path, task 4, never by the live WAL_WORKER_CTRL apply switch). collect_host_frames/capnp_encode_host_admin_state (this spec's task 2.1 code) are functioning exactly as designed -- they faithfully serialize whatever w->host.status currently holds; the bug is that w->host.status itself is wrong on ctrl-2/ctrl-3, entirely upstream of any checkpoint/materialization logic. Existing test coverage (test_apply_committed_entry.c:test_ace_worker_ctrl_join_restores_and_notifies) only exercises the fresh-JOIN case; no test exercises WAL_WORKER_CTRL UPDATE against an already-existing worker, confirming this is a genuine untested gap, not a previously-handled case. Filed separately as bug-1472 (the true root cause) since it is a distinct, real, pre-existing mechanism entirely outside config-upgrade-snapshot's boundary -- see that entry for the fix-owner routing. This entry (bug-1471) remains the observed SYMPTOM (checkpoint byte divergence) for task 8.6's soak; the underlying CAUSE is bug-1472.",
|
|
"fix": "FIXED -- this was the observed SYMPTOM (checkpoint host-frame byte divergence) of bug-1472's root cause (worker_from_capnp()'s WAL_WORKER_CTRL apply path silently discarding UPDATE payloads against an already-existing worker). bug-1472 was fixed 2026-07-25 (TDD RED->GREEN): worker_from_capnp() now decodes hook_detail before applying its existing-worker idempotency guard, and HOOK_DETAIL_WORKER_UPDATE replaces the existing worker's XCE_WORKER_ADMIN_MASK bits with the decoded payload instead of silently no-op'ing on -EEXIST. This directly closes bug-1471's exact repro (an admin-close status change failing to replicate to standbys, producing the byte-42879 checkpoint divergence). Note: HOOK_DETAIL_WORKER_DEAD was deliberately left unfixed in the same change -- tracked separately as bug-1472-remainder (needs a design decision, not yet resolved).\n\n[Original entry]\nNOT FIXED, AND DELIBERATELY NOT ATTEMPTED IN THIS SPEC -- confirmed genuinely OUT OF config-upgrade-snapshot's scope (see root_cause above). The real fix belongs in worker.c's worker_from_capnp()/persist.c's WAL_WORKER_CTRL apply case (case WAL_WORKER_CTRL, persist.c:3724), which needs to distinguish JOIN semantics (create-if-missing, EEXIST is a legitimate no-op) from UPDATE/DEAD semantics (an already-existing worker is the EXPECTED case, and the decoded fields -- at minimum host.status -- must still be applied to it, not discarded) -- e.g. an update-in-place path mirroring how restore_host_state (task 3, worker.c, config-upgrade-snapshot's OWN precedent) ORs admin bits into an existing worker rather than treating existing-ness as terminal. That is a genuine, real, previously undiscovered defect (filed as bug-1472) but is squarely core HA worker-control replication, predating this spec by ~2.5 months and untouched by any of its tasks -- fixing it here would be scope creep into a different subsystem's correctness contract, not a config-upgrade-snapshot materialization fix. Task 8.6's soak will keep observing this exact symptom (host-frame byte divergence whenever its scenario admin-closes a host before the final checkpoint) until bug-1472 is fixed by whoever owns worker.c/persist.c's general worker-control replication path. Recommend task 8.6 either (a) accept this as a known, separately-tracked limitation and adjust the soak's own PASS criteria to tolerate it (e.g. skip the admin-close-a-host step, or snapdiff-exclude the host-admin-status byte range) until bug-1472 lands, or (b) block final PASS on bug-1472's fix -- an orchestrator/owner decision, not this investigation's to make.",
|
|
"tags": [
|
|
"capnp",
|
|
"capnp_encode_host_admin_state",
|
|
"collect_host_frames",
|
|
"config-upgrade-snapshot",
|
|
"distinguished",
|
|
"host-frame",
|
|
"hypothesis-1-confirmed",
|
|
"hypothesis-2-refuted",
|
|
"live-soak-finding",
|
|
"materialization",
|
|
"needs-owner",
|
|
"out-of-scope",
|
|
"root-caused",
|
|
"routed-to-bug-1472",
|
|
"single-byte-divergence",
|
|
"task-8.6",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1469",
|
|
"bug-1472"
|
|
],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-07-25T16:35:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1472",
|
|
"timestamp": "2026-07-25T16:35:00Z",
|
|
"error_message": "Host admin-control status changes (hostctrl -c / hostctrl -o, i.e. HOST_CLOSE/HOST_OPEN via worker_ctrl()) never propagate to standby members' in-memory worker state once the target host has already been joined -- discovered while root-causing bug-1471's single-byte checkpoint divergence, but the defect itself is general and has nothing to do with checkpoints, config upgrades, or the config-upgrade-snapshot spec.",
|
|
"file": "src/controller/worker.c worker_from_capnp (~827-856); src/controller/persist.c case WAL_WORKER_CTRL apply path (~3724-3786)",
|
|
"root_cause": "worker_from_capnp() (worker.c:827-856) is invoked UNCONDITIONALLY by persist.c:3731 for every WAL_WORKER_CTRL entry, regardless of its hook_detail discriminator (JOIN, UPDATE, or DEAD all share this one apply path -- see persist.c:3766-3783's switch, which only controls which post-apply NOTIFICATION hook fires, not whether the mutation itself is applied). worker_from_capnp's own idempotency guard (worker.c:847-853): if key_find() on c->workermgr finds a worker with the decoded name ALREADY PRESENT, it returns -EEXIST immediately, WITHOUT applying any decoded field (including host.status) to the existing worker object. persist.c:3732-3733 treats any -EEXIST return as 'idempotent re-apply (replay / resync) -- no hook' and silently returns 0. This EEXIST short-circuit is correct for its originally-intended purpose (a duplicate/replayed JOIN entry for a worker that's already been created should indeed be a no-op), but WAL_WORKER_CTRL is also the opcode for HOOK_DETAIL_WORKER_UPDATE (worker.c:732-794's worker_ctrl(), which handles HOST_OPEN/ HOST_CLOSE admin commands, sets w->host.status, then fires exactly this same HOOK_AFTER_EVENT/HOOK_DETAIL_WORKER_UPDATE/WAL_WORKER_CTRL path at worker.c:786-787) and HOOK_DETAIL_WORKER_DEAD. For UPDATE/DEAD events, the target worker EXISTING is the NORMAL, EXPECTED case (you can only update or kill an already-joined worker) -- yet the same 'already exists -> skip entirely' logic applies, so the decoded status change is silently discarded on every member OTHER than the one that directly processed the original RPC. Confirmed via git blame: worker_from_capnp was introduced 2026-05-08 (commit 9b6a91a8, 'feat: implement restore_job/worker_from_capnp for WAL recovery'), predating config-upgrade-snapshot's spec work by ~2.5 months; no config-upgrade-snapshot task touches this function or the WAL_WORKER_CTRL apply case. Empirically confirmed via byte-precise capnp decode of two independent live-soak checkpoint sets (/tmp/xce-ha-configupgrade{,-v2}): ctrl-1 (which processed a `hostctrl -c` against a previously-joined synthetic host) has host.status=0x00500000 (XCE_WORKER_CLOSED|XCE_WORKER_CLOSED_BY_ADMIN) in its checkpoint's HostAdminState frame; ctrl-2/ctrl-3 (standbys) both show host.status=0x00000000 for the identically-named host entry -- proving the close never reached their live c->workermgr entries. Because a standby's OWN restart+full-WAL-replay hits the identical code path (persist.c's replay call site also routes through apply_committed_entry's same WAL_WORKER_CTRL case), a member that fully replays from LSN 1 would ALSO reconstruct the JOIN first (creating the worker) and then skip the later UPDATE (already exists) -- so this is not even a restart-repairable staleness; the divergence appears to be permanent for that member until directly patched or until some other mechanism re-applies the admin action. General severity: this affects ANY admin host-control action (`hostctrl -c`/`hostctrl -o`) against an already-joined host, unconditionally, cluster-wide -- not just this soak's synthetic cfgupgrade-host scenario.",
|
|
"fix": "FIXED 2026-07-25 (TDD: RED test first, confirmed failing against the pre-fix code, then GREEN). worker_from_capnp() (src/controller/worker.c) now decodes the WAL_WORKER_CTRL entry's hook_detail discriminator (the same 4 leading bytes it previously skipped without inspecting) BEFORE applying its existing-worker idempotency guard. When the target worker already exists: HOOK_DETAIL_WORKER_JOIN keeps the original -EEXIST no-op (a duplicate JOIN replay is genuinely idempotent -- unchanged, regression-guarded). HOOK_DETAIL_WORKER_UPDATE now REPLACES (not ORs -- worker_ctrl()'s HOST_OPEN uses assignment-style &= ~(...) to CLEAR admin bits, so OR would leave a re-opened worker stuck closed) the existing worker's XCE_WORKER_ADMIN_MASK bits with the decoded payload's admin-masked bits, under the worker's own write lock (mirrors restore_host_state's masking discipline, worker.c:487, with replace instead of OR semantics), then returns 0 so persist.c's WAL_WORKER_CTRL apply case (unchanged -- its existing '0 on any successful apply, -EEXIST only for genuine JOIN no-op' contract already handled this generically) falls through to fire the correct HOOK_DETAIL_WORKER_UPDATE notification instead of silently discarding the status change. HOOK_DETAIL_WORKER_DEAD is DELIBERATELY LEFT UNFIXED (still -EEXIST/no-op) -- investigated, not skipped: mark_worker_unavail()'s mutation (worker.c:661-679) is NOT confined to XCE_WORKER_ADMIN_MASK (sets XCE_WORKER_UNAVAIL + dead_since + resets hostattrs_t to 'unknown' + zeroes resource-value slots via set_host_slots), and critically, the live per-host resource-value array xce_worker_t.resvals (a zarray_t, what set_host_slots actually mutates and what scheduling reads) is NOT part of the Worker capnp wire schema at all -- only the separate resvals_to_sched/nresvals_to_sched fields are (confirmed by reading the generated decode_Worker/encode_Worker in controller.capnp.c and the schema in controller.capnp). A naive status-replace for DEAD would be an incomplete fix (would not zero standbys'/replayers' resource slots on a dead-worker event, a real correctness gap for POST-PROMOTION scheduling since the newly-promoted primary would read stale, non-zeroed slots) and needs its own investigation into whether/how to extend the wire schema -- filed separately as bug-1472-remainder below rather than rushed. Fix verified via 2 new + regression tests in test_apply_committed_entry.c (test_ace_worker_ctrl_update_applies_to_existing_worker, test_ace_worker_ctrl_update_replaces_not_ors_admin_bits, test_ace_worker_ctrl_join_duplicate_existing_is_noop -- the last one a regression guard proving JOIN's existing no-op behavior is unchanged) plus the full controller_unit_test suite: baseline (this worktree, immediately pre-fix) 1030 Tests 0 Failures, post-fix 1033 Tests 0 Failures (net +3, exactly the new tests, zero regressions). persist.c was NOT touched -- confirmed its WAL_WORKER_CTRL apply case (persist.c:3724-3786) already treats any non-negative worker_from_capnp() return as a successful apply generically (re-looks-up the worker by name and fires the hook_detail-keyed notification unconditionally), so returning 0 from the new UPDATE branch required no caller-side change.\n\n[UPDATE 2026-08-16] Tag hygiene: this entry's own UPDATE-case fix landed 2026-07-25 (commit 7547a8f1) but its tags were never updated off 'not-fixed'/'needs-owner'. The DEAD-case gap this entry deferred is bug-1472-remainder, separately FIXED and landed today in commit 45400c3a. Both halves of bug-1472 are now fixed and committed; closing out.",
|
|
"tags": [
|
|
"worker.c",
|
|
"persist.c",
|
|
"worker_from_capnp",
|
|
"WAL_WORKER_CTRL",
|
|
"host-control-replication",
|
|
"hostctrl",
|
|
"admin-status",
|
|
"standby-divergence",
|
|
"pre-existing",
|
|
"out-of-config-upgrade-snapshot-scope",
|
|
"root-caused",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1471",
|
|
"bug-1472-remainder"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-08-16T10:35:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1473",
|
|
"timestamp": "2026-07-25T19:12:00Z",
|
|
"error_message": "test_second_config_marker_supersedes_first_still_installing_on_member (task 8.8) FAILED on first run: Expected 0 Was 1 -- the fence must clear once materialization for the latest marker (B) completes.",
|
|
"file": "src/controller/testsuite/test_config_repl.c (test-only; no production code involved)",
|
|
"root_cause": "Test-construction gap, not a production bug. After releasing the checkpoint_in_progress CAS in the raced fixture, the test called the bare persist_checkpoint() to resolve the in-flight-checkpoint scenario, then read upgrade_materialization_fenced() directly -- but plain persist_checkpoint() never calls upgrade_materialization_verify() itself. That call only happens from two production call sites: apply_committed_entry's WAL_CONFIG_MARKER case (fires only on a NEW marker apply, not a bare checkpoint), and the delaymgr-driven retry trampoline (schedule_upgrade_materialization_retry), which explicitly no-ops when delaymgr is not running -- its own doc comment says so verbatim: \"No-op when... the delaymgr is not running (the unit-test fixture path...) -- caller drives directly.\" The bare t42/t43 test fixture (used throughout test_config_repl.c) never inits a delaymgr, so nothing in the raced fixture would ever re-evaluate the fence after the resolving checkpoint landed -- the fence stayed fenced=1 even though materialization for marker B had genuinely completed.",
|
|
"fix": "Added an explicit upgrade_materialization_verify(c_raced) call immediately after the resolving persist_checkpoint() call, mirroring the exact pattern already used by the precedent 6.1-c fence tests earlier in this same file (which call upgrade_materialization_verify(c) directly after t43_commit_marker for the same delaymgr-less-fixture reason). Also asserted verify_rc == 0. Confirmed via log trace that upgrade_materialization_verify only logs on a fence 0->1 transition (ha.c:254-256, \"never spams on repeated failed retries\") -- explaining why no second ERROR line appeared for markerB in the raw log even before the fix, which was the first clue this was a missing-caller issue rather than a fence-logic issue.",
|
|
"tags": [
|
|
"config-upgrade-snapshot",
|
|
"task-8.8",
|
|
"test-only",
|
|
"upgrade_materialization_verify",
|
|
"activation-fence",
|
|
"delaymgr",
|
|
"test-construction",
|
|
"not-a-production-bug"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-25T19:12:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1474",
|
|
"timestamp": "2026-07-25T20:50:00Z",
|
|
"error_message": "config-upgrade-snapshot task 8.9's new live --config-upgrade-wal-trim soak (run-ha-soak.sh, run_config_upgrade_wal_trim_round): the marker-triggered checkpoint's WAL-segment trim (persist_checkpoint_marker_triggered -> trim_wal_segments -> repl_trim_lsn, bug-1147's guard) strands a genuinely mid-catch-up standby's still-needed WAL segment -- but NOT because bug-1147's guard logic itself is wrong. Reproduced identically on 2/2 independent live 3-node runs: a killed, still-down standby's disconnect-guard (last_disconnected_lsn) is silently DESTROYED before the trim ever runs, because an UNRELATED, already-connected peer's redundant reconnect attempt reuses the dead standby's just-freed replicator slot.",
|
|
"file": "src/controller/ha.c (primary_heartbeat_fn's 'reconnect to any peer missing from standby_endpoints' loop, ~9219-9253; on_standby_connected, ~8658-8708; raft_cb_become_leader's vote-ep promotion, ~1888-1921); src/controller/repl.c (repl_add_standby's first-empty-slot allocation, ~85-133, and its memset(s,0,...) which wipes last_disconnected_lsn on reuse)",
|
|
"root_cause": "Confirmed via direct log evidence on 2 independent live-soak runs (deploy dirs /home/claude/tmp/xce-ha-waltrim and /home/claude/tmp/xce-ha-waltrim2, both --config-upgrade-wal-trim). Sequence, identical both times: (1) An election promotes surviving VOTE endpoints to standby replication channels (raft_cb_become_leader: 'promoted vote ep[i] -> standby channel', repl_add_standby registers them at replicator slots 0/1 -- e.g. run 1: ep[0]=ctrl-1 -> slot 0, ep[1]=ctrl-3 -> slot 1). (2) The test kills a non-primary TARGET standby (ctrl-1) while it is caught up to a known WAL floor. The primary's err_handler (vote_ep_err_handler, correctly wired) detects the RDHUP and calls repl_remove_standby, freeing slot 0 and setting last_disconnected_lsn = ctrl-1's real acked_lsn (confirmed matching the test's own captured floor segment, e.g. seg-5 in run 1, seg-c in run 2) -- bug-1147's guard is set CORRECTLY at this point. (3) Seconds later (matching the ~9s default heartbeat interval), primary_heartbeat_fn's periodic 'reconnect to any peer missing from standby_endpoints' sweep (ha.c ~9219) runs. It correctly identifies ctrl-1 (peer[0]) as missing (reconnect attempt fails with ECONNREFUSED, confirmed in both runs' logs: 'HA: connect to peer[0] (localhost:9991) failed: -111') -- but it ALSO, incorrectly, identifies ctrl-3 (peer[2]) as missing, even though ctrl-3 has been continuously connected the whole time via its slot-1 promoted-vote-channel connection (confirmed acking WAL entries without any gap throughout, via ctrl-2.log's 'commit: ack standby_idx=1' sequence). This triggers a redundant outbound reconnect to ctrl-3 (on_standby_connected fires: 'HA: outbound standby connection to peer[2] established' + 'HA: repl registered late-joiner standby peer[2] (slot 0, localhost:9993)'). (4) repl_add_standby's slot allocation picks the FIRST EMPTY slot by lowest index (repl.c ~85-110) with no regard for whether that slot still holds an unexpired bug-1147 disconnect guard for a DIFFERENT peer -- it picks slot 0 (ctrl-1's just-freed, guard-holding slot, since it is lower-indexed than slot 1) and unconditionally memsets it to zero, WIPING OUT ctrl-1's last_disconnected_lsn guard entirely. (5) When the marker-triggered checkpoint's trim runs shortly after, repl_trim_lsn (repl.c ~650-683) sees slot 0 now occupied by a live, fully-caught-up ctrl-3 duplicate connection (contributing no meaningful floor-lowering) and slot 1 also fully caught up -- with NO surviving trace that ctrl-1 (still down, still needing its old floor) was ever disconnected. floor collapses to the active segment itself, and every segment below it -- including the one ctrl-1 genuinely still needs -- is deleted. This is NOT a bug in bug-1147's guard logic (repl_trim_lsn/trim_wal_segments are working exactly as designed against the replicator state they are handed); it is an upstream defect in how a duplicate/late-joiner reconnect for an ALREADY-connected peer gets allocated a replicator slot. Root cause of WHY the 'peer already has a standby endpoint' check (ha.c ~9225-9249) fails to recognize ctrl-3's existing promoted-vote-channel connection is not fully pinned to a single line -- standby_ep_ctx_t is deliberately layout-compatible with vote_ep_ctx_t (confirmed by direct struct read, ha.c:8590-8603, both start with ha/c/ctx/peer_idx in the same order, so the blind cast the check performs is NOT a type-confusion bug) -- but vote_ep_ctx_t.peer_idx appears to be populated under inconsistent conventions across its several creation call sites in ha.c (e.g. line 542 sets peer_idx=votes_idx [relative, votes-array index] while a comment at line ~6120 asserts 'vctx->peer_idx is the ABSOLUTE cluster index' for a different call site) -- a mismatch between the relative votes_idx_for_i the check computes and whichever convention the SPECIFIC promoted vote_ep_ctx_t for ectx->votes[i].ep was actually built under would make the sctx->peer_idx == votes_idx_for_i comparison fail deterministically for promoted-vote-channel entries, matching the 100% reproduction rate observed. This needs further tracing by whoever owns ha.c's HA connection-management code to identify the exact mismatched call site.",
|
|
"fix": "[UPDATE 2026-08-16] Angle-a FIXED (TDD RED->GREEN, root-caused precisely -- not the original peer_idx-convention hypothesis, a different, concrete bug in an adjacent function). Traced every vote_ep_ctx_t.peer_idx assignment site as recommended: raft_cb_send_vote_request (real vote, ha.c) correctly sets peer_idx=votes_idx (RELATIVE) and is the ONLY function that stores its endpoint into ectx->votes[] (the array raft_cb_become_leader's promotion loop reads) -- confirmed by full read, no ectx->votes[].ep assignment exists anywhere else. raft_cb_send_pre_vote_request deliberately sets peer_idx=ABSOLUTE (correct, documented, needed by the PreVote tally) but NEVER stores into ectx->votes[] either -- so PreVote endpoints structurally can never reach promotion, ruling out the original hypothesis (PreVote-vs-real-vote convention mismatch reaching the reconnect-sweep check). ha->my_priority is set once at init and never reassigned, ruling out a self-idx-drift hypothesis too. The reconnect-sweep check itself (primary_heartbeat_fn, ~line 9787) already correctly discriminates promoted-vote-ep (relative) vs standby-ep (absolute) via sctx->ctx != NULL, unchanged since 2026-06-01 (predates this bug's 2026-07-25 discovery, confirmed via git log -L) -- it was never the bug. The REAL bug: on_standby_connected's own same-peer duplicate-eviction check (the function's OWN doc comment already named this exact hazard -- 'two live outbound state-push channels to one peer') compared cur_sctx->peer_idx == sctx->peer_idx DIRECTLY, with no relative/absolute discrimination at all -- unlike the adjacent, correct reconnect-sweep check ~500 lines away. sctx (the newly-connecting standby) always carries the ABSOLUTE index; if the existing entry for the same physical peer is a promoted vote ep (RELATIVE), the raw comparison can never match, so the stale promoted-vote channel is never evicted -- both channels survive, reproducing the buglog's exact live evidence (heartbeats/WAL fan out to a stale duplicate; the genuinely-connected promoted channel's own bug-1147 disconnect-guard slot gets silently reused by the SECOND, spurious connect attempt for the SAME live peer). Fix: apply the identical votes_idx_for_i conversion the reconnect-sweep check already uses, in on_standby_connected's eviction loop, discriminating on cur_sctx->ctx != NULL exactly as that check does. Regression test (test_ha_liveness.c's test_reconnect_resolves_dual_channel_promoted_vote_ep): stale entry is a genuine promoted-vote-ep test double (vote_ep_ctx_build_for_test, relative peer_idx) for the same physical peer a fresh standby reconnect targets (absolute peer_idx) -- RED under the pre-fix code (both channels survive, zero evictions -- the existing sibling test, test_reconnect_resolves_dual_channel_same_peer, only ever exercised the standby-vs-standby case, both absolute, which is why this mixed case slipped through originally), GREEN under the fix (exactly one channel survives, one eviction). Full controller_unit_test suite: 1100 tests, 2 pre-existing unrelated failures (bug-1561), no regressions. NOT independently re-verified via a live multi-node chaotic soak (the class of test that originally discovered this bug) -- the unit test directly constructs and proves the exact mechanism the live soak's log evidence showed, but a live re-run of config-upgrade-snapshot task 8.9's --config-upgrade-wal-trim scenario would be the strongest additional confirmation if this is revisited.\n\n[Original entry -- angle-b, already fixed 2026-07-26]\n\nNOT FIXED -- explicitly out of config-upgrade-snapshot task 8.9's boundary (task 8.9 is a regression test for the pre-existing, unmodified bug-1147 guard under the NEW marker-triggered trigger path, not a fix for this separately-discovered HA connection-management defect). Two independent, complementary fix angles for whoever owns ha.c/repl.c's HA connection layer: (a) fix the 'peer already has a standby endpoint' check (ha.c ~9225-9249) so it correctly recognizes an existing promoted-vote-channel connection for a peer, eliminating the spurious duplicate/late-joiner reconnect entirely (the more targeted fix, addresses the root cause) -- likely requires auditing every vote_ep_ctx_t.peer_idx assignment site (ha.c lines 542, 697, 6956, and whichever one specifically constructs ectx->votes[i].ep's ep->data) against the relative-votes_idx convention votes_idx_for_i expects; (b) independently harden repl_add_standby's slot allocation (repl.c) to never silently clobber a slot whose last_disconnected_lsn guard has not yet expired per snap_interval_s -- e.g. skip a guard-holding slot in the first-empty-slot scan (falling through to a genuinely empty slot, or failing loud if none exists) -- this is a defense-in-depth hardening of bug-1147's own retention mechanism against ANY future caller that might reuse a slot prematurely, not just this specific duplicate-connection path. Recommend (b) regardless of whether (a) is fixed, since it directly protects the invariant Requirement 7.4 cares about. The run_config_upgrade_wal_trim_round test infrastructure (run-ha-soak.sh, config-upgrade-snapshot task 8.9) is CORRECT and reproducibly catches this defect via direct on-disk WAL segment inspection -- re-run `run-ha-soak.sh --config-upgrade-wal-trim` after either fix lands to confirm a clean PASS; task 8.9 itself should stay incomplete/blocked on this bug per its own scope boundary (mirrors task 8.6's bug-1471/1472 precedent).\n\n[UPDATE 2026-07-26] FIXED (fix angle (b), the repl.c defense-in-depth hardening): repl_add_standby's slot-allocation scan (repl.c) now does a two-pass search instead of first-empty-slot-by-index. Pass 1 prefers a genuinely virgin slot (ep==NULL && last_disconnected_lsn==0). Pass 2 (fallback, only when no virgin slot exists) reuses the guard-holding slot (ep==NULL && last_disconnected_lsn!=0) with the OLDEST last_disconnect_time -- a deliberate policy: that guard is closest to its own natural repl_expire_disconnect_slots expiry, so reusing it discards the LEAST remaining WAL-retention protection of any guard-holding slot. With MAX_STANDBYS==3, the exhausted case (both non-primary slots simultaneously guard-holding, no virgin slot free) is handled by this same fallback rather than -ENOSPC -- refusing a legitimate new/reconnecting peer would be worse for cluster availability than accepting an early guard loss in an already-degraded state; the pre-existing -ENOSPC path (more distinct live peers than MAX_STANDBYS slots) is untouched, reserved for that genuinely-impossible case only.\nTDD: two new unit tests added to src/controller/testsuite/test_repl_unit.c -- test_repl_add_standby_prefers_virgin_slot_over_guard (RED under the old code: asserted a new unrelated peer must not land in a lower-indexed guard-holding slot when a virgin slot exists, and that the guard's last_disconnected_lsn must survive untouched) and test_repl_add_standby_exhausted_guards_prefers_oldest_disconnect (RED under the old code: asserted the exhausted-fallback deliberately picks the OLDER-disconnected guard slot, not merely the lowest-indexed one -- the test deliberately makes 'oldest-disconnected' and 'lowest-indexed' point at DIFFERENT slots so an accidental first-guard-by-index fallthrough would still fail it). Both new tests failed pre-fix, pass post-fix.\nGREEN: full controller_unit_test suite = 1030 tests (1028 known-good baseline + 2 new), 0 failures, no regressions (ASAN_OPTIONS=detect_leaks=0, nix develop build via `ninja -C src/xce.build controller/controller_unit_test`).\nrepl_remove_standby, repl_expire_disconnect_slots, repl_trim_lsn, and trim_wal_segments were NOT modified -- all confirmed correct and untouched, per this fix's scope.\nThis fix does NOT address fix angle (a) -- the separate ha.c heartbeat-reconnect-sweep defect (vote_ep_ctx_t.peer_idx convention mismatch hypothesis, ha.c ~9219-9254 / ~8687-8708) that triggers the spurious duplicate reconnect in the first place -- that remains a separate, not-fully-root-caused issue, out of this fix's scope. Recommend re-running `run-ha-soak.sh --config-upgrade-wal-trim` (config-upgrade-snapshot task 8.9) to confirm this defense-in-depth closes the observed WAL-segment-loss symptom even without (a) landing.\n\n[UPDATE 2026-07-26, post-review remediation] Independent review REJECTED the initial fix on one finding: the Pass 2 exhausted-fallback branch silently destroyed the reused slot's last_disconnected_lsn/last_disconnect_time via memset with zero logging, undercutting the fix's own stated goal of making the previously-silent WAL-retention-guard destruction visible/bounded -- this file already has an established convention for exactly this class of event (repl_broadcast's WARN(\"repl_broadcast: no standbys registered...\") and WARN(\"repl_broadcast: standby %s:%u evicted...\")). Remediated: repl_add_standby now tracks whether Pass 1 found a virgin slot (used_fallback_slot) and, only on the genuine Pass 2 fallback path, logs WARN(\"repl_add_standby: reusing guard-holding slot %d (host=%s:%u, last_disconnected_lsn=%lu) -- no virgin slot available, WAL-retention protection discarded\", ...) immediately before the memset, capturing the discarded slot's host/port/last_disconnected_lsn while they're still readable. No new test required (a log line has no observable return-value/state effect for a test to assert on) -- verified instead by confirming the WARN string is present in the built binary (`strings controller_unit_test | grep 'reusing guard-holding slot'`) and that both existing bug-1474 tests (test_repl_add_standby_prefers_virgin_slot_over_guard, test_repl_add_standby_exhausted_guards_prefers_oldest_disconnect -- the latter specifically exercises the Pass 2 path this WARN sits on) still pass unchanged. GREEN: full controller_unit_test suite = 1033 tests (1030 baseline + bug-1472's 3 concurrently-landed tests), 0 failures. NOTE: a transient stale-object-file build artifact was observed once in this shared build directory during verification (a link picked up an out-of-date worker.c.o from a moment when a concurrent sibling agent's build was in flight, showing 2 spurious failures unrelated to this change) -- resolved by touching the affected sources to force recompilation; not a defect in this fix, noted here in case it recurs for a future concurrent multi-agent session in this worktree.",
|
|
"tags": [
|
|
"ha.c",
|
|
"repl.c",
|
|
"trim_wal_segments",
|
|
"repl_trim_lsn",
|
|
"repl_add_standby",
|
|
"bug-1147",
|
|
"standby_endpoints",
|
|
"late-joiner",
|
|
"slot-reuse",
|
|
"duplicate-connection",
|
|
"promoted-vote-channel",
|
|
"config-upgrade-snapshot",
|
|
"task-8.9",
|
|
"live-soak-finding",
|
|
"root-caused",
|
|
"reproducible-2-of-2",
|
|
"needs-owner",
|
|
"out-of-scope",
|
|
"wal-trim",
|
|
"mid-catch-up",
|
|
"fixed",
|
|
"defense-in-depth",
|
|
"log-hygiene",
|
|
"review-remediation",
|
|
"angle-a-fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1147",
|
|
"bug-1471",
|
|
"bug-1472"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-07-26T04:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1472-remainder",
|
|
"timestamp": "2026-07-25T20:15:00Z",
|
|
"error_message": "Follow-up split out of bug-1472: HOOK_DETAIL_WORKER_DEAD entries applied via WAL_WORKER_CTRL against an already-existing worker still return -EEXIST (no-op) -- a dead-worker transition detected by one member (mark_worker_unavail(), worker.c:661-679) still never replicates its state to other members (standbys, or this member's own WAL replay), unconditionally. NOT a regression: this was already true before bug-1472's investigation; bug-1472's fix deliberately scoped itself to the byte-precise-confirmed HOOK_DETAIL_WORKER_UPDATE case only and left DEAD as -EEXIST/no-op, unchanged.",
|
|
"file": "src/controller/worker.c worker_from_capnp (~827-895, post-bug-1472-fix); mark_worker_unavail (~661-679); src/schema/controller.capnp struct Worker (~136-144)",
|
|
"root_cause": "mark_worker_unavail()'s mutation is NOT confined to XCE_WORKER_ADMIN_MASK the way worker_ctrl()'s is -- it sets XCE_WORKER_UNAVAIL (a non-admin bit), dead_since, resets hostattrs_t to 'unknown' sentinel strings, AND zeroes the live per-host resource-value slots via set_host_slots()/update_resvals(), which mutates xce_worker_t.resvals (a zarray_t of live xce_val_t entries). Critically, w->host.resvals is NOT part of the Worker capnp wire schema at all (confirmed by reading src/schema/controller.capnp's struct Worker and the generated decode_Worker/encode_Worker in controller.capnp.c) -- only the separate resvals_to_sched/nresvals_to_sched fields (a different, scheduler-push-facing concept) are encoded. So even applying a simple 'replace admin-masked bits' fix analogous to bug-1472's UPDATE fix would NOT fully replicate a DEAD transition's effects: the resource-value slot zeroing would still be silently lost on every other member, which matters materially at PROMOTION time (a newly-promoted primary would read stale, non-zeroed slots for a worker that died before promotion, potentially over-scheduling a dead host). A correct fix needs either (a) a schema change adding a wire-encodable resource-value-slots field so the DEAD payload can carry it, or (b) a different replication strategy for DEAD (e.g. re-deriving 'this worker's connection is gone locally' independently on each member rather than replicating a mutation), which is a design decision beyond a same-task patch.",
|
|
"fix": "FIXED (TDD RED->GREEN), design direction chosen by user: wire-encode the resource-value-slot zeroing rather than a non-replicated per-member re-derivation. Investigation revised the original design framing: NO new capnp schema field was actually needed. capnp_encode_worker (persist_worker_hook_fun) already serializes the FULL xce_worker_t.host -- including `attrs` (HostAttrs) -- on every WAL_WORKER_CTRL entry, and mark_worker_unavail() calls reset_hostattrs_unknown() BEFORE firing the hook that triggers that encode, so a DEAD entry's wire payload already carries the post-reset 'unknown'/0 attrs state. The actual gap was narrower: worker_from_capnp() had no DEAD branch at all (fell through to the JOIN-duplicate -EEXIST no-op), so nothing ever APPLIED what was already on the wire. Fixed by adding a DEAD branch (worker.c) mirroring the existing UPDATE branch (bug-1472's own fix): sets XCE_WORKER_UNAVAIL, takes dead_since from the decoded payload's deadSince field (the PRIMARY's own death timestamp -- genuinely wire-driven, not locally re-derived, honoring the chosen design direction), and calls reset_hostattrs_unknown()+add_hostattrs_resvals()+set_host_slots(0) locally to re-derive the resvals from the now-reset attrs -- these three calls are deterministic/data-independent (same effect mark_worker_unavail() itself produces on the primary), so xce_worker_t.resvals (the zarray_t the original investigation worried about) never needs to cross the wire at all. Regression test (test_apply_committed_entry.c's test_ace_worker_ctrl_dead_applies_to_existing_worker): pre-existing worker with live (non-'unknown') attrs receives a DEAD WAL entry with a specific non-zero deadSince -- RED under the pre-fix code (rc=-EEXIST, no mutation, no notification, the exact silent-discard this entry describes), GREEN under the fix (XCE_WORKER_UNAVAIL set, dead_since matches the payload exactly, hostattrs reset to 'unknown'/0, one notification fires). Full controller_unit_test suite: 1101 tests, 2 pre-existing unrelated failures (bug-1561), no regressions.\n\n[Original entry]\nNOT FIXED -- deliberately deferred, investigated not skipped (see bug-1472's own fix note for the full investigation). Needs its own design decision on how (or whether) to wire-encode the resource-value-slot zeroing, or an alternative non-replicated detection strategy, before a fix can be written safely.",
|
|
"tags": [
|
|
"worker.c",
|
|
"worker_from_capnp",
|
|
"mark_worker_unavail",
|
|
"WAL_WORKER_CTRL",
|
|
"HOOK_DETAIL_WORKER_DEAD",
|
|
"capnp-schema-gap",
|
|
"resource-value-replication",
|
|
"standby-divergence",
|
|
"post-promotion-scheduling-risk",
|
|
"needs-owner",
|
|
"needs-design-decision",
|
|
"not-fixed",
|
|
"deferred",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1472"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-25T20:15:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1475",
|
|
"timestamp": "2026-07-26T04:36:00Z",
|
|
"error_message": "Live config-upgrade-snapshot task 8.6 soak (`run-ha-soak.sh --config-upgrade`), run to verify bug-1472's fix, FAILED \u2014 but NOT at bug-1472's own assertions (materialized-state checkpoint byte-identity and active-configuration identity both PASSED cleanly across all 3 members, confirming bug-1472's fix holds). Failure occurred one step later, inside the Requirement 6.4 host-admin-status-rotation check's own `force_elect_node(\"ctrl-1\")` maneuver: after 3 rounds of overlapping chaotic kills + a live config upgrade all completed and the cluster reconverged 3-of-3, `force_elect_node` killed the spoiler (ctrl-3) and tried to submit a job batch on the surviving {ctrl-2 primary, ctrl-1 standby} pair \u2014 5 consecutive attempts all got 0/3 acked (\"waiting for write-quorum\"), and the round hard-failed: `[xce-test-ha] FAIL: force-elect ctrl-1: submit on {ctrl-2,ctrl-1} failed`. The Req 6.4 workerlist/admin-status assertion itself was never reached.",
|
|
"file": "src/controller/ha.c (ha_dispatch_repl_action_for_standby, ha_consume_append_entries, ha_evaluate_repl_action \u2014 HA_REPL_STREAM_WAL decision/dispatch loop); src/controller/config_repl.c (ha_stream_wal_to_standby catch-up streamer)",
|
|
"root_cause": "NOT data loss, NOT bug-1472 (worker/host admin-status replication is unaffected \u2014 unrelated subsystem, and its own checks passed). This is a standby catch-up LIVENESS stall: ctrl-1 (which had itself served as primary in term=2 before being killed in round 1 of the chaotic sequence, then restarted) got permanently stuck at applied_lsn=12 and never advanced again for the rest of the run. ctrl-1's own log (`ha_consume_append_entries`) shows a revealing pattern: a zero-entry PROBE AppendEntries at prevIdx=12,n=0 correctly succeeds with match=12 (confirming index 12 IS ctrl-1's true, correct log tip), but the very next entry-carrying AppendEntries from the SAME dispatch cycle uses prevIdx=13 (not 12) for n=1, which ctrl-1 correctly rejects with event=ae_reject_logmismatch (success=0 match=0) since it has no entry at index 13 yet to check a predecessor against. This 1-off prevIdx computation (using prevIdx=standby_applied_lsn+1 instead of prevIdx=standby_applied_lsn for the FIRST entry of a catch-up batch) means every retry of the SAME heartbeat-driven HA_REPL_STREAM_WAL decision (ha_evaluate_repl_action: standby_lsn(12) < committed_lsn(31) -> stream) recomputes and resends the IDENTICAL doomed range, forever, with zero backtrack/self-correction -- confirmed via ctrl-2's log: 'HA repl: standby[0] lsn=12 < committed_lsn=31 -> stream WAL batches' repeats verbatim every ~3s from 04:31:26 through 04:32:26 (60+ seconds, 20+ identical retries, zero progress) after ctrl-2 had already logged 'repl_broadcast: standby localhost:9991 evicted (pending_ack_count=17 > 16) -- triggering catch-up reconnect' and 'HA quorum lost: connected=0 required=1'. Once the soak's own force_elect_node killed the OTHER standby (ctrl-3) as its spoiler maneuver, ctrl-1 became the sole remaining standby, and its permanent inability to catch up meant the primary could never regain 2-of-3 write quorum again -- every subsequent job submission timed out (`commit: async continuation deadline expired`, `jobsubmit_commit_continuation: lsn=N commit failed/timed out (rc=-110)`), exactly matching the soak's observed '0/3 acked; waiting for write-quorum' x5 before hard-failing. Superficially similar symptom signature to already-FIXED bug-1028 (same 'ha_dispatch_repl_action_for_standby: standby[0] lsn=X < committed_lsn=Y -> stream WAL batches' log line looping indefinitely post-failover) but a DIFFERENT specific AE-reject reason -- bug-1028 was a logOk TERM-mapping mismatch (raw hdr.term vs persist_entry_term legacy mapping), fixed 2026-06-23; this is `ae_reject_logmismatch`, which reads like a prevLogIndex/off-by-one issue in how the catch-up streamer picks the FIRST entry's predecessor index, not a term problem -- so this is either a narrower unfixed variant of the same family, or a new regression in a related code path. NOT root-caused down to the exact defective line (this investigation was a live-soak VERIFICATION run for a DIFFERENT bug, not a fix task) -- flagging for whoever picks this up next to read ha_dispatch_repl_action_for_standby/ha_stream_wal_to_standby's prevIdx computation directly and compare against ctrl-1's actual persisted log at lsn=12/13 (waldump). Also notable: this specific soak step (force_elect_node's spoiler-kill-then-submit maneuver, previously only exercised by --sequential mode's post-loop 'leadership coverage' step against an otherwise-calm, fully-settled cluster) had never previously been run immediately after --config-upgrade's THREE rounds of aggressive overlapping chaotic kills plus a live config upgrade -- this specific combination/history may be what's needed to reproduce the stall, rather than it being config-upgrade-specific.",
|
|
"fix": "FIXED (2026-07-27/28, via a regression test + real-instrumentation debugging session that continued this entry's original live-soak finding). Landed as THREE coordinated changes, all required together -- the first two alone left the new regression test (test_bug1475_catchup_survives_midstream_checkpoint, test_config_repl.c) RED with applied_lsn stuck at 0 for the whole run:\n\n1. SEND side (config_repl.c, ha_stream_wal_to_standby): when scanning the WAL for entries to stream, a WAL_CHECKPOINT entry is still never built/sent as its own catchup entry, but the prev_log_index/prev_log_term tracker now advances across it like every other scanned entry, instead of freezing one entry behind. A standby that independently applied the same committed WAL_CONFIG_MARKER writes its OWN local checkpoint at the identical LSN (deterministic per-member trigger), so the checkpoint's LSN is a real, held position on both sides, not a gap to skip past chaining-wise.\n\n2. RECEIVE side (ha.c, ha_apply_term_entry_via_library): a JIT resync reads persist_durable_floor(p) and monotonically raises ha->raft.log_len to match before consuming each AppendEntries -- mirroring ha_sync_raft_log_from_recovery's boot-time computation, but applied live on the AE-receive path. This corrects for persist_write_checkpoint_marker (bug-1466, still not fixed at ITS root) advancing persist_t's current_lsn without going through raft_log_append, which otherwise leaves ha->raft.log_len stale and fails logOk's prev_log_index<=log_len bound forever.\n\n3. TERM-INDEX side (persist.c, record_entry_term/entry_term_locked) -- a THIRD, previously-undiscovered gap, found only via live fprintf instrumentation of the new regression test after fixes 1-2 above still left it RED. Fixes 1-2 both depend on persist_entry_term(checkpoint_lsn) reading back 'absent' (0) FOREVER on every member (the explicit, twice-documented design intent in both fixes' own comments and in persist_write_checkpoint_marker's comment). That invariant was actually FALSE: record_entry_term's geometric-growth realloc zero-filled any never-explicitly-recorded gap slot (like a checkpoint's own LSN, which is deliberately never passed to record_entry_term), and entry_term_locked's `lsn <= term_index_count` presence check then read that zero-fill back as WAL_LEGACY_TERM (1), not absent (0), the INSTANT any LATER lsn was recorded and grew term_index_count past the gap -- which happens immediately on a live leader (it appends real entries right after the checkpoint) but not yet on a receiver that has not itself appended past its own checkpoint. So the checkpoint LSN's 'term' was TIME-DEPENDENT: the sender (which streams AFTER its own later entries exist) computed prev_log_term=1 for the entry right after the checkpoint, while the receiver's honest, not-yet-grown term index still (correctly, per design) read 0 for the same LSN -- logOk's equality check spuriously mismatched (0 != 1) and rejected forever, exactly reproducing this entry's original ae_reject_logmismatch signature. Confirmed with real fprintf instrumentation at the streamer, the JIT resync, and raft.c's logOk check (added and removed during this investigation, not left in the tree): prev_log_term flipped from 0 to 1 in the SAME test run, immediately after the leader appended its 2nd post-checkpoint entry. Fixed with a TERM_INDEX_UNSET sentinel (UINT64_MAX) that record_entry_term's growth path now fills gap slots with (instead of 0), and entry_term_locked treats as absent -- so a never-explicitly-written slot reads absent PERMANENTLY, independent of later array growth. Confined to persist.c's two functions plus the term_index doc comment in persist.h; no other call site reads p->term_index[] directly.\n\nAlso completed as part of this fix: (a) audited whether WAL entry types OTHER than WAL_CHECKPOINT bypass record_entry_term the same way -- confirmed NO: WAL_CHECKPOINT (value 100) is the numeric max of wal_entry_type, persist_wal_async and persist_wal_write_replicated both explicitly reject type==WAL_CHECKPOINT up front (it cannot reach record_entry_term via either live path), and replay_wal's `hdr.type < WAL_CHECKPOINT` recording guard already covers every other currently-defined type (WAL_JOB_UPDATE=7, WAL_QUEUE_CTRL=20, WAL_WORKER_CTRL=30, WAL_NOOP=40, WAL_CONFIG_MARKER=50); (b) confirmed no interaction with the RequestVote/PreVote freshness gates (raft.c raft_log_ok, shared by raft_on_vote_request/raft_on_pre_vote_request): that gate also reads on_get_entry_term(s->log_len), which can legitimately land on a checkpoint LSN after the JIT resync in fix 2 -- the TERM_INDEX_UNSET fix makes that read deterministic (always absent) instead of time-dependent, which is a consistency IMPROVEMENT for vote freshness too, not a behavior change in the unsafe direction; full test_ha_prevote.c/test_ha_failover_prevote.c suites pass unchanged. Full regression suite: 1034 Tests, 0 Failures (was 1033/1034 with the new test failing before this fix). Files changed: src/controller/config_repl.c (REAL logic change, landed earlier in this same bug-1475 investigation: ha_stream_wal_to_standby's WAL_CHECKPOINT branch now falls through to the unconditional prev-tracker advance via `hdr.lsn > standby_lsn && hdr.type != WAL_CHECKPOINT`, instead of a hard `continue` that froze the tracker one entry behind -- plus cross-reference comments added in this later session); src/controller/ha.c (REAL logic change, also landed earlier in this investigation: a ~30-line JIT resync block added to the top of ha_apply_term_entry_via_library that raises ha->raft.log_len from persist_durable_floor(p) before consuming each AppendEntries -- plus cross-reference comments added in this later session); src/controller/persist.c (the TERM_INDEX_UNSET sentinel fix + doc comments, the new logic landed in THIS session); src/controller/testsuite/test_config_repl.c (test_bug1475_catchup_survives_midstream_checkpoint + updated doc comments describing all three fix parts). Correction (coordinator review 2026-07-27/28, Finding 1): an earlier version of this fix summary mischaracterized config_repl.c's and ha.c's changes as 'comment-only, no logic change' -- both carry genuine logic changes; they were simply written in an earlier part of this same bug-1475 investigation than the TERM_INDEX_UNSET sentinel (session 3 of the fix), not left unmodified by it.\n\nFinding 2 (coordinator review, 2026-07-27/28, CONFIRMED REAL and FIXED): after the TERM_INDEX_UNSET fix, the reviewer traced a plausible NEW instance of the identical permanent-wedge bug class, reachable via the SNAPSHOT-INSTALL catch-up path (HA_REPL_SEND_SNAPSHOT, dispatched whenever a standby has fallen too far behind for incremental WAL streaming -- a live, common path) instead of WAL-streaming catch-up. ha_snapshot_do_send (ha.c) computes checkpoint_term = persist_entry_term(leader, c->persist.checkpoint_lsn) and ships it on the wire; the receiver's ha_handle_snapshot_chunk calls persist_reconcile_checkpoint_term(p, checkpoint_lsn, checkpoint_term), which called record_entry_term(p, checkpoint_lsn, checkpoint_term) directly -- an EXPLICIT write, not a growth-fill, so it never got the TERM_INDEX_UNSET sentinel even when checkpoint_term==0. entry_term_locked's pre-existing legacy-0 rule then read that raw 0 back as WAL_LEGACY_TERM(1), forever -- permanently diverging from the leader's own permanently-absent(0) value for the SAME lsn whenever c->persist.checkpoint_lsn (== last_applied_lsn at general persist_checkpoint() time, NOT the WAL_CHECKPOINT entry's own physical lsn) happens to coincide with a checkpoint's own un-recorded lsn -- a real, reachable quiescent-state timing (the apply pump has walked, one lsn at a time including a no-op pass over checkpoint slots, all the way to exactly the checkpoint's own position before the next persist_checkpoint()+snapshot-send cycle runs, e.g. right after a config upgrade with no immediate follow-up activity) -- not the common case, but real and worth closing. Proven with a dedicated regression test (test_bug1475_finding2_snapshot_install_checkpoint_term_absent, test_config_repl.c) that drives the REAL ha_send_snapshot_to_standby -> ha_handle_snapshot_chunk -> persist_reconcile_checkpoint_term path (via the xce_snapshot_chunk_hook test seam) with a leader whose checkpoint_lsn is deliberately seeded (via last_applied_lsn) to coincide with its checkpoint's own physical lsn -- confirmed RED by temporarily reverting only persist_reconcile_checkpoint_term's fix (receiver read back term=1, not the expected absent=0) and GREEN after restoring it. Fixed with the SAME TERM_INDEX_UNSET sentinel: persist_reconcile_checkpoint_term now substitutes TERM_INDEX_UNSET for a wire checkpoint_term of exactly 0 before calling record_entry_term, instead of recording the raw 0 -- a wire value of 0 is unambiguous today (ha_snapshot_do_send is the ONLY sender and always computes it via persist_entry_term, whose public contract already returns a DIFFERENT value, WAL_LEGACY_TERM, for a present-but-legacy-0 entry -- so a public 0 can only mean genuinely, permanently absent). A genuinely non-zero checkpoint_term (any real historical term) is still recorded verbatim and still correctly overwrites a stale local term at that LSN, unchanged -- the pre-existing STALE-TERM reconcile test (test_ha_core_safety.c's test_3_1_snapshot_install_does_not_reconcile_boundary_term, CHECKPOINT_TERM=7, a synthetic non-zero value) is unaffected and still passes. Also fixed the stale 'zeroed-on-grow' comment at persist.c's truncate_term_index_locked (grown slots are TERM_INDEX_UNSET-filled since the original TERM_INDEX_UNSET fix, not zero-filled -- comment had not been updated). Re-verified RequestVote/PreVote freshness non-interference for this second fix too: persist_reconcile_checkpoint_term's caller (ha_handle_snapshot_chunk) never touches ha->raft.log_len or any vote-path state; the fix only changes what value entry_term_locked returns for a checkpoint-boundary LSN after a snapshot install (now consistently absent instead of inconsistently WAL_LEGACY_TERM), which is the SAME direction of improvement (deterministic absence vs time/path-dependent) the original TERM_INDEX_UNSET fix already established as safe for the freshness gate. Full suite: 1035 Tests, 0 Failures (was 1034 before this new test).",
|
|
"tags": [
|
|
"ha.c",
|
|
"config_repl.c",
|
|
"ha_dispatch_repl_action_for_standby",
|
|
"ha_stream_wal_to_standby",
|
|
"ha_consume_append_entries",
|
|
"ae_reject_logmismatch",
|
|
"catch-up-stall",
|
|
"write-quorum-loss",
|
|
"standby-liveness",
|
|
"config-upgrade-snapshot-task-8.6",
|
|
"force_elect_node",
|
|
"not-bug-1472",
|
|
"bug-1472-fix-verified-good",
|
|
"same-family-as-bug-1028",
|
|
"needs-owner",
|
|
"root-caused-partially",
|
|
"not-fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1472",
|
|
"bug-1028"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-28T03:15:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1476",
|
|
"timestamp": "2026-07-26T04:44:00Z",
|
|
"error_message": "Live config-upgrade-snapshot task 8.9 re-verification soak (run-ha-soak.sh --config-upgrade-wal-trim, run to confirm bug-1474's repl.c fix), deploy /home/claude/tmp/xce-ha-waltrim3: ctrl-3 ABORTed via AddressSanitizer heap-use-after-free during the round's live config-upgrade submission, well before TARGET(ctrl-1) was ever restarted. The round's own bug-1474 WAL-trim assertions (floor segment preserved, below-floor segments trimmed, active segment present) all PASSED cleanly before this crash was noticed -- ctrl-3's death was only discovered because it, combined with a second unrelated issue (bug-1475), prevented the round's final '3-of-3 reconvergence' assertion from ever succeeding.",
|
|
"file": "src/controller/config_repl.c (load_primary_config ~line 656-666 free_ClusterConfig/free(myconf->cluster_config) call site; config_activate_committed ~line 360; handle_repl_config_push ~line 1280); lib/controller.capnp.c (decode_ClusterConfig_ptr ~line 17074 calloc site, decode_Resource_list ~line 4057 crash site)",
|
|
"root_cause": "AddressSanitizer heap-use-after-free, WRITE of size 8, in decode_Resource_list (lib/controller.capnp.c:4057), thread T5. Full ASAN trace (ctrl-3.stderr):\nWRITE by T5: decode_Resource_list <- decode_ClusterConfig <- decode_ClusterConfig_ptr <- load_cluster_config_from_file (config_repl.c:606) <- load_primary_config (config_repl.c:664) <- config_activate_committed (config_repl.c:360) <- handle_repl_config_push (config_repl.c:1280) <- myreq_handler (cluster.c:654) <- vtask_entry (cluster.c:786)\nFREED by T6: load_primary_config (config_repl.c:659, the 'free any prior decoded config before overwriting the pointer' step: free_ClusterConfig(myconf->cluster_config); free(myconf->cluster_config)) <- config_activate_committed (config_repl.c:360) <- handle_repl_config_push (config_repl.c:1280) <- myreq_handler <- vtask_entry\nALLOCATED by T5: calloc in decode_ClusterConfig_ptr (lib/controller.capnp.c:17074) <- load_cluster_config_from_file (config_repl.c:606) <- load_primary_config (config_repl.c:664) <- config_activate_committed <- handle_repl_config_push\nThis is a genuine, unguarded data race: load_primary_config's sequence is (a) if myconf->cluster_config is non-NULL, free it and NULL the pointer, then (b) decode a fresh ClusterConfig into myconf->cluster_config via load_cluster_config_from_file/decode_ClusterConfig_ptr. decode_ClusterConfig_ptr appears to publish the new struct pointer into *config (i.e. myconf->cluster_config) before it has finished populating nested fields (e.g. the Resource_list), since T5 is later observed still writing into the struct via decode_Resource_list AFTER T6 already saw a non-NULL myconf->cluster_config, freed it (T6's own step (a)), and proceeded to decode its own replacement. No mutex protects myconf->cluster_config across this read-free-decode sequence, so two overlapping invocations of handle_repl_config_push -> config_activate_committed -> load_primary_config for the same node race on the shared myconf->cluster_config pointer. This matches the class of concern already flagged (but not as a crash) in bug-976/bug-981 (handle_repl_config_push / config_activate_committed activation-ordering races) -- this is a NEW, more severe manifestation: an actual heap-corruption crash, not just an ordering/verification gap. Plausible trigger in this specific soak: heavy duplicate/late-joiner reconnect churn was independently observed on ctrl-2 (the primary) around the same window (bug-1474's WARN 'reusing guard-holding slot' fired twice, confirming the still-open, out-of-scope ha.c heartbeat-reconnect-sweep defect -- bug-1474's un-addressed 'fix angle (a)' -- was actively spawning duplicate/late-joiner standby connections during this round). If the primary sent the same config-push payload to ctrl-3 twice (once per duplicate connection), ctrl-3 could dispatch two concurrent handle_repl_config_push invocations on separate VTASK_LIVE_BLOCK workers, which is consistent with the observed T5/T6 race. This causal link (duplicate-connection churn -> duplicate config-push delivery -> concurrent load_primary_config race) is a plausible hypothesis from timeline correlation, not confirmed by direct evidence of two inbound config-push messages -- flagged as a hypothesis for whoever investigates, not a proven mechanism.",
|
|
"fix": "FIXED (2026-07-28). Two-part fix in load_primary_config() (config_repl.c), independently reviewed and verified via a real pthread-based deterministic race test: (1) added myconf_t.lock (mylock_t, mirrors replicator_t.lock's idiom in repl.c) serializing the entire free-decode-publish sequence against any concurrent load_primary_config() call for the same myconf_t -- initialized in main.c before first use, finalized in myconf_fini(), and in the t43_attach_myconf/t43_free_myconf test fixture. (2) load_cluster_config_from_file() now decodes into a LOCAL temporary (cluster_config_t *tmp), never directly into the shared myconf->cluster_config field -- decode_ClusterConfig_ptr (lib/controller.capnp.c) calloc's and publishes its pointer via the out-parameter BEFORE decode_ClusterConfig populates nested fields (e.g. resources), so decoding into a local closes the early-publish exposure at its source; myconf->cluster_config is only swapped in after the new config is fully decoded and validated, still under myconf->lock. Part (2) is independently necessary because several other readers (cluster.c, queue.c, sched.c, worker.c, apiserver.c, ctrlstatus.c, reply.c) read c->myconf->cluster_config without ever taking myconf->lock, so the field itself must never be observably half-decoded. New regression test test_bug1476_concurrent_load_primary_config_no_uaf_or_double_free (test_config_repl.c) drives two REAL concurrent pthreads through load_primary_config() for the same myconf_t via a deterministic test-only hook (load_primary_config_race_hook, XCE_TESTING-only, NULL/no-op in production) that parks the first thread exactly at the retire-old-config step the live crash raced -- pre-fix this reliably reproduces a genuine ASan-catchable double-free from the same missing-lock root cause; post-fix myconf->lock keeps the second thread blocked for the entire duration, verified both by a captured never-raced-through flag and by the final published config being fully valid, never torn. Full suite: 1035 -> 1036 tests, 0 failures.\n\n[UPDATE 2026-07-28, kiro-impl config-upgrade-snapshot resume] Prior fix landed with a comment block (config_repl.c:639-646) admitting it had been reverted to a RED-phase reproduction (no lock, decode-directly-into-shared-field) for test-construction purposes and NEVER restored to GREEN \u2014 the mylock_init/fini wiring (myconf.h, main.c, myconf.c) landed, but load_primary_config() itself still ran fully unguarded. Full suite run confirmed: test_bug1476_concurrent_load_primary_config_no_uaf_or_double_free FAILED (\"thread B... Expected 0 Was 1\"), i.e. B raced through while A was parked -- the lock was never acquired. Fixed for real: mylock_lock(&myconf->lock) now wraps the ENTIRE load_primary_config() body (acquired first, released at every return including success), and Cap-n-Proto decode now targets a local cluster_config_t *new_config first -- myconf->cluster_config is only freed+swapped after new_config is fully decoded and validated (reserved-name check, generation default), never decoded directly into the shared field. Verified 4/4 clean full-suite runs (1036 Tests 0 Failures 0 Ignored, ASAN_OPTIONS=detect_leaks=0) after the fix, including the specific race test. Committed as part of config-upgrade-snapshot task 8.6/8.9 unblock resume.",
|
|
"tags": [
|
|
"config_repl.c",
|
|
"load_primary_config",
|
|
"config_activate_committed",
|
|
"handle_repl_config_push",
|
|
"heap-use-after-free",
|
|
"decode_Resource_list",
|
|
"controller.capnp.c",
|
|
"concurrency-race",
|
|
"config-upgrade-snapshot",
|
|
"task-8.9",
|
|
"live-soak-finding",
|
|
"bug-1474-verification-run",
|
|
"new-crash",
|
|
"needs-owner",
|
|
"possibly-related-to-bug-1474-fix-angle-a-duplicate-reconnects",
|
|
"fixed",
|
|
"mylock"
|
|
],
|
|
"related_bugs": [
|
|
"bug-976",
|
|
"bug-981",
|
|
"bug-1474",
|
|
"bug-1475"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-07-28T08:06:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1477",
|
|
"timestamp": "2026-07-28T08:25:00Z",
|
|
"error_message": "Live config-upgrade-snapshot task 8.6 soak (run-ha-soak.sh --config-upgrade ~/tmp/xce-ha-configupgrade), run on top of bug-1475's already-fixed and already-built-in commit ce8df990 (confirmed via binary mtime 08:16:27 postdating ce8df990 04:48:53Z and b08e392e 08:13:54Z, plus `strings` matching TERM_INDEX_UNSET/persist_durable_floor), FAILED: \"ctrl-3 has no on-disk checkpoint after the upgrade\". ctrl-1/ctrl-2 both have data/snap/snap-000000000000000b.capnp (51161 bytes, LSN 11 hex = the WAL_CONFIG_MARKER's own lsn); ctrl-3's data/snap/ is completely empty. ctrl-3's log shows a PERMANENT loop (repeats every ~3s/heartbeat for the entire ~3-minute run, never progressing): a bare heartbeat probe at prevIdx=11 succeeds (ae_already_have, match=11), but every walCatchupEntry at prevIdx=12/13/14 is rejected forever with ae_reject_logmismatch. Unlike bug-1475's own signature, this is NOT a transient race that self-heals once durable_lsn catches up -- it never recovers for the rest of the run.",
|
|
"file": "src/controller/myapp.c (~line 388-425, the \"leader already known -- skip own election\" fast path and its single guarded cluster_init_phase2 retry, bug-849 lineage); src/controller/ha.c (raft_cb_become_follower ~line 2000-2012, raft_cb_become_leader ~line 1772-1783, ha_elect_evaluate_and_signal ~line 5609-5629/5699-5710 -- all three unconditionally set ha->phase2_done=1 after calling cluster_init_phase2(c) without checking its return value); src/controller/cluster.c (cluster_init_phase2 ~line 1342-1598, the sole call site of commit_engine_init/persist_recover/ha_sync_raft_log_from_recovery); src/controller/persist.c (~line 796-799, on_durable_advance documented as registered ONLY by commit_engine_init)",
|
|
"root_cause": "ROOT-CAUSED with byte/log-precise evidence, NOT config-upgrade-snapshot's own defect. ctrl-3 (my_priority=2, the highest-priority-number/most-deferred candidate in the 3-node cluster, per myapp_run's startup-stagger nanosleep) never ran its own raft candidacy for the ENTIRE test: zero occurrences of raft_cb_become_follower/raft_cb_become_leader/\"-> CTRL_STANDBY\" anywhere in ctrl-3.log. Instead, by the time its stagger delay elapsed, ctrl-1 (priority 0) had already voted/established itself, so myapp_run's own \"leader already known\" check (myapp.c ~343-390: voted_for_name set, or raft.term>0, or primary_ctrl_fd>=0) was true, and ctrl-3 took the `goto skip_election` fast path, entirely bypassing ha_start_election_async and therefore every raft-library election callback for the rest of its process lifetime (it only ever GRANTS votes to others afterward -- confirmed via repeated vote_granted/pre_vote_granted RAFT[p2] events with no corresponding become_follower/become_leader). The skip_election fast path (myapp.c ~415-425, bug-849, commit 20e59d0b, 2026-06-21 -- three-plus weeks before config-upgrade-snapshot's first commit 9e68335a) makes exactly ONE, correctly-guarded attempt at cluster_init_phase2(&c) (checks prc, only sets c.ha.phase2_done=1 on success) -- and at 08:18:26,930, that ONE attempt fired before c->myconf->cluster_config was populated (ctrl-3 had no local config file and had not yet received/activated a push), so cluster_init_phase2 returned -EINVAL immediately (cluster.c:1349-1358, before doing ANY of its real work) and the WARN 'cluster_init_phase2 on standby rejoin failed (rc=-22) -- WAL not recovered; falling back to election-path recovery' fired. phase2_done correctly stayed 0 -- but there is NO OTHER retry mechanism anywhere in the codebase for a node that (a) took the skip_election fast path and (b) never subsequently runs its own contested election: the only other three call sites that could retry (raft_cb_become_follower ha.c:2000-2012, raft_cb_become_leader ha.c:1772-1783, ha_elect_evaluate_and_signal's CTRL_PRIMARY/CTRL_STANDBY branches ha.c:5609-5629/5699-5710) never fire for ctrl-3 because it never engages the raft callback machinery at all. (Separately confirmed those three call sites ALSO unconditionally set ha->phase2_done=1 after calling cluster_init_phase2(c) with NO check of its return value -- unlike myapp.c's own careful guard -- a second, adjacent defect of the same class that did not trigger THIS failure only because ctrl-3 never reached them, but would identically strand any node whose FIRST raft-driven role transition happens to race ahead of config load.) Consequence, confirmed via grep: ctrl-3.log has ZERO occurrences of \"commit engine wired\", \"persist_recover\", \"xce_config_init\", or \"create_lost_and_found\" for the entire run (vs. multiple occurrences on ctrl-1/ctrl-2, once per boot/restart/re-election) -- cluster_init_phase2 (and therefore commit_engine_init, cluster.c:1484-1496) NEVER completed on ctrl-3. persist.c:796-799 documents on_durable_advance (the sole wake hook driving persist_apply_pump_run) as registered ONLY inside commit_engine_init -- so without it, persist_apply_pump_run/apply_committed_entry NEVER runs on ctrl-3, for ANY committed LSN, for the whole process lifetime. This means persist_checkpoint_marker_triggered (config-upgrade-snapshot task 5's own WAL_CONFIG_MARKER-triggered checkpoint, apply_committed_entry's WAL_CONFIG_MARKER case) never fires on ctrl-3 -- explaining precisely why its data/snap/ is empty while ctrl-1/ctrl-2 (whose commit engines DID wire) both hold the identical snap-000000000000000b.capnp. ctrl-3's config nonetheless activates cosmetically at 08:18:48,572 via a SEPARATE, independent code path (handle_repl_config_push -> load_primary_config -> config_activate_committed, an RPC push handler that does not touch the commit engine or apply pump at all) -- masking the underlying defect and making the soak's materialized-state/checkpoint assertions the first thing ever to surface it. bug-1475's three-part fix (config_repl.c's tracker-advance-across-WAL_CHECKPOINT, ha.c's JIT persist_durable_floor resync of ha->raft.log_len, persist.c's TERM_INDEX_UNSET sentinel) is necessary and correctly targets its own class of bug (a receiving standby's log_len bookkeeping merely LAGGING behind a checkpoint it DID independently write) but structurally cannot cover this failure: bug-1475's own fix explicitly documents and depends on the invariant 'a standby that independently applied the SAME committed WAL_CONFIG_MARKER writes its OWN local checkpoint at the identical LSN (deterministic per-member trigger)' -- ctrl-3 violates that precondition outright (it never writes the checkpoint AT ALL, not merely late), so the primary's catch-up stream's prev_log_index=12 (the checkpoint's own lsn, per bug-1475's now-correct sender tracking) checks against an entry ctrl-3 genuinely, permanently does not have. ae_reject_logmismatch is therefore a CORRECT rejection of ctrl-3's true log state, not a stale/racy one -- and since a WAL_CHECKPOINT entry is local-only/non-replicated BY DESIGN (persist_write_checkpoint_marker's own doc comment; persist_wal_write_replicated/persist_wal_async both explicitly reject type==WAL_CHECKPOINT), ctrl-3 can NEVER receive lsn=12 over the wire, and can never independently write it either (cluster_init_phase2/commit_engine_init never retries) -- a genuinely permanent, not merely time-bounded, wedge, exactly matching the soak's observed behavior (unlike bug-1475's transient race, this repeated with zero progress for the entire ~3-minute run). git blame confirms both implicated pre-existing defects (myapp.c's skip_election fast path, commit 20e59d0b bug-849 2026-06-21; ha.c's raft-callback phase2_done latch structure, commit 8f0d2d55 task 6.2 raft-library) predate config-upgrade-snapshot's first commit (9e68335a) by roughly a month -- this is a pre-existing HA bootstrap/election gap, NOT something config-upgrade-snapshot's task 5 introduced. Task 5 merely exposed it by creating a new cross-member structural dependency (every member independently checkpointing at a synchronized marker-boundary LSN) that a node whose commit engine/apply pump never wired silently violates. Before config-upgrade-snapshot, the same underlying gap would have left such a node's materialized state (jobmgr/qmgr/workermgr) permanently stale/un-applied with a much less visible failure signature (no crash, no wedge -- just silently wrong query results if that node were ever promoted), plausibly unnoticed by prior soaks that do not assert per-member materialized-state identity.",
|
|
"fix": "FIXED (2026-07-28). Root cause: myapp_run's skip_election passive path, and 3 raft-callback call sites (raft_cb_become_leader, raft_cb_become_follower, ha_elect_evaluate_and_signal x2), all latched ha->phase2_done=1 UNCONDITIONALLY right after calling cluster_init_phase2 (or its ha_phase2_hook test seam), discarding its return value entirely -- so a single failed attempt (e.g. racing config availability, cluster_init_phase2 returning -EINVAL because cluster_config wasn't loaded yet) permanently stranded the member: commit_engine_init never ran, so apply_committed_entry never applied ANY committed WAL entry for the rest of that process's life, and -- for a node on the passive skip_election path specifically -- NOTHING else would ever retry it (the other 3 call sites only fire via this node's own raft-library state transitions, which never happen for a passive standby whose primary keeps heartbeating normally).\n\nFix: extracted a shared, idempotent retry mechanism -- ha_phase2_retry_fn (the blocking retry itself, capturing cluster_init_phase2/ha_phase2_hook's real return value, latching phase2_done ONLY on rc==0) plus ha_schedule_phase2_retry (a delaymgr-scheduled, SELF-RESCHEDULING trigger at heartbeat_interval_ms cadence -- unlike upgrade_materialization_retry/config_activate_retry, which are re-triggered externally by recurring commit-advance events, nothing recurring would otherwise ever re-trigger this for a passive skip_election node, so this one self-arms). Wired into all 5 call sites: myapp.c's skip_election block now schedules a retry instead of just WARNing on failure; raft_cb_become_follower and ha_elect_evaluate_and_signal's STANDBY branch likewise (safe to stay passive while retrying); raft_cb_become_leader and ha_elect_evaluate_and_signal's PRIMARY branch additionally REFUSE promotion on failure in raft_cb_become_leader specifically (mirroring the sibling upgrade_materialization_fenced refusal in the same function -- a promoted primary with an unwired commit engine would be far worse than a delayed promotion); the legacy ha_elect_evaluate_and_signal PRIMARY branch does NOT refuse (its ctx->done semaphore is already posted to the caller before this point in that function, so refusing would leave an inconsistent signal -- it proceeds to CTRL_PRIMARY and lets the self-rescheduling retry wire the commit engine shortly after instead).\n\nTDD: 4 new tests in test_config_repl.c (test_ha_phase2_retry_fn_noop_when_already_done, test_ha_phase2_retry_fn_does_not_latch_on_failure_and_succeeds_on_retry -- the core regression, RED confirmed by temporarily reverting the rc-gating back to an unconditional latch and observing the exact predicted failure -- test_schedule_phase2_retry_noop_when_already_done, test_schedule_phase2_retry_noop_when_delaymgr_not_running). GREEN: full controller_unit_test suite = 1044 tests, 0 failures, clean across multiple runs (including the RED/GREEN round-trip).\n\nLive-verified: re-ran run-ha-soak.sh --config-upgrade (the exact scenario that originally found this bug) -- ctrl-2's log shows the retry mechanism firing for real (4 failed cluster_init_phase2 attempts at ~3s intervals, rc=-22, then success: \"commit engine now wired (bug-1477)\"), and the soak's own checkpoint-identity, config-identity, and host-admin-status-survival assertions (the exact things bug-1477 blocked) all PASS. The soak run subsequently hit a DIFFERENT, seemingly unrelated failure later in its own force-elect-rotation step (repeated commit timeouts, rc=-110, on ctrl-1-as-primary) -- flagged separately, NOT part of this fix's scope; this soak scenario has never previously reached that step (earlier runs always failed earlier, at bug-1471/1472's checkpoint divergence or this bug's own catch-up wedge), so it may be a pre-existing, newly-exposed issue rather than a regression from this fix -- needs its own dedicated investigation.",
|
|
"tags": [
|
|
"apply_pump_never_wired",
|
|
"not-bug-1475",
|
|
"commit_engine_init",
|
|
"cluster.c",
|
|
"config-upgrade-snapshot-task-8.6",
|
|
"not-fixed",
|
|
"marker-triggered-checkpoint",
|
|
"out-of-scope-upstream",
|
|
"skip_election",
|
|
"retry-mechanism",
|
|
"phase2_done",
|
|
"ae_reject_logmismatch",
|
|
"bug-849-lineage",
|
|
"permanent-catchup-wedge",
|
|
"fixed",
|
|
"myapp.c",
|
|
"bug-1475-fix-verified-good",
|
|
"ha.c",
|
|
"needs-owner",
|
|
"cluster_init_phase2"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1475",
|
|
"bug-1466",
|
|
"bug-849"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-07-28T13:25:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1478",
|
|
"timestamp": "2026-07-28T09:00:00Z",
|
|
"error_message": "config-upgrade-snapshot task 8.9 live soak (run-ha-soak.sh --config-upgrade-wal-trim ~/tmp/xce-ha-waltrim): bug-1474's floor-preservation fix confirmed working (floor segment seg-5 correctly preserved, all below-floor segments correctly trimmed) but the round still FAILED: \"cluster did not reconverge to 3-of-3 after restarting ctrl-1 -- the preserved floor segment did not actually suffice for real incremental catch-up\". ctrl-1 (TARGET, killed+restarted 3x) settles into a PERMANENT, zero-progress loop: its own raft AppendEntries exchanges cleanly reach match=22 with zero ae_reject events (heartbeat probe at prevIdx=22,n=0 -> success=1 match=22, repeating every ~3s forever), while ctrl-2 (primary) simultaneously and forever logs 'HA repl: standby[0] lsn=21 < committed_lsn=22 -> stream WAL batches' / 'ha_stream_wal_to_standby: streamed WAL [21+1..22] to standby' every heartbeat cycle with zero effect -- an off-by-one disagreement (21 vs 22) between the two sides that never reconciles.",
|
|
"file": "src/controller/ha.c (repl_ack_decode_and_dispatch's heartbeat/stateReport reply branch, ~6379-6388 pre-fix -- the `target_lsn = max(committed_lsn, last_written)` computation feeding ha_dispatch_repl_action_for_standby)",
|
|
"root_cause": "ROOT-CAUSED with byte/log-precise evidence; NOT a recurrence of bug-1474 (independently re-confirmed working in this same run -- floor preservation and below-floor trim both correct), bug-1475 (independently re-confirmed working -- ctrl-1's own raft log_len/term-index bookkeeping across the checkpoint boundary is clean, zero ae_reject_logmismatch anywhere in its log, unlike bug-1475's own signature), or bug-1477 (ctrl-1 clearly DID wire its commit engine every boot -- multiple 'commit engine wired'/persist_recover lines confirmed, unlike bug-1477's ctrl-3 which never ran its own election at all). This is a THIRD, previously-undiscovered gap in the same 'WAL_CHECKPOINT breaks LSN co-tracking invariants' family already flagged (not fixed at its root) as bug-1466.\n\nGround truth via `xce_test waldump` on the preserved deploy dir (~/tmp/xce-ha-waltrim): ctrl-2's WAL shows lsn=21 as the WAL_CONFIG_MARKER (type UNKNOWN/40 bytes, matching ctrl-2's own log 'Config change committed (marker_lsn=21)') and lsn=22 as a WAL_CHECKPOINT (0-byte payload) -- confirming persist_write_checkpoint_marker (persist.c:1747, `hdr.lsn = p->current_lsn++`) fired immediately after the marker committed and consumed the very next LSN slot, exactly as apply_committed_entry's WAL_CONFIG_MARKER case (persist_checkpoint_marker_triggered) is designed to do (config-upgrade-snapshot task 5). Critically, ctrl-2's OWN commit_advance_locked (commit.c, the SOLE authoritative committed_lsn writer) never logs an advance past 21 anywhere in the run ('commit: committed_lsn 20 -> 21' is the LAST such line) -- the real, majority-gated persist.committed_lsn correctly and permanently stays at 21, since no standby can ever legitimately ack a local-only, non-replicated checkpoint entry.\n\nYet ha_dispatch_repl_action_for_standby's own log line reports 'committed_lsn=22' from the very next heartbeat cycle onward. Traced to repl_ack_decode_and_dispatch's stateReportMsg branch (ha.c): `last_written = c->persist.current_lsn - 1` (the RAW physical WAL tip, which unconditionally counts EVERY locally-appended entry including a local-only WAL_CHECKPOINT) is combined via `target_lsn = max(committed_lsn, last_written)` and THIS value -- not the real committed_lsn -- is what gets passed into ha_dispatch_repl_action_for_standby's committed_lsn parameter and printed in its log line. Once ctrl-2 wrote its checkpoint, last_written jumped to 22 and target_lsn followed, permanently outrunning the real committed_lsn by exactly one. Since a checkpoint's own consumed LSN slot is, by design, NEVER streamed (ha_stream_wal_to_standby) or applied (persist_wal_write_replicated / persist_wal_async both explicitly reject type==WAL_CHECKPOINT) by any standby, no standby's applied_lsn can EVER legitimately reach 22 -- ha_evaluate_repl_action's `standby_lsn < committed_lsn` check can never become false, so HA_REPL_CONVERGED is permanently unreachable for any standby once a local checkpoint has interleaved ahead of the next real committed advance. ha_stream_wal_to_standby is correctly re-invoked every heartbeat (per its own logic) but finds nothing new in [22,22] to send every single time -- a deterministic, permanent, zero-progress busy-loop, exactly matching this run's observed symptom (and ctrl-1's own applied_lsn -- correctly capped at 21 by ha_advance_applied_lsn/ha_apply_term_entry_via_library's own last-contiguously-held-LSN semantic, mirrored by ha_handle_snapshot_chunk's snapshot-install path setting applied_lsn=checkpoint_lsn never checkpoint_lsn+1 -- can never satisfy it).\n\nThe `target_lsn = max(committed_lsn, last_written)` fallback's OWN doc comment states its intended purpose narrowly: 'so standbys can catch up even when committed_lsn is stuck at 0 (no replicator-registered standbys to advance it)' -- a cluster-bootstrap convenience. But the code applies the max() UNCONDITIONALLY, not only when committed_lsn==0 -- broader than its own documented justification. This mismatch was latent and harmless until config-upgrade-snapshot task 5 introduced a LIVE, mid-operation local-only WAL entry (the marker-triggered checkpoint) that advances current_lsn without a corresponding real committed advance; bug-1466 already flagged the SAME persist_write_checkpoint_marker current_lsn bump as breaking raft's own log_len co-tracking invariant (affecting vote-freshness comparisons) -- this is a THIRD, distinct consequence of that same architectural gap, this time poisoning the replication-target computation instead. git blame confirms the `target_lsn` code (commit 06135954f, 2026-06-11) predates config-upgrade-snapshot's first commit by roughly two weeks -- a pre-existing HA replication-decision defect that config-upgrade-snapshot's task 5 merely exposed (same routing pattern as bug-1471/1472/1474/1477 before it), not something task 8.9 introduced.",
|
|
"fix": "FIXED (2026-07-28, narrowly-scoped TDD fix, in-scope to land here per explicit high-confidence + narrow-scope authorization -- unlike bug-1474's angle (a) and bug-1477, which were left for the HA-core spec owner): extracted the target_lsn computation out of repl_ack_decode_and_dispatch into a new small, pure, side-effect-free, directly-unit-testable function `ha_compute_repl_target_lsn(committed_lsn, last_written)` (declared in ha.h, defined in ha.c right after ha_process_standby_state). The fix restores the fallback to EXACTLY its own documented intent: `last_written` is used ONLY when `committed_lsn == 0` (genuine bootstrap, nothing ever committed) -- any other case returns `committed_lsn` unchanged, never leaking a trailing local-only checkpoint's consumed LSN into the convergence decision. repl_ack_decode_and_dispatch's call site now reads `target_lsn = ha_compute_repl_target_lsn(committed_lsn, last_written)`, replacing the old unconditional max(). No other function touched -- ha_evaluate_repl_action, ha_process_standby_state, ha_dispatch_repl_action_for_standby, ha_stream_wal_to_standby, persist_write_checkpoint_marker, and commit.c's majority_candidate_locked/commit_advance_locked are all confirmed correct and untouched (the bug was purely in what value got PASSED to them, not in their own logic).\n\nTDD: four new unit tests added to src/controller/testsuite/test_ha_role.c (all four call the new pure function directly, no capnp/network scaffolding needed): test_compute_repl_target_lsn_bootstrap_fallback (committed_lsn=0, last_written=42 -> 42, confirms the intended bootstrap behavior is preserved), test_compute_repl_target_lsn_zero_zero (0,0 -> 0, fresh-cluster edge case), test_compute_repl_target_lsn_ignores_trailing_checkpoint_lsn (this bug's EXACT reproduction shape: committed_lsn=21, last_written=22 -> must return 21, not 22 -- confirmed RED under the old unconditional-max code via a temporary revert, 'Expected 21 Was 22', then GREEN after restoring the fix), test_compute_repl_target_lsn_committed_already_ahead (100,50 -> 100, normal steady-state sanity check). GREEN: full controller_unit_test suite = 1040 Tests, 0 Failures, 0 Ignored, run twice clean (ASAN_OPTIONS=detect_leaks=0, nix devshell, `ninja -C src/xce.build controller/controller_unit_test`). RED confirmed independently: reverting only the new function's body to the old unconditional-max logic (leaving the new tests in place) reproduced exactly 1 failure at the predicted assertion ('Expected 21 Was 22'), then re-applying the fix restored 0 failures -- proving the test genuinely exercises this bug and the fix genuinely closes it, not a tautological test.\n\nNOT yet re-verified via a fresh live `run-ha-soak.sh --config-upgrade-wal-trim` run (recommended next step, mirroring bug-1474's own verification precedent, before considering config-upgrade-snapshot task 8.9 unblocked) -- this fix was validated at the unit level only within this investigation's scope.\n\n[UPDATE 2026-07-28, kiro-impl config-upgrade-snapshot task 8.9 verification] The initial fix landed only ONE of TWO call sites duplicating this formula: ha.c repl_ack_decode_and_dispatch (fixed, via the new ha_compute_repl_target_lsn) and config_repl.c catchup_derive_target (a SEPARATE, independently-duplicated inline copy of the exact same max(committed_lsn,last_written) formula, used by ha_walack_on_ack/catchup_lane_fn -- the ACK-driven catch-up continuation path, not the heartbeat/stateReport path the first fix covered). Rerunning the live --config-upgrade-wal-trim soak after the first fix STILL FAILED (\"cluster did not reconverge to 3-of-3... preserved floor segment did not actually suffice for real incremental catch-up\") -- confirmed via log correlation that ctrl-2 (primary) was stuck forever at ha_dispatch_repl_action_for_standby committed_lsn=22 while catchup_lane_fn's own INFO line independently reported target=22 (the OLD, unfixed formula) even though the heartbeat path's committed_lsn logging correctly showed 21. Root-caused to catchup_derive_target (config_repl.c:2617-2627, its own comment literally said \"re-derive the replication target exactly as ha.c:2771-2776 / D6\" -- a deliberate, now-stale duplication). Fixed by making catchup_derive_target call the SAME ha_compute_repl_target_lsn pure function instead of re-deriving the formula inline, so the two paths can never disagree again. Applying just this second-call-site fix then caused a NEW symptom: controller_unit_test hung indefinitely (0.8%% CPU, blocked not spinning) inside test_convergence_verification.c's test_walack_behind_target_schedules_one_continuation. Isolated via a controlled revert-and-rerun (confirmed clean 1040/1040 with the OLD formula restored, confirming the SECOND fix -- not something else -- was the trigger). Root cause of the hang: three pre-existing tests in that file (\"behind\", \"single\", \"respawn\") hardcoded committed_lsn=4 with appended_lsn=9, deliberately exercising the OLD buggy max(4,9)=9 behavior as their expected target -- with the fix, the correct target becomes 4, so acked_lsn=5/6 (used by the later tests) no longer legitimately reads as \"still behind\", and the FIRST test's own hardcoded assertion fails. Because this test file's harness (cv_setup/cv_teardown) does not run teardown from a signal-safe/finally-equivalent path, a failed TEST_ASSERT's Unity longjmp skips cv_teardown() entirely, leaking that test's live 8-thread commit_engine still bound to the soon-to-be-memset g_cv global -- the NEXT test's cv_setup() memset-ing g_cv out from under those still-running threads is what actually produced the observed permanent hang, not a defect in the production fix itself. Fixed by updating all three tests' committed_lsn from 4 to 9 (matching appended_lsn, so target=9 under EITHER formula) -- this decouples them from the bug-1478 edge case entirely (which already has dedicated, correct pure-function coverage in test_ha_role.c), preserving each test's TRUE original intent (continuation scheduling / single-flight / respawn-after-complete mechanics) with a minimal, surgical change. Stale docstrings referencing the old \"max(committed_lsn, last_written)\" formula were also corrected to reference ha_compute_repl_target_lsn. GREEN: full controller_unit_test suite = 1040 Tests, 0 Failures, run clean 2x after all fixes (plus the isolation-revert run confirming the pre-fix baseline was also clean). Live-verified: run-ha-soak.sh --config-upgrade-wal-trim now reports a clean PASS (18 jobs, zero job loss, ctrl-1 reconverged 3-of-3 using the preserved floor segment for real incremental catch-up) -- config-upgrade-snapshot task 8.9 unblocked.",
|
|
"tags": [
|
|
"ha.c",
|
|
"repl_ack_decode_and_dispatch",
|
|
"ha_dispatch_repl_action_for_standby",
|
|
"ha_evaluate_repl_action",
|
|
"target_lsn",
|
|
"last_written",
|
|
"committed_lsn",
|
|
"WAL_CHECKPOINT",
|
|
"persist_write_checkpoint_marker",
|
|
"bug-1466",
|
|
"bug-1474-fix-verified-good",
|
|
"bug-1475-fix-verified-good",
|
|
"not-bug-1477",
|
|
"config-upgrade-snapshot-task-8.9",
|
|
"permanent-catchup-wedge",
|
|
"off-by-one",
|
|
"waldump-confirmed",
|
|
"root-caused",
|
|
"fixed",
|
|
"narrowly-scoped-fix",
|
|
"tdd",
|
|
"red-green-verified"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1466",
|
|
"bug-1474",
|
|
"bug-1475",
|
|
"bug-1477"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-07-28T09:52:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1479",
|
|
"timestamp": "2026-07-28T13:25:00Z",
|
|
"error_message": "Live config-upgrade-snapshot task 8.6 soak (run-ha-soak.sh --config-upgrade ~/tmp/xce-ha-configupgrade2), run on top of bug-1477's fix (checkpoint-identity, config-identity, and host-admin-status-survival assertions ALL PASSED for the first time), FAILED later in the force-elect-rotation step: 5 consecutive job-submit attempts on {ctrl-1 (primary), ctrl-2 (standby)} all got 0/3 acked (\"waiting for write-quorum\"), then hard-failed. Investigated the ORIGINAL hypothesis (a leaked VTASK_LIVE_BLOCK/commit-admission slot from an earlier burst of 17 commit timeouts, lsn=15..31, rc=-110) and REFUTED it: commit_resolve()/wait_release_locked() correctly release the admission slot on every timeout (confirmed 17 'async continuation deadline expired' + 17 'commit failed/timed out' WARN pairs, 1:1, in ctrl-1.log) \u2014 no admission-pool leak exists. The REAL mechanism is unrelated to admission control entirely: a permanent Raft AppendEntries log-conflict wedge on standby ctrl-2, compounded by a NACK-handling gap that never triggers catch-up.",
|
|
"file": "src/controller/ha.c (repl_ack_decode_and_dispatch's WAL-ACK branch, ~6456-6644 -- the `!success` NACK path at ~6631-6642 only checks for a higher term and WARNs \"ignoring\", never calls repl_on_ack/repl_start_catchup/any retry); src/controller/repl.c (repl_broadcast ~295-380, the live single-entry send path -- fire-and-forget, no nextIndex backoff-and-retry on rejection; repl_on_ack ~250-271, the ONLY site that decrements pending_ack_count, never invoked on a NACK)",
|
|
"root_cause": "ROOT-CAUSED with byte-precise waldump evidence (xce_test's built-in `waldump` REPL command against the preserved deploy dir ~/tmp/xce-ha-configupgrade2), cross-correlated with both ctrl-1's and ctrl-2's logs line-by-line. During the soak's chaotic round-3 kill/restart churn, THREE leadership changes happened in rapid succession (term 3 -> 4 -> 5) within about 20 seconds (13:18:57-13:19:19): ctrl-2 briefly won term=3 and appended its own arm-own-term-gate NOOP, was killed before that entry could be widely replicated/committed, a short-lived term=4 leader (never directly observed in either surviving node's own become-leader lines, but proven to have existed by its WAL fingerprint) won next and wrote ITS OWN own-term NOOP at the SAME log index (14), and finally ctrl-1 won term=5 and became the lasting primary. `xce_test waldump` on ctrl-1's canonical (surviving, majority) WAL shows: lsn=12 CHECKPOINT term=2 (the marker-triggered checkpoint from config-upgrade-snapshot task 5, matching bug-1475/1477/1478's exact family), lsn=13 NOOP term=4 (the short-lived term-4 leader's noop), lsn=14 NOOP term=5 (ctrl-1's own winning noop). `xce_test waldump` on ctrl-2's own local pre-restart WAL shows: lsn=12 CHECKPOINT term=2 (agrees with ctrl-1), lsn=13 NOOP **term=3** (ctrl-2's OWN aborted, never-widely-replicated noop from its deposed term-3 stint) -- a genuine, CONFLICTING entry at the SAME index (13) with a DIFFERENT term (3 vs the canonical 4). This is an entirely NORMAL, expected Raft outcome of rapid leader churn (Raft's own \u00a75.3 log-matching property explicitly anticipates followers accumulating stale, uncommitted tail entries from deposed leaders) -- ctrl-2 correctly rejects ctrl-1's AppendEntries at prevLogIndex=13 with logOk's standard conflicting-term check (confirmed via ha_consume_append_entries's own trace: `prevIdx=13 n=1 -> success=0 match=0`, `RAFT[p1] term=5 event=ae_reject_logmismatch`, repeating for EVERY subsequent new entry ctrl-1 tries to send: prevIdx=14,15,16,...29, one per newly-committed lsn, all rejected, spanning 13:19:19 through 13:19:52). The BUG is what happens (or rather, does not happen) next, confirmed via two independent, compounding gaps: (1) ctrl-1 NEVER backs off and retries with a DECREMENTED prevLogIndex to find the point of log agreement (the standard Raft nextIndex-conflict-resolution protocol, which would let ctrl-2 truncate its conflicting lsn=13 tail and adopt the canonical term=4 entry) -- repl_broadcast (repl.c:295-380) is a pure fire-and-forget per-new-entry send with zero synchronous handling of the reply; it always advances prevIdx forward to (next-new-lsn - 1), never backward. (2) repl_ack_decode_and_dispatch's WAL-ACK reply-dispatch branch in ha.c (~6631-6642) handles a NACK (success=0) by checking ONLY for a higher observed term (raft_on_higher_term_observed, correctly added for the DIFFERENT bug-1421 stale-term scenario) and then explicitly `WARN(\"...success=0 \u2014 ignoring\")` -- the comment says exactly what the code does: the rejection is discarded. Critically, `repl_on_ack` (repl.c:250-271) is the ONLY code path that decrements `standby_conn_t.pending_ack_count`, and it is called ONLY from the `success` branch -- so a standby that is stuck rejecting (for ANY reason) has pending_ack_count monotonically climb by 1 on every subsequent broadcast attempt with ZERO corresponding decrements, until repl_broadcast's own MAX_PENDING_ACKS=16 defensive eviction (repl.c:325-334, from ha-config-bootstrap task 7.2, commit 3969064e, 2026-05-28 -- a full month before config-upgrade-snapshot's first commit) fires and marks the standby in_catch_up=1 at 13:19:53 (confirmed: 'repl_broadcast: standby localhost:9992 evicted (pending_ack_count=17 > 16) \u2014 triggering catch-up reconnect'). This eviction correctly EXCLUDES the standby from repl_active_standby_count (hence from ha_has_write_quorum's majority calculation) -- but nothing in the codebase actually DRIVES a catch-up stream or snapshot-install for it afterward: ctrl-2's log shows ZERO entry-carrying AppendEntries for the remaining ~60 seconds of the run (13:19:53 through the log's end at 13:20:53) -- only bare heartbeat probes (prevIdx=13,n=0) that trivially succeed since a presence-only probe at the standby's own true log_len=13 doesn't hit the term-conflict check. With ctrl-2 permanently excluded (in_catch_up=1, never un-evicted) and ctrl-3 permanently failing to reconnect (separate, unrelated ECONNREFUSED loop, likely a real chaos-kill in this soak round), ctrl-1 has connected=0 standbys forever ('HA quorum lost: connected=0 required=1', logged once at the eviction and never restored) -- every subsequent job submission either times out waiting for write-quorum (0/3 acked, matching the force-elect step's failure verbatim) or gets an immediate -XCE_ERR_NOT_READY (-10013) fast-reject via ha_dispatch_gate's quorum check. This is a GENUINE, SERIOUS, and apparently PERMANENT availability defect: ANY standby whose log happens to diverge by even ONE entry at a single index during leader-election churn (an entirely normal, expected Raft occurrence, not itself a bug) can become irrecoverably stuck and permanently excluded from quorum, with no self-healing path -- in a 3-node cluster this is one bad-luck election sequence away from TOTAL, PERMANENT write-quorum loss if it hits 2 of 3 standbys. Same family as bug-1466 (open, 'WAL_CHECKPOINT breaks LSN/term co-tracking', NOT fixed at its root) and its now-3 fixed siblings (bug-1475, bug-1477, bug-1478) -- this is the family's 5th distinct member, but the trigger here (an ordinary post-election term-conflicted log tail, NOT specifically a checkpoint-boundary term-derivation issue) is narrower than bug-1466's checkpoint-specific framing and points instead at a genuinely MISSING piece of core Raft log-repair protocol (conflict-driven nextIndex backoff + NACK-triggered catch-up), which appears to have never been implemented for this replication path at all -- not a regression, a gap. git blame confirms both implicated mechanisms (repl_broadcast's pending_ack_count eviction, commit 3969064e, 2026-05-28; the NACK-handling 'ignoring' branch in repl_ack_decode_and_dispatch, present since at least bug-1421's fix, itself predating config-upgrade-snapshot) are pre-existing, core HA replication code untouched by any config-upgrade-snapshot task -- config-upgrade-snapshot's task 5 (marker-triggered per-member local checkpoint) merely adds one more entry into the WAL stream around the point where this pre-existing gap gets exercised; it does not create the gap itself.",
|
|
"fix": "FIXED AND VERIFIED LIVE (2026-07-29, see UPDATE 2 below for the final closing fix) -- two compounding gaps were closed after the initial investigation: (1) the standby's own reject path sent no NACK reply at all (ha_send_wal_ack_reply hardcoded success=1 unconditionally), fixed via ha_send_wal_ack_reply_ex with success=0 on reject; (2) even with NACKs flowing, ha_stream_wal_to_standby's catch-up range was hard-capped at committed_lsn, which could never advance in this exact scenario (self-referential deadlock) -- fixed via ha_compute_repl_stream_ceiling_lsn widening the ceiling to the leader's own log tail, matching raft.tla's real AppendEntries semantics. Verified via three successive live run-ha-soak.sh --config-upgrade re-runs tracking each iteration (v1/v2 still failed, v3 with both fixes together PASSED end-to-end: 3/3 jobs acked on both force-elect rounds, zero materialized-state or config divergence). 1053/1053 controller_unit_test PASS. Full investigation history preserved below for context (including the earlier partial-fix iterations and root-causing).\n\n[Original investigation, 2026-07-28]\nNOT FIXED -- explicitly out of scope for a single safe pass, per this investigation's own conclusion (matches kiro-debug's guidance against forcing a fix when the true defect requires a protocol design decision, not a narrow patch). At least TWO separate, non-trivial design questions need to be resolved by whoever owns ha.c/repl.c's replication-catch-up protocol before a fix can be written safely: (a) should an ae_reject_logmismatch NACK immediately trigger repl_start_catchup (moving the standby to catch-up mode on the FIRST conflict, rather than silently accumulating up to 16 failed sends first)? This is the more targeted, root-cause-adjacent fix. (b) independently, once a standby IS marked in_catch_up (whether via this path or the existing MAX_PENDING_ACKS eviction), what mechanism is SUPPOSED to actually drive its catch-up (stream from join_applied_lsn, or snapshot-install if too far behind) and clear in_catch_up via repl_complete_catchup? Evidence here shows NOTHING does, for at least this eviction path -- config_repl.c's ACK-driven catchup_lane_fn/ha_walack_on_ack continuation (the only other repl_complete_catchup call site found) is itself ACK-driven, so it can never engage for a standby that never sends a genuine ACK in the first place; whether IT (or a periodic sweep independent of ACKs) is supposed to notice an in_catch_up standby and proactively start streaming it needs its own trace by the owning team. A correct fix likely needs both: NACK-triggered catch-up entry (closing gap (a)) AND a proactive (not purely ACK-reactive) catch-up driver that streams from join_applied_lsn or falls back to snapshot-install for any in_catch_up standby (closing gap (b)) -- implementing only one without the other would leave the defect only partially closed. Recommend routing to whoever owns ha.c/repl.c's HA replication/catch-up protocol (the same 'needs-owner' bucket as bug-1474's still-open fix angle (a) and bug-1472-remainder) for a proper design pass, THEN a TDD fix + live re-verification via `run-ha-soak.sh --config-upgrade` on a fresh deploy dir. Preserved evidence: ~/tmp/xce-ha-configupgrade2 (do not delete) -- `xce_test waldump <data_dir>` (via the xce_test REPL: `printf 'waldump <path>\\nquit\\n' | ASAN_OPTIONS=detect_leaks=0 timeout 60 <xce.build>/controller/xce_test`) reproduces the byte-precise lsn=13 term-3-vs-term-4 conflict evidence directly from the preserved WAL segments at any time.\n\nUPDATE (2026-07-29, this session): a fix WAS committed (uncommitted in the 'config' worktree at investigation time) implementing exactly gap (a) from this entry's own recommendation -- ha_raft_on_repl_nack() (ha.c/ha.h) routes a WAL-ACK-reply NACK into the raft library's nextIndex backoff and returns a corrected resume LSN; repl_ack_decode_and_dispatch's NACK branch calls it and immediately repl_start_catchup() with the corrected LSN; repl_get_catchup_join_lsn() (repl.c/repl.h) lets the heartbeat-driven ha_dispatch_repl_action_for_standby use the corrected position; repl_complete_catchup() now also resets pending_ack_count. 1048/1048 controller_unit_test PASS. HOWEVER: a fresh live-soak re-verification (run-ha-soak.sh --config-upgrade, deploy preserved at ~/tmp/xce_ha_bug1479_verify, NOT deleted) reproduced the ORIGINAL symptom verbatim -- force-elect ctrl-2 round: 5/5 submit_jobs attempts on {ctrl-1,ctrl-2} got 0/3 acked, hard FAIL. Root-caused: the fix's NACK-routing branch in repl_ack_decode_and_dispatch (ha.c ~6680-6720) is CORRECT but UNREACHABLE in production, because the standby's OWN reject path never sends a NACK (or any reply) in the first place. ha_apply_wal_catchup_entry has three reject paths (ha.c ~3230-3232 via ha_apply_term_entry_via_library for the term-carrying single/batch case -- the one actually hit live; ~3320-3321 for a batch sub-entry apply failure; ~3373-3374 for the legacy single-entry path) that all explicitly do 'no ACK' on a logOk reject/forward-gap. ha_send_wal_ack_reply (ha.c:3084-3106) is the ONLY function anywhere in the controller that ever constructs a WalAckReply, and it hardcodes success=1 unconditionally -- there is NO production code path that ever sends success=0. Live evidence: ctrl-2's own log shows repeating RAFT[p1] event=ae_reject_logmismatch / ha_consume_append_entries success=0 match=0 at growing prevIdx (40,41,...54) while stuck at match=20 forever; ctrl-1's log has ZERO 'WAL NACK from standby' or ha_raft_on_repl_nack lines the entire time -- the primary never learns of the rejection at all, so it never backs off nextIndex or re-arms catch-up, and committed_lsn stays frozen (the only alive standby can never re-sync, and the heartbeat-driven catch-up's own target is gated on the same frozen committed_lsn). STILL NOT FULLY FIXED. New follow-up spec .kiro/specs/raft-adapter-conformance/ created to (1) fix this concrete missing-NACK-reply defect at the three reject sites and (2) perform a broader raft.tla action-by-action conformance pass over the controller's Raft adapter (ha.c/repl.c/config_repl.c) -- distinct from raft-sim-conformance, which is scoped to src/lib/raft/raft_sim.c (library-only, in-process) and explicitly does not cover this adapter code.\n\nUPDATE 2 (2026-07-29, this session): fully FIXED and verified live end-to-end. Two more compounding gaps found and closed after the NACK-send fix (UPDATE 1) landed:\n(1) ha_apply_term_entry_via_library's logOk-reject path (ha.c, the single live-reachable reject site) sent NO reply at all on rejection -- ha_send_wal_ack_reply hardcoded success=1 unconditionally, so the primary-side ha_raft_on_repl_nack (correct since UPDATE 1) was unreachable dead code. Fixed by adding ha_send_wal_ack_reply_ex(ha, ep, c, lsn, success) and calling it with success=0 on reject, plus a new ha_wal_ack_send_hook (ha.h, XCE_TESTING) so a unit test can observe the NACK without a live endpoint (test_bug1479_ae_reject_sends_nack_not_silence, test_config_repl.c). Confirmed live in a 2nd soak run: ctrl-1's log showed real 'WAL NACK from standby ... success=0 -- marking catch-up' lines for the first time.\n(2) Even with (1) working, that 2nd soak run STILL failed at the identical force-elect ctrl-2 point: ha_stream_wal_to_standby's catch-up range was hard-bounded at committed_lsn, and committed_lsn can never advance in this exact scenario because advancing it requires an ACK from the very standby that's stuck catching up (2-of-3 alive, this standby is the only path to a new majority) -- a self-referential deadlock. Fixed by adding a new pure function ha_compute_repl_stream_ceiling_lsn(committed_lsn, last_written, checkpoint_lsn) (ha.c/ha.h), wired into ha_dispatch_repl_action_for_standby to widen the STREAM_WAL ceiling (and the ha_evaluate_repl_action convergence check that gates it) to the leader's own log tail instead of just committed_lsn -- matching raft.tla's real AppendEntries semantics (leaderCommit is advisory to the follower, never a cap on what gets sent) -- while still guarding against bug-1478's old trap (never widening to a trailing local-only checkpoint's own unstreamable LSN slot). 4 new pure-function tests in test_ha_role.c (test_compute_repl_stream_ceiling_lsn_*), RED-confirmed against a stubbed committed_lsn-only version before the real fix was restored.\nFull verification: 1053/1053 controller_unit_test PASS twice clean. THREE successive live run-ha-soak.sh --config-upgrade re-runs tracked each fix: v1 (NACK-send only) still FAILED at force-elect ctrl-2 (0/3 acked); v2 confirmed NACKs now reaching the primary but still FAILED (frozen committed_lsn=14, ha_stream_wal_to_standby target never advanced); v3 (both fixes together) PASSED end-to-end: all 3 force-elect rounds succeeded (ctrl-2: 3/3 jobs acked, term=6; ctrl-3: 3/3 jobs acked, term=7), final verdict 'PASS (config-upgrade): 12 jobs, zero materialized-state divergence, zero configuration divergence, host admin-status confirmed across all members'. Evidence preserved at ~/tmp/xce_ha_bug1479_verify, ~/tmp/xce_ha_bug1479_verify_v2, ~/tmp/xce_ha_bug1479_verify_v3 (all not deleted). config-upgrade-snapshot task 8.6 unblocked. The raft-adapter-conformance spec created mid-investigation had its concrete seed defect (missing NACK reply) fixed here; the broader raft.tla action-by-action conformance audit it also scopes remains valid, separate future work.",
|
|
"tags": [
|
|
"ha.c",
|
|
"repl.c",
|
|
"repl_broadcast",
|
|
"repl_ack_decode_and_dispatch",
|
|
"repl_on_ack",
|
|
"pending_ack_count",
|
|
"MAX_PENDING_ACKS",
|
|
"in_catch_up",
|
|
"ae_reject_logmismatch",
|
|
"raft-log-conflict",
|
|
"nextIndex-backoff-missing",
|
|
"nack-ignored",
|
|
"catch-up-never-triggered",
|
|
"permanent-quorum-loss",
|
|
"config-upgrade-snapshot-task-8.6",
|
|
"force_elect_node",
|
|
"not-admission-slot-leak",
|
|
"hypothesis-refuted",
|
|
"same-family-as-bug-1466",
|
|
"waldump-confirmed",
|
|
"byte-precise",
|
|
"root-caused",
|
|
"needs-owner",
|
|
"needs-design-decision",
|
|
"live-soak-finding",
|
|
"missing-nack-reply",
|
|
"raft-adapter-conformance",
|
|
"fixed",
|
|
"verified-live",
|
|
"raft-tla-conformance",
|
|
"stream-ceiling",
|
|
"nack-now-sent"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1466",
|
|
"bug-1471",
|
|
"bug-1472",
|
|
"bug-1474",
|
|
"bug-1475",
|
|
"bug-1477",
|
|
"bug-1478",
|
|
"bug-1421"
|
|
],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-07-29T04:05:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1480",
|
|
"timestamp": "2026-07-29T07:05:00Z",
|
|
"error_message": "raft-adapter-conformance systematic audit finding (not yet fixed): handle_repl_config_push (config_repl.c:1261-1337) has 4 reject paths (malformed body, missing bytes/sha256, sha256 mismatch, conf_save_config failure) that all return without ever sending a ReplConfigPushReply. Only the success path (1326-1335) sends {accepted=1}; there is no {accepted=0} anywhere in this function, despite its own doc-comment implying a reject reply exists. cluster.c dispatch case (652-655) has no fallback error-reply either.",
|
|
"file": "src/controller/config_repl.c (handle_repl_config_push, ~1261-1337)",
|
|
"root_cause": "Same defect class as bug-1479 (silent-drop-on-reject) but on the out-of-band config-push channel instead of the WAL catch-up channel: the reject branches never construct/send a reply message at all, so push_config_to_standbys / repl_wait_majority_ack cannot distinguish an active standby rejection from a lost packet -- both degrade identically to CONF_PUSH_TIMEOUT_MS.",
|
|
"fix": "FIXED (2026-07-29, ~09:43, commit b7828eed \"feat(raft-adapter-conformance): send explicit reply on every config-push outcome\"). handle_repl_config_push now constructs and sends ReplConfigPushReply{accepted=0, term=current_term} on all four reject early-returns (malformed request, missing bytes/sha256, sha256 mismatch, conf_save_config failure) instead of returning silently; term populated on the success path too. Landed as raft-adapter-conformance tasks 2.1-2.3 (see tasks.md), tested end-to-end in test_config_repl.c, confirmed live in task 7.3's soak. This buglog entry's original 'Not yet fixed' note (07:05 same day) predates the fix landing by ~2.5h and was never updated -- code is fixed, only this log entry was stale.",
|
|
"tags": [
|
|
"config_repl.c",
|
|
"handle_repl_config_push",
|
|
"ReplConfigPushReply",
|
|
"silent-drop-on-reject",
|
|
"same-family-as-bug-1479",
|
|
"raft-adapter-conformance",
|
|
"found-not-yet-fixed",
|
|
"config-push-channel",
|
|
"term-discovery-gap"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1479"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-29T13:53:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1481",
|
|
"timestamp": "2026-07-29T07:05:00Z",
|
|
"error_message": "raft-adapter-conformance systematic audit finding (not yet fixed): vote_ep_err_handler (ha.c:7564-7608), the shared on_err handler wired onto both real-vote and PreVote endpoints (ha.c:688-689, 827-828), handles post-connect endpoint failures (RDHUP/SSL error/remote close arriving after connect+monitor succeeded but before a reply) by calling the legacy handle_request_vote_reply directly instead of routing through vote_reply_dispatch / pre_vote_reply_dispatch (the production tally path fixed by bug-1423/1424 for connect-time and monitor-time failures only).",
|
|
"file": "src/controller/ha.c (vote_ep_err_handler, ~7564-7608; correct sibling sites at ~693-726 and ~830-855)",
|
|
"root_cause": "Reopens the bug-1423/1424 defect class (vote-request send failure must reach the reply tally) for one failure window the original fix did not cover: connect/iomgr_monitor failures were fixed, but a failure arriving after a successful connect+monitor (before any reply) still bypasses the tally via the legacy path. Effect is bounded (election_timeout_ms / PreVote round timeout still fire), not a permanent deadlock, but the fast all-replied quorum-decision path is structurally unreachable for this failure mode.",
|
|
"fix": "FIXED (2026-07-29, ~13:53, commit fce73b5b \"feat(raft-adapter-conformance): route post-connect vote/PreVote failures to production tally\"). vote_ep_err_handler split into a real-vote handler and a new pre_vote_ep_err_handler; each now routes a post-connect election-phase failure through the same production tally path used for connect-time failures (vote_reply_dispatch / pre_vote_reply_dispatch) instead of the legacy handle_request_vote_reply. Landed as raft-adapter-conformance tasks 3.1-3.2 (see tasks.md), tested in test_ha_vote_send.c, confirmed live in task 7.4's soak. This buglog entry's original 'Not yet fixed' note (07:05 same day) predates the fix landing by ~6.8h and was never updated -- code is fixed, only this log entry was stale.",
|
|
"tags": [
|
|
"ha.c",
|
|
"vote_ep_err_handler",
|
|
"handle_request_vote_reply",
|
|
"vote_reply_dispatch",
|
|
"pre_vote_reply_dispatch",
|
|
"silent-drop-on-reject",
|
|
"same-family-as-bug-1423",
|
|
"raft-adapter-conformance",
|
|
"found-not-yet-fixed",
|
|
"election-timeout-bounded",
|
|
"not-a-deadlock"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1423"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-29T13:53:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1482",
|
|
"timestamp": "2026-07-29T10:43:00Z",
|
|
"error_message": "AddressSanitizer: heap-use-after-free in free_packet ../lib/netio.c:437, called from test_config_push_reply_higher_term_adopts_and_steps_down (test_config_repl.c:3718)",
|
|
"file": "src/controller/testsuite/test_config_repl.c; doc comment in src/controller/cluster.c (myreq_handler_for_test)",
|
|
"root_cause": "A code-review finding (task 2.2 re-review) reported that cpr22_build_config_push_reply_pkt's io_packet_t* pkt was never freed after myreq_handler_for_test(...), citing myreq_handler_for_test's own doc comment ('the caller still owns/frees pkt itself') as the ownership contract. That doc comment was WRONG: myreq_handler unconditionally calls xce_decode(pkt, &request) as its first step, and xce_decode() itself (src/lib/request.c:274-275) unconditionally calls free_packet(pkt) (frees pkt->data) then FREEUP(pkt) (frees the io_packet_t struct) before returning -- ownership of pkt is transferred into xce_decode, not retained by the caller. Applying the review finding literally (adding free_packet(pkt); free(pkt); after the call) was therefore a double-free/use-after-free, caught immediately by ASAN even under ASAN_OPTIONS=detect_leaks=0 (UAF detection is independent of leak detection).",
|
|
"fix": "Removed the erroneous free_packet(pkt)+free(pkt) call from the test (there is no leak -- pkt is already fully consumed). Corrected myreq_handler_for_test's doc comment in cluster.c to accurately state that pkt ownership is transferred into the call via xce_decode, and callers must not touch/free pkt afterward. Added an explanatory NOTE comment at the call site in the test to prevent recurrence.",
|
|
"tags": [
|
|
"cluster.c",
|
|
"myreq_handler_for_test",
|
|
"xce_decode",
|
|
"free_packet",
|
|
"use-after-free",
|
|
"double-free",
|
|
"misleading-doc-comment",
|
|
"ownership-contract",
|
|
"raft-adapter-conformance",
|
|
"task-2.2",
|
|
"review-finding-corrected"
|
|
],
|
|
"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": "FIXED (2026-08-01). ha_arm_heartbeat_timeout_vtask (ha.c) published a calloc'd liveness_poll_ctx_t into the static s_liveness_ctx unconditionally, but only freed it via liveness_poll_fn's cancelled-check path -- which never runs if delay_task_ms was never called (c==NULL, delaymgr not running, or delay_task_ms itself failing). Fixed by clearing s_liveness_ctx and freeing ctx immediately in all three no-schedule cases (the pre-existing c==NULL/!running else-branch, plus the previously-unhandled delay_task_ms rc<0 branch, which had the identical defect shape and was found while fixing this). Establishes the invariant: s_liveness_ctx is non-NULL only when a delaymgr task actually holds a live reference to it. Regression test: test_bug1483_lost_round_without_hook_does_not_leak_liveness_ctx (test_ha_prevote.c) drives a real LOST PreVote round WITHOUT stubbing ha_prevote_rearm_liveness_hook (every other LOST-path test in that file stubs it specifically to avoid this code path) and asserts the new liveness_ctx_get_for_test() accessor returns NULL afterward. Full suite: 1071 Tests 0 Failures (verified via the direct-binary recipe, ASAN_OPTIONS=detect_leaks=0).",
|
|
"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-08-01T00:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1484",
|
|
"timestamp": "2026-07-29T21:10:00Z",
|
|
"error_message": "No test anywhere in src/controller/testsuite/ drives the real production dispatch path for either term-discovery vector bug-1421 introduced (heartbeat-reply state-report term adoption, ha.c:6690-6711; WAL-NACK reply_term adoption inside repl_ack_decode_and_dispatch, ha.c:6805-6814) and asserts raft_on_higher_term_observed actually fires. The look-alike test_intake_higher_term_heartbeat_adopts_term (test_term_safety_adapter.c:1232) drives a different code path (ha_consume_append_entries -> raft_on_append_entries_request library-level UpdateTerm, an AE-request vector, not the AE-reply/state-report fallback bug-1421 added). test_persist_recovery.c (cited by design.md line 146 as covering this) has zero term-adoption content -- pure recovery mechanics. test_config_repl.c only covers the NEW config-push term vector added by this feature (Req 7.4), not the pre-existing heartbeat/WAL-NACK vectors.",
|
|
"file": "src/controller/ha.c (~6690-6711 heartbeat-reply vector, ~6805-6814 WAL-NACK vector); no test file drives either",
|
|
"root_cause": "bug-1421 (heartbeat-reply term-discovery fallback) shipped without a dedicated regression test asserting raft_on_higher_term_observed fires through the real repl_ack_decode_and_dispatch path for either vector -- found during raft-adapter-conformance task 7.2s regression-confirmation sweep, which searched the whole test suite (not just its own 8-file boundary) for `raft_on_higher_term_observed`/`higher_term` callers and found none exercising these two vectors end-to-end.",
|
|
"fix": "FIXED (2026-08-01) -- test-coverage gap closed, no production logic change (the underlying bug-1421 term-adoption code was already correct, just unverified end-to-end). Added test_term_adoption_vectors.c with two tests driving the real peer_ctrl_msg_handler -> repl_ack_decode_and_dispatch path (via peer_ctrl_msg_handler_for_test + standby_ep_ctx_build_for_test, c=NULL -- every c-dependent step downstream of the term check is already guarded): (a) test_heartbeat_state_report_higher_term_adopts_and_steps_down builds a wire-shape StateReport reply carrying a higher term and asserts raft_on_higher_term_observed adopts it and steps the node down from RAFT_LEADER (ha.c:6690-6711 vector); (b) test_wal_nack_higher_term_adopts_and_steps_down does the same for a WalAckReply{success=0} carrying a higher reply_term (ha.c:6805-6814 vector). Both went GREEN immediately, confirming Requirement 7.5's 'already verified' claim was correct in substance, just previously unverified by any test. Registered in meson.build controller_unit_test_src and controller_test.c. Full suite: 1071 -> 1073 Tests, 0 Failures.",
|
|
"tags": [
|
|
"ha.c",
|
|
"raft_on_higher_term_observed",
|
|
"repl_ack_decode_and_dispatch",
|
|
"term-discovery",
|
|
"bug-1421",
|
|
"coverage-gap",
|
|
"raft-adapter-conformance",
|
|
"task-7.2",
|
|
"found-not-yet-fixed",
|
|
"pre-existing",
|
|
"requirement-7.1",
|
|
"requirement-7.2",
|
|
"requirement-7.5"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1421"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-01T00:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1485",
|
|
"timestamp": "2026-07-30T14:35:00Z",
|
|
"error_message": "test_e2e_live_ha_push.py::test_live_config_push_against_primary_reaches_success_path flaky (near-100% fail rate across ~25 live runs during admin-config-tool task 6.3 round-2 remediation): TimeoutError: controller never opened localhost:<port>: [Errno 111] Connection refused, raised from a fresh wait_for_port re-probe of the elected primary's own address performed AFTER _wait_for_primary (CTRL_PRIMARY marker) + a new _wait_for_standbys (both other nodes show CTRL_STANDBY) + a 3s settle sleep all already succeeded.",
|
|
"file": "src/xceadmin/tests/test_e2e_live_ha_push.py (live_ha_cluster fixture); root cause is in src/controller (exact site not yet isolated -- C-side investigation out of this task's boundary)",
|
|
"root_cause": "NOT a pure test-side readiness race as round-1 review assumed. Live forensic capture (ps aux mid-run) caught the freshly-elected ctrl-1 as a <defunct> zombie process moments after its own log recorded the full raft_cb_become_leader promotion sequence ending at 'HA: repl registered standby ep[1] (slot 1, ...)' -- the log then goes silent (no crash trace, no further lines) and the process is gone. stderr was DEVNULL'd in the fixture so no ASAN/signal diagnostic was captured from a real failing pytest run. Confusingly, 3 separate standalone (non-pytest) repro scripts using byte-identical spawn code (same xce_controller build.dbg binary, same deploy-ha.sh cluster, same peers/certs/workdir args) ran the exact same primary-promotion sequence successfully every single time with the primary staying alive and the port reachable for 20-30s post-election -- while pytest-invoked runs of the identical fixture code failed roughly 24/25 times. Ruled out during investigation: pytest's default fd-capture (reproduced with -s / capturing disabled, still failed 3/3), ulimits (NPROC/NOFILE/AS/STACK identical between nix-develop plain-shell and pytest-invoked-via-python contexts), and orphaned-process port contention (ps aux clean before each batch). True root cause not isolated -- prime suspects are a genuine timing-sensitive controller-side crash/race in the CTRL_STANDBY->CTRL_PRIMARY raft promotion path (raft_cb_become_leader / repl registration) that pytest's process tree somehow makes far more likely to trigger, or a process-group/session/signal-mask difference inherited by subprocess.Popen children when the parent is pytest vs a bare python3 script.",
|
|
"fix": "UPDATE 2026-08-01 -- investigated per this entry's own \"next step\" (capture stderr instead of DEVNULL, re-attempt). Redirected each node's stderr to deploy_dir/logs/<name>.stderr.log (permanent change to test_e2e_live_ha_push.py, replacing the DEVNULL redirect that left this entry's original investigation with no diagnostic) and added an XCE_KEEP_DEPLOY_DIR=1 debug env var to preserve deploy_dir across the fixture's own cleanup for inspection. Ran the live test 40 times total in this environment: 25 baseline (idle sandbox, load avg ~2/22 cores) + 15 more with a concurrent `xce-build.sh controller debug` compile racing for CPU (separate build.dbg dir, so it could not clobber the xce.build controller binary the test depends on -- unlike bug-1486's same-dir clobber shape). Result: 40/40 PASSED, 0/120 captured stderr logs (3 nodes x 40 runs) non-empty -- no crash, no ASAN report, in any run. Could NOT reproduce the ~24/25 failure rate from the original investigation despite matching the documented repro shape exactly (same binaries, same fixture code, same pytest invocation).\n\nNOT marking fixed -- absence of reproduction here is not proof of absence of the underlying bug, and this session's single concurrent compile is a much lighter contention scenario than the real multi-session sandbox reality bug-1486 documents (several concurrent AGENT SESSIONS, potentially each running their own live 3-node cluster). Leading hypothesis (unconfirmed): the original ~24/25 failure rate was itself a symptom of resource contention from OTHER concurrent sessions on the shared sandbox during that investigation (CPU starvation delaying the primary's post-election warmup past _POST_ELECTION_SETTLE_S, or an OOM-adjacent condition killing the freshly-forked primary outright) rather than a bug in the promotion path reachable in isolation -- consistent with the original investigation's own \"pytest's process tree somehow makes far more likely\" framing, since pytest's subprocess tree carries more memory/fd overhead than the bare python3 scripts that never reproduced it there either.\n\nDowngraded to low-priority/environment-flake, left OPEN. The stderr-capture infrastructure is now permanently in place (not reverted) so the next real live failure -- in pytest, in a genuinely contended multi-session sandbox, or in CI -- captures an actual ASAN report or signal instead of DEVNULL silence, which is what would actually close this out.",
|
|
"tags": [
|
|
"flaky-test",
|
|
"ha",
|
|
"raft-election",
|
|
"controller-crash",
|
|
"admin-config-tool",
|
|
"task-6.3",
|
|
"e2e-live",
|
|
"unresolved",
|
|
"pytest-specific"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1477",
|
|
"bug-1479",
|
|
"bug-606"
|
|
],
|
|
"occurrences": 25,
|
|
"last_seen": "2026-08-01T00:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1486",
|
|
"timestamp": "2026-07-31T03:48:00Z",
|
|
"error_message": "Backgrounded `xce-build.sh all` run went silently stale mid-flight ([360/362], no ninja FAILED/error line, no completion marker, log just stopped growing at 03:38:35) with no matching build process left in `ps aux`",
|
|
"file": "src/tools/xce-build.sh",
|
|
"root_cause": "Multiple DIFFERENT Claude agent sessions independently invoked xce-build.sh against the same shared worktree's src/xce.build directory at the same time (confirmed via `ps auxf`: sibling `bash src/tools/xce-build.sh controller` and a separate `... all` invocation running under different parent `claude --output-format stream-json` PIDs). xce-build.sh has no lock/mutex around its unconditional `rm -rf \"$BUILD_DIR\"` + `meson setup` step (same code path as bug-1464), so a peer session's rm -rf tore the build directory out from under this session's own in-progress ninja/meson compile with no error propagation -- the backgrounded process's output just stops, indistinguishable at first glance from a hang.",
|
|
"fix": "No code change; workflow fix. Before trusting a backgrounded xce-build.sh log that has gone stale, run `ps auxf | grep -E 'xce-build|meson|ninja|cc1'` to check for a sibling xce-build.sh invocation from a different session targeting the same worktree. If found, do not start a third concurrent build -- bounded-poll (`while kill -0 $PEER_PID; do sleep 5; done`, not a passive wait for a background-task notification) until all peer invocations exit, then run exactly one clean blocking `xce-build.sh all` and treat only that run's own output as ground truth. Real fix would be a flock/lockfile around setup_build()'s rm-rf+meson-setup step in xce-build.sh itself so concurrent sessions serialize instead of clobbering.",
|
|
"tags": [
|
|
"build",
|
|
"xce-build.sh",
|
|
"meson",
|
|
"ninja",
|
|
"race-condition",
|
|
"concurrent-sessions",
|
|
"multi-agent",
|
|
"workflow"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1464"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-31T03:48:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1487",
|
|
"timestamp": "2026-07-31T04:50:00Z",
|
|
"error_message": "30-round chaotic HA soak (run-ha-soak.sh --chaotic 30): committed_job_loss=1 at round 25/30 (VERDICT result=FAIL). expect-job reported job 0-6-1785473261-216067 not found on newly-elected primary ctrl-2 (term=27) immediately after the round-25 kill of ctrl-1 (term=26). committed_divergence stayed 0 for the entire run; the job (and all others) was confirmed present on every subsequent verify (rounds 26-30) and the final post-run sweep of all 93 tracked jobs.",
|
|
"file": ".claude/skills/xce-test-ha/run-ha-soak.sh",
|
|
"root_cause": "NOT a controller bug and NOT genuinely-uncommitted-at-kill-time -- test-harness false-positive, root-caused with log/timestamp evidence from the preserved run (/home/claude/tmp/xce-ha-chaos30-run1/logs/ctrl-{1,2,3}.log). ctrl-1 (primary, term=26) majority-committed all 3 round-25 jobs (lsn 101,102,103; self + ctrl-2 ack) between 04:47:41.839 and 04:47:42.052 -- confirmed via commit_advance_locked log lines -- moments before being killed at 04:47:42+. ctrl-2 was elected primary at term=27 at 04:47:52.470 with ha_compute_safe_committed_lsn reporting safe_committed_lsn=99 \"(from 2 granted voters)\" -- the conservative Raft floor, since ctrl-3 (the only other reachable voter) was itself mid-restart/catch-up from round 25s own overlapping-kill design and had not yet caught up past lsn 99. Per the documented Raft Figure-8 safety mechanism (ha_arm_own_term_gate, ha.c:4997-5046: \"the universal commit barrier still requires per-entry majority of a new-term entry\"), a newly-elected primary cannot fold a PRIOR-term entry into its own committed_lsn watermark merely because it holds it durably -- it must first get a fresh majority ack, under its OWN term, for its own-term WAL_NOOP (armed at promotion). ctrl-2s committed_lsn stayed at 100 (excluding lsn 101-103) until ctrl-3s WAL catch-up stream let it ack the term-27 noop at lsn=104, at 04:47:58.702 -- 6.232s after promotion (commit_advance_locked: \"committed_lsn 100 -> 104\"). expect-job (joblist query) reads c->jobmgr, which the apply pump only populates for entries that have reached this committed_lsn watermark -- so the job was genuinely invisible, by design, for that 6.232s window. run-ha-soak.shs verify_classify() (chaotic mode) runs its expect-job check immediately once wait_for_new_primary detects the new primary is SERVING at a higher term -- unlike verify_no_loss (sequential mode; already carries a 3-attempt/2s-settle retry from bug-1422 for a related but distinct client-retry-storm race) and unlike wait_for_full_convergence (which chaotic mode intentionally skips between kills, by design, to land kills inside overlap windows) -- so its single, instantaneous query landed inside the 6.232s barrier window and counted a false LOSS. Comparison: round 24s election (ctrl-1, term=26) closed the identical barrier window in only 167ms because the other voting peer was not mid-catch-up at that moment -- the window duration is directly proportional to how far behind the second required peer is, which chaotic modes overlapping-restart design can occasionally push to several seconds.",
|
|
"fix": "Added a bounded retry (5 attempts, 2s settle between) around the expect-job/verdict-classify check in verify_classify() (.claude/skills/xce-test-ha/run-ha-soak.sh) -- mirrors verify_no_loss/bug-1422s \"retry the whole check\" precedent, only retrying on a LOSS classification (BUG854/OK still resolve on the first attempt, matching prior semantics). ~8s of total settle margin comfortably covers the measured 6.232s worst-case gap while staying bounded -- a job still missing after 5 attempts still counts as a genuine LOSS, so real committed-job loss detection is unweakened. Verified with a full, fresh 30-round chaotic re-soak (see run2 VERDICT).",
|
|
"tags": [
|
|
"xce-test-ha",
|
|
"chaotic-soak",
|
|
"verify_classify",
|
|
"raft-commit-barrier",
|
|
"apply-decoupling",
|
|
"false-positive",
|
|
"test-harness"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1422",
|
|
"bug-1431",
|
|
"bug-1432"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-07-31T04:50:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1489",
|
|
"timestamp": "2026-08-03T04:00:00Z",
|
|
"error_message": "gcc: 'unknown type name xce_sched_core_t; did you mean xce_sched_ctx_t?' at core.h:92 (xce_sched_core_init prototype) when compiling scheduler.h consumers (handler.c, main.c, etc).",
|
|
"file": "src/scheduler/include/core.h",
|
|
"root_cause": "core.h defined `struct xce_sched_core_s { ... };` (the full body) but relied entirely on plugin.h's forward declaration (`typedef struct xce_sched_core_s xce_sched_core_t;`) for the typedef name -- core.h itself never declared it. scheduler.h includes core.h BEFORE plugin.h, so in that (the only real) include order, xce_sched_core_t was unresolved by the time core.h's own function prototypes referenced it.",
|
|
"fix": "Added `typedef struct xce_sched_core_s xce_sched_core_t;` directly in core.h, immediately before the struct body. An identical repeated typedef (same underlying type) is valid C11/gnu17, matching this codebase's existing cluster_t idiom (myconf.h/persist.h/ha.h/cluster_def.h all forward-declare independently) -- so the fix works regardless of which of core.h/plugin.h is included first.",
|
|
"tags": [
|
|
"scheduler-core",
|
|
"task-4.1",
|
|
"core-extraction",
|
|
"typedef-forward-decl",
|
|
"include-order"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-03T04:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1490",
|
|
"timestamp": "2026-08-03T04:00:00Z",
|
|
"error_message": "ld: undefined reference to 'reset_sched_obj' when linking xce_scheduler (referenced from plugins/limit.c's limit_job_election()).",
|
|
"file": "src/scheduler/src/schedobj.c",
|
|
"root_cause": "While rewriting schedobj.c wholesale to relocate the CRUD accessors (sched_get_job/sched_add_job/etc, scheduler-core spec task 4.1) into core.c, the reset_sched_obj() function (unrelated to the relocation, a small xlist/zarray cleanup helper called by plugins/limit.c) was accidentally omitted from the rewritten file -- a transcription miss, not an intentional removal.",
|
|
"fix": "Re-added reset_sched_obj() verbatim (unchanged body) to schedobj.c, right after make_sched_obj() where it originally lived.",
|
|
"tags": [
|
|
"scheduler-core",
|
|
"task-4.1",
|
|
"core-extraction",
|
|
"link-error",
|
|
"whole-file-rewrite-risk"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1489"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-03T04:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1491",
|
|
"timestamp": "2026-08-03T06:33:00Z",
|
|
"error_message": "AddressSanitizer: SEGV on unknown address 0x000000000000 in dataq_deq_head (lib/dataq.c:15), called from dataq_fini <- xce_sched_core_fini (core.c:126), when a test called xce_sched_core_init() then xce_sched_core_fini() back-to-back on a fresh xce_sched_core_t.",
|
|
"file": "src/scheduler/testsuite/test_core_jbuf_capacity_pin.c",
|
|
"root_cause": "xce_sched_core_init() memset()s the whole xce_sched_core_t, leaving core->pend_updates[0]/[1] NULL -- those two dataq_t* are only allocated+dataq_init()d by scheduler.c sched_init() AFTER calling xce_sched_core_init() (see core.c file header comment: pend_updates storage lives in xce_sched_core_t but its dataq_init/killer wiring stays driver-owned in scheduler.c). xce_sched_core_fini() unconditionally calls dataq_fini(core->pend_updates[0]) and [1] with no NULL guard, so calling fini() right after init() without going through sched_init()'s extra setup step dereferences NULL inside dataq_deq_head.",
|
|
"fix": "Not a production bug (xce_sched_core_fini()'s real caller, scheduler.c sched_fini(), always runs after sched_init() has populated pend_updates) -- fixed the test instead: test_jbuf_capacity_is_runtime_one() (task 4.2) calls only xce_sched_core_init() and reads core.jbuf.ncap, deliberately never calling xce_sched_core_fini() on a fixture built by init() alone. Matches this testsuite directory's established \"fixtures aren't torn down\" convention (test_picker_core_loop_boundary.c's header comment).",
|
|
"tags": [
|
|
"scheduler-core",
|
|
"task-4.2",
|
|
"core-init-fini",
|
|
"segv",
|
|
"null-deref",
|
|
"test-authoring-gotcha",
|
|
"pend_updates"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1489",
|
|
"bug-1490"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-03T06:33:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1492",
|
|
"timestamp": "2026-08-04T01:04:00Z",
|
|
"error_message": "plugin_end_session() checks plugin->begin_session_fn != NULL but calls plugin->end_session_fn(plugin) -- a guard/call field mismatch",
|
|
"file": "src/scheduler/src/plugin.c",
|
|
"root_cause": "Pre-existing bug predating the scheduler-core spec (git blame: commit 638173dec, 2026-02-26). plugin_end_session()'s per-plugin loop guards on the wrong struct field before invoking the hook, so a plugin registering only end_session_fn (not begin_session_fn) never has it called; a plugin registering only begin_session_fn (not end_session_fn) would crash via a NULL function-pointer call if this branch were ever reached for it. Discovered incidentally during scheduler-core task 5.2's independent review while verifying the plugin_begin_session/plugin_end_session per-session bookkeeping fan-out is preserved in the new normal-mode driver loop -- not introduced by task 5.2, confirmed untouched by its diff.",
|
|
"fix": "NOT FIXED -- out of scope for task 5.2, flagged for a dedicated follow-up. The one-line fix is straightforward: change the guard to `plugin->end_session_fn != NULL` (mirroring plugin_begin_session()'s own correct `plugin->begin_session_fn != NULL` guard for its `begin_session_fn` call).",
|
|
"tags": [
|
|
"scheduler-core",
|
|
"task-5.2",
|
|
"plugin-c",
|
|
"guard-call-mismatch",
|
|
"pre-existing",
|
|
"legacy-fcfs-picker",
|
|
"not-fixed"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-04T01:04:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1493",
|
|
"timestamp": "2026-08-04T12:35:00Z",
|
|
"error_message": "gcc: 'expected declaration specifiers before sched_snapshot_data_t' cascading into ~20 errors across typemap.h/controller.capnp.h/controller.capnp.c when building lib/controller.capnp.c (scheduler-core task 7.3 SnapshotData C struct).",
|
|
"file": "src/include/typemap.h",
|
|
"root_cause": "A doc comment on sched_snapshot_data_t read '...raw uint8_t*/size_t pattern...' -- the literal substring '*/' inside the comment text (no space between the uint8_t* pointer-star and the following /size_t) prematurely closed the C block comment. Everything after that point (the rest of the comment prose plus the following struct's opening brace) was parsed as real C tokens, corrupting the sched_snapshot_data_t typedef and cascading into every generated function signature that references it.",
|
|
"fix": "Reworded the comment to avoid the accidental */ sequence ('uint8_t-pointer + size_t pattern' instead of 'uint8_t*/size_t pattern'). General gotcha: never write 'TypeA*/TypeB' (pointer-star immediately followed by slash) inside a /* */ C comment -- always put a space or word between the * and the /.",
|
|
"tags": [
|
|
"scheduler-core",
|
|
"task-7.3",
|
|
"capnp-schema",
|
|
"typemap.h",
|
|
"comment-syntax",
|
|
"build-break"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-04T12:35:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1494",
|
|
"timestamp": "2026-08-04T00:00:00Z",
|
|
"error_message": "clang-format -i produced bizarre whole-file +1-space indentation drift (starting right after the top #include block, persisting to EOF) in a newly-written test_snapshot_save_load.c, with kill_sched_job() alone expanded to multiple lines while identical sibling one-liners stayed collapsed.",
|
|
"file": "src/scheduler/testsuite/test_snapshot_save_load.c",
|
|
"root_cause": "Same class of bug as bug-1493 (task 7.3): the file's own top-of-file header comment contained the literal substring '(kill_sched_*/plugin_unregister/...)' -- the pointer-star-like '*' immediately followed by '/' prematurely closed the /* */ block comment. Everything after that point was parsed as real C code by clang-format's lexer, which is what produced the indentation drift (a strong diagnostic signal, not just a formatting quirk) -- gcc itself would also have failed to compile this.",
|
|
"fix": "Reworded 'kill_sched_*/plugin_unregister/sched_worker_release_host_ctx/sched_resolve_job_picker)' to 'kill_sched_* family, plugin_unregister, sched_worker_release_host_ctx, sched_resolve_job_picker)', removing the accidental */ sequence. General lesson (reinforcing bug-1493): a sudden, file-wide clang-format indentation shift starting at a specific line is a strong signal to grep that file for a stray '*/' inside a comment before assuming it's a clang-format config issue -- verified via a small python scanner that walks the file tracking in-comment state and flags any '*/' encountered while not already inside a comment.",
|
|
"tags": [
|
|
"scheduler-core",
|
|
"task-8.1",
|
|
"comment-syntax",
|
|
"clang-format",
|
|
"testsuite"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1493"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-04T00:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1495",
|
|
"timestamp": "2026-08-04T00:00:00Z",
|
|
"error_message": "sched_get_user()/sched_get_project() (core.c) always returned NULL for any user/project name not already present in core->users/core->projects, even though both are documented and relied upon (core_events.c JOBS_PUSH, schedobj.c make_sched_job, and task 8.1's own snapshot_load.c) as get-or-create. Surfaced as job->user/job->project being silently NULL for every job referencing a brand-new user/project, discovered while writing test_snapshot_save_load.c's cross-core equivalence test (RED phase: TEST_ASSERT_NOT_NULL(sched_get_project(&core_a, \"proj1\")) failed immediately after a successful JOBS_PUSH).",
|
|
"file": "src/scheduler/src/core.c",
|
|
"root_cause": "Both functions call key_find() then do `if (rc < 0) { return NULL; }` before falling through to the make_sched_user()/make_sched_project() create path. key_find()'s actual not-found signal is a NEGATIVE errno (-ENOENT, confirmed via direct debug instrumentation: rc=-2 for an absent key, rc=1 for a present one) -- NOT rc==0 as the surrounding code assumed. Since -ENOENT < 0, the guard incorrectly treated the EXPECTED not-found outcome as a fatal error and returned NULL before ever reaching the create fallback, making get-or-create unreachable for any genuinely new name. This is a pre-existing bug from earlier tasks (4.1/4.3), not introduced by task 8.1, but it directly breaks task 8.1's own snapshot_load.c users/projects restoration onto a freshly-initialized core (which always starts empty, so every name is 'new').",
|
|
"fix": "Changed the guard in both functions from `if (rc < 0)` to `if ((rc < 0) && (rc != -ENOENT))`, so only a genuine (non-ENOENT) error short-circuits before the create fallback. Two-line change per function, core.c lines ~341 and ~416. Verified: full scheduler suite 23/23 (up from 22/22 baseline, no regressions), plus the new test's own field-level assertions (users/projects created correctly, priority preserved) now pass.",
|
|
"tags": [
|
|
"scheduler-core",
|
|
"task-8.1",
|
|
"core.c",
|
|
"get-or-create",
|
|
"kvmgr",
|
|
"key_find",
|
|
"sched_get_user",
|
|
"sched_get_project",
|
|
"regression-fix"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-04T00:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1496",
|
|
"timestamp": "2026-08-04T00:00:00Z",
|
|
"error_message": "xce_sched_core_load_snapshot() never restored core->prng_seed from the snapshot -- a freshly loaded core silently kept xce_sched_core_init()'s default (0) instead of the value xce_sched_core_save_snapshot() had captured. Caught by test_snapshot_save_load.c's field-level assertion: TEST_ASSERT_EQUAL_UINT64(0xDEADBEEFULL, core_b.prng_seed) failed with Expected 3735928559 Was 0 after a successful save+load round trip.",
|
|
"file": "src/scheduler/src/snapshot_load.c",
|
|
"root_cause": "save_snapshot() (snapshot.c) correctly writes `out->prng_seed = core->prng_seed;`, but the corresponding `core->prng_seed = in->prng_seed;` assignment was simply missing from load_snapshot()'s field-copy sequence -- an incomplete round trip for a field the function's own header comment (snapshot.c, 'PRNG seed resolution') explicitly documents as in scope (Req 5 AC 21's 'PRNG state' checklist row).",
|
|
"fix": "Added `core->prng_seed = in->prng_seed;` to xce_sched_core_load_snapshot() (snapshot_load.c), placed after the jobs-restoration loop and before the internal_state restoration block. Verified via the same field-level assertion, now passing.",
|
|
"tags": [
|
|
"scheduler-core",
|
|
"task-8.1",
|
|
"snapshot_load.c",
|
|
"prng_seed",
|
|
"round-trip-gap"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-04T00:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1497",
|
|
"timestamp": "2026-08-04T00:00:00Z",
|
|
"error_message": "ASan SEGV inside dup_val() -> makeString() -> hash_string() while building test_snapshot_save_load.c's cross-core equivalence test fixtures.",
|
|
"file": "src/scheduler/testsuite/test_snapshot_save_load.c",
|
|
"root_cause": "Test-side only, not production code: three test-owned xce_val_t resval fixtures were left with `.which` at its memset-zero default. XCE_VAL_STRING happens to be enum value 0 (xce/types.h), so the zeroed `.which` was silently interpreted as \"this is a string\" -- dup_val()/makeString() then reinterpreted the fixture's raw ivalue32 int as a char* pointer and hash_string() dereferenced it, crashing.",
|
|
"fix": "Explicitly set `.which = XCE_VAL_NUMERIC` on all three test-owned xce_val_t fixtures in test_snapshot_save_load.c before use -- never rely on struct-zero-init to select a union discriminant when a non-zero-valued enum member (XCE_VAL_NUMERIC) is the intended default.",
|
|
"tags": [
|
|
"scheduler-core",
|
|
"task-8.1",
|
|
"test_snapshot_save_load.c",
|
|
"xce_val_t",
|
|
"zero-init-union-discriminant",
|
|
"test-only",
|
|
"asan-segv"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-04T00:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1498",
|
|
"timestamp": "2026-08-05T00:00:00Z",
|
|
"error_message": "test_toctou_hardlink_planted_after_validation_rejected FAILED: Expected Non-NULL -- fgets() on the outside 'victim' file returned NULL (file was 0 bytes) after the TOCTOU regression test ran, even though sched_record_start()/the reproduced open-hardening sequence both correctly REJECTED the hard-link swap and returned an error.",
|
|
"file": "src/scheduler/src/recording.c",
|
|
"root_cause": "sched_record_start()'s TOCTOU-hardened open used O_WRONLY|O_CREAT|O_TRUNC|O_NOFOLLOW. O_TRUNC truncates the target atomically as PART OF the open(2) syscall itself, before any userspace code -- including the fstat()+st_nlink==1 safety check right after open() -- ever runs. Against a hard-linked victim (same inode as the outside file, no symlink involved so O_NOFOLLOW never triggers), open() succeeds and O_TRUNC immediately zeroes the shared inode's content; the subsequent st_nlink>1 check then correctly rejects and closes the fd, but the outside victim file was already corrupted by that point. The check ran too late to matter -- classic 'check-after-side-effect' TOCTOU-adjacent bug, caught by the test's own outside-file-content assertion (added specifically to prove containment, not just that the return code was negative).",
|
|
"fix": "Removed O_TRUNC from the initial open() flags (now O_WRONLY|O_CREAT|O_NOFOLLOW). After fstat()+st_nlink==1 passes, explicitly call ftruncate(fd, 0) to get the same truncate-on-legitimate-overwrite behavior, but only once safety is verified. Same fix applied to the test's own toctou_hardened_open() helper (a verbatim reproduction of the production sequence, used because a literal multi-threaded race against sched_record_start()'s few-instruction internal window would be flaky).",
|
|
"tags": [
|
|
"scheduler-core",
|
|
"task-9.2",
|
|
"recording.c",
|
|
"toctou",
|
|
"hardlink",
|
|
"O_TRUNC",
|
|
"check-after-side-effect",
|
|
"sched_record_start"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-05T00:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1499",
|
|
"timestamp": "2026-08-05T00:00:00Z",
|
|
"error_message": "sched_driver_session_ordering_test TIMEOUT (30s, killed by SIGTERM) after adding task 9.2's recording-write hooks to xce_sched_driver_run_normal_mode_round() -- picker thread, allocator thread, and the main round all blocked forever.",
|
|
"file": "src/scheduler/src/driver.c",
|
|
"root_cause": "While inserting the new 'if (sched->recording) { rec_ctx = sched_record_session_begin(...); }' block between plugin_begin_session()/sched_account_jobs() and the decision-drain loop, the pre-existing `xce_core_signal_go(&(sched->core));` call was accidentally dropped from the Edit's old_string/new_string pair -- it was the last line of the block being replaced but was not included in the replacement text. Without xce_core_signal_go(), the picker thread's cbuf_get(&core->wbuf) rendezvous never unblocks, which cascades: the stand-in allocator thread never receives a jobid from cbuf_get(&core->jbuf), so it never pushes the end-of-session NULL decision, so the main thread's own cbuf_get(&core->decisions) drain loop blocks forever -- a 3-way deadlock across all three threads.",
|
|
"fix": "Restored `xce_core_signal_go(&(sched->core));` immediately after the new recording session-begin block (matching requirements.md's own annotated pseudocode order: build ReplaySession{beginRound} THEN sched_go()). Caught by re-running the full scheduler test suite after the recording hooks were added -- test_driver_session_ordering.c is the ONLY test in the suite that drives a real picker/allocator thread pair through this exact function, so it was the only test capable of catching a signal_go() regression.",
|
|
"tags": [
|
|
"scheduler-core",
|
|
"task-9.2",
|
|
"driver.c",
|
|
"deadlock",
|
|
"xce_core_signal_go",
|
|
"accidental-deletion-in-edit",
|
|
"xce_sched_driver_run_normal_mode_round"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-05T00:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1500",
|
|
"timestamp": "2026-08-06T00:00:00Z",
|
|
"error_message": "test_run_processes_multiple_sessions_in_order_and_no_longer_returns_enosys FAIL: Expected 5000 Was 743938186628040 (a raw-looking CLOCK_MONOTONIC nanosecond value, not the fixture's own beginRound).",
|
|
"file": "src/scheduler/testsuite/test_sim_event_loop.c",
|
|
"root_cause": "The test's fixture-building helper called the real sched_record_start() THEN sched_record_stop() to produce a valid header+snapshot prefix (matching test_sim_startup.c's own write_valid_fixture() precedent), then re-opened the same path in append mode ('a') to hand-write additional ReplayEvent/ReplaySession messages after it. But sched_record_stop() (recording.c) unconditionally writes its OWN ReplayEvent{endSession} marker immediately after the snapshot as part of every completed recording (Req 5 AC 20) -- so the fixture already contained a premature end-of-stream marker BEFORE any of the test's own appended events/sessions. sched_sim_driver_run()'s event loop (sim_loop.c, task 11.2) correctly treats ReplayEvent{endSession} as the whole-stream termination signal and stopped reading right there, leaving sim->core's clock at its xce_sched_core_init() default (virtual_clock_base=0, speed_num=1, speed_den=1 -- AC 3's normal-mode row), so xce_core_now() returned an unfrozen, elapsed-wall-clock-driven value instead of the intended frozen 5000.",
|
|
"fix": "Changed the fixture helper to call ONLY sched_record_start() (never sched_record_stop()), and return the STILL-OPEN FILE* (sched.record_file) so the test appends its own hand-built events/sessions directly onto the same open stream, ending with its own append_end_of_stream_marker() call, then fclose()s it directly -- bypassing sched_record_stop()'s real event/session-recording API entirely for this hand-built-fixture use case.",
|
|
"tags": [
|
|
"scheduler-core",
|
|
"task-11.2",
|
|
"sim_loop.c",
|
|
"test-fixture",
|
|
"sched_record_stop",
|
|
"ReplayEvent_body_endSession",
|
|
"premature-termination-marker"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-06T00:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1501",
|
|
"timestamp": "2026-08-07T00:00:00Z",
|
|
"error_message": "gcc: 'expected =, ,, ;, asm or __attribute__ before is' / 'unknown type name is' / 'missing terminating character' cascade starting at sim_verify.c:59, plus 'implicit declaration of function sim_verify_str_eq' further down.",
|
|
"file": "src/scheduler/src/sim_verify.c",
|
|
"root_cause": "File header doc comment's Comparison-strategy paragraph wrote the literal text 'xce_job_alloc_t*/xce_pendreason_t*' to mean 'an xce_job_alloc_t pointer or an xce_pendreason_t pointer' -- the '*/' substring is C's block-comment CLOSE token, so the /* ... */ doc comment terminated early, right in the middle of prose. Everything from that point until the next real */ (the following function's own closing delimiter) was parsed as C code, producing a cascade of nonsense syntax errors and, once the compiler resynced, an implicit-declaration warning/error for a function whose real prototype/definition had been swallowed into the truncated comment. Exact recurrence of the bug-1493 pattern already logged for typemap.h (same 'accidental */ in a C block comment' root cause).",
|
|
"fix": "Reworded to 'xce_job_alloc_t* or xce_pendreason_t*' (space before 'or' instead of a bare slash-star-slash-adjacent sequence), eliminating the literal '*/' substring. Ran a repo grep for the same '[A-Za-z_]*/[A-Za-z_]' pattern across both new/modified files (sim_verify.c, sim_loop.c) before rebuilding to rule out a second occurrence.",
|
|
"tags": [
|
|
"scheduler-core",
|
|
"task-11.4",
|
|
"sim_verify.c",
|
|
"block-comment",
|
|
"accidental-comment-close",
|
|
"bug-1493-recurrence",
|
|
"build-failure"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1493"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-07T00:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1502",
|
|
"timestamp": "2026-08-07T00:00:00Z",
|
|
"error_message": "Task 11.5 review round 1 REJECTED: previous implementer's self-reported RED-phase evidence (git stash of 4 'behavioral production files' -> 3 tests failing under meson test) did not reproduce -- reviewer got a hard ninja build failure instead (test_sim_event_loop.c:467 calling sim_process_replay_event_message with 5 args against a stashed-back 4-arg sim_loop.c declaration).",
|
|
"file": "src/scheduler/src/sim_loop.c",
|
|
"root_cause": "git stash scoped to only 4 production files silently desyncs test files (which already call the NEW post-task-11.5 signatures/behavior) against the stashed-back OLD production code -- a stash-based RED probe is not a valid methodology whenever tests and production code changed together in the same commit-to-be. The previous implementer's reported failure counts were therefore not reproducible as described.",
|
|
"fix": "Replaced the stash approach with a direct, targeted, in-place temporary edit of ONLY the behavioral logic inside sim_loop.c (never touching test files, sim_record.c, sim.c/sim.h, recording_session.c/recording.h, or either meson.build): hardcoded event_src to sim->replay_file (defeats AC16 what-if branching) and wrapped the 3 --sim-output write gates (header/snapshot, event pass-through, session-write via record_ctx) in 'if (0 && ...)' no-ops (defeats AC19). Rebuilt+ran `meson test -C xce.build --suite scheduler`: real RED = 30/32, sched_sim_alt_events_test and sched_sim_record_output_test FAIL with concrete assertion messages. Reverted all 4 edits using the exact original text; confirmed via `git diff src/scheduler/src/sim_loop.c` that only the original (pre-probe) task-11.5 diff remained, no probe residue (grep for 'TEMP RED-PHASE PROBE' and 'if (0 &&' both zero matches). Rebuilt+reran: 32/32 green again.",
|
|
"tags": [
|
|
"scheduler-core",
|
|
"task-11.5",
|
|
"sim_loop.c",
|
|
"red-phase-evidence",
|
|
"review-rejection",
|
|
"git-stash-pitfall",
|
|
"methodology"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-07T00:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1503",
|
|
"timestamp": "2026-08-07T03:11:00Z",
|
|
"error_message": "AddressSanitizer: attempting free on address which was not malloc()-ed, inside free_QueueConf() <- free_QueueConf_ptr() <- release_translated_payload() (driver.c) <- xce_sched_driver_translate_pending_events(). Crashing pointer was 56 bytes inside a 61-byte region allocated by makeString()->makeInstance().",
|
|
"file": "src/scheduler/testsuite/test_sim_equivalence.c",
|
|
"root_cause": "makeString() (lib/xstring.c) is backed by the vendored rtti library makeInstance() allocator, which does NOT return a plain malloc()-compatible pointer at offset 0 of its allocation (it returns a pointer into a larger rtti-managed block). Elsewhere in the codebase makeString()-allocated strings are safe because they are only ever released by the SAME rtti-aware teardown path that created them (e.g. kill_sched_* killers, or never freed at all in white-box test fixtures). This new test constructed xce_queue_t/xce_job_t fixtures with q->queue/submit->queue/user/project_name/resreq set via makeString(), then drove them through the REAL production cleanup path release_translated_payload() (driver.c), whose free_QueueConf_ptr()/free_Job_ptr() (controller.capnp.c, capnp-generated) call plain free() on those fields directly -- exactly the mismatch: an rtti-backed allocation freed via plain free().",
|
|
"fix": "Replaced every makeString() call used to populate xce_queue_t.queue / xce_job_t.submit->{queue,user,project_name,resreq} in test_sim_equivalence.c with strdup(), which returns a plain malloc()-compatible buffer safe for free_QueueConf_ptr()/free_Job_ptr() to free directly. Confirmed clean (no ASan bad-free) after the fix, full scheduler suite (33/33) green.",
|
|
"tags": [
|
|
"scheduler-core",
|
|
"makeString",
|
|
"strdup",
|
|
"asan",
|
|
"bad-free",
|
|
"driver.c",
|
|
"task-11.6"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-07T03:11:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1504",
|
|
"timestamp": "2026-08-07T08:00:00Z",
|
|
"error_message": "sched_sim_startup_test SIGSEGV in write_SnapshotData (lib/controller.capnp.c) -- deterministic crash inside libCapnC_Runtime's read_ptr/capn_setp, discovered during scheduler-core task 12.1 review remediation (full clean rebuild needed for a libedit dependency swap).",
|
|
"file": "src/schema/controller.capnp",
|
|
"root_cause": "SnapshotData.internalState was declared `:Data` in the capnp schema. This codebase's capnpc-c backend silently no-ops Data-field encoding inside generated encode_XXX() composite helpers (documented, deliberate limitation -- see controller.capnp's own prior comment citing ReplayHeader.configHash). But encode_SnapshotData_ptr()'s local `struct SnapshotData d;` is never zero-initialized before the (partially no-op) encode_SnapshotData() populates it, so the skipped Data field's capn_ptr is left as UNINITIALIZED STACK GARBAGE. write_SnapshotData() then unconditionally capn_setp()'s that garbage onto the wire. This is genuine UB: whether it crashes depends entirely on what garbage bytes land in that stack slot at each call site -- ReplayHeader.configHash has the identical gap but never crashed (lucky garbage); SnapshotData.internalState's stack layout in this one test's call chain was unlucky. A prior 'rm -rf xce.build' full rebuild (needed to pick up a new nix dependency) perturbed the whole binary's layout enough to flip this from dormant to a deterministic, reproducible SIGSEGV.",
|
|
"fix": "Changed SnapshotData.internalState from `Data` to `List(UInt8)` in controller.capnp, with a new companion internalStateLen (@11, UInt32) wire field for the maplistcount -- following the exact working precedent of FetchFileReply.content/bytesRead, which this same capnpc-c backend DOES correctly auto-generate real (non-no-op) encode/decode for (capn_new_list8/capn_set8 loop, not a placeholder comment). Updated typemap.h's sched_snapshot_data_t.internal_state_len from size_t to uint32_t to match the wire type, and updated test_e2e_capnp.c's test_snapshot_data_round_trip (which previously worked around the Data no-op with a manual low-level SnapshotData_get/set_internalState accessor) to rely on the now-working ordinary codec bridge instead. No hand-written low-level accessor code needed any more for this field.",
|
|
"tags": [
|
|
"scheduler-core",
|
|
"task-12.1",
|
|
"capnp-schema",
|
|
"codegen-limitation",
|
|
"sigsegv",
|
|
"uninitialized-memory",
|
|
"controller.capnp",
|
|
"snapshot"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1493",
|
|
"bug-1505"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-07T08:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1505",
|
|
"timestamp": "2026-08-07T08:10:00Z",
|
|
"error_message": "controller_unit_test SIGSEGV in write_WalCatchupEntry (lib/controller.capnp.c), test_wal_catchup_append_term_fields_round_trip -- discovered incidentally while chasing bug-1504; NOT fixed, logged for its own follow-up.",
|
|
"file": "src/schema/controller.capnp",
|
|
"root_cause": "Same root cause as bug-1504 (Data-field codegen no-op leaves an uninitialized stack capn_ptr in the generated encode_XXX_ptr()'s local struct), a DIFFERENT field: WalCatchupEntry.payload (@2: Data), in the controller's HA/WAL-catchup subsystem (bug-847's own territory -- see controller.capnp's comment there), entirely unrelated to scheduler-core. Confirms this is a systemic, project-wide bug class affecting every `:Data` field in controller.capnp whose bytes are populated via the generic encode_XXX()/write_XXX() composite pipeline rather than fully hand-written low-level accessor code -- not a one-off. Known/suspected other Data fields with the same latent gap: ReplayHeader.configHash (dormant so far, no real consumer), CtrlHelloRequest.key, and possibly others not yet audited.",
|
|
"fix": "FIXED 2026-08-07. Investigated production exposure first: xce_wal_batch_encode_raw()/wal_entry_to_wire() (request.c) never call the generic encode_WalCatchupEntry() at all -- they memset() their own struct and call write_WalCatchupEntry() directly with every field hand-set, deliberately leaving payload unset (bug-847's own comment). So this bug was 100% test-only exposure, zero production risk, confirmed by grepping every caller of encode_WalCatchupEntry_ptr/decode_WalCatchupEntry (only test_e2e_capnp.c uses the generic path). Fix: same as bug-1504 -- changed WalCatchupEntry.payload (@2) and batchPayloads (@10) from Data to List(UInt8) in controller.capnp, with batchPayloadsLen (@11, new) as batchPayloads' maplistcount companion (payload reuses the existing wirePayloadLen @9). Verified batchPayloads' own top-level-single-blob shape means this does not reintroduce bug-847's per-element cross-segment far-pointer loss (that issue is inherent to PER-ELEMENT data regardless of Data vs List(UInt8) spelling -- payload, the per-element field, was already legacy/unpopulated in production before this fix and stays that way; batchPayloads is single top-level, never subject to that issue either way). Updated typemap.h's wal_catchup_entry_t field types (xce_data_t* -> uint8_t*, new batch_payloads_wire_len). Fixed request.c's extract_data_bytes() to accept a raw capn_ptr instead of capn_data (it already only ever used .p internally) so all 4 call sites (WalCatchupEntry.payload/batchPayloads, SnapshotTransfer.payload, per-sub-entry we.payload) work regardless of which Data-shaped wrapper type the accessor returns. Strengthened test_wal_catchup_append_term_fields_round_trip (test_e2e_capnp.c) with real payload/batchPayloads content assertions (previously never exercised at all, since the test's src.payload/batch_payloads were left NULL). Verified: controller_unit_test no longer crashes (3/3 controller suite), scheduler suite unaffected (37/37, unrelated schema area).",
|
|
"tags": [
|
|
"controller",
|
|
"ha",
|
|
"wal-catchup",
|
|
"capnp-schema",
|
|
"codegen-limitation",
|
|
"sigsegv",
|
|
"uninitialized-memory",
|
|
"controller.capnp",
|
|
"deferred",
|
|
"systemic"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1504",
|
|
"bug-847"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-07T09:15:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1506",
|
|
"timestamp": "2026-08-07T09:05:00Z",
|
|
"error_message": "sched_repl_breakpoints_inspection_test: repl_dispatch(sim, \"break JOB_STATE_CHANGE jobid=12345\") stored NULL for the breakpoint's token/filter key/value -- TEST_ASSERT_EQUAL_STRING(\"jobid\", ...) failed with 'Expected jobid Was NULL'.",
|
|
"file": "src/scheduler/testsuite/test_repl_breakpoints_inspection.c",
|
|
"root_cause": "makeString() (src/lib/xstring.c) is an interned-xstring allocator backed by a process-global xstr_table that must be initialized via xstring_table_init() before first use -- xce_sched_core_init() (core.c) is the only call site in the scheduler tree and does this transitively. New task 12.2 unit tests built a bare xce_sched_sim_driver_t via memset(0) and called repl_state_ensure()/repl_dispatch() directly for pure command-dispatch tests, without ever calling xce_sched_core_init() first (the real driver flow always does, via sched_sim_driver_start() before xce_repl_start() runs, so this precondition is always satisfied in production -- only the test fixtures skipped it). With xstr_table uninitialized (NULL), makeString()'s internal key_find()/key_add() against a NULL kvmgr container fail gracefully and return NULL rather than crash, so the bug surfaced as silently-NULL breakpoint fields, not an immediate crash.",
|
|
"fix": "Added xce_sched_core_init(&(sim.core)) as the first statement (right after memset) in every Group A/B test in test_repl_breakpoints_inspection.c that calls repl_dispatch()'s break/delete commands or the repl_break.c matcher functions -- matching the real driver's own precondition ordering.",
|
|
"tags": [
|
|
"scheduler-core",
|
|
"task-12.2",
|
|
"repl",
|
|
"xstring",
|
|
"test-fixture",
|
|
"makeString"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1507"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-07T09:05:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1507",
|
|
"timestamp": "2026-08-07T09:10:00Z",
|
|
"error_message": "sched_repl_breakpoints_inspection_test: 'free(): invalid pointer' SIGABRT inside repl_breakpoint_free(), reached from repl_cmd_break()'s malformed-filter rejection path (\"break JOB_PUSH nofiltermark\"). gdb backtrace: malloc_printerr <- repl_breakpoint_free (repl_break.c:375) <- repl_cmd_break <- repl_dispatch <- test_break_malformed_filter_rejected.",
|
|
"file": "src/scheduler/src/repl_break.c",
|
|
"root_cause": "repl_breakpoint_free() called FREEUP() (a bare free()) on bp->token and each filter's key/value, all of which are makeString()-produced xstrings -- RTTI reference-counted objects (src/lib/xstring.c: xstring_type has custom .reference/.dereference interface functions; the returned pointer is the object's DATA region inside an RTTI-managed allocation, not a plain malloc() chunk). Releasing one requires going through the RTTI dereference path (xstring_dereference(), which only fires the real free when the refcount hits zero via the owning kvtab's key_del), never a bare free(). This codebase's own kill_sched_job()/kill_sched_queue() (schedobj.c) establish the identical precedent for every other makeString()'d field in the scheduler tree (xce_sched_job_t.submit fields, xce_sched_queue_t.name, etc.): none of them are ever explicitly released either -- they live for the process's lifetime, matching this whole test suite's 'detect_leaks=0 by design' convention. My new repl_break.c code was the first place in this file family to call free() directly on a makeString() result.",
|
|
"fix": "Removed the FREEUP() calls on bp->token/filters[i].key/filters[i].value from repl_breakpoint_free() (repl_break.c) -- it now only frees the plain calloc'd bp->filters array and bp itself, matching kill_sched_job()/kill_sched_queue()'s established never-release-xstrings precedent. Updated repl_internal.h's xce_repl_filter_t doc comment to state this explicitly so a future maintainer doesn't reintroduce the same free() on an RTTI-managed pointer.",
|
|
"tags": [
|
|
"scheduler-core",
|
|
"task-12.2",
|
|
"repl",
|
|
"xstring",
|
|
"heap-corruption",
|
|
"free",
|
|
"rtti"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1506"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-07T09:10:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1508",
|
|
"timestamp": "2026-08-08T00:00:00Z",
|
|
"error_message": "No user report / no test failure -- discovered incidentally during doc-cleanup fact-check audit of src/docs/job_peek.md against current code.",
|
|
"file": "src/worker/src/xcecd_worker.c (handle_fetchfile, jobs-peek fetchfile feature)",
|
|
"root_cause": "job_peek.md's design called for worker-side security validation on the fetchfile RPC (jobid ownership check, out/err-file path match against the job's actual output paths, path-traversal rejection) before Plan B (CGO/FetchFile) shipped. The validation was never implemented -- handle_fetchfile() opens whatever path it is given with no ownership or path-traversal check.",
|
|
"fix": "NOT FIXED -- out of scope for the doc-cleanup task that found it. Flagged to user as a follow-up; needs its own security-reviewer pass on handle_fetchfile() (job ownership check + path-traversal rejection, matching the validation job_peek.md originally specified).",
|
|
"tags": [
|
|
"security",
|
|
"path-traversal",
|
|
"fetchfile",
|
|
"worker",
|
|
"jobs-peek",
|
|
"needs-fix"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-08T00:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1509",
|
|
"timestamp": "2026-08-10T07:34:55.093767+00:00",
|
|
"error_message": "extralib flake dependency pulls external repo for trivial linked-list code used only by autoscaler scaler.h",
|
|
"file": "src/flake.nix,src/nixSupport/xce.nix,src/autoscaler/scaler/include/scaler.h",
|
|
"root_cause": "basiclib/list.h (xcelist_t + list_insert_entry_back) is the only consumer; can be vendored locally in ~30 lines.",
|
|
"fix": "Port xcelist_t/xcelist_entry_t/list_insert_entry_back to local basic_list.h in autoscaler, remove extralib from flake.nix inputs and xce.nix nativeBuildInputs. ~40 min effort.",
|
|
"tags": [
|
|
"tech-debt",
|
|
"build",
|
|
"nix",
|
|
"low-risk"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-10"
|
|
},
|
|
{
|
|
"id": "bug-1510",
|
|
"timestamp": "2026-08-10T13:07:36.020Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/component-failover-adoption/design.md",
|
|
"root_cause": "Had `hardware_monitor`",
|
|
"fix": "Changed to `worker_process_update()`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-08-10T13:07:50.958Z"
|
|
},
|
|
{
|
|
"id": "bug-1511",
|
|
"timestamp": "2026-08-10T13:09:14.910Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": ".kiro/specs/component-failover-adoption/design.md",
|
|
"root_cause": "2 lines replaced/restructured",
|
|
"fix": "Rewrote 3\u21924 lines (2 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-10T13:09:14.910Z"
|
|
},
|
|
{
|
|
"id": "bug-1512",
|
|
"timestamp": "2026-08-10T13:10:14.229Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": ".kiro/specs/component-failover-adoption/requirements.md",
|
|
"root_cause": "8 lines replaced/restructured",
|
|
"fix": "Rewrote 21\u21927 lines (8 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-10T13:10:14.229Z"
|
|
},
|
|
{
|
|
"id": "bug-1513",
|
|
"timestamp": "2026-08-10T13:47:21.938Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": ".kiro/specs/component-failover-adoption/tasks.md",
|
|
"root_cause": "2 lines replaced/restructured",
|
|
"fix": "Rewrote 6\u21926 lines (2 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-10T13:47:21.938Z"
|
|
},
|
|
{
|
|
"id": "bug-1514",
|
|
"timestamp": "2026-08-10T18:46:00.000Z",
|
|
"error_message": "kiro-validate-design Critical Issue 1: design.md claims sched_job_picker/sched_allocator are 'unaffected' by a blocked xcecli_jobdispatch call, violating Req 3 AC1",
|
|
"file": ".kiro/specs/component-failover-adoption/design.md, tasks.md, research.md",
|
|
"root_cause": "design.md/tasks.md/research.md all wrongly claimed xcecli_jobdispatch executes on the sched_allocator thread. Verified against source: it actually runs on scheduler.c's main driver-loop thread (main.c while(1) -> xce_sched_driver_run_normal_mode_round -> driver.c on_decision -> sched_publish_dispatch, scheduler.c:1257), reached only after draining the decisions cbuf (capacity 5). sched_allocator only produces into decisions; it never calls xcecli_jobdispatch. jbuf (picker->allocator handoff) is a fixed capacity-1 scheduler-core invariant (core.c:161, never resizable). So a blocked dispatch call backpressures through decisions (5 slots) then jbuf (1 slot) -- picker/allocator get a bounded ~6-job grace window, then both stall. Not full isolation as originally claimed.",
|
|
"fix": "Corrected thread attribution and rejoin-call placement in design.md (SchedulerControllerClient section, sequence diagram note, traceability table) and tasks.md (task 3.1/3.2) to point at sched_publish_dispatch/main-loop thread instead of sched_allocator. Documented the real bounded-buffering model (jbuf cap 1 + decisions cap 5 = ~6-job grace window). Added a Req 3 AC1 scope-narrowing note as a Validation Hook -- flagged for human sign-off on requirements.md, not edited directly (requirements phase already approved). Corrected the same wrong claim at its source in research.md (lines 22, 30, 84).",
|
|
"tags": [
|
|
"design-review",
|
|
"thread-model",
|
|
"kiro-validate-design",
|
|
"scheduler",
|
|
"critical-issue"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-10T18:46:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1515",
|
|
"timestamp": "2026-08-10T20:20:00.000Z",
|
|
"error_message": "/goal-driven deep re-review of component-failover-adoption requirements.md+design.md found 5 additional distinct defects after bug-1514's fix, several introduced by bug-1514's own Req 7 fix",
|
|
"file": ".kiro/specs/component-failover-adoption/requirements.md, design.md, tasks.md, research.md",
|
|
"root_cause": "(1) Req 3 AC2's '~6-job grace window' was stated as 'at least 6' (a floor) when 6 is actually the best-case ceiling; the real guaranteed floor is 1-2 depending on decisions-cbuf occupancy at the moment of stall -- direction of the bound was backwards. (2) Citation scheduler.c:1253 for sched_publish_pend_reason was off by 2 (actual line 1251). (3) Cross-cutting: the shared 'check and clear needs_rejoin, then call xcecli_join' pattern (worker/scheduler/apiserver) cleared the flag unconditionally rather than only on xcecli_join's own success -- since xcecli_join is itself XCECLI_FAILOVER_CALL-wrapped and can hit its own retry-budget exhaustion, this could leave a component transport-connected but permanently un-joined with nothing left to retry (no requirement/design text previously covered this). (4) The Req 7 scheduler decision-publish retry loop only checked core.stop in the while-condition (after each attempt), so multiple decisions queued behind a stuck one would each burn a full ~100s budget cycle discovering shutdown was requested, compounding shutdown latency to minutes instead of the claimed ~1-2 min bound. (5) While fixing (3) for apiserver's heartbeat-idle-path, the first draft gated the retry on ApiserverBackendHealth.IsDegraded() -- but that state has its own independent TTL-based auto-clear for circuit-breaker purposes; if the TTL expired before an actual rejoin succeeded, the retry would silently stop, reintroducing the exact starvation bug (3) was fixing. Two unrelated state machines (rejoin-tracking vs request-path circuit-breaker) had been conflated onto one flag.",
|
|
"fix": "(1) Reworded Req 3 AC2 and all design.md/research.md/tasks.md echoes to state the guarantee qualitatively (bounded, occupancy-dependent, resumes with zero loss per Req 7) instead of a wrong fixed number. (2) Fixed the line citation. (3) Added Requirement 2 AC5 (rejoin retry-on-failure, applies to all three components) and updated the shared 'Rejoin callback constraint' section plus all three component sections in design.md and their tasks.md task bullets to clear the flag only on xcecli_join success. (4) Changed the Req 7 retry loop from do/while to while (check core.stop before each attempt, not only after) so only the actively in-flight decision can cost a full budget cycle; queued decisions behind it skip immediately once stop is set. (5) Introduced a dedicated needs_rejoin flag for apiserver's heartbeat path (set on transition, cleared only on join success) fully decoupled from ApiserverBackendHealth's TTL-governed degraded state; updated the sequence diagram, prose, and tasks.md task 4.4 accordingly, plus an explicit note in ApiserverBackendHealth's section warning against this conflation. Also added Req 7 AC6 documenting that the fix does not survive a scheduler process crash/restart (in-memory only, no persistence).",
|
|
"tags": [
|
|
"design-review",
|
|
"goal-loop",
|
|
"requirements-math-error",
|
|
"rejoin-retry",
|
|
"shutdown-latency",
|
|
"state-conflation",
|
|
"scheduler",
|
|
"apiserver",
|
|
"worker"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1514"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-10T20:20:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1516",
|
|
"timestamp": "2026-08-11T11:35:00.157Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/scheduler/testsuite/meson.build",
|
|
"root_cause": "2 lines replaced/restructured",
|
|
"fix": "Rewrote 5\u219212 lines (2 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"build"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-11T11:35:00.157Z"
|
|
},
|
|
{
|
|
"id": "bug-1517",
|
|
"timestamp": "2026-08-11T11:35:50.895Z",
|
|
"error_message": "Wrong reference: true should be false",
|
|
"file": "src/scheduler/src/scheduler.c",
|
|
"root_cause": "Used \"true\" instead of \"false\"",
|
|
"fix": "Changed true \u2192 false",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-08-11T11:36:52.523Z"
|
|
},
|
|
{
|
|
"id": "bug-1518",
|
|
"timestamp": "2026-08-11T12:22:54.348Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/scheduler/src/scheduler.c",
|
|
"root_cause": "2 lines replaced/restructured",
|
|
"fix": "Rewrote 7\u219211 lines (2 removed) | Also: ERROR(\"%s: xcecli_join() failed across %d candidat; __func__, sched->cluster_cfg.candidates_count, rc)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-08-11T12:23:00.675Z"
|
|
},
|
|
{
|
|
"id": "bug-1519",
|
|
"timestamp": "2026-08-11T12:49:17.815Z",
|
|
"error_message": "==ERROR: AddressSanitizer: Joining already joined thread, aborting.",
|
|
"file": "src/worker/src/main.c (xcecd daemon startup)",
|
|
"root_cause": "UNRESOLVED / not root-caused. xcecd's root check (main.c:288 geteuid()!=0) was bypassed for sandbox testing via `unshare -r` (user-namespace fake root, euid=0 but not real root). Startup then immediately hit an ASAN double-pthread_join abort during/after the HA-cluster-config init log line (main.c:435), before any further logging. Never reproduced under real root -- unknown whether this is a genuine double-join bug in xcecd's daemonize/thread-spawn path (e.g. duplicate cleanup on an early-init error branch) or an artifact of unshare's user-namespace semantics (e.g. a syscall xcecd's threading depends on behaving differently under CLONE_NEWUSER, such as thread creation ordering or signal delivery). Blocked further component-failover-adoption Task 3.3 Item-3 E2E validation from getting a live worker registered, which in turn meant no real job ever produced a scheduler decision (picker/allocator never had a matching candidate to dispatch to or explicitly PEND against), so the scheduler's decision-publish/rejoin code path (task 3.2) could not be exercised via a fully live job in this sandbox.",
|
|
"fix": "Not fixed -- out of scope for Task 3.3 (which validates scheduler HA reconnect, not worker daemon startup). Worked around by validating scheduler join/failover/reconnect behavior via direct socket-state inspection (ss/proc fd) instead of a full live job pipeline; the decision-publish retry+rejoin logic itself already has white-box unit coverage from task 3.2 (test_scheduler_decision_publish_retry.c) and task 3.3 item 2 (test_scheduler_backpressure.c). If a future session needs a live worker in this sandbox, retry under real root (not unshare -r) first to isolate whether this is userns-specific.",
|
|
"tags": [
|
|
"asan",
|
|
"double-join",
|
|
"worker",
|
|
"xcecd",
|
|
"unshare",
|
|
"sandbox-environment",
|
|
"unresolved",
|
|
"component-failover-adoption"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-11T12:49:17.815Z"
|
|
},
|
|
{
|
|
"id": "bug-1520",
|
|
"timestamp": "2026-08-11T13:05:01.694Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/scheduler/src/scheduler.c",
|
|
"root_cause": "3 lines replaced/restructured",
|
|
"fix": "Rewrote 12\u219210 lines (3 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-11T13:05:01.694Z"
|
|
},
|
|
{
|
|
"id": "bug-1521",
|
|
"timestamp": "2026-08-11T13:14:08.399Z",
|
|
"error_message": "Wrong reference: test_sched_init_no_peers_default_also_fails_cleanly should be test_all_candidates_unreachable_log_names_every_candidate_host_port",
|
|
"file": "src/scheduler/testsuite/test_scheduler_connect.c",
|
|
"root_cause": "Used \"test_sched_init_no_peers_default_also_fails_cleanly\" instead of \"test_all_candidates_unreachable_log_names_every_candidate_host_port\"",
|
|
"fix": "Changed test_sched_init_no_peers_default_also_fails_cleanly \u2192 test_all_candidates_unreachable_log_names_every_candidate_host_port",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-11T13:14:08.399Z"
|
|
},
|
|
{
|
|
"id": "bug-1522",
|
|
"timestamp": "2026-08-11T13:14:51.964Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/scheduler/testsuite/test_scheduler_connect.c",
|
|
"root_cause": "4 lines replaced/restructured",
|
|
"fix": "Rewrote 11\u219221 lines (4 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-11T13:14:51.964Z"
|
|
},
|
|
{
|
|
"id": "bug-1523",
|
|
"timestamp": "2026-08-11T14:34:18.839Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/scheduler/testsuite/test_scheduler_decision_redelivery.c",
|
|
"root_cause": "2 lines replaced/restructured",
|
|
"fix": "Rewrote 6\u21927 lines (2 removed) | Also: * Fixtures call xce_sched_core_init()/xce_sched_co; * the full sched_init()) -- the same minimal-fixtu",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-08-11T14:35:21.798Z"
|
|
},
|
|
{
|
|
"id": "bug-1524",
|
|
"timestamp": "2026-08-11T14:37:43.571Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/scheduler/src/scheduler.c",
|
|
"root_cause": "5 lines replaced/restructured",
|
|
"fix": "Rewrote 26\u219227 lines (5 removed) | Also: /* TEMPORARY RED-PHASE PROBE #2 (task 3.4 evidence; * immediately after use) -- core.stop checked only",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-08-11T14:38:28.503Z"
|
|
},
|
|
{
|
|
"id": "bug-1525",
|
|
"timestamp": "2026-08-11T23:39:27.643Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/scheduler/src/scheduler.c",
|
|
"root_cause": "15 lines replaced/restructured",
|
|
"fix": "Rewrote 27\u219211 lines (15 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-11T23:39:27.643Z"
|
|
},
|
|
{
|
|
"id": "bug-1526",
|
|
"timestamp": "2026-08-11T23:49:56.443Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": ".kiro/specs/component-failover-adoption/tasks.md",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-11T23:49:56.443Z"
|
|
},
|
|
{
|
|
"id": "bug-1527",
|
|
"timestamp": "2026-08-12T02:41:37.052Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/frontend/apiserver/backend/clib.go",
|
|
"root_cause": "6 lines replaced/restructured",
|
|
"fix": "Rewrote 21\u219226 lines (6 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"go"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-12T02:41:37.052Z"
|
|
},
|
|
{
|
|
"id": "bug-1528",
|
|
"timestamp": "2026-08-12T02:41:56.690Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/frontend/apiserver/backend/config.go",
|
|
"root_cause": "4 lines replaced/restructured",
|
|
"fix": "Rewrote 5\u21928 lines (4 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"go"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-12T02:41:56.690Z"
|
|
},
|
|
{
|
|
"id": "bug-1529",
|
|
"timestamp": "2026-08-12T03:09:17.720Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/frontend/apiserver/backend/candidates.go",
|
|
"root_cause": "13 lines replaced/restructured",
|
|
"fix": "Rewrote 40\u219274 lines (13 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"go"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-12T03:09:17.721Z"
|
|
},
|
|
{
|
|
"id": "bug-1530",
|
|
"timestamp": "2026-08-12T04:33:27.866Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/component-failover-adoption/tasks.md",
|
|
"root_cause": "Had `scheduler.c`",
|
|
"fix": "Changed to `xce_parse_peers()`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-12T04:33:27.866Z"
|
|
},
|
|
{
|
|
"id": "bug-1531",
|
|
"timestamp": "2026-08-12T07:05:08.345Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/frontend/apiserver/backend/clib.go",
|
|
"root_cause": "40 lines replaced/restructured",
|
|
"fix": "Rewrote 83\u2192229 lines (40 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"go"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-12T07:05:08.345Z"
|
|
},
|
|
{
|
|
"id": "bug-1532",
|
|
"timestamp": "2026-08-12T00:20:00.000Z",
|
|
"error_message": "apiserver clib.go tryConnect(): use-after-free on ctx->conf->masters[i] (host address string) on every post-initial-connect failover rotation attempt",
|
|
"file": "src/frontend/apiserver/backend/clib.go",
|
|
"root_cause": "tryConnect() allocated cAddr/cFrom/cKey via C.CString(), built a Go-function-local xce_client_config_t pointing at them, called xce_backend_init() once, then deferred C.free() on all three strings immediately after that single call returned. xcecli_ctx_init() (src/lib/client.c) stores ctx->conf = cfg as a RAW pointer (never copies the struct), and client_failover.c dereferences ctx->conf->masters[cur_master] on EVERY subsequent failover rotation attempt (client_failover.c:120,386), not just the initial connect -- so any reconnect/rotation after the first tryConnect() call returned read freed memory. A second, independent hazard: cConfig itself was a Go-local var; ctx->conf retained a raw pointer to it invisible to Go GC once tryConnect() returned. (Note: from/key were NOT actually part of this UAF -- xce_ctx_init() strdup()s them immediately at ctx-init time, so freeing cFrom/cKey was safe in isolation; only the masters[] host string and the client_config_t struct address itself were genuinely unsafe.)",
|
|
"fix": "component-failover-adoption task 4.2: replaced tryConnect() and the dual Go-level connect loops entirely with buildClusterConfig()+RegisterToBackend(), backed by two new package-level (process-lifetime, GC-rooted) vars gClusterCfg (C.xce_cluster_config_t) and gClientCfg (C.xce_client_config_t). Host strings now live in gClusterCfg.candidates[i].hostname (fixed char[256] arrays, no CString/free at all -- xce_cluster_config_to_client_config() aliases pointers directly into this storage). from/key point at gClusterCfg.identity[0]/key[0] (also fixed arrays) rather than separate CStrings. No C.CString/C.free is used anywhere in the connect path except the transient peers-string argument to xce_parse_peers(), which is safely freed right after that one call since xce_parse_peers() copies into gClusterCfg internally.",
|
|
"tags": [
|
|
"use-after-free",
|
|
"cgo",
|
|
"apiserver",
|
|
"failover",
|
|
"component-failover-adoption",
|
|
"task-4.2"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-12T00:20:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1533",
|
|
"timestamp": "2026-08-12T07:46:01.677Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/component-failover-adoption/tasks.md",
|
|
"root_cause": "Had `scheduler.c`",
|
|
"fix": "Changed to 's two connect mechanisms into one \u2014 the deleted `",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-12T07:46:01.677Z"
|
|
},
|
|
{
|
|
"id": "bug-1534",
|
|
"timestamp": "2026-08-12T08:45:46.229Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/frontend/apiserver/backend/reconnect_test.go",
|
|
"root_cause": "3 lines replaced/restructured",
|
|
"fix": "Rewrote 9\u219214 lines (3 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"go"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-12T08:45:46.229Z"
|
|
},
|
|
{
|
|
"id": "bug-1535",
|
|
"timestamp": "2026-08-12T09:15:53.632Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/component-failover-adoption/tasks.md",
|
|
"root_cause": "Had `scheduler.c`",
|
|
"fix": "Changed to `go_backend_rejoin_handler`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-12T09:15:53.632Z"
|
|
},
|
|
{
|
|
"id": "bug-1536",
|
|
"timestamp": "2026-08-12T09:25:02.926Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/frontend/apiserver/backend/heartbeat.go",
|
|
"root_cause": "4 lines replaced/restructured",
|
|
"fix": "Rewrote 17\u219262 lines (4 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"go"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-12T09:25:02.926Z"
|
|
},
|
|
{
|
|
"id": "bug-1537",
|
|
"timestamp": "2026-08-12T09:25:33.041Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/frontend/apiserver/backend/clib.go",
|
|
"root_cause": "3 lines replaced/restructured",
|
|
"fix": "Rewrote 7\u219214 lines (3 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"go"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-12T09:25:33.041Z"
|
|
},
|
|
{
|
|
"id": "bug-1538",
|
|
"timestamp": "2026-08-12T09:26:08.038Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/frontend/apiserver/backend/heartbeat_test.go",
|
|
"root_cause": "4 lines replaced/restructured",
|
|
"fix": "Rewrote 48\u2192214 lines (4 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"go"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-12T09:26:08.038Z"
|
|
},
|
|
{
|
|
"id": "bug-1539",
|
|
"timestamp": "2026-08-12T09:58:02.265Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/component-failover-adoption/tasks.md",
|
|
"root_cause": "Had `scheduler.c`",
|
|
"fix": "Changed to `runHeartbeat()`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-12T09:58:02.265Z"
|
|
},
|
|
{
|
|
"id": "bug-1540",
|
|
"timestamp": "2026-08-12T10:16:08.309Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/frontend/apiserver/backend/clib.go",
|
|
"root_cause": "2 lines replaced/restructured",
|
|
"fix": "Rewrote 23\u219295 lines (2 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"go"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-12T10:16:08.309Z"
|
|
},
|
|
{
|
|
"id": "bug-1541",
|
|
"timestamp": "2026-08-12T10:17:17.099Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/frontend/apiserver/backend/reconnect.go",
|
|
"root_cause": "4 lines replaced/restructured",
|
|
"fix": "Rewrote 16\u219226 lines (4 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"go"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-12T10:17:17.099Z"
|
|
},
|
|
{
|
|
"id": "bug-1542",
|
|
"timestamp": "2026-08-12T10:18:42.192Z",
|
|
"error_message": "health_rejoin_test.go referenced C.E_XCE_NOT_READY directly (via -int(C.E_XCE_NOT_READY)), which requires import \"C\" in a _test.go file -- illegal per golang/go#13938, would have failed to compile",
|
|
"file": "src/frontend/apiserver/backend/health_rejoin_test.go",
|
|
"root_cause": "Wrote a test helper that needed the -E_XCE_NOT_READY errno value, and reached for C.E_XCE_NOT_READY directly without recalling that _test.go files can never import \"C\" themselves (established project constraint, see clib_test.go/reconnect_test.go doc comments) -- caught before ever running go test, by re-reading the file before the first test run.",
|
|
"fix": "Exposed -E_XCE_NOT_READY as a plain Go int via a new package-level var in clib.go (a cgo file): notReadyRC = -int(C.E_XCE_NOT_READY). health_rejoin_test.go references notReadyRC instead of C.E_XCE_NOT_READY -- same plain-Go-signature test-seam pattern as performRejoinFn (reconnect.go, task 4.3).",
|
|
"tags": [
|
|
"go",
|
|
"cgo",
|
|
"test-file-restriction",
|
|
"import-C-in-test"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-12T10:18:42.192Z"
|
|
},
|
|
{
|
|
"id": "bug-1543",
|
|
"timestamp": "2026-08-12T10:20:03.350Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/frontend/apiserver/backend/reconnect_test.go",
|
|
"root_cause": "8 lines replaced/restructured",
|
|
"fix": "Rewrote 17\u219230 lines (8 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"go"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-12T10:20:03.350Z"
|
|
},
|
|
{
|
|
"id": "bug-1544",
|
|
"timestamp": "2026-08-12T10:51:41.466Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/component-failover-adoption/tasks.md",
|
|
"root_cause": "Had `sched_init()`",
|
|
"fix": "Changed to `callBackend()`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-12T10:51:41.466Z"
|
|
},
|
|
{
|
|
"id": "bug-1545",
|
|
"timestamp": "2026-08-12T12:21:30.458Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/component-failover-adoption/tasks.md",
|
|
"root_cause": "Had `sched_init()`",
|
|
"fix": "Changed to \"zero new code is a valid outcome when genuinely t",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-12T12:21:30.458Z"
|
|
},
|
|
{
|
|
"id": "bug-1546",
|
|
"timestamp": "2026-08-12T12:42:35.605Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "../../../../../../tmp/claude-1000/-home-rshen-projects-xce-worktrees-scheduler-framework/93f96538-d154-48c8-b92b-c8f9342a87cf/scratchpad/phase2_failover.sh",
|
|
"root_cause": "3 lines replaced/restructured",
|
|
"fix": "Rewrote 11\u219213 lines (3 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"sh"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-12T12:42:35.605Z"
|
|
},
|
|
{
|
|
"id": "bug-1547",
|
|
"timestamp": "2026-08-12T12:48:36.145Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "../../../../../../tmp/claude-1000/-home-rshen-projects-xce-worktrees-scheduler-framework/93f96538-d154-48c8-b92b-c8f9342a87cf/scratchpad/phase2_failover.sh",
|
|
"root_cause": "Had \"$TOP/logs/apiserver.stdout.log\"",
|
|
"fix": "Changed to \"$APISERVER_LOG\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"sh"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-08-12T12:48:46.153Z"
|
|
},
|
|
{
|
|
"id": "bug-1548",
|
|
"timestamp": "2026-08-12T12:59:31Z",
|
|
"error_message": "apiserver never re-registers (application-level xcecli_join with HostRole_apiserver) with the new primary after a live controller failover, even though its transport/write-call connectivity clearly recovers (job/host-control POSTs keep succeeding); observed for 10+ minutes and 20+ default-30s heartbeat ticks with zero occurrences of reconnect.go's own 'checkAndPerformRejoin: rejoin after transparent reconnect succeeded/failed' log lines in apiserver_out.log, across 3 separate write calls (2 job submits + 1 host control) issued after the primary was kill -9'd. TASK 5.2 UPDATE (2026-08-12, second independent live E2E reproduction, cleaner isolation): ran component-failover-adoption task 5.2's own scenario (apiserver-only, no worker/scheduler, 3-node controller cluster at localhost:19991-19993, apiserver -d /home/claude/tmp/xce-e2e-task52/apiserver) specifically to isolate the heartbeat-only idle-period path task 5.1's write-traffic-muddied run could not cleanly separate. Confirmed real election: ctrl-1 (primary, term=2) kill -9'd at 13:33:31Z; ctrl-2 promoted primary at term=3 within 9s (13:33:40Z, raft_cb_become_leader). Zero write requests issued for the full outage window: apiserver_out.log is BYTE-IDENTICAL (23 lines) from before the kill through 268s / ~9 heartbeat ticks after it (well past the task's 2-minute/3-4-tick minimum) -- zero occurrences of 'checkAndPerformRejoin'/'rejoin'/'needsRejoin'/'xcecli_join' anywhere. Diagnostic control issued only AFTER the observation window (13:39:52Z, ~6.5 min post-kill): POST /xce/v1/jobs/create succeeded with a real controller-assigned job ID (73930919093731328) and server-generated success message -- proving the transport had already reached the NEW primary (ctrl-2) -- yet this write call ALSO produced zero rejoin log lines, full apiserver_out.log grep for the same 4 terms still empty after it. This is strictly stronger evidence than task 5.1's: it directly demonstrates the write path's own XCECLI_FAILOVER_CALL/xcecli_invoke_rejoin also did not fire even when explicitly exercised, consistent with the transport having already been silently repaired by an earlier heartbeat tick's XCECLI_FF_CALL before the write call ever needed to retry -- exactly bug-1548's leading hypothesis, not merely 'consistent with' it as task 5.1 could only say. Corroborating bug-1549 downstream symptom also reproduced: GET /xce/v1/jobs immediately after the successful submit returned {\"count\":0,\"rows\":[]} -- the just-submitted job never reached apiserver's local store, consistent with apiserver never having actually re-issued xcecli_join(HostRole_apiserver) against ctrl-2. ctrl-2.log has no apiserver-join lines either direction (join.c logs only rejections, per task 5.1's prior finding -- reconfirmed, not independently informative here). Task 5.2's own observable-completion criterion ('the scenario passes without requiring any client-triggered write request during the outage window' -- i.e. apiserver rejoins and resumes push notifications via the heartbeat-triggered path alone) was NOT met: no rejoin evidence appeared at any point in the heartbeat-only window. Evidence preserved at /home/claude/tmp/xce-e2e-task52/ (apiserver/logs/apiserver_out.log, logs/ctrl-{1,2,3}.log, logon_response.json, diagnostic_job_submit_response.json, diagnostic_joblist_response.json, KILL_TIMESTAMP_UTC.txt, DIAGNOSTIC_CONTROL_START_UTC.txt, DIAGNOSTIC_CONTROL_SUBMIT_UTC.txt).",
|
|
"file": "src/frontend/apiserver/backend/reconnect.go, heartbeat.go, clib.go (component-failover-adoption task 4.3/4.4's checkAndPerformRejoin/needsRejoin mechanism)",
|
|
"root_cause": "NOT root-caused (out of task 5.1's E2E-validation boundary to fix). Leading hypothesis from live log analysis: XCECLI_FF_CALL (the fire-and-forget macro backing xcecli_heartbeat) can silently self-heal the TRANSPORT (rotate to a live candidate) entirely within a single heartbeat tick without that tick ever returning a failure to Go -- so heartbeat.go's prevFailed-edge detection (onFailureToSuccess) never observes a failure->success transition and never sets needsRejoin. Separately, none of the 3 post-kill write calls (which DO route through XCECLI_FAILOVER_CALL, which per design.md should invoke the rejoin callback mid-call on a genuine failover) show any evidence of having hit a failed connection either -- consistent with the connection having already been silently fixed by a prior heartbeat tick before any write call needed to retry, so XCECLI_FAILOVER_CALL's own rejoin-invoking path is also never exercised. Net effect: needsRejoin is never set by any path, so checkAndPerformRejoin() stays a permanent silent no-op and apiserver's push-registration (join) with the new primary is never renewed. Could not independently confirm via controller-side logs either way -- discovered during this same investigation that the controller's join.c only logs REJECTED/failed joins (WARN/ERROR), never a successful one at any verbosity, so controller logs are not usable evidence for this question in either direction. REVIEW UPDATE (task 5.1 review, 2026-08-12): confirmed via source read that XCECLI_FF_CALL (client_internal.h:290-302) never calls xcecli_invoke_rejoin under any circumstance -- this half of the hypothesis is not speculative, it's structurally true by construction. Elevated confidence this is a REPRODUCIBLE gap, not scenario-specific timing luck: since real elections in this codebase's own logs complete in single-digit seconds while the default heartbeat interval is 30s, a single heartbeat tick landing after the election has already completed will both discover the dead connection AND repair it within that same XCECLI_FF_CALL invocation -- the failure never surfaces to Go's heartbeat.go loop as a separate tick, so the cross-tick prevFailed-edge detection (onFailureToSuccess) structurally cannot observe it. This is likely to recur on MOST real single-election failovers, not just this run's specific timing -- materially risks Req 2 AC4 (component-failover-adoption requirements.md) in production. Recommend escalating past ordinary buglog cadence to a dedicated follow-up spec/task, given it affects the already-approved task 4.3/4.4 mechanism.",
|
|
"fix": "FIXED (component-failover-adoption tasks.md Phase 6, task 6.1). Root cause confirmed as hypothesized: XCECLI_FF_CALL (client_internal.h:290-302) can rotate+reconnect the transport entirely inside a single call, holding ac->failover.lock, and still return success -- so a failure->success transition on the caller's own return code is not a reliable 'a reconnect happened' signal whenever an election (single-digit seconds) completes faster than the 30s default heartbeat interval, which is the common case. Fix: added a monotonic `_Atomic uint64_t reconnect_gen` field to `endpoint_t` (src/include/netio.h:137), incremented unconditionally on the success path of `xce_ctx_reconnect()` (src/lib/xcectx.c:402) -- confirmed via repo-wide grep as the sole reconnect call-site reachable from `xce_failover_rotate()`, covering both the write-path retry loop and the heartbeat fire-and-forget path. apiserver's heartbeat.go `runHeartbeat()` now compares this generation on every tick (via the existing `xcecli_get_my_endpoint()` accessor, atomic-loaded through clib.go) instead of waiting for a failure->success transition, replacing the old detector entirely. Regression test `TestRunHeartbeat_IdlePeriodRecovery_GenChangeAloneSetsNeedsRejoinEvenWhenAllTicksSucceed` (heartbeat_rejoin_test.go) proves the fix's exact shape. Closed via live E2E re-run of task 5.2's scenario: rejoin fired 22s after primary kill (12s post-election) with zero write traffic for the preceding 5.5 minutes.",
|
|
"tags": [
|
|
"apiserver",
|
|
"rejoin",
|
|
"push-notification",
|
|
"failover",
|
|
"component-failover-adoption",
|
|
"task-5.1",
|
|
"heartbeat",
|
|
"live-e2e-finding",
|
|
"task-5.2",
|
|
"second-independent-repro",
|
|
"resolved"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-08-15T22:54:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1549",
|
|
"timestamp": "2026-08-12T12:59:31Z",
|
|
"error_message": "Jobs submitted via apiserver REST API (POST /xce/v1/jobs/create) never appear in apiserver's own job store (GET /xce/v1/jobs / GET /xce/v1/jobs/:id returns empty), even though the job is confirmed genuinely committed on the controller (verified directly via xce_test's `joblist` showing both jobs in PEND state). Reproduced for 2 jobs (one submitted at the moment of a primary kill, one submitted >1 minute after a clean new-primary failover) -- so this is NOT specific to the failover window, appears to be a general gap. By contrast, worker/host-list push (apiserver_push_workers/apiserver_push_workerlist, controller/apiserver.c) DOES work: GET /xce/v1/hosts correctly showed the live-joined worker with real data.",
|
|
"file": "src/controller/apiserver.c (apiserver_job_new_fun / apiserver_push_joblist hook), src/frontend/apiserver/backend/clib.go (go_push_handler / handleDataset)",
|
|
"root_cause": "NOT root-caused (out of task 5.1's boundary). apiserver_job_new_fun is wired as a HOOK_DETAIL_JOB_NEW hook meant to fire apiserver_push_joblist()/apiserver_push_jobarray() after a job commits (apply_committed_entry()); controller logs show zero evidence either way since apiserver.c has no INFO-level success logging on this path (only a WARN on push failure, `push job list to api server %s has problem, rc %d`, which also never appeared). Could be: the hook isn't actually registered/invoked in this build, or apiserver's join isn't registered in c->apiservers[] the push fan-out iterates, or something queue/resreq-specific. Discovered opportunistically while probing bug-1548; not independently isolated from bug-1548 (both could share a root cause -- c->apiservers[] fan-out list membership -- or be unrelated). REVIEW UPDATE (task 5.1 review, 2026-08-12): found the likely direct causal chain, narrowing this from 'could share a root cause or be unrelated' to 'very likely a downstream symptom of bug-1548'. src/controller/apiserver.c's on_apiserver_join() unconditionally calls xce_apiserver_push_jobs(c, ep) (bulk job resync) alongside xce_apiserver_push_workers(c, ep), but ONLY fires when a fresh join is actually processed by the controller. c->apiservers[] (the fan-out list push hooks iterate) is per-process, in-memory-only state -- no WAL/config replication (confirmed zero references outside apiserver.c) -- so a NEW primary starts with an empty registration table until each apiserver instance re-joins against it. If bug-1548 means apiserver's rejoin was never re-issued against the new primary, ctrl-2 never ran on_apiserver_join for it, so neither the bulk resync nor any incremental job push could ever reach apiserver -- cleanly explaining both job1 and job2 being empty. Recommend a fix attempt for bug-1548 be verified against this job-push symptom directly (if fixing the rejoin gap makes GET /xce/v1/jobs start populating correctly, that's confirmation bug-1549 was never an independent issue). TASK 5.2 RE-REPRODUCTION (2026-08-12T13:39:52Z): reproduced a third time in an isolated, apiserver-only (no worker/scheduler) idle-period E2E run -- a job submitted well after a clean failover (jobid 73930919093731328, controller-confirmed via the accepted response) still never appeared in GET /xce/v1/jobs. This occurred in the SAME run where bug-1548's rejoin gap was also independently reconfirmed with a clean negative control, strengthening (not just repeating) the downstream-symptom-of-bug-1548 hypothesis: if apiserver never re-joined the new primary at the application level, c->apiservers[] on ctrl-2 never gained an entry for it, so no push (bulk or incremental) could ever reach it -- independent of whether the underlying job-push wiring itself is otherwise correct.",
|
|
"fix": "FIXED as a downstream symptom of bug-1548 -- confirmed, not just hypothesized. Once apiserver's heartbeat-triggered rejoin (bug-1548's fix) correctly re-issues xcecli_join(HostRole_apiserver) against the new primary, the controller's on_apiserver_join() bulk job resync (xce_apiserver_push_jobs) fires as designed and populates apiserver's local job store. Live E2E re-validation (component-failover-adoption task 6.2): a diagnostic job submitted post-recovery correctly appeared via GET /xce/v1/jobs, with no client-triggered write request required during the outage window.",
|
|
"tags": [
|
|
"apiserver",
|
|
"controller",
|
|
"push-notification",
|
|
"job-submit",
|
|
"component-failover-adoption",
|
|
"task-5.1",
|
|
"live-e2e-finding",
|
|
"resolved"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1548"
|
|
],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-08-15T22:54:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1550",
|
|
"timestamp": "2026-08-12T13:22:40.852Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/component-failover-adoption/tasks.md",
|
|
"root_cause": "Had `sched_init()`",
|
|
"fix": "Changed to `xcecd_virtual`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-12T13:22:40.852Z"
|
|
},
|
|
{
|
|
"id": "bug-1551",
|
|
"timestamp": "2026-08-13T02:38:03.922Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/component-failover-adoption/tasks.md",
|
|
"root_cause": "Had `sched_init()`",
|
|
"fix": "Changed to 's bug-1548 finding (heartbeat-only, zero write tra",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T02:38:03.922Z"
|
|
},
|
|
{
|
|
"id": "bug-1552",
|
|
"timestamp": "2026-08-13T03:02:32.434Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/component-failover-adoption/tasks.md",
|
|
"root_cause": "Had `sched_init()`",
|
|
"fix": "Changed to `client_failover.c`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T03:02:32.434Z"
|
|
},
|
|
{
|
|
"id": "bug-872",
|
|
"timestamp": "2026-08-13T07:20:20.800Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/xceadmin/src/xcecommon/mapping.py",
|
|
"root_cause": "7 lines replaced/restructured",
|
|
"fix": "Rewrote 8\u219214 lines (7 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"py"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T07:20:20.800Z"
|
|
},
|
|
{
|
|
"id": "bug-873",
|
|
"timestamp": "2026-08-13T07:20:42.831Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/xceadmin/tests/test_mapping.py",
|
|
"root_cause": "3 lines replaced/restructured",
|
|
"fix": "Rewrote 3\u21925 lines (3 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"py"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T07:20:42.831Z"
|
|
},
|
|
{
|
|
"id": "bug-874",
|
|
"timestamp": "2026-08-13T07:25:51.662Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/controller/testsuite/test_worker_join.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T07:25:51.662Z"
|
|
},
|
|
{
|
|
"id": "bug-875",
|
|
"timestamp": "2026-08-13T07:27:23.041Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/controller/worker.c",
|
|
"root_cause": "3 lines replaced/restructured",
|
|
"fix": "Rewrote 49\u219267 lines (3 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T07:27:23.041Z"
|
|
},
|
|
{
|
|
"id": "bug-1553",
|
|
"timestamp": "2026-08-13T07:35:00Z",
|
|
"error_message": "controller_unit_test (combined 1095-test Unity binary) segfaults intermittently (~1 in 3 full runs observed) somewhere between test_drive_async_config.c and the next testsuite file (test_configcompare.c/test_slowlane.c area) -- no assertion failure, no ASAN report captured before the crash, process just dies (exit 139/SIGSEGV)",
|
|
"file": "src/controller/testsuite/ (combined binary, crash site not yet isolated -- occurs after test_drive_async_config.c's liveness_reserved_* tests)",
|
|
"root_cause": "Not yet investigated. Reproduced 1/3 runs both BEFORE and AFTER an unrelated worker.c change (update_resval PERROR->rc logging fix) confirming this is pre-existing and unrelated to that fix -- likely order-dependent shared-process state leakage across Unity tests (global fixtures, xstring table, or ASAN heap state) rather than a bug in any specific test file. Two of three runs completed cleanly with 0 failures each time.",
|
|
"fix": "Not fixed -- out of scope for the update_resval/mxj-auto-detect bugfix session that surfaced it. Needs isolation: bisect which specific test pair triggers it (likely by running testsuite files in smaller batches or under gdb with a core dump), then root-cause the actual memory-safety issue.",
|
|
"tags": [
|
|
"flaky",
|
|
"segfault",
|
|
"controller_unit_test",
|
|
"order-dependent",
|
|
"unity",
|
|
"not-fixed"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T07:35:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1554",
|
|
"timestamp": "2026-08-13T07:36:00Z",
|
|
"error_message": "workerlist / resval show maxswap=1024 and maxtmp=2048 for every host regardless of actual hardware, unless overridden by a per-host config resource entry",
|
|
"file": "src/worker/src/xcecd.c",
|
|
"root_cause": "init_host_attrs() hardcodes host_attrs.maxswap = 1024 and host_attrs.maxtmp = 2048 as placeholder constants (lines ~349-350) -- unlike maxcpus/maxmem, which come from real hardware_monitor_* detection, these two fields have no real detection implemented yet. Confirmed live: a deploy's maxtmp showed exactly 2048 (the hardcoded stub) while maxswap showed 10000 (a per-host config override in hosts.yaml resource list, taking precedence via apply_join_state's mark_host_res loop -- proves the stub IS reachable/live whenever no override exists).",
|
|
"fix": "Not fixed -- user explicitly deferred this (2026-08-13): real swap/tmp-disk detection is a bigger feature (needs actual sysinfo swap totals + statvfs on the configured tmp path) worth discussing design for, not a one-line fix. Flagging only per user's request.",
|
|
"tags": [
|
|
"worker",
|
|
"hardware-detection",
|
|
"stub",
|
|
"not-fixed",
|
|
"maxswap",
|
|
"maxtmp"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T07:36:00Z"
|
|
},
|
|
{
|
|
"id": "bug-878",
|
|
"timestamp": "2026-08-13T08:06:37.286Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/controller/testsuite/test.c",
|
|
"root_cause": "2 lines replaced/restructured",
|
|
"fix": "Rewrote 30\u219241 lines (2 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T08:06:37.286Z"
|
|
},
|
|
{
|
|
"id": "bug-1555",
|
|
"timestamp": "2026-08-13T07:40:00Z",
|
|
"error_message": "controller log spammed with '[ERROR] update_resval: Success' / 'update_resval: Resource temporarily unavailable' -- misleading, the real failure reason is never logged",
|
|
"file": "src/controller/worker.c",
|
|
"root_cause": "update_resvals()/update_resval_list() called PERROR(\"update_resval\") on rc<0, but PERROR (xce_perror -> xce_perror_) formats the process-global errno, not rc. update_resval()'s failure paths (key_find/zarray_put) return raw negative codes directly and never touch errno, so the logged message reflected whatever errno happened to be left over from an unrelated earlier syscall in the same event-loop iteration -- 0 (\"Success\") if nothing had touched it, or a stray EAGAIN if something had. The real reason (e.g. -ENOENT from an unregistered resource name) was silently discarded. Also fixed a second instance of the same errno-vs-rc bug in update_resval()'s r==NULL branch (was `return -errno;`, now `return -ENOENT;`, matching the identical branch in the sibling function mark_host_res()).",
|
|
"fix": "Replaced PERROR with a local log_update_resval_failure() helper that decodes the actual rc via xce_strerror_r(-rc, ...) and includes the resource name in the message. Regression test: test_update_resvals_logs_actual_rc_not_stale_errno (test_worker_join.c) sets errno=EAGAIN before the call and asserts the captured log contains neither \"Success\" nor \"Resource temporarily unavailable\", contains the resource name, and contains the real ENOENT string -- verified genuine RED (failed against the reverted old code with the exact reported symptom) before GREEN.",
|
|
"tags": [
|
|
"controller",
|
|
"logging",
|
|
"errno",
|
|
"fixed"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T07:40:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1556",
|
|
"timestamp": "2026-08-13T07:41:00Z",
|
|
"error_message": "Every host using the documented hosts.yaml default (no max_slot, meaning 'auto-detect from CPU count') gets 0 scheduling slots -- permanently blocks the scheduler from placing any job on that host",
|
|
"file": "src/xceadmin/src/xcecommon/mapping.py",
|
|
"root_cause": "hosts.schema.json documents max_slot: -1 as the 'auto-detect' sentinel, but HostConfig.mxj is UInt32 on the wire and cannot represent -1 (pycapnp raises capnp.KjException for a negative assignment). mapping.py's _build_host_config() worked around this by leaving mxj unset when max_slot was absent/negative, which capnp defaults to 0. worker.c's apply_join_state() then does `nslots = hconfig->mxj; if (nslots < 0) nslots = maxcpus;` -- but 0 is never < 0, so the auto-detect fallback never fires, and the host is explicitly configured with 0 slots. Confirmed live via a real deploy: resval -n slots showed value: 0.000000 for the default host. An existing test (test_mapping.py) even asserted this broken behavior as correct (`assert h.mxj == 0`).",
|
|
"fix": "mapping.py now sets mxj = HOSTCONFIG_MXJ_AUTO_DETECT (0xFFFFFFFF) instead of leaving it unset. The controller's `int mxj` field receives this via capn_read32()'s implicit uint32_t->int conversion, which reinterprets it back to -1 on this project's two's-complement target platforms -- no capnp schema change or C-side change needed, apply_join_state()'s existing `nslots<0` fallback already handles a genuine -1 correctly (now proven by a new C regression test, test_apply_join_state_mxj_negative_one_falls_back_to_maxcpus, since no existing test exercised that branch with a negative mxj before). Updated the stale test assertion, added a new test for the absent-max_slot production case, and regenerated the xceadmin golden fixture (tests/fixtures/full/expected.bin) whose wire bytes changed as a result.",
|
|
"tags": [
|
|
"xceadmin",
|
|
"config",
|
|
"scheduling",
|
|
"wire-encoding",
|
|
"fixed",
|
|
"high-severity"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T07:41:00Z"
|
|
},
|
|
{
|
|
"id": "bug-881",
|
|
"timestamp": "2026-08-13T08:16:40.941Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/schema/controller.capnp",
|
|
"root_cause": "11 lines replaced/restructured",
|
|
"fix": "Rewrote 14\u21923 lines (11 removed) | Also: # Display-unit hint copied from the resource's own; # at reply-build time -- empty/unset means \"raw nu",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"capnp"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-08-13T08:17:02.893Z"
|
|
},
|
|
{
|
|
"id": "bug-882",
|
|
"timestamp": "2026-08-13T08:18:53.065Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/controller/opget.c",
|
|
"root_cause": "7 lines replaced/restructured",
|
|
"fix": "Rewrote 20\u21929 lines (7 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T08:18:53.065Z"
|
|
},
|
|
{
|
|
"id": "bug-883",
|
|
"timestamp": "2026-08-13T08:19:26.708Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/configs/schema/resources.schema.json",
|
|
"root_cause": "Had \"unit\"",
|
|
"fix": "Changed to \"resourcemap\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"json"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T08:19:26.708Z"
|
|
},
|
|
{
|
|
"id": "bug-884",
|
|
"timestamp": "2026-08-13T08:20:21.520Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/xceadmin/src/xcecommon/mapping.py",
|
|
"root_cause": "2 lines replaced/restructured",
|
|
"fix": "Rewrote 5\u21923 lines (2 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"py"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T08:20:21.520Z"
|
|
},
|
|
{
|
|
"id": "bug-885",
|
|
"timestamp": "2026-08-13T08:22:12.974Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/controller/testsuite/test.c",
|
|
"root_cause": "5 lines replaced/restructured",
|
|
"fix": "Rewrote 8\u219237 lines (5 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T08:22:12.974Z"
|
|
},
|
|
{
|
|
"id": "bug-886",
|
|
"timestamp": "2026-08-13T09:22:19.958Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/worker/src/xcecd.c",
|
|
"root_cause": "2 lines replaced/restructured",
|
|
"fix": "Rewrote 3\u21927 lines (2 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T09:22:19.958Z"
|
|
},
|
|
{
|
|
"id": "bug-887",
|
|
"timestamp": "2026-08-13T09:22:43.708Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/configs/resources.yaml",
|
|
"root_cause": "Had \"available memory in MB (built-in dynamic load ind",
|
|
"fix": "Changed to \"available memory in bytes (built-in dynamic load ",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"yaml"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-08-13T09:22:54.754Z"
|
|
},
|
|
{
|
|
"id": "bug-888",
|
|
"timestamp": "2026-08-13T09:23:07.016Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/configs/resources.yaml",
|
|
"root_cause": "2 lines replaced/restructured",
|
|
"fix": "Rewrote 7\u21927 lines (2 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"yaml"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T09:23:07.016Z"
|
|
},
|
|
{
|
|
"id": "bug-889",
|
|
"timestamp": "2026-08-13T09:23:47.981Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/controller/testsuite/test.c",
|
|
"root_cause": "6 lines replaced/restructured",
|
|
"fix": "Rewrote 12\u219216 lines (6 removed) | Also: /* MaxMem is stored/wired as raw bytes (xce_resour; * for the maxmem resource definition) -- humanize ",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-08-13T09:24:28.179Z"
|
|
},
|
|
{
|
|
"id": "bug-890",
|
|
"timestamp": "2026-08-13T09:25:25.166Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/configs/schema/hosts.schema.json",
|
|
"root_cause": "2 lines replaced/restructured",
|
|
"fix": "Rewrote 10\u219217 lines (2 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"json"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T09:25:25.166Z"
|
|
},
|
|
{
|
|
"id": "bug-891",
|
|
"timestamp": "2026-08-13T09:25:49.927Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/configs/schema/queues.schema.json",
|
|
"root_cause": "2 lines replaced/restructured",
|
|
"fix": "Rewrote 10\u219217 lines (2 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"json"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T09:25:49.927Z"
|
|
},
|
|
{
|
|
"id": "bug-892",
|
|
"timestamp": "2026-08-13T09:26:55.689Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/xceadmin/src/xcecommon/mapping.py",
|
|
"root_cause": "3 lines replaced/restructured",
|
|
"fix": "Rewrote 16\u219258 lines (3 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"py"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T09:26:55.689Z"
|
|
},
|
|
{
|
|
"id": "bug-893",
|
|
"timestamp": "2026-08-13T10:45:55.441Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/tools/deploy-ha.sh",
|
|
"root_cause": "2 lines replaced/restructured",
|
|
"fix": "Rewrote 21\u219234 lines (2 removed) | Also: # NOT retroactively update an already-built snapsh; # priority order (as this used to be) silently pic",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"sh"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-08-13T10:47:58.219Z"
|
|
},
|
|
{
|
|
"id": "bug-894",
|
|
"timestamp": "2026-08-13T10:52:01.122Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/tools/deploy-ha.sh",
|
|
"root_cause": "Had \"Warning: no xceadmin found in $BINARY'",
|
|
"fix": "Changed to \"Warning: no xceadmin found alongside $BINARY (che",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"sh"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T10:52:01.122Z"
|
|
},
|
|
{
|
|
"id": "bug-1557",
|
|
"timestamp": "2026-08-13T12:00:00Z",
|
|
"error_message": "xce_test's `worker` -> `join` command defaults to maxmem=64 -- discovered while writing/verifying detailed `help join` text",
|
|
"file": "src/controller/testsuite/test.c (cmd_join_worker, hostattrs_t attrs initializer)",
|
|
"root_cause": "attrs.maxmem = 64 was a reasonable default back when maxmem was MB-scale (64 MB); this session's earlier fix converted maxmem's canonical unit to bytes (node_information.c/xcecd.c/resources.yaml) but never touched this test-tool default, which is now a nonsensical 64 BYTES of RAM. Purely a manual-test-tool default (join is used to simulate a worker joining without a real xcecd), not a production code path -- callers who don't pass -m get an obviously-wrong but harmless value.",
|
|
"fix": "Not fixed -- out of scope for the help-text task that surfaced it (help text correctly documents the actual current default, 64, which is itself the bug). Should become e.g. 64 * 1024 * 1024 (64MB, matching the old intent) to stay consistent with the rest of this session's bytes-canonical convention.",
|
|
"tags": [
|
|
"test-tool",
|
|
"xce_test",
|
|
"stale-default",
|
|
"units",
|
|
"not-fixed",
|
|
"low-priority"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T12:00:00Z"
|
|
},
|
|
{
|
|
"id": "bug-896",
|
|
"timestamp": "2026-08-13T13:08:50.126Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/xceadmin/src/xcecommon/mapping.py",
|
|
"root_cause": "3 lines replaced/restructured",
|
|
"fix": "Rewrote 3\u21925 lines (3 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"py"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T13:08:50.126Z"
|
|
},
|
|
{
|
|
"id": "bug-897",
|
|
"timestamp": "2026-08-13T13:11:27.503Z",
|
|
"error_message": "Wrong reference: write_output should be dump_cluster_config",
|
|
"file": "src/xceadmin/src/xceadmin/cli.py",
|
|
"root_cause": "Used \"write_output\" instead of \"dump_cluster_config\"",
|
|
"fix": "Changed write_output \u2192 dump_cluster_config",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"py"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-13T13:11:27.503Z"
|
|
},
|
|
{
|
|
"id": "bug-1558",
|
|
"timestamp": "2026-08-15T11:20:00Z",
|
|
"error_message": "make test-backend fails standalone: backend/reconnect.go:6:10: fatal error: client.h: No such file or directory -- FAIL apiserver/backend [build failed], make: *** [Makefile:33: test-backend] Error 1. Hit during /kiro-validate-impl component-failover-adoption full-suite validation.",
|
|
"file": "src/frontend/Makefile (test-backend target), src/frontend/apiserver/meson.build",
|
|
"root_cause": "CGO_CFLAGS/CGO_LDFLAGS for libxce and its transitive deps are constructed only inside apiserver/meson.build (lines 11-49) and set via meson's go_env environment() for its custom_target. They are never exported to a general shell, so the Makefile's test-backend target runs bare `CGO_ENABLED=1 go test ./backend/...` with no include or link paths. Compounding this, xce-build.sh's RUN_TESTS path only invokes `make test` (CGO_ENABLED=0), so the CGO backend suite -- which holds this spec's load-bearing rejoin/heartbeat/candidate-parity tests -- is structurally never exercised by any documented command. Previously noted narratively in component-failover-adoption tasks.md Implementation Notes (task 4.1, task 5.4) but never logged as a bug.",
|
|
"fix": "FIXED (component-failover-adoption tasks.md Phase 6, non-blocking build-tooling fix). src/frontend/Makefile's test-backend target now self-derives CGO_CFLAGS/CGO_LDFLAGS via `pkg-config --cflags/--libs librtti c-capnproto openssl tinylog` plus -I$(CURDIR)/../include -I$(BUILD_DIR)/lib and -L$(BUILD_DIR)/lib -lxce -lm -lrt -fsanitize=address, mirroring apiserver/meson.build's own construction. BUILD_DIR anchored on $(CURDIR) (the Makefile's own directory), not a path relative to the `cd apiserver` recipe target, avoiding the off-by-one the workaround note flagged. Verified 2026-08-15: `make test-backend` run standalone from a nix develop shell with zero manual env setup -- `ok apiserver/backend 14.652s`, `ok apiserver/backend/auth 0.010s`.",
|
|
"tags": [
|
|
"build",
|
|
"tooling",
|
|
"cgo",
|
|
"apiserver",
|
|
"test-backend",
|
|
"meson",
|
|
"makefile",
|
|
"component-failover-adoption",
|
|
"resolved"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1440",
|
|
"bug-1441"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-15T22:54:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1559",
|
|
"timestamp": "2026-08-15T13:10:00Z",
|
|
"error_message": "xce-build.sh scheduler's RUN_TESTS block never builds or runs the 4 new component-failover-adoption task-3.x scheduler test binaries (sched_scheduler_connect_test, sched_scheduler_backpressure_test, sched_scheduler_decision_publish_retry_test, sched_scheduler_decision_redelivery_test) -- it only builds/runs 'xce_scheduler sched_test'. They only got compiled in this session as a side effect of a separate worker build and had to be run directly, bypassing the canonical script.",
|
|
"file": "src/tools/xce-build.sh, src/scheduler/testsuite/meson.build",
|
|
"root_cause": "xce-build.sh's scheduler case's RUN_TESTS list was never updated when task 3.x added 4 new standalone test executables under src/scheduler/testsuite/meson.build -- same class of gap as bug-1558 (documented commands cover only a subset of the real suite), just for the scheduler component instead of apiserver's CGO path.",
|
|
"fix": "FIXED (component-failover-adoption tasks.md Phase 6, non-blocking build-tooling fix). src/tools/xce-build.sh's scheduler case's RUN_TESTS block now runs `meson test -C \"$BUILD_DIR\" --suite scheduler --print-errorlogs` instead of invoking sched_test directly by path -- meson test rebuilds by default, so no need to separately enumerate the 4 previously-skipped binaries. Verified 2026-08-15: `xce-build.sh scheduler asan` now runs all 41 scheduler suite tests (was: 1 binary only). NOTE: running the full suite for the first time surfaced a previously-invisible failure, test_recordstart_symlink_escape_replies_error (test_admin_request.c) -- logged separately as bug-1560, unrelated to this fix or to component-failover-adoption.",
|
|
"tags": [
|
|
"build",
|
|
"tooling",
|
|
"scheduler",
|
|
"xce-build.sh",
|
|
"component-failover-adoption",
|
|
"coverage-gap",
|
|
"resolved"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1558"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-15T22:54:00Z"
|
|
},
|
|
{
|
|
"id": "bug-900",
|
|
"timestamp": "2026-08-15T13:02:22.188Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/frontend/apiserver/backend/clib.go",
|
|
"root_cause": "6 lines replaced/restructured",
|
|
"fix": "Rewrote 14\u219230 lines (6 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"go"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-15T13:02:22.188Z"
|
|
},
|
|
{
|
|
"id": "bug-901",
|
|
"timestamp": "2026-08-15T13:05:02.816Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/frontend/Makefile",
|
|
"root_cause": "3 lines replaced/restructured",
|
|
"fix": "Rewrote 3\u21926 lines (3 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"unknown"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-15T13:05:02.816Z"
|
|
},
|
|
{
|
|
"id": "bug-902",
|
|
"timestamp": "2026-08-15T13:06:10.183Z",
|
|
"error_message": "Wrong reference: 039 should be 1548",
|
|
"file": ".kiro/specs/component-failover-adoption/tasks.md",
|
|
"root_cause": "Used \"039\" instead of \"1548\"",
|
|
"fix": "Changed 039 \u2192 1548",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-08-15T13:06:19.081Z"
|
|
},
|
|
{
|
|
"id": "bug-903",
|
|
"timestamp": "2026-08-15T13:07:00.267Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/component-failover-adoption/tasks.md",
|
|
"root_cause": "Had 's own scope to fix (task 5.x is cross-component v",
|
|
"fix": "Changed to `/kiro-validate-impl`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-15T13:07:00.267Z"
|
|
},
|
|
{
|
|
"id": "bug-904",
|
|
"timestamp": "2026-08-15T13:07:21.491Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": ".kiro/specs/component-failover-adoption/spec.json",
|
|
"root_cause": "2 lines replaced/restructured",
|
|
"fix": "Rewrote 20\u219230 lines (2 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"json"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-15T13:07:21.491Z"
|
|
},
|
|
{
|
|
"id": "bug-905",
|
|
"timestamp": "2026-08-15T14:20:32.090Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": ".kiro/specs/component-failover-adoption/tasks.md",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-15T14:20:32.090Z"
|
|
},
|
|
{
|
|
"id": "bug-906",
|
|
"timestamp": "2026-08-15T14:20:51.010Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/component-failover-adoption/spec.json",
|
|
"root_cause": "Had \"2026-08-15T13:10:00Z\"",
|
|
"fix": "Changed to \"2026-08-15T14:20:00Z\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"json"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-15T14:20:51.010Z"
|
|
},
|
|
{
|
|
"id": "bug-907",
|
|
"timestamp": "2026-08-15T14:21:07.376Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": ".kiro/specs/component-failover-adoption/spec.json",
|
|
"root_cause": "5 lines replaced/restructured",
|
|
"fix": "Rewrote 11\u219217 lines (5 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"json"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-15T14:21:07.376Z"
|
|
},
|
|
{
|
|
"id": "bug-1560",
|
|
"timestamp": "2026-08-15T22:54:35Z",
|
|
"error_message": "test_recordstart_symlink_escape_replies_error (src/scheduler/testsuite/test_admin_request.c:850) FAILED: Expected 'invalid record file name' Was 'permission denied accessing record file'. Surfaced only now because bug-1559's fix made xce-build.sh's scheduler case run the full `meson test --suite scheduler` for the first time -- this test was never reached by the old sched_test-only invocation.",
|
|
"file": "src/scheduler/testsuite/test_admin_request.c, src/scheduler/src/recording.c",
|
|
"root_cause": "Not yet investigated. Test plants a symlink inside record_dir whose target resolves outside record_dir, then issues a recordStart admin request expecting rejection with error string 'invalid record file name' (the canonical-path containment check). Instead the admin path is returning a 'permission denied accessing record file' error, implying some permission-check code path is being hit and short-circuiting before (or instead of) the containment check in this sandbox environment (uid 1000, non-root) -- ordering between the two checks in recording.c not yet confirmed by direct read. Unrelated to component-failover-adoption / bug-1548/1549/1558/1559 -- discovered purely as a side effect of bug-1559's coverage-gap fix making this test reachable.",
|
|
"fix": "NOT FIXED -- out of scope for the component-failover-adoption remediation that surfaced it. Needs its own investigation of recording.c's record-file validation check ordering.",
|
|
"tags": [
|
|
"scheduler",
|
|
"recording",
|
|
"symlink",
|
|
"test-failure",
|
|
"coverage-gap-discovery",
|
|
"unresolved"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1559"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-15T22:54:35Z"
|
|
},
|
|
{
|
|
"id": "bug-909",
|
|
"timestamp": "2026-08-16T03:42:14.435Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "reports/aug08-aug15-2026.md",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-16T03:42:14.435Z"
|
|
},
|
|
{
|
|
"id": "bug-910",
|
|
"timestamp": "2026-08-16T03:57:07.719Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "reports/aug08-aug15-2026.md",
|
|
"root_cause": "Had `build.py`",
|
|
"fix": "Changed to `3afe3d5`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-08-16T03:57:25.315Z"
|
|
},
|
|
{
|
|
"id": "bug-908",
|
|
"timestamp": "2026-08-16T04:29:20.063Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": ".kiro/specs/config-upgrade-snapshot/spec.json",
|
|
"root_cause": "3 lines replaced/restructured",
|
|
"fix": "Rewrote 21\u219229 lines (3 removed) | Also: \"updated_at\": \"2026-07-29T09:20:00Z\",; \"phase\": \"tasks-generated\",",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"json"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-08-16T04:29:29.059Z"
|
|
},
|
|
{
|
|
"id": "bug-909",
|
|
"timestamp": "2026-08-16T04:51:52.141Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/controller/testsuite/test_commit_barrier_reply.c",
|
|
"root_cause": "11 lines replaced/restructured",
|
|
"fix": "Rewrote 11\u219216 lines (11 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-16T04:51:52.141Z"
|
|
},
|
|
{
|
|
"id": "bug-910",
|
|
"timestamp": "2026-08-16T04:54:26.304Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "No early return/throw for edge case: j == NULL",
|
|
"fix": "Added guard clause: if (j == NULL)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-16T04:54:26.304Z"
|
|
},
|
|
{
|
|
"id": "bug-1561",
|
|
"timestamp": "2026-08-16T00:00:00.000Z",
|
|
"error_message": "controller_unit_test: test_conf_trim_keeps_only_n_versions and test_conf_get_saved_tag_no_config (test_config_repl.c) FAIL during an unrelated ASAN controller build/test run (bug-451 fix session)",
|
|
"file": "src/controller/testsuite/test_config_repl.c",
|
|
"root_cause": "Not investigated -- discovered incidentally while verifying an unrelated fix (bug-451, persist_job_hook_fun's RUSAGE arm). Neither test_config_repl.c nor config_repl.c were touched this session (confirmed via git diff, zero changes). Coincides with a burst of 'persist: flusher fdatasync FAILED (errno=5 Input/output error)' ERROR lines in the same test run, matching this project's well-documented overlayfs sandbox fdatasync artifact class (same family as bug-924, bug-1470, bug-1553) rather than a genuine regression.",
|
|
"fix": "NOT FIXED -- out of scope for the bug-451 session that surfaced it. Needs confirmation this is the same overlayfs artifact (re-run on a real fs) before treating it as a real regression in test_config_repl.c's config-version-trim/tag-save logic.",
|
|
"tags": [
|
|
"controller",
|
|
"testsuite",
|
|
"test_config_repl",
|
|
"overlayfs",
|
|
"fdatasync",
|
|
"sandbox-environment",
|
|
"unconfirmed",
|
|
"not-fixed"
|
|
],
|
|
"related_bugs": [
|
|
"bug-924",
|
|
"bug-1470",
|
|
"bug-1553"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-16T00:00:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-912",
|
|
"timestamp": "2026-08-16T05:04:02.838Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "3 lines replaced/restructured",
|
|
"fix": "Rewrote 37\u219286 lines (3 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-16T05:04:02.838Z"
|
|
},
|
|
{
|
|
"id": "bug-913",
|
|
"timestamp": "2026-08-16T05:22:23.386Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": "src/controller/testsuite/test_e2e_checkpoint.c",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-16T05:22:23.386Z"
|
|
},
|
|
{
|
|
"id": "bug-914",
|
|
"timestamp": "2026-08-16T05:25:35.899Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "2 lines replaced/restructured",
|
|
"fix": "Rewrote 6\u219217 lines (2 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-16T05:25:35.899Z"
|
|
},
|
|
{
|
|
"id": "bug-915",
|
|
"timestamp": "2026-08-16T06:54:02.070Z",
|
|
"error_message": "Missing guard clause",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "No early return/throw for edge case: ha->standby_endpoints",
|
|
"fix": "Added guard clause: if (ha->standby_endpoints)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"guard-clause",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-16T06:54:02.070Z"
|
|
},
|
|
{
|
|
"id": "bug-916",
|
|
"timestamp": "2026-08-16T07:03:34.559Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/controller/worker.c",
|
|
"root_cause": "9 lines replaced/restructured",
|
|
"fix": "Rewrote 12\u219223 lines (9 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-16T07:03:34.559Z"
|
|
},
|
|
{
|
|
"id": "bug-917",
|
|
"timestamp": "2026-08-16T09:54:06.127Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/controller/worker.c",
|
|
"root_cause": "7 lines replaced/restructured",
|
|
"fix": "Rewrote 15\u21928 lines (7 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-16T09:54:06.127Z"
|
|
},
|
|
{
|
|
"id": "bug-918",
|
|
"timestamp": "2026-08-16T11:12:53.822Z",
|
|
"error_message": "Missing error handling in unknown",
|
|
"file": ".kiro/specs/admin-config-tool/tasks.md",
|
|
"root_cause": "Code path had no error handling \u2014 exceptions would propagate uncaught",
|
|
"fix": "Added try/catch block",
|
|
"tags": [
|
|
"auto-detected",
|
|
"error-handling",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-16T11:12:53.822Z"
|
|
},
|
|
{
|
|
"id": "bug-919",
|
|
"timestamp": "2026-08-16T12:12:34.395Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/specs/ha-config-bootstrap/spec.json",
|
|
"root_cause": "Had \"All tasks 1.x-11.x done (verified 2026-06-09 gap ",
|
|
"fix": "Changed to \"CLOSED 2026-08-16. All 3 known deviations from th",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"json"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-08-16T12:12:47.023Z"
|
|
},
|
|
{
|
|
"id": "bug-920",
|
|
"timestamp": "2026-08-16T12:12:57.617Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": ".kiro/specs/resval-id-decoupling/spec.json",
|
|
"root_cause": "3 lines replaced/restructured",
|
|
"fix": "Rewrote 21\u219222 lines (3 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"json"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-16T12:12:57.617Z"
|
|
},
|
|
{
|
|
"id": "bug-1562",
|
|
"timestamp": "2026-08-17T03:40:00.000Z",
|
|
"error_message": "3-node HA bootstrap never elects a primary: ctrl-1 (only node with local config) goes completely silent ~22s after boot -- no crash, no log output, cluster.log shows no further activity even after ctrl-2/ctrl-3 join minutes later. Downstream symptom: worker gets 'SSL_do_handshake: Broken pipe' in a loop and ctrl-2/ctrl-3 log repeated 'incorrect worker idx -1' ERRORs from handle_endpoint_error (harmless noise -- join.c's handle_join_ stamps priv->role=HostRole_worker before the ha_no_primary_known guard can reject the join, so u.idx is still -1 when the rejected connection is torn down).",
|
|
"file": "src/controller/ha.c (ha_on_primary_ctrl_fd_rdhup, 5.10b debounce branch)",
|
|
"root_cause": "Live-reproduced locally (build.dbg xce_controller, fresh 3-node deploy via deploy-ha.sh, ctrl-1 started ~45s before ctrl-2/ctrl-3 to match the user's actual timing) -- byte-for-byte matches the user's ctrl-1.log. ha_on_primary_ctrl_fd_rdhup's 5.10b debounce branch (ha.c ~8573-8589, added 2026-07-01 commit 0d70d5e4, bug-1310 task 5.10b) returns WITHOUT calling ha_arm_heartbeat_timeout_vtask() when a debounced RDHUP lands within the 2x-election-timeout cooldown window, unlike the function's other two early-return branches: the 5.6 election-in-progress guard (checks role==CTRL_ELECTING || pre_vote_in_progress, i.e. actually verifies a live timer is still running elsewhere) and the 5.2 spurious-suppression branch (explicitly re-arms via ha_arm_heartbeat_timeout_vtask before returning). The 5.10b branch only checks elapsed time since last_failover_ms -- it never checks whether an election is ACTUALLY still in flight. On a lone cold-booting node (n_peers up but none reachable yet), the first PreVote round loses within milliseconds (all connect attempts fail fast -> counted as no-votes), which re-arms the liveness watchdog once (10s). When that watchdog fires again ~10s later, last_failover_ms is still inside the 2x-election-timeout cooldown (observed 9805ms < 10000ms), so it lands in the debounce branch even though no election is in flight anymore -- and returns without re-arming anything. That is the LAST timer ever scheduled in the process: /proc/<pid>/task/*/wchan confirmed every vtask worker thread idling in futex_do_wait (empty work queue, not deadlocked) and the io_worker thread parked in do_epoll_wait with zero further epoll events (lsof showed only the listen socket + epoll fd, no in-flight connections) for the remainder of the run. Node is permanently stuck CTRL_STANDBY with zero further election attempts -- other config-less nodes correctly wait forever for a primary that will never appear, so the whole cluster is permanently leaderless. Timing-dependent: reproducible only when the solo bootstrap window is long enough for a second liveness-timeout to land inside the cooldown after the first PreVote round already concluded (confirmed NOT reproducible with a tight ~0.5s inter-node start stagger, where a real peer answers before the trap window closes) -- explains why this presented as 'used to work' without any actual regression: bug has been latent since 2026-07-01, only the user's own start timing changed.",
|
|
"fix": "FIXED (TDD RED->GREEN). Added test_rdhup_debounce_still_rearms_liveness_watchdog (test_ha_rdhup_integration.c, next to the sibling test_rdhup_within_cooldown_is_debounced) -- asserts ha->last_activity moves off a sentinel after a debounced RDHUP, the same delaymgr-independent observable test_ha_arm_no_crash_no_thread (test_ha_liveness.c) already uses to prove ha_arm_heartbeat_timeout_vtask ran without a live delaymgr thread. RED confirmed pre-fix (assertion failed with the bug-1562 message). Fix: ha_on_primary_ctrl_fd_rdhup's 5.10b debounce branch (ha.c ~8578-8598) now calls ha_arm_heartbeat_timeout_vtask(ha, c) before returning, mirroring the function's own 5.2 spurious-suppression branch pattern -- safe with c==NULL (unit-test mode) since the arm function stamps ha->last_activity unconditionally before its internal c-null/delaymgr-running check gates only the actual timer scheduling. GREEN: controller_unit_test 1102 tests, 2 Failures (both pre-existing, unrelated overlayfs fdatasync EIO sandbox flakiness in test_config_repl.c -- test_conf_trim_keeps_only_n_versions and test_conf_get_saved_tag_no_config -- confirmed via 'persist: flusher fdatasync FAILED (errno=5 Input/output error)' immediately preceding both in the test log; identical to the cerebrum.md-documented sandbox quirk, present before this change too). LIVE END-TO-END VALIDATION (per this project's live-soak-validation-discipline convention -- unit-green alone is not proof): rebuilt xce_controller (src/xce.build), redeployed the identical 3-node scenario that hung before (ctrl-1 solo 45s, then ctrl-2, then ctrl-3 -- byte-for-byte the same timing that previously froze the process forever). Post-fix ctrl-1.log shows the debounce branch now immediately followed by 'HA: standby liveness poll armed' (previously the log went dead right after the debounce line), the watchdog continuing to retry every ~10s through several more PreVote-loses/debounce cycles while alone, and once ctrl-2/ctrl-3 came online: 'HA FSM (raft): -> CTRL_PRIMARY (term=2, first_boot=0)' -- ctrl-1 successfully elected primary, and both controller/ctrl-2/conf and controller/ctrl-3/conf received the pushed cluster.bin + current config. Full cluster convergence confirmed on the exact scenario that previously froze permanently.",
|
|
"tags": [
|
|
"ha",
|
|
"election",
|
|
"liveness-timer",
|
|
"dropped-timer",
|
|
"bootstrap-hang",
|
|
"raft-ha-core-safety",
|
|
"5.10b"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1310"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-17T03:40:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-922",
|
|
"timestamp": "2026-08-17T03:45:49.314Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/controller/ha.c",
|
|
"root_cause": "2 lines replaced/restructured",
|
|
"fix": "Rewrote 6\u21928 lines (2 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-17T03:45:49.314Z"
|
|
},
|
|
{
|
|
"id": "bug-923",
|
|
"timestamp": "2026-08-17T04:59:39.812Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_term_safety_adapter.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-17T04:59:39.812Z"
|
|
},
|
|
{
|
|
"id": "bug-924",
|
|
"timestamp": "2026-08-17T05:01:33.795Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/persist.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-17T05:01:33.795Z"
|
|
},
|
|
{
|
|
"id": "bug-1563",
|
|
"timestamp": "2026-08-17T04:59:00.000Z",
|
|
"error_message": "40-round chaotic /xce-test-ha soak: ctrl-2's own log shows 309,671 'persist: flusher fdatasync FAILED (errno=22 Invalid argument) -- durable_lsn held at 163 (tip=164 NOT made durable)' ERROR lines, 706 of them landing within a single 705ms window (04:52:54.000-04:52:54.705) on the freshly-promoted primary -- a sustained sync failure the flusher never recovered from or backed off on for the rest of the run. The soak's own verdict still reports PASS (committed_divergence=0, committed_job_loss=0) because the other two standbys' acks alone satisfy majority and the bug-924 fdatasync-error exclusion swallows the count -- but this specific pattern (a stuck LSN, EINVAL not the documented EIO, hundreds of retries per second) is a distinct, real defect from the known overlayfs sandbox quirk, not just noise.",
|
|
"file": "src/controller/persist.c (fsync_worker)",
|
|
"root_cause": "fsync_worker's loop (persist.c) only calls pthread_cond_timedwait (its ONLY throttle/backoff mechanism) when flusher_work_pending_locked(p) is false. But that predicate is purely 'durable_lsn < tip' -- it cannot distinguish 'genuine fresh work just landed' from 'still stuck from the previous failed attempt', because flusher_flush_once()'s fail-loud gate (correct, unchanged) deliberately never advances durable_lsn on a failed fdatasync. Once fdatasync starts failing with no new appends arriving (a standby/primary transition mid-chaotic-kill with a broken local fd, or any sustained real disk error in production), durable_lsn < tip stays true forever, so 'pending' is permanently true and the loop skips the wait on every single iteration -- flusher_flush_once (and thus fdatasync) gets called as fast as the CPU/lock overhead allows, pinning one core and flooding the log. Confirmed by direct code read of flusher_work_pending_locked (dur < tip, no failure-awareness) and fsync_worker's loop structure (wait only in the !pending branch), and reproduced deterministically in a unit test (test_force_fsync_fail seam) before any live soak was re-run.",
|
|
"fix": "FIXED (TDD RED->GREEN). Added test_flusher_flush_attempt_count (persist.h, XCE_TESTING-only atomic counter, incremented once per flusher_flush_once() call) and test_flusher_backs_off_on_sustained_fsync_failure (test_term_safety_adapter.c): forces every fdatasync to fail via the existing test_force_fsync_fail seam on a PRIMARY persist_t with wal_sync_ms=20, appends one entry (primary's append path defers all sync to the async flusher, unlike a standby's inline persist-before-ACK sync -- see test_on_persist_entry_failure_propagates_no_ack), waits 300ms, and asserts attempt count stays under 60 (~15 expected at a 20ms cadence). RED confirmed pre-fix (assertion failed -- unbounded spin). Fix: fsync_worker's loop (persist.c) now also waits (same pthread_cond_timedwait/wal_sync_ms cadence the idle path already uses, no new tunable) when the just-completed flush WAS pending but made no progress (after == before) -- i.e. specifically the failure case, never the legitimate 'nothing to sync' idle case (pending was false there, left untouched) nor a successful flush (after > before, still loops immediately to catch a fresh append with zero latency, unchanged fast path). GREEN: test_flusher_backs_off_on_sustained_fsync_failure passes with attempts=15 (was unbounded/thousands pre-fix in the same 300ms window). Full controller_unit_test: 1103 tests, 2 failures -- both pre-existing, unrelated overlayfs fdatasync EIO sandbox flakiness in test_config_repl.c (test_conf_trim_keeps_only_n_versions, test_conf_get_saved_tag_no_config), confirmed unchanged from before this fix. LIVE VALIDATION: re-ran the 40-round chaotic /xce-test-ha soak that originally surfaced this, with the rebuilt binary -- excluded_bug924_fdatasync dropped from 304,689 to 0 in the re-run (VERDICT mode=chaotic rounds=40 jobs=123 committed_divergence=0 committed_job_loss=0 result=PASS). Also re-ran the 40-round sequential soak for completeness (PASS: 40 rounds, 123 jobs, zero job loss, all 3 nodes led) -- unaffected by this change as expected, confirming no regression. Both full 40-round soaks (sequential and chaotic) now pass cleanly end to end.",
|
|
"tags": [
|
|
"persist",
|
|
"fsync",
|
|
"livelock",
|
|
"busy-loop",
|
|
"backoff",
|
|
"durability",
|
|
"chaotic-soak",
|
|
"xce-test-ha"
|
|
],
|
|
"related_bugs": [
|
|
"bug-661"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-17T04:59:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-926",
|
|
"timestamp": "2026-08-17T06:41:48.625Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/tools/deploy-ha.sh",
|
|
"root_cause": "2 lines replaced/restructured",
|
|
"fix": "Rewrote 40\u219293 lines (2 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"sh"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-17T06:41:48.625Z"
|
|
},
|
|
{
|
|
"id": "bug-927",
|
|
"timestamp": "2026-08-17T06:44:51.034Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": ".claude/skills/xce-deploy-ha/SKILL.md",
|
|
"root_cause": "7 lines replaced/restructured",
|
|
"fix": "Rewrote 65\u2192132 lines (7 removed) | Also: # 1. Stop running controllers; bash \"$TOP/scripts/cleanup.sh\"",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-08-17T06:45:17.871Z"
|
|
},
|
|
{
|
|
"id": "bug-928",
|
|
"timestamp": "2026-08-17T06:51:13.785Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": ".claude/skills/xce-build/SKILL.md",
|
|
"root_cause": "2 lines replaced/restructured",
|
|
"fix": "Rewrote 3\u219226 lines (2 removed) | Also: does not need to run from inside this repo or the ; **not** bundle its dependencies (`click`, `pycapnp | Also: ## Installing the xceadmin wheel elsewhere; `/xce-build xceadmin` always leaves a fresh, teste",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-08-17T06:53:41.573Z"
|
|
},
|
|
{
|
|
"id": "bug-929",
|
|
"timestamp": "2026-08-17T06:52:21.795Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/xceadmin/pyproject.toml",
|
|
"root_cause": "5 lines replaced/restructured",
|
|
"fix": "Rewrote 6\u21929 lines (5 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"toml"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-17T06:52:21.795Z"
|
|
},
|
|
{
|
|
"id": "bug-930",
|
|
"timestamp": "2026-08-17T07:00:05.291Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/tools/deploy-ha.sh",
|
|
"root_cause": "13 lines replaced/restructured",
|
|
"fix": "Rewrote 22\u219244 lines (13 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"sh"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-17T07:00:05.291Z"
|
|
},
|
|
{
|
|
"id": "bug-931",
|
|
"timestamp": "2026-08-17T07:00:21.077Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/tools/deploy-ha.sh",
|
|
"root_cause": "Had \"xceadmin installed at $TOP/xceadmin-venv -- use i",
|
|
"fix": "Changed to \"xceadmin installed at $TOP/xceadmin-site -- use i",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"sh"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-17T07:00:21.077Z"
|
|
},
|
|
{
|
|
"id": "bug-932",
|
|
"timestamp": "2026-08-17T07:15:26.246Z",
|
|
"error_message": "Function not marked async",
|
|
"file": "src/controller/testsuite/test_commit_durability.c",
|
|
"root_cause": "Function uses await but wasn't declared async",
|
|
"fix": "Added async modifier",
|
|
"tags": [
|
|
"auto-detected",
|
|
"async-fix",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-17T07:15:26.246Z"
|
|
},
|
|
{
|
|
"id": "bug-933",
|
|
"timestamp": "2026-08-17T07:15:58.937Z",
|
|
"error_message": "Wrong reference: fire_count should be g_durable_advance_fire_count",
|
|
"file": "src/controller/testsuite/test_commit_durability.c",
|
|
"root_cause": "Used \"fire_count\" instead of \"g_durable_advance_fire_count\"",
|
|
"fix": "Changed fire_count \u2192 g_durable_advance_fire_count",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-17T07:15:58.938Z"
|
|
},
|
|
{
|
|
"id": "bug-1564",
|
|
"timestamp": "2026-08-17T07:15:00.000Z",
|
|
"error_message": "controller_unit_test: test_durable_majority_commit_end_to_end FAIL: Expected 0 Was -110 (commit_submit(WAIT) must return 0 after durable-majority) -- deterministic 3/3 direct runs of the binary, not a flake. Surfaced while live-testing an unrelated /xce-deploy-ha enhancement, right after rebuilding controller on top of bug-1563's fix.",
|
|
"file": "src/controller/persist.c (persist_flush)",
|
|
"root_cause": "persist_flush() (the synchronous durability point tests and clean-shutdown use in place of waiting for the background flusher) advances durable_lsn directly under p->lock but never calls p->on_durable_advance -- only fsync_worker's own successful flusher_flush_once() call fires that callback (persist.c, 'after > before' gate). Any WAIT-blocked commit caller (commit_engine's COMMIT_MODE_WAIT) that relies on on_durable_advance to be re-evaluated is therefore never woken by a persist_flush()-driven advance -- only by fsync_worker's own next successful cycle. This gap was LATENT and never triggered before bug-1563: pre-1563, fsync_worker's un-throttled retry loop (the livelock bug-1563 fixed) spun continuously while work was pending, so it happened to notice any state change (e.g. a test clearing test_force_fsync_fail) and independently re-attempt+succeed+fire the callback within microseconds, completely masking that persist_flush's own advance was silently un-observed. bug-1563's fix (correct: fsync_worker now backs off up to wal_sync_ms between failed attempts instead of spinning) removed that accidental fast-repoll cover, so a persist_flush()-only advance during a slow-cadence window (make_durability_persist uses wal_sync_ms=5000 deliberately, 'durability comes from the explicit flush, not the timer') now genuinely times out the 2000ms-budget WAIT with nothing left to wake it for the remaining ~4.7s fsync_worker was still asleep.",
|
|
"fix": "FIXED (TDD RED->GREEN). Added test_persist_flush_fires_durable_advance_callback (test_commit_durability.c, next to test_durable_majority_commit_end_to_end): registers a counting callback via persist_set_durable_cb, appends an entry, asserts persist_flush() fires it exactly once on a genuine advance and not again on a no-op flush. RED confirmed against the pre-fix persist_flush (0 fires). Fix: persist_flush() now fires p->on_durable_advance(p->durable_cb_ctx) after releasing p->lock, gated on advanced==true (only when durable_lsn actually moved) -- identical gate and identical lock-ordering discipline (strictly outside p->lock, so the callback's own ce->lock acquisition has no p->lock held underneath it) to fsync_worker's own existing callback-firing code. GREEN: both test_persist_flush_fires_durable_advance_callback and the originally-broken test_durable_majority_commit_end_to_end pass, confirmed deterministic across 3 direct repeat runs of controller_unit_test. Full suite: 1104 tests, 2 failures (both pre-existing, unrelated overlayfs fdatasync sandbox flakiness in test_config_repl.c, unchanged from before this fix).",
|
|
"tags": [
|
|
"persist",
|
|
"durability",
|
|
"commit-engine",
|
|
"callback",
|
|
"wait-timeout",
|
|
"regression",
|
|
"bug-1563-followup"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1563"
|
|
],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-17T07:15:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1565",
|
|
"timestamp": "2026-08-17T07:16:00.000Z",
|
|
"error_message": "src/tools/xce-build.sh's setup_build() does an unconditional `rm -rf \"$BUILD_DIR\"` + fresh `meson setup` for EVERY component case (controller, worker, xceadmin, etc), not just when actually needed -- running `/xce-build xceadmin` (or any single-component target) after `/xce-build controller` in the SAME build dir silently deletes the already-built xce_controller/xce_test/etc binaries, leaving only that one component's fresh output. Discovered live while enhancing /xce-deploy-ha: a working xce_controller from an earlier turn vanished after an unrelated `/xce-build xceadmin` run in the same xce.build dir, breaking a live-deploy test with 'No such file or directory' for the controller binary.",
|
|
"file": "src/tools/xce-build.sh (setup_build)",
|
|
"root_cause": "setup_build() (xce-build.sh, called at the top of every component case branch) always does `rm -rf \"$BUILD_DIR\"; meson setup \"$BUILD_DIR\" ...` before compiling -- a full wipe-and-reconfigure regardless of which single component was requested. Since `meson compile -C \"$BUILD_DIR\" <component>` only rebuilds that one target afterward, every OTHER previously-built target in the same dir (e.g. xce_controller, when the requested component was xceadmin) is gone until something explicitly rebuilds it too. Not investigated further / not fixed -- out of scope for the /xce-deploy-ha enhancement session that found it; flagged here for whoever owns xce-build.sh next. A likely fix direction: only rm -rf+reconfigure when MESON_OPTS actually differ from the existing build dir's recorded options (or on first setup / explicit request), otherwise just `meson compile -C \"$BUILD_DIR\" <target>` against the existing configured dir.",
|
|
"fix": "FIXED (opt-in, not a default-behavior change). Added --incremental to xce-build.sh (parsed out of the argument list before the existing component/profile/build_dir positional parsing, so it can appear anywhere and never disturbs that parsing). When passed AND the target build dir already has a build.ninja (i.e. it's already configured), setup_build() runs `meson setup --reconfigure \"$BUILD_DIR\" \"${MESON_OPTS[@]}\"` in place instead of `rm -rf` + fresh `meson setup` -- preserving any other already-built component's binaries in that dir. First-ever build of a dir (no build.ninja yet) still does a normal fresh setup regardless of the flag, since there's nothing to reconfigure. Default (flag omitted) is completely unchanged -- still always wipes. Deliberately NOT made the default: the known missing-dependency-edge races in the capnp-generation custom_target (see recurring buglog entries on 'controller.capnp.h: No such file or directory') are papered over by always wiping (worst case: a loud, retry-fixable clean-build failure); without the wipe the same gap could instead cause SILENT staleness (a schema edit not triggering regeneration, build reports success against stale generated code) -- an --incremental caller is explicitly opting into that tradeoff. Live-validated: built controller (xce_controller present), then `xceadmin --incremental` (wheel built, xce_controller's mtime unchanged -- survived); confirmed the flag works regardless of argument position (`--incremental xceadmin` and `xceadmin --incremental` both work); confirmed the DEFAULT (no flag) still wipes as before (xce_controller correctly gone after a plain `xceadmin` rebuild). Also updated the /xce-build skill and build-deployment.md steering doc to document the new flag.",
|
|
"tags": [
|
|
"xce-build.sh",
|
|
"build-tooling",
|
|
"footgun",
|
|
"meson",
|
|
"discovery"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-17T07:16:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-936",
|
|
"timestamp": "2026-08-17T08:02:07.121Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/steering/persistence.md",
|
|
"root_cause": "Had `on_durable_advance(ctx)`",
|
|
"fix": "Changed to `fdatasync`",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-08-17T08:02:22.680Z"
|
|
},
|
|
{
|
|
"id": "bug-937",
|
|
"timestamp": "2026-08-17T08:03:27.006Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": ".kiro/steering/build-deployment.md",
|
|
"root_cause": "7 lines replaced/restructured",
|
|
"fix": "Rewrote 32\u219248 lines (7 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-17T08:03:27.006Z"
|
|
},
|
|
{
|
|
"id": "bug-938",
|
|
"timestamp": "2026-08-17T08:18:40.345Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": ".claude/skills/xce-build/SKILL.md",
|
|
"root_cause": "4 lines replaced/restructured",
|
|
"fix": "Rewrote 11\u219212 lines (4 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-17T08:18:40.345Z"
|
|
},
|
|
{
|
|
"id": "bug-939",
|
|
"timestamp": "2026-08-17T08:19:13.328Z",
|
|
"error_message": "Wrong operator: && should be <<",
|
|
"file": ".claude/skills/xce-build/SKILL.md",
|
|
"root_cause": "Used \"&&\" instead of \"<<\"",
|
|
"fix": "Changed operator && \u2192 <<",
|
|
"tags": [
|
|
"auto-detected",
|
|
"operator-fix",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-17T08:19:13.328Z"
|
|
},
|
|
{
|
|
"id": "bug-940",
|
|
"timestamp": "2026-08-17T08:19:30.812Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": ".kiro/steering/build-deployment.md",
|
|
"root_cause": "Had 're gone until something explicitly rebuilds them ",
|
|
"fix": "Changed to 're gone until something explicitly rebuilds them ",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"md"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-17T08:19:30.812Z"
|
|
},
|
|
{
|
|
"id": "bug-941",
|
|
"timestamp": "2026-08-17T08:24:49.130Z",
|
|
"error_message": "Incorrect value in code",
|
|
"file": "src/xceadmin/tests/test_cli.py",
|
|
"root_cause": "Had \", event_count=0, started_at=None)\n\n monkeypatc",
|
|
"fix": "Changed to \", event_count=0, started_at=0)\n\n monkeypatch.s",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-value",
|
|
"py"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-17T08:24:49.130Z"
|
|
},
|
|
{
|
|
"id": "bug-1566",
|
|
"timestamp": "2026-08-17T08:30:00.000Z",
|
|
"error_message": "User-reported: `./scripts/xceadmin scheduler record status` (from a /xce-deploy-ha deployment) failed with 'Error: cannot connect to localhost:9991: [Errno 111] Connection refused' -- the deployment's actual --peers were localhost:9901/9902/9903, not 9991.",
|
|
"file": "src/xceadmin/src/xceadmin/cli.py, src/tools/deploy-ha.sh",
|
|
"root_cause": "xceadmin's --controller option (config push, and all 3 scheduler record start/stop/status subcommands) defaulted unconditionally to a hardcoded module constant _DEFAULT_CONTROLLER = 'localhost:9991' with no way to override it except typing --controller on every single invocation. /xce-deploy-ha's generated scripts/xceadmin wrapper (added earlier this session) was a bare passthrough (`exec python3 -m xceadmin.cli \"$@\"`) that never told xceadmin what the actual deployed cluster's real ports were -- so any xceadmin command that didn't explicitly pass --controller silently tried the generic, deployment-agnostic default instead of this specific deployment's real peers, which have nothing to do with 9991 unless the deploy happened to use that exact port by coincidence.",
|
|
"fix": "FIXED (TDD RED->GREEN). Added envvar=\"XCEADMIN_CONTROLLER\" to all 4 --controller click.option() decorators in cli.py (naming matches the existing XCEADMIN_SCHEMA_PATH convention in xcecommon/schema.py) -- click's built-in option-resolution precedence is CLI flag > envvar > default, so an explicit --controller still always wins. Added test_controller_option_falls_back_to_xceadmin_controller_env_var (RED pre-fix: asserted the env var value reaches the command, failed with the hardcoded default instead) and test_controller_flag_overrides_xceadmin_controller_env_var (regression lock for the override guarantee) to test_cli.py. deploy-ha.sh's generated scripts/xceadmin wrapper now exports XCEADMIN_CONTROLLER=\"${PEER_ARRAY[0]}\" (this deployment's own first --peers candidate) before exec'ing xceadmin. GREEN: full xceadmin test suite (261 tests via direct pytest, 258 passed + 3 skipped via the meson-driven build) all pass, no regressions. LIVE VALIDATION: rebuilt via `/xce-build xceadmin --incremental` (bug-1565's new flag, keeping the already-built controller/worker/scheduler binaries), redeployed with --peers localhost:9901,9902,9903 (matching the user's report exactly), started the cluster + scheduler, ran the user's EXACT command (`scripts/xceadmin scheduler record status`) in a completely stripped environment (env -i, no nix, no network) with NO --controller flag: correctly reached localhost:9901 (confirmed by the error changing from a raw connection-refused on the wrong port to a real application-level 'scheduler not connected' before the scheduler was started, then a clean 'recording: no' / exit 0 once it was) instead of failing against the wrong hardcoded port.",
|
|
"tags": [
|
|
"xceadmin",
|
|
"cli",
|
|
"deploy-ha",
|
|
"config",
|
|
"default-port",
|
|
"envvar"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-17T08:30:00.000Z"
|
|
},
|
|
{
|
|
"id": "bug-1567",
|
|
"timestamp": "2026-08-17T09:00:00Z",
|
|
"error_message": "xce_scheduler -i -s <replay>: WARN 'failed to resolve job picker plugin (rc=-2)' on load; all pre-existing jobs stay PEND forever, nothing ever dispatches in simulation/interactive mode",
|
|
"file": "src/scheduler/src/sim.c, src/scheduler/src/sim_loop.c",
|
|
"root_cause": "Two compounding, both explicitly documented 'Known scope boundary' gaps in the scheduler-core sim driver (task 11.1/11.2, .kiro/specs/scheduler-core): (1) sched_sim_driver_start() (sim.c) loads the initial snapshot via xce_sched_core_load_snapshot() BEFORE any picker plugin is registered into core->plugins -- only job_pick_plugin's NAME is threaded through from the ReplayHeader (sim.h:206-216's own doc comment). sched_resolve_job_picker() therefore returns -ENOENT (=-2), producing the WARN, and the picker-rebuild walk (on_queue_update/on_job_push) inside xce_sched_core_load_snapshot() is silently skipped for every job/queue in the initial snapshot. The real picker only gets registered moments later, in sim_register_default_picker() (sim_loop.c:381, called from sched_sim_driver_run() right after start() returns) -- but nothing re-pushes the already-loaded jobs/queues into it, so any job present in the replay file's INITIAL snapshot is permanently invisible to the fcfs picker's next_job(). (2) Independently, sim_picker_thread_fn() (sim_loop.c:448) has its own documented scope boundary: real resource-matching allocation (sched_make_allocation()) needs a live xce_scheduler_t* that the sim driver deliberately doesn't have, and no core-only equivalent exists yet (deferred to the separate, not-yet-designed .kiro/specs/scheduler-allocation spec) -- so EVERY candidate the picker selects is unconditionally turned into a PEND decision; dispatch is not implemented in simulation mode at all today, regardless of resource availability.",
|
|
"fix": "FIXED (TDD, RED->GREEN). New file src/scheduler/src/sim_picker.c: sim_bootstrap_picker() (replaces sim_loop.c's sim_register_default_picker(), moved out because sim_loop.c was already at its documented 800-line 'zero line-budget headroom' cap) registers the real builtin_fcfs picker AND then replays the picker-rebuild walk (on_queue_update per queue, on_job_push per pending job) that xce_sched_core_load_snapshot() had to skip at initial-snapshot-load time. Wired into scheduler_srcs, sched_sim_isolation_lib, and all 9 white-box test TUs that #include sim_loop.c directly (test_sim_isolation.c mechanically re-verified). New regression test: test_sim_event_loop.c's test_job_present_only_in_initial_snapshot_still_reaches_the_picker -- builds a fixture with a job baked into the INITIAL snapshot (not a ReplayEvent), asserts it gets a live PEND decision. RED confirmed by temporarily no-op'ing the rebuild walk (test failed as expected), GREEN with the real fix restored. Full scheduler suite green (41/41, only pre-existing unrelated bug-1560 skipped/excluded from that count). Note: finding (2) from the original diagnosis (sim mode never dispatches, only PENDs -- scheduler-allocation spec gap) is NOT fixed here, by design -- out of scope, a whole separate not-yet-designed spec.",
|
|
"tags": [
|
|
"scheduler",
|
|
"simulation-mode",
|
|
"sim-mode",
|
|
"replay",
|
|
"job-picker",
|
|
"scheduler-core",
|
|
"known-scope-boundary",
|
|
"fixed",
|
|
"tdd"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 2,
|
|
"last_seen": "2026-08-17T09:40:00Z"
|
|
},
|
|
{
|
|
"id": "bug-1568",
|
|
"timestamp": "2026-08-17T09:00:00Z",
|
|
"error_message": "xce_scheduler -i -s <replay>: 'info worker <name>' shows total=0.00 available=0.00 for every resource, even though the live cluster (xce_test resval/workerlist) reports real non-zero values for the same worker -- CONFIRMED ROOT CAUSE (superseding this entry's earlier 'architecture gap' theory, which was wrong -- corrected after the user pointed to worker.c's real mark_host_res()/update_val_res() write path)",
|
|
"file": "src/scheduler/src/repl_info.c, src/scheduler/src/snapshot_wire.c, src/scheduler/src/snapshot_load.c, src/controller/sched.c",
|
|
"root_cause": "CONFIRMED via live value-level TRACE instrumentation (not just counts this time): xce_core_push_events()'s XCE_CORE_EVENT_WORKERS_PUSH handler (src/scheduler/src/core_events.c) calls sched_add_worker() UNCONDITIONALLY on every push -- and sched_add_worker() (src/scheduler/src/core.c:270) is a plain key_add() (ADD-ONLY semantics: fails -EEXIST if the worker name is already registered, never updates in place). A worker connecting triggers MULTIPLE WORKERS_PUSH events in quick succession (confirmed live: sched.c's collect_resval()/xcesched_push_workers() fire more than once during join sequencing -- e.g. an early push before src/controller/worker.c's apply_join_state()->add_hostattrs_resvals()/set_host_slots() has finished writing real hostattrs-derived values into w->host.resvals, carrying stale/zero data, followed by a later push carrying the real values). The FIRST push's sched_add_worker() call succeeds and registers the worker (confirmed: 'sched_add_worker(\"pc13v\") ok (idx=0)' at 10:02:34.848, immediately preceded by a TRACE showing it received maxmem=0.000000). The SECOND push's freshly-built xce_sched_worker_t -- this time carrying the REAL values (confirmed: 'resource maxmem received fvalue=33182089216.000000', matching xce_test's own real 30.9GB reading, at 10:02:36.849 -- silently fails sched_add_worker() with rc=-17 (-EEXIST) one line later in the SAME log, and its return value was unchecked until this investigation's own instrumentation added the WARN (core_events.c, added this session) that finally surfaced it. The correctly-valued worker object is discarded/leaked; core->workers['pc13v'] permanently keeps the FIRST, zero-valued object. This is not limited to the initial-join race -- because there is no 'update an existing worker in place' event type (unlike jobs, which have XCE_CORE_EVENT_JOB_STATE_CHANGE/JOB_UPDATE for in-place mutation of an already-added job), EVERY subsequent WORKERS_PUSH for an already-registered worker (sched_worker_change's ongoing per-event pushes throughout normal cluster operation, not just at join) hits the identical silent EEXIST-discard. The scheduler's view of a worker's resources freezes forever at whichever push happened to land first and win the race, and never updates again for the lifetime of the process.",
|
|
"fix": "NOT YET FIXED -- root cause confirmed live with reproducible TRACE evidence (this session's own instrumentation across src/controller/worker.c, dataex.c, sched.c and src/scheduler/src/core_events.c). Correct fix: XCE_CORE_EVENT_WORKERS_PUSH's handler (core_events.c, xce_core_push_events()) should look up an existing worker by name first (sched_get_worker()) and update it in place (status + resvals, mirroring how XCE_CORE_EVENT_JOB_STATE_CHANGE/JOB_UPDATE mutate an existing job rather than re-adding) instead of unconditionally building a fresh xce_sched_worker_t and calling sched_add_worker() (add-only, key_add()-backed) every time. Reported to user with full evidence chain; awaiting go-ahead to implement + TDD regression test.",
|
|
"tags": [
|
|
"scheduler",
|
|
"controller",
|
|
"simulation-mode",
|
|
"resource-values",
|
|
"worker-resvals",
|
|
"root-caused",
|
|
"live-verified",
|
|
"confirmed-bug",
|
|
"sched_add_worker",
|
|
"key_add-eexist"
|
|
],
|
|
"related_bugs": [
|
|
"bug-1567"
|
|
],
|
|
"occurrences": 3,
|
|
"last_seen": "2026-08-17T10:05:00Z"
|
|
},
|
|
{
|
|
"id": "bug-945",
|
|
"timestamp": "2026-08-17T09:14:31.784Z",
|
|
"error_message": "Significant refactor of ",
|
|
"file": "src/scheduler/src/sim_loop.c",
|
|
"root_cause": "47 lines replaced/restructured",
|
|
"fix": "Rewrote 52\u219212 lines (47 removed)",
|
|
"tags": [
|
|
"auto-detected",
|
|
"refactor",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-17T09:14:31.784Z"
|
|
},
|
|
{
|
|
"id": "bug-946",
|
|
"timestamp": "2026-08-17T09:14:35.731Z",
|
|
"error_message": "Wrong reference: sim_register_default_picker should be sim_bootstrap_picker",
|
|
"file": "src/scheduler/src/sim_loop.c",
|
|
"root_cause": "Used \"sim_register_default_picker\" instead of \"sim_bootstrap_picker\"",
|
|
"fix": "Changed sim_register_default_picker \u2192 sim_bootstrap_picker",
|
|
"tags": [
|
|
"auto-detected",
|
|
"wrong-reference",
|
|
"c"
|
|
],
|
|
"related_bugs": [],
|
|
"occurrences": 1,
|
|
"last_seen": "2026-08-17T09:14:35.731Z"
|
|
}
|
|
]
|
|
}
|