chore(wolf): checkpoint buglog.json (1001 bugs)
This commit is contained in:
parent
5f7e1e98be
commit
230083ae5d
1 changed files with 5 additions and 4 deletions
|
|
@ -18003,7 +18003,7 @@
|
|||
"error_message": "User-reported (xce_scheduler -i -s <replay>, 'info worker <name>'): every CONSUMABLE resource's used= value reads 0.00 for a worker regardless of how many jobs are actually dispatched and running on it, e.g. 'resource slots: value=22.00 used=0.00' and 'resource mem: value=17286225920.00 used=0.00' with jobs clearly active (confirmed via ongoing JOB_RUSAGE ticks in the same session). Confirmed real, not a display bug.",
|
||||
"file": "src/scheduler/src/sim_loop.c",
|
||||
"root_cause": "sched_account_jobs() (scheduler.c:1255, exported via scheduler.h) is the ONLY mechanism that re-populates per-worker (w->resInUse) and shared (core->sharedInUse) resource-in-use accounting after each session's resval reset zeroes them (core.h's own doc comment on xce_core_begin_session()/xce_core_signal_go(): 'the picker thread must never observe a session whose resource-in-use accounting has been reset to zero ... but not yet re-summed from currently running jobs (sched_account_jobs())'). This obligation was split out (scheduler-core spec task 5.2) into xce_core_begin_session()+xce_core_signal_go() specifically so a driver can call sched_account_jobs() in between; the normal-mode driver does this correctly (driver.c:739-749, xce_sched_driver_run_normal_mode_round(): xce_core_begin_session() -> plugin_begin_session()+sched_account_jobs() -> xce_core_signal_go()). The simulation driver (sim_loop.c:680) was never migrated to this split -- it still calls the older monolithic xce_core_go() (core_session.c:402-409, itself now just xce_core_begin_session()+xce_core_signal_go() called back-to-back with zero interleaving slot), and sim_loop.c/sim.c/sim_verify.c/sim_record.c contain NO call to sched_account_jobs() anywhere (grep-confirmed). Consequently every session's resval reset in simulation/replay mode is never followed by re-accumulation, so w->resInUse/core->sharedInUse stay at their zero-initialized value for the entire run -- even a job freshly dispatched via sched_commit_decision()'s direct sched_charge_account() call (scheduler.c:1438-1443) would have that charge wiped by the very next session's reset with nothing to re-sum it. Broader concern (not yet verified): the live allocator thread's own capacity checks (sched_try_alloc_on_host_ -> sched_check_host_satisfy/sched_meet_host_selection, resource.c) may read w->resInUse to compute free capacity -- if so, the simulation driver could be scheduling against permanently-zero 'in use' data, i.e. believing full capacity is always available regardless of what is actually running, which would be a correctness risk for scheduler-core's documented normal-mode/sim-mode decision-equivalence invariant, not merely a REPL display cosmetic. This needs confirmation before being treated as proven.",
|
||||
"fix": "Not yet fixed -- investigation only, per user request. Proposed direction: call sched_account_jobs(sched) in sim_loop.c's round loop, in the same relative position driver.c uses (after xce_core_begin_session()'s resval reset, before signaling the picker/allocator thread) -- likely requires migrating sim_loop.c from the monolithic xce_core_go() to the split xce_core_begin_session()+xce_core_signal_go() calls, mirroring xce_sched_driver_run_normal_mode_round()'s exact pattern (driver.c:739-749). Should be paired with confirming/refuting the broader allocator-capacity-check concern above before scoping a fix.",
|
||||
"fix": "Not yet fixed -- investigation only, per user request. Proposed direction: call sched_account_jobs(sched) in sim_loop.c's round loop, in the same relative position driver.c uses (after xce_core_begin_session()'s resval reset, before signaling the picker/allocator thread) -- likely requires migrating sim_loop.c from the monolithic xce_core_go() to the split xce_core_begin_session()+xce_core_signal_go() calls, mirroring xce_sched_driver_run_normal_mode_round()'s exact pattern (driver.c:739-749). Should be paired with confirming/refuting the broader allocator-capacity-check concern above before scoping a fix.\n\n--- CONFIRMED 2026-08-21 (scheduler-sim-decision-parity spec research) ---\n\nThe \"broader concern (not yet verified)\" above is CONFIRMED, not theoretical: `sched_check_host_satisfy_()`/`sched_check_shared_satisfy_()` (resource.c) read `w->resInUse`/`core->sharedInUse` directly as inputs to the live allocator's own per-host capacity check (`sched_try_alloc_on_host_`'s viability test). With `resInUse` permanently zero in sim/replay mode, simulation-mode capacity checks can systematically pass where normal-mode execution of the same recorded state would fail -- this is a scheduling-decision-correctness bug under resource contention, not merely a REPL display cosmetic.\n\nAlso determined to likely share one root cause with bug-1611 (see that entry): sim_loop.c decodes the recorded decision stream (`decoded_session->decisions`) every round but only ever uses it for optional `--sim-verify` comparison, never to reconstruct state (job->allocs/job->accounts) or report a decision for a job already resolved before the replay reaches it.\n\nThis is now elevated to an enforced steering invariant: `.kiro/steering/scheduler-driver-equivalence.md` (\"normal-mode and sim-mode must produce identical decisions AND identical resource-accounting state, not just a matching decision sequence\").\n\nA dedicated fix spec has been scoped (deliberately not folded into the closed scheduler-core spec or the narrower scheduler-sim-repl-verbosity spec): `.kiro/specs/scheduler-sim-decision-parity/` (requirements approved; design generated, not yet approved; tasks not yet generated -- next step is /kiro-validate-design or /kiro-spec-tasks). Chosen approach: reconstruct job->allocs/job->accounts for already-resolved RUN-state jobs from the recorded decision stream at the round-boundary accounting point, keyed/deduped on job->accounts == NULL (the same signal sched_account_jobs() already uses), and feed the reconstructed decision through the same on_decision/xce_repl_check_decision reporting path a fresh decision uses -- fixing bug-1613's accounting gap and bug-1611's decision-visibility gap as one change. See that spec's research.md for full architecture-option evaluation and risks (--sim-verify interaction, snapshot-restored jobs with no in-window recorded decision).",
|
||||
"tags": [
|
||||
"scheduler",
|
||||
"sim",
|
||||
|
|
@ -18012,13 +18012,14 @@
|
|||
"resInUse",
|
||||
"sched_account_jobs",
|
||||
"correctness",
|
||||
"repl"
|
||||
"repl",
|
||||
"confirmed"
|
||||
],
|
||||
"related_bugs": [
|
||||
"bug-1611"
|
||||
],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-08-21T07:25:00Z"
|
||||
"occurrences": 2,
|
||||
"last_seen": "2026-08-21T00:00:00Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-1614",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue