Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1f932bf22d
commit
3d3f37e0fd
2 changed files with 17 additions and 12 deletions
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
id: "bug-1893"
|
||||
status: "open"
|
||||
status: "fixed"
|
||||
status_updated: "2026-09-30"
|
||||
status_note: "newly logged"
|
||||
status_note: ""
|
||||
component: "scheduler"
|
||||
severity: "wrong-result"
|
||||
timestamp: "2026-09-30T03:58:52Z"
|
||||
|
|
@ -11,6 +11,7 @@ occurrences: 1
|
|||
files: ["src/scheduler/src/plugins/seqjob_allocator.c", "src/scheduler/src/plugins/parjob_allocator.c"]
|
||||
tags: ["scheduler", "allocation", "preason", "code-review"]
|
||||
related: ["bug-1892"]
|
||||
fix_commits: ["d9ef9830", "239bcf95", "65679285"]
|
||||
---
|
||||
|
||||
# bug-1893: xce_scheduler allocators never record shared-resource pend reasons (vget rc check inverted)
|
||||
|
|
@ -68,15 +69,15 @@ UPDATE (2026-09-30): Found in scheduler-allocator-runner task 2.1 (characterizat
|
|||
- Evidence: not kept (code reading only)
|
||||
|
||||
## Root cause
|
||||
TODO: required for fixed/partial
|
||||
Both allocators' `my_alloc()` shared-reason loop skipped on `vget() <= 0`, but `vget()` (`xzarray_get_vec`, src/lib/zarray.c) returns 0 on success, so every successful lookup was skipped and no shared `PREASON_NO_RESOURCE` reason was ever added. The loop also ran to `ctx->alloc_req.shared.count` instead of `ctx->unmeet.count` (the tail entries were zero-filled and skipped the same way).
|
||||
|
||||
## Fix
|
||||
TODO: required for fixed/partial
|
||||
Allocation moved into the framework runner (spec scheduler-allocator-runner). `sched_alloc_prepare_shared_()` in src/scheduler/src/alloc_runner.c loops over `ctx->unmeet.count` and skips only on `vget() < 0`, adding one host-less NO_RESOURCE reason per unmet shared resource. parjob (task 4.1) and seqjob (task 4.2) now allocate through it; both private loops are deleted.
|
||||
|
||||
## 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_shared_short_one_reason_per_unmet_entry` (testsuite/test_alloc_runner.c) RED under an `rc <= 0` skip ("Expected 1 Was 0"), GREEN after; characterization `test_parjob_pending_on_short_shared_names_short_one` and `test_seqjob_pending_on_short_shared_names_it` RED against the old plugins ("Expected 1 Was 0"), GREEN after the switch.
|
||||
- Suites: scheduler ASAN suite 96/96 (`bash src/tools/xce-build.sh scheduler asan build.alloc --jobs 12`), 2026-09-30.
|
||||
- Live: n/a (pend-reason content only; main_reason, decisions, unsatisfiable cache and sim parity unaffected).
|
||||
|
||||
## References
|
||||
- Related: none
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue