chore(wolf): checkpoint buglog.json (1001 bugs)
This commit is contained in:
parent
f11f0df3bd
commit
76ca61547e
1 changed files with 3 additions and 3 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.\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).",
|
||||
"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).\n\n--- PARTIAL FIX 2026-08-22 (scheduler-sim-decision-parity task 2.1) ---\n\nsim_loop.c's round boundary now calls the relocated sched_account_jobs(&(sim->core)) (core.h, task 1.1) in exactly the position driver.c uses: xce_core_go() replaced with the split xce_core_begin_session() -> [reconciliation insertion point, not yet built] -> sched_account_jobs() -> xce_core_signal_go() sequence. Proven via a new spy-based regression test (test_sim_session_ordering.c): 0 calls pre-fix (RED, matches this bug's own symptom exactly), 2 calls (one per replayed round) with core->session_active==1 post-fix (GREEN). Interactive and batch sim runs share this one call site (Req 5.1), no change to normal-mode behavior (Req 5.3) -- full scheduler suite 45/46 OK post-fix, only pre-existing unrelated bug-1560 fails.\n\nSTILL NOT FULLY OBSERVABLE END-TO-END: confirmed while implementing this task that job->accounts/job->allocs is ALWAYS NULL for every RUN-state job in sim mode today -- sim_picker_thread_fn() never emits a live DISPATCH (unconditionally PENDs every candidate), and sched_commit_decision() (the only function that ever sets job->accounts) is only ever called from scheduler.c's real sched_allocator() thread, which sim mode never runs. sched_account_jobs()'s round-boundary re-charge therefore has nothing to charge yet in isolation -- 'info worker' will still show used=0.00 until Recorded-Decision Reconciliation (scheduler-sim-decision-parity tasks 2.2-2.4, not yet implemented) populates job->accounts from the recorded decision stream. This task deliberately leaves a documented insertion point for that work (sim_loop.c comment, right before the sched_account_jobs() call) rather than building it now (out of task 2.1's own scope). Do not close this bug until tasks 2.2-2.4 land.",
|
||||
"tags": [
|
||||
"scheduler",
|
||||
"sim",
|
||||
|
|
@ -18018,8 +18018,8 @@
|
|||
"related_bugs": [
|
||||
"bug-1611"
|
||||
],
|
||||
"occurrences": 2,
|
||||
"last_seen": "2026-08-21T00:00:00Z"
|
||||
"occurrences": 3,
|
||||
"last_seen": "2026-08-22T07:10:00Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-1614",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue