myxce/src
lei.chen 7f8c07ba85 fix(scheduler): bug-1513 — rejoin crash root-caused to 3 rejoin re-push bugs, not a lib race
The "libxce reconnect heap corruption" (ASAN bad-free, free(): invalid
pointer) was NOT a libxce bug — xce_ctx_reconnect is fine. The crashes are
in the scheduler's rejoin state re-sync path (config/dataset re-push),
fixed with the reconnect/rejoin feature now integrated:

1. group.c makeGroup refresh: FREEUP(m->u.name) raw-freed shared interned
   xstrings (makeString is a global refcounted table); the correct release
   is dereference(), matching group_killer. → dereference().
2. limit.c limit_update_config: after key_add returns -EEXIST (rejoin
   re-push — limit name already present) it called kill_limit(limit), but
   xkvmgr_add's vclear already freed the limit via the kvmgr datakiller
   (=kill_limit). → skip on -EEXIST (idempotent re-push).
3. handler.c/scheduler.c: the config push was applied inline on the vcpu
   thread (sched_init_config adds queues/plugin queues) while job updates
   flow through pend_updates on the main loop — concurrent rejoin re-push
   let fcfs_update_job see a NULL j->queue (SIGSEGV). Route the config
   push through pend_updates (XCE_SCHED_OP_UPDATE_CONFIG, killer case
   already existed) and process config requests FIRST in sched_update via
   a staging queue so jobs always see their queues/resources.

Verified: 295 lib unit tests pass under ASAN (incl. 2 new group-refresh
regression tests), scheduler survives 3 consecutive controller restarts
(each rejoin ok), full job lifecycle (submit→dispatch→DONE) on the
cluster. Also fixed stale build deps (libxce_deps missing librtti_dep,
scheduler_deps missing ssl_dep/c_capnproto_dep, unity include path).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-14 07:29:32 +00:00
..
autoscaler fix: nix build environment fixes 2026-07-24 07:03:18 +00:00
configs fix(apiserver): carry exec_user on job submit so jobs don't run as nobody (bug-1500) 2026-08-04 07:38:43 +00:00
controller feat(apiserver): expose PEND reason end-to-end (scheduler → API) 2026-08-13 09:16:13 +00:00
docs fix(configs): add worker-builtin load indices missing from resources.yaml 2026-08-02 07:36:03 +00:00
frontend feat(apiserver): fail-fast circuit breaker when backend controller is down (Req 4) 2026-08-14 05:20:52 +00:00
include feat(raft-adapter-conformance): add term field to ReplConfigPushReply schema 2026-07-29 09:09:56 +00:00
lib fix(scheduler): bug-1513 — rejoin crash root-caused to 3 rejoin re-push bugs, not a lib race 2026-08-14 07:29:32 +00:00
nixSupport fix(nix): pin capnpc source to immutable commit, not mutable main ref 2026-07-24 08:25:38 +00:00
scheduler fix(scheduler): bug-1513 — rejoin crash root-caused to 3 rejoin re-push bugs, not a lib race 2026-08-14 07:29:32 +00:00
schema feat(raft-adapter-conformance): add term field to ReplConfigPushReply schema 2026-07-29 09:09:56 +00:00
tools fix: nix build environment fixes 2026-07-24 07:03:18 +00:00
worker feat(failover): worker keeps retrying forever + apiserver re-joins on reconnect 2026-08-14 02:35:05 +00:00
xceadmin wip(admin-config-tool): task 6.3 HA E2E test (blocked, flaky primary-push) 2026-07-31 08:09:36 +00:00
flake.lock fix librtti package leak issue 2026-07-27 15:31:50 +08:00
flake.nix chore(nix): drop redundant capnpc override from flake.nix overlay 2026-08-01 03:04:10 +00: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