chore(wolf): mark bug-1621/1723/1758 fixed, update anatomy/memory
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GLfB5uWRdmx2WiZSFC7Fm7
This commit is contained in:
parent
c832706e0c
commit
b612f80bd6
4 changed files with 66 additions and 18 deletions
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"version": 1,
|
||||
"meta": {
|
||||
"lastScanned": "2026-09-08T08:47:24.325Z",
|
||||
"fileCount": 507,
|
||||
"lastScanned": "2026-09-08T09:10:34.359Z",
|
||||
"fileCount": 510,
|
||||
"hits": 0,
|
||||
"misses": 0,
|
||||
"renderedHash": "4c838f2e6f5be2f06bd86f007ff11fedbe3a56b2b036cf38d59d42877a15071b",
|
||||
"storeUpdatedAt": "2026-09-08T08:47:24.333Z",
|
||||
"rootHash": "3775bab2c532fd30"
|
||||
"renderedHash": "2a1a6f7d5627269a9beb535944e21f32daa272c537cdc52c200662b960e05d05",
|
||||
"storeUpdatedAt": "2026-09-08T09:10:34.366Z",
|
||||
"rootHash": "cdfc2e29b87713ac"
|
||||
},
|
||||
"files": {
|
||||
".agent-shell/transcripts/2026-08-11-11-39-59.md": {
|
||||
|
|
@ -9780,6 +9780,33 @@
|
|||
"mtimeMs": 1788857244280.3716,
|
||||
"updatedAt": "2026-09-08T08:47:24.325Z",
|
||||
"source": "hook"
|
||||
},
|
||||
"src/lib/testsuite/test_xcealloc.c": {
|
||||
"description": "include <stdio.h>",
|
||||
"tokens": 4979,
|
||||
"hash": "9ad2be619a1e9bfd",
|
||||
"size": 18690,
|
||||
"mtimeMs": 1788858106119.9905,
|
||||
"updatedAt": "2026-09-08T09:01:46.164Z",
|
||||
"source": "hook"
|
||||
},
|
||||
"src/lib/misc.c": {
|
||||
"description": "include <errno.h>",
|
||||
"tokens": 486,
|
||||
"hash": "e50b3d93e4e39bc4",
|
||||
"size": 1821,
|
||||
"mtimeMs": 1788858209469.2747,
|
||||
"updatedAt": "2026-09-08T09:03:29.511Z",
|
||||
"source": "hook"
|
||||
},
|
||||
"src/scheduler/testsuite/test_core_events.c": {
|
||||
"description": "Declares and",
|
||||
"tokens": 18252,
|
||||
"hash": "d4594ba3d4df54ad",
|
||||
"size": 68442,
|
||||
"mtimeMs": 1788858634325.683,
|
||||
"updatedAt": "2026-09-08T09:10:34.359Z",
|
||||
"source": "hook"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# anatomy.md
|
||||
|
||||
> Auto-maintained by OpenWolf. Last scanned: 2026-09-08T08:47:24.325Z
|
||||
> Files: 507 tracked | Anatomy hits: 0 | Misses: 0
|
||||
> Auto-maintained by OpenWolf. Last scanned: 2026-09-08T09:10:34.359Z
|
||||
> Files: 510 tracked | Anatomy hits: 0 | Misses: 0
|
||||
|
||||
## ./
|
||||
|
||||
|
|
@ -830,3 +830,15 @@
|
|||
## src/configs/
|
||||
|
||||
- `limits.yaml` (~603 tok)
|
||||
|
||||
## src/lib/
|
||||
|
||||
- `misc.c` — include <errno.h> (~486 tok)
|
||||
|
||||
## src/lib/testsuite/
|
||||
|
||||
- `test_xcealloc.c` — include <stdio.h> (~4979 tok)
|
||||
|
||||
## src/scheduler/testsuite/
|
||||
|
||||
- `test_core_events.c` — Declares and (~18252 tok)
|
||||
|
|
|
|||
|
|
@ -18195,7 +18195,7 @@
|
|||
"error_message": "LeakSanitizer (run with ASAN_OPTIONS=detect_leaks=1, overriding this test suite's own detect_leaks=0 convention): 'Direct leak of 8 byte(s) ... #1 make_host_account ../lib/xcealloc.c:119 #2 make_job_account ../lib/xcealloc.c:188' -- an xce_host_account_t's `host` field (strdup'd in make_host_account(), src/lib/xcealloc.c:119) is never freed.",
|
||||
"file": "src/lib/misc.c (free_host_account)",
|
||||
"root_cause": "free_host_account() (src/lib/misc.c) frees acct->accounts[] (each via free_res_account()) and then FREEUP(acct) itself, but never FREEUP(acct->host) -- the strdup'd host string make_host_account() (src/lib/xcealloc.c:119, `haccount->host = strdup(halloc->host);`) allocates. Pre-existing, NOT introduced by scheduler-sim-decision-parity task 2.3: confirmed by tracing the leak's allocation stack, which bottoms out in make_job_account()/make_host_account() (xcealloc.c) -- the exact same tree-building code the LIVE dispatch path already uses (scheduler.c's sched_commit_decision() -> make_job_account()), so this leak equally exists on the live, production dispatch path today, just previously undetected because src/scheduler/testsuite/meson.build runs this whole suite with ASAN_OPTIONS=detect_leaks=0 (fixtures are deliberately not torn down in this test family, per test file header conventions -- masks this along with every other intentional fixture leak).",
|
||||
"fix": "NOT FIXED -- out of boundary for task 2.3 (src/lib/misc.c was not in that task's editable file set; task 2.3's own boundary was sim_loop.c's Recorded-Decision Reconciliation component only). Discovered while verifying task 2.3's reconcile-then-release ASAN round-trip (test_reconcile_then_release_via_job_state_change_is_asan_clean, test_sim_reconcile_unaccounted.c) by re-running the standalone sched_sim_reconcile_unaccounted_test binary directly with ASAN_OPTIONS=detect_leaks=1 (overriding the meson-registered detect_leaks=0) specifically to check for leaks the registered test run cannot see. Zero double-free/use-after-free were found (task 2.3's own move-then-null-then-free ownership transfer is correct); this is the ONLY leak that traces through sim_reconcile_unaccounted_jobs, and it is entirely attributable to this pre-existing free_host_account() gap, not to task 2.3's own new code. Correct fix (for whoever picks this up): add `FREEUP(acct->host);` to free_host_account() in src/lib/misc.c, mirroring free_res_account()'s existing `FREEUP(acct->resname);` pattern immediately above it in the same file.",
|
||||
"fix": "FIXED (2026-09-08, follow-up session). Applied exactly the fix this entry already recommended: added FREEUP(acct->host); to free_host_account() (src/lib/misc.c), immediately before FREEUP(acct) -- mirrors free_res_account()'s existing FREEUP(acct->resname) pattern in the same file. Discovered as the remaining residual leak while fixing bug-1723's test-cleanup gaps: after adding the missing free_JobAlloc_ptr()/free_HostAlloc_list() calls those two tests needed, xcelib_test still leaked 12 bytes/2 allocations (exactly 2x \"host0\"/\"host1\", 6 bytes each) at make_host_account (xcealloc.c:119) via make_job_account -- this exact function/line. Since free_host_account() is called from free_job_account(), which real production dispatch code uses (scheduler.c, core_events.c), this fix has genuine production value, not just test-cleanliness. Verified: xcelib_test now 1/1 Ok with zero LeakSanitizer reports; full xce-build.sh all asan --incremental: 94/94 Ok, zero regressions.",
|
||||
"tags": [
|
||||
"memory-leak",
|
||||
"asan",
|
||||
|
|
@ -18206,11 +18206,14 @@
|
|||
"resource-accounting",
|
||||
"scheduler-sim-decision-parity",
|
||||
"pre-existing",
|
||||
"out-of-scope"
|
||||
"out-of-scope",
|
||||
"fixed"
|
||||
],
|
||||
"related_bugs": [
|
||||
"bug-1723"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-08-22T08:12:00Z"
|
||||
"last_seen": "2026-09-08T00:00:00Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-1622",
|
||||
|
|
@ -19732,7 +19735,7 @@
|
|||
"error_message": "LeakSanitizer (xcelib_test's ASAN default detect_leaks=1, per bug-1437's established precedent that this is a separate pass/fail axis from Unity PASS/FAIL) aborts the whole xcelib_test binary at exit with SIGABRT even on a completely clean run (all Unity tests, including the new scheduler-snapshot-job-allocation task 1.1 dup_job_alloc() suite, report 0 Failures) -- 456 byte(s) leaked in 29 allocation(s), confirmed present identically at HEAD before task 1.1's changes (baseline A/B comparison: stashed task 1.1's 3 changed files, rebuilt, reran standalone binary -- same 456 bytes/29 allocations, same two leak sources, same SIGABRT).",
|
||||
"file": "src/lib/testsuite/test_xcealloc.c",
|
||||
"root_cause": "test_make_job_account_multi_host_no_overflow() (added in bug-1722's fix) calls free_job_account(account) but never frees its own directly-built fixture tree (jalloc/hallocs/h0/h1/a0/a1 -- make_job_alloc()'s calloc at xcealloc.c:156 and the two make_alloc()-internal strdup()s it roots). test_make_host_allocs_multi_host_no_overflow() (same commit) frees nothing at all (make_host_allocs()'s calloc at xcealloc.c:134 and its two hosts/allocs). Neither test calls free_JobAlloc_ptr() or any other teardown on its own locally-constructed xce_job_alloc_t/xce_host_alloc_t** tree. Pre-existing since bug-1722's commit (00207503), not introduced by task 1.1 -- confirmed via git-stash A/B rebuild showing byte-for-byte identical leak signature with task 1.1's 3 files reverted.",
|
||||
"fix": "NOT FIXED -- out of boundary for scheduler-snapshot-job-allocation task 1.1 (its own explicit instructions: 'add your new tests alongside the existing ones -- do not remove or alter the existing tests'). Task 1.1's own 6 new dup_job_alloc() tests were verified leak-delta-clean: with task 1.1's changes applied, the same standalone binary run reports the exact same 456 bytes/29 allocations as the baseline-without-task-1.1 run, proving zero additional leaked bytes/allocations from the new code. Correct fix for whoever picks this up: add free_JobAlloc_ptr(&jalloc) (which also frees hallocs/h0/h1/a0/a1's tree) at the end of test_make_job_account_multi_host_no_overflow(), and free_host_allocs-equivalent teardown (free_HostAlloc_list(2, hallocs) via controller.capnp.h, already included in this file) at the end of test_make_host_allocs_multi_host_no_overflow().",
|
||||
"fix": "FIXED (2026-09-08, follow-up session). Applied exactly the fix this entry already specified: added free_JobAlloc_ptr(&jalloc); at the end of test_make_job_account_multi_host_no_overflow() (frees jalloc/hallocs/h0/h1/a0/a1's whole tree, after free_job_account(account) already frees the account side) and free_HostAlloc_list(2, hallocs); at the end of test_make_host_allocs_multi_host_no_overflow() (which previously freed nothing at all). This reduced the leak from 456 bytes/29 allocations to 12 bytes/2 allocations -- the residual was a DIFFERENT, deeper pre-existing production bug (free_host_account() never freeing acct->host), already independently logged as bug-1621 and fixed in the same pass; see that entry. Verified: standalone xcelib_test binary now 1/1 Ok with zero LeakSanitizer reports (was: SIGABRT on every run, even with all Unity tests passing); full xce-build.sh all asan --incremental: 94/94 Ok (controller/scheduler/lib/worker/apiserver C suites + all Go test packages), zero regressions.",
|
||||
"tags": [
|
||||
"memory-leak",
|
||||
"asan",
|
||||
|
|
@ -19741,7 +19744,8 @@
|
|||
"test-fixture-teardown",
|
||||
"scheduler-snapshot-job-allocation",
|
||||
"pre-existing",
|
||||
"out-of-scope"
|
||||
"out-of-scope",
|
||||
"fixed"
|
||||
],
|
||||
"related_bugs": [
|
||||
"bug-1722",
|
||||
|
|
@ -19749,7 +19753,7 @@
|
|||
"bug-1437"
|
||||
],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-08-27T00:00:00Z"
|
||||
"last_seen": "2026-09-08T00:00:00Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-1724",
|
||||
|
|
@ -20689,8 +20693,8 @@
|
|||
"timestamp": "2026-09-02T03:23:00Z",
|
||||
"error_message": "scheduler suite (meson test --suite scheduler): sched_core_events_test FAILs deterministically -- test_core_events.c:1364:test_job_rusage_reconciles_mem_reservation_against_usage:FAIL: Expected 4 Was 0. Discovered as one of 2 failures (the other is a pre-existing, unrelated libxce/meson.build ASAN-flag gap) during worker-rejoin-resync feature-level /kiro-validate-impl full-suite run; confirmed NOT caused by worker-rejoin-resync.",
|
||||
"file": "src/scheduler/testsuite/test_core_events.c",
|
||||
"root_cause": "NOT YET ROOT-CAUSED (logged, not investigated -- out of scope for the session that found it). Confirmed via git blame that the ENTIRE failing test function, including the failing sanity assertion at line 1364 itself, was newly added by commit eb06f16d (\"fix(scheduler): wire mem reservation reconciliation into live rusage event path\", .kiro/specs/scheduler-dispatch-commit/), not by worker-rejoin-resync or any earlier commit -- this is that commit's own new test failing against its own new code, not a regression it caused in pre-existing coverage. The failure is at the test's OWN pre-condition sanity check (line 1364, before the rusage/reconciliation event the test is actually about is even pushed): a JOBS_PUSH-dispatched job with a real 4.0 \"mem\" xce_alloc_t is asserted to have already charged 4.0 into w->resInUse (\"matching sched_charge_account()'s existing behavior\", per the test's own comment) -- but val[0] reads back 0. Two live hypotheses, neither yet confirmed: (a) core_events.c's XCE_CORE_EVENT_JOBS_PUSH handler (used here to simulate a dispatch by directly attaching job1->allocs) never actually calls sched_charge_account()/an equivalent resInUse-charging step for a pushed RUN job carrying allocs -- JOBS_PUSH may be resync-shaped (report already-existing state) rather than dispatch-shaped (perform a fresh charge) by design, making the test's own sanity-check premise wrong; or (b) charging happens but keyed off a different resource-index/worker-pointer path than this test's fixture reads back from. Needs an actual debugging pass (e.g. kiro-debug) to distinguish; not attempted here.",
|
||||
"fix": "NOT FIXED. Out of scope for the worker-rejoin-resync feature that discovered it (confirmed via git blame this belongs entirely to eb06f16d/.kiro/specs/scheduler-dispatch-commit/, a separate, currently in-flight spec on this shared branch). Logged per this project's bug-tracking convention instead of silently ignoring a real, currently-red test on the shared branch. Needs a dedicated debugging/fix pass scoped to scheduler-dispatch-commit before that spec can be considered complete -- do not patch around it from an unrelated feature.",
|
||||
"root_cause": "NOT YET ROOT-CAUSED (logged, not investigated -- out of scope for the session that found it). Confirmed via git blame that the ENTIRE failing test function, including the failing sanity assertion at line 1364 itself, was newly added by commit eb06f16d (\"fix(scheduler): wire mem reservation reconciliation into live rusage event path\", .kiro/specs/scheduler-dispatch-commit/), not by worker-rejoin-resync or any earlier commit -- this is that commit's own new test failing against its own new code, not a regression it caused in pre-existing coverage. The failure is at the test's OWN pre-condition sanity check (line 1364, before the rusage/reconciliation event the test is actually about is even pushed): a JOBS_PUSH-dispatched job with a real 4.0 \"mem\" xce_alloc_t is asserted to have already charged 4.0 into w->resInUse (\"matching sched_charge_account()'s existing behavior\", per the test's own comment) -- but val[0] reads back 0. Two live hypotheses, neither yet confirmed: (a) core_events.c's XCE_CORE_EVENT_JOBS_PUSH handler (used here to simulate a dispatch by directly attaching job1->allocs) never actually calls sched_charge_account()/an equivalent resInUse-charging step for a pushed RUN job carrying allocs -- JOBS_PUSH may be resync-shaped (report already-existing state) rather than dispatch-shaped (perform a fresh charge) by design, making the test's own sanity-check premise wrong; or (b) charging happens but keyed off a different resource-index/worker-pointer path than this test's fixture reads back from. Needs an actual debugging pass (e.g. kiro-debug) to distinguish; not attempted here.\n\nRESOLVED (2026-09-08, follow-up session): hypothesis (a) confirmed, but with the opposite implication than it first suggested -- this is NOT a production gap. core_session.c's own core_begin_session_internal() doc comment (lines 156-176) already documents the real architecture: resInUse/sharedInUse is never charged incrementally at JOBS_PUSH/dispatch time. It is fully RE-DERIVED once per round by sched_account_jobs() (scheduler.c:1434) -- iterates every currently-RUN job in core->jobs and calls sched_charge_account() on each one's accounts -- called by BOTH the real normal-mode driver (driver.c:761) and the sim driver (sim_loop.c:1118), always BEFORE anything else in that round reads resInUse. JOBS_PUSH intentionally does none of this itself (confirmed by reading its full handler in core_events.c and builtin_fcfs_on_job_push() -- neither calls sched_charge_account/sched_uncharge_account anywhere), and neither does the terminal-state cleanup path (JOB_STATE_CHANGE/JOB_UPDATE just free the accounts structure) -- both are consistent with a 'recompute from source of truth each round' design that needs no incremental charge/uncharge pairing at all. The test's own precondition assertion (checking resInUse immediately after JOBS_PUSH, with no round boundary simulated) was checking an invariant that was never the real contract -- a test bug, not a production one.",
|
||||
"fix": "FIXED (2026-09-08, follow-up session). test_job_rusage_reconciles_mem_reservation_against_usage (test_core_events.c) now calls sched_charge_account(&core, tracked->accounts) right after JOBS_PUSH and before the resInUse sanity assertion -- simulating the exact reconciliation step sched_account_jobs() would perform for this test's one RUN job, the same primitive sched_account_jobs() itself calls internally (test_core_events.c already white-box #includes resource.c, where sched_charge_account() lives; sched_account_jobs() itself is scheduler.c, not included here, so its single-job effect is reproduced directly rather than pulling in that whole file). No production code changed -- the bug was entirely in the test's precondition assumption, not the scheduler. Verified: full scheduler suite xce-build.sh scheduler asan --incremental: 77/77 Ok (was 76/77, this test's own prior deterministic failure now gone); full xce-build.sh all asan --incremental: 94/94 Ok, zero regressions.",
|
||||
"tags": [
|
||||
"scheduler-dispatch-commit",
|
||||
"core_events-c",
|
||||
|
|
@ -20700,11 +20704,12 @@
|
|||
"resInUse",
|
||||
"unrelated-branch-breakage",
|
||||
"discovered-by-worker-rejoin-resync-validation",
|
||||
"not-fixed"
|
||||
"not-fixed",
|
||||
"fixed"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-09-02T03:23:00Z"
|
||||
"last_seen": "2026-09-08T00:00:00Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-1759",
|
||||
|
|
|
|||
|
|
@ -4447,3 +4447,7 @@
|
|||
| 01:44 | Edited .claude/skills/xce-build/SKILL.md | 5→5 lines | ~64 |
|
||||
| 01:46 | Edited src/configs/limits.yaml | expanded (+12 lines) | ~187 |
|
||||
| 01:47 | Edited src/configs/limits.yaml | 4→4 lines | ~31 |
|
||||
| 02:01 | Edited src/lib/testsuite/test_xcealloc.c | 5→6 lines | ~54 |
|
||||
| 02:01 | Edited src/lib/testsuite/test_xcealloc.c | 3→5 lines | ~41 |
|
||||
| 02:03 | Edited src/lib/misc.c | 7→8 lines | ~35 |
|
||||
| 02:10 | Edited src/scheduler/testsuite/test_core_events.c | expanded (+13 lines) | ~321 |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue