myxce/src
Rongsong Shen 7041d988d1
fix(scheduler): bug-1569 three stacked crashes blocking ALL job dispatch
No job could ever be scheduled in normal mode -- every round produced
decision=(nil), forever. Three independent bugs were stacked on the
same symptom, each masking the next (only reachable once the prior
one was fixed):

1. scheduler.c's sched_init_queues() -- the scheduler's one-time
   synchronous initial-config-push handler -- only fired the legacy
   job_elect_fn-era plugin_queue_update() fan-out. builtin_fcfs (the
   default picker) has no .hooks, only picker_iface, so
   on_queue_update() was never called for any queue from the initial
   cluster config. Its own candidate registry stayed empty forever,
   so next_job() found zero candidates on every session.

2. Once #1 was fixed and a job first reached the allocator,
   core_events.c's core_build_job() never constructed job->schedobj
   -- a documented but incorrect assumption from the scheduler-core
   rewrite ("no picker hook reads job->schedobj... belongs to a
   separate allocation spec" -- no such spec exists in the live
   code). sched_allocator() dereferences it directly with no NULL
   check; reproduced live as a SIGSEGV in limit_job_election().

3. Once #2 was fixed and a job reached genuine dispatch,
   resource.c's put_resvals() crashed during post-dispatch resource
   charging: `idxs[i] <= 0` treated resource index 0 ("slots",
   almost always the first registered resource) as an invalid
   sentinel, leaving its value slot NULL for an unconditional write
   two lines later.

All three root-caused via gdb `bt full` on live SIGSEGVs, not
guesswork, and live-verified end-to-end: a 3-element job array now
runs PEND -> DISPATCH -> RUN -> DONE with the scheduler staying alive
throughout.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 12:38:10 +00:00
..
autoscaler support shared libxce(for api server) 2026-01-19 11:02:49 +08:00
configs fix(controller): close 6 data-safety races + apply-pump O(N^2) regression + boot TOCTOU 2026-08-16 10:20:02 +00:00
controller fix(scheduler,controller): worker resource values always display as 0.00 (bug-1568) 2026-08-17 10:35:34 +00:00
docs update documents 2026-08-10 17:51:51 +08:00
frontend fix(controller): close 6 data-safety races + apply-pump O(N^2) regression + boot TOCTOU 2026-08-16 10:20:02 +00:00
include fix(ha): close standby election-freeze (bug-1562) + flusher retry storm (bug-1563) 2026-08-17 06:35:06 +00:00
lib fix(libxce): bug-1425 -- populate jobsubmit's *jobid on idempotent-replay success 2026-08-16 10:47:09 +00:00
nixSupport feat(scheduler-core): implement REPL execution control (task 12.1) 2026-08-07 08:17:35 +00:00
scheduler fix(scheduler): bug-1569 three stacked crashes blocking ALL job dispatch 2026-08-17 12:38:10 +00:00
schema refactor(controller,xceadmin): drop generic Resource.unit, hardcode bytes for maxmem 2026-08-13 08:27:16 +00:00
tools feat(deploy,xceadmin): standalone xceadmin packaging + deploy-ha usability (bug-1566) 2026-08-17 10:20:52 +00:00
worker fix(worker): bug-1569 periodic resval reports tagged with wrong host 2026-08-17 12:01:52 +00:00
xceadmin feat(deploy,xceadmin): standalone xceadmin packaging + deploy-ha usability (bug-1566) 2026-08-17 10:20:52 +00:00
flake.lock fix librtti package leak issue 2026-07-27 15:31:50 +08:00
flake.nix save works 2026-03-04 18:18:53 +08:00
meson.build feat(admin-config-tool): wire xceadmin into meson + nix build 2026-07-22 10:46:45 +00:00
meson.options Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00