chore(buglog): bug-1892 fixed (e822b888)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e822b88886
commit
8f5ba635c5
2 changed files with 17 additions and 14 deletions
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
id: "bug-1892"
|
||||
status: "open"
|
||||
status_updated: "2026-09-30"
|
||||
status_note: "newly logged"
|
||||
status: "fixed"
|
||||
status_updated: "2026-10-01"
|
||||
status_note: ""
|
||||
component: "scheduler"
|
||||
severity: "wrong-result"
|
||||
timestamp: "2026-09-30T03:58:52Z"
|
||||
|
|
@ -11,6 +11,7 @@ occurrences: 1
|
|||
files: ["src/scheduler/src/resource.c", "src/lib/xvec.c"]
|
||||
tags: ["scheduler", "allocation", "compound", "code-review"]
|
||||
related: ["bug-1893"]
|
||||
fix_commits: ["e822b888"]
|
||||
---
|
||||
|
||||
# bug-1892: xce_scheduler admission check reads per-resource uncommitted amounts by list position, not index
|
||||
|
|
@ -72,15 +73,15 @@ shortfall.
|
|||
- Evidence: not kept (code reading only)
|
||||
|
||||
## Root cause
|
||||
TODO: required for fixed/partial
|
||||
`unsatisfy_()` (`src/scheduler/src/resource.c`) indexed the uncommitted vector positionally (`uncomitted[i]`) like `total`/`inuse`/`wanted`, but both callers, `sched_check_shared_satisfy_()` and `sched_check_host_satisfy_()`, pass the allocation context's dense vector keyed by resource index (`ctx->uncomitted.shared` / `.hosts[w]`, 1024 floats, filled with `xvec_idval()`). Entry `i` therefore read the uncommitted amount of resource index `i` instead of `wanted->idxs[i]`. It matters from the second primary of a COMPOUND/ALTER job on, the only place a context holds nonzero uncommitted amounts.
|
||||
|
||||
## Fix
|
||||
TODO: required for fixed/partial
|
||||
`unsatisfy_()` takes the uncommitted `xvec_t*` and reads it through a new `uncomit_at_(uncomitted, wanted->idxs[i])`, which returns 0 for a NULL vector, a negative index, or an index past the vector's end. The last case is needed because `sim_loop.c`'s reconcile checks pass a short all-zero vector sized to the request; reading it by resource index would otherwise run past its end.
|
||||
|
||||
## Verification
|
||||
- Test: TODO: name + file; RED before the fix, GREEN after
|
||||
- Suites: TODO: suite results and build profile
|
||||
- Live: TODO: soak/deploy run, or n/a and why
|
||||
- Test: `test_host_satisfy_counts_uncommitted_of_the_wanted_resource` RED ("Expected 0 Was 1": over-admit), `test_host_satisfy_ignores_uncommitted_of_another_resource` RED ("Expected 1 Was 0": wrong pend), `test_shared_satisfy_counts_uncommitted_of_the_wanted_resource` RED ("Expected 0 Was 1"), all GREEN after; `test_host_satisfy_short_uncommitted_vector_counts_as_zero` (guards the bounds check, passes before and after), all in testsuite/test_resource_accounting.c.
|
||||
- Suites: scheduler ASAN suite 97/97 (build.alloc), 2026-10-01.
|
||||
- Live: n/a for HA (no HA path touched). Sanity: the bug-1897 replay (`--sim`) still completes, exit 0, no ASan report.
|
||||
|
||||
## References
|
||||
- Related: none
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue