--- id: "bug-1863" status: "fixed" status_updated: "2026-09-25" status_note: "aea34738" component: "scheduler" severity: "leak" timestamp: "2026-09-25T13:07:56Z" last_seen: "2026-09-25T13:07:56Z" occurrences: 1 files: ["src/scheduler/src/scheduler.c", "src/scheduler/src/plugins/seqjob_allocator.c", "src/scheduler/src/plugins/parjob_allocator.c"] tags: ["scheduler", "allocation", "compound", "accounting"] related: [] fix_commits: ["aea34738"] legacy: true gitea_issue: 282 gitea_synced_status: "fixed" gitea_synced_hash: "0d5b3b8b03c0" --- # bug-1863: A COMPOUND resreq with 2+ primaries (e.g ## Description A COMPOUND resreq with 2+ primaries (e.g. '1*{A} + 2*{B}') keeps only the LAST primary's allocation: seqjob/parjob my_alloc assign ctx->alloc = make_job_alloc(...) per primary, overwriting (and leaking) the previous primary's job alloc, while every primary's hosts were already debited into ctx->uncomitted -- the dispatched allocation omits earlier primaries' hosts and accounting diverges from the decision. ## Environment _Not recorded (migrated from buglog.json)._ ## Reproduction _Not recorded (migrated from buglog.json)._ ## Root cause sched_make_compound_alloc_() (scheduler.c) loops primaries on one ctx; each allocator's success path replaces ctx->alloc instead of merging host allocs (and shared allocs) across primaries. Latent until bug-1768 (fixed 2026-09-25) because nested primaries previously requested nothing. ## Fix _Not recorded (migrated from buglog.json)._ ## Verification _Not recorded (migrated from buglog.json)._ ## References - Gitea: #282