2.5 KiB
| id | status | status_updated | status_note | component | severity | timestamp | last_seen | occurrences | files | tags | related | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| bug-1887 | open | 2026-09-29 | newly logged | lib | wrong-result | 2026-09-29T09:48:49Z | 2026-09-29T09:48:49Z | 1 |
|
|
|
bug-1887: resreq parser ignores a primary's select/rusage parse error and accepts the job without that clause
Description
Observed: (code reading) the primary_resreq action in
src/lib/xce_resreq.peg calls
parse_resreq_primary(primary, $0, auxil->resmgr, &(auxil->errmsg))
and ignores its return value; nothing sets has_error, so
parse_resreq() returns success. A primary whose select or rusage clause
fails to parse is kept without that clause (select NULL / rusages empty),
i.e. the job is scheduled as if it had no such constraint. While fixing
bug-1884 a LeakSanitizer report showed such an error message being
produced during a normal replay fixture (its job's resreq parsed "OK").
Expected: a primary sub-parse error makes parse_resreq() fail with that message (the job is rejected/pended with a parse error), not silently dropped.
Impact: wrong result: a job with a malformed select (e.g. a typo) may dispatch onto hosts its select would have excluded.
Found by: review (while fixing bug-1884, 2026-09-29)
Environment
- OS: no /etc/os-release; Docker container; NixOS kernel; kernel Linux 6.18.33 x86_64
- libc: glibc 2.42-47 (interpreter /nix/store/wb6rhpznjfczwlwx23zmdrrw74bayxw4-glibc-2.42-47/lib/ld-linux-x86-64.so.2)
- Toolchain: gcc (GCC) 15.2.0, meson 1.9.1
- Build: asan (src/xce.build.discrete)
- Code: scheduler-framework @ 90b99d91-dirty
- Deployment: n/a (found by code reading while fixing bug-1884; not observed on a deployment)
Reproduction
- Read the
primary_resreqaction in src/lib/xce_resreq.peg andparse_resreq_primary()in src/lib/resreq.c. - Unit check:
parse_resreq(&r, "select[type==] rusage[mem=1]", resmgr, &err)-- expect rc < 0; observe the return value.
- Frequency: deterministic for any malformed select/rusage inside a primary
- Evidence: not kept; LeakSanitizer stack from the bug-1884 fixture (strdup in parse_select error path under core_build_job)
Root cause
TODO: required for fixed/partial
Fix
TODO: required for fixed/partial
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
References
- Related: bug-1884