myxce/src
Rongsong Shen c1cd8f917d
fix(scheduler): free registry entries after their tables at core teardown; fix dup_val and the unmeet re-init leak (bug-1884, part 5)
A failed key_add() runs the table's datakiller on the rejected value, and
callers keep using it (JOBS_PUSH merges a duplicate job into the existing
one; sched_init_queues() re-adds every queue on each config apply), so the
job, queue, worker and resource datakillers must stay shallow. Part 4 made
kill_sched_job() free the whole job; that is reverted. Instead
xce_sched_core_fini() collects each table's entries, destroys the table,
then frees each entry with a full destructor (core.c). The resource table
is released the same way (a reference per resobj).

Also:
- dup_val() tested which == XCE_VAL_STRING (0, the resource value type,
  equal to Value_u_ivalue32): real string values were shallow-copied and a
  nonzero int32 went to makeString() as a pointer. It now tests
  Value_u_svalue and strdup()s, as free_Value() expects.
- The shared/host satisfy checks re-initialize the unmeet vector they are
  given; the allocators passed the ctx's live one, dropping its buffers on
  every candidate host. The callers finalize it first.
- add_vres() registers a resobj via makeResource(), like every other
  resource, instead of a bare calloc(); test_limit.c drops it with
  dereference().
- plugin_register_core() rejects a duplicate name before init_fn/key_add,
  since a failed add now finalizes (frees) the plugin and callers free it
  on failure.
- sharedInUse gets kill_sched_resval, as put_resvals() fills it.

Exit-time leak on the reproduction replay 7,469 -> 928 bytes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-29 09:28:08 +00:00
..
autoscaler remove extralib 2026-09-04 11:24:43 +08:00
configs feat(xceadmin): validate percent-based limit values are in [0.0, 1.0] (bug-1833) 2026-09-20 10:50:21 +00:00
controller fix(controller): cold start elects in ~1.7 s, not ~10 s; ctrlstatus appliedLsn on the primary (bug-1879, bug-1878) 2026-09-28 07:35:45 +00:00
docs docs(scheduler-sim-discrete-clock): deployment guide describes the event-driven sim clock and deprecated --sim-speed (task 4.1) 2026-09-29 05:21:11 +00:00
frontend fix: spurious errors/warnings from a pc13v HA deploy (bug-1872..1877) 2026-09-28 04:35:19 +00:00
harness fix(harness): xce_test argument validation, RPC error text and leaks (13 bugs) 2026-09-28 04:17:04 +00:00
include feat(libxce-alloc-preason-equality): full-match job_preason_eq with first-difference description (task 2.2) 2026-09-28 09:49:57 +00:00
lib fix(scheduler): free registry entries after their tables at core teardown; fix dup_val and the unmeet re-init leak (bug-1884, part 5) 2026-09-29 09:28:08 +00:00
nixSupport remove extralib 2026-09-04 11:24:43 +08:00
scheduler fix(scheduler): free registry entries after their tables at core teardown; fix dup_val and the unmeet re-init leak (bug-1884, part 5) 2026-09-29 09:28:08 +00:00
schema feat: acknowledged job start/finish/fail reports (bug-1741) 2026-09-27 06:47:47 +00:00
tools fix(xce-test-multihost): deploy with a fixture config set that clears limits (bug-1857) 2026-09-25 13:15:03 +00:00
worker fix: spurious errors/warnings from a pc13v HA deploy (bug-1872..1877) 2026-09-28 04:35:19 +00:00
xceadmin feat(xceadmin): validate percent-based limit values are in [0.0, 1.0] (bug-1833) 2026-09-20 10:50:21 +00:00
flake.lock remove extralib 2026-09-04 11:24:43 +08:00
flake.nix remove extralib 2026-09-04 11:24:43 +08:00
meson.build feat(xce-harness-component): relocate xce_test into standalone harness component 2026-09-14 05:08:15 +00:00
meson.options feat(dirty-content-fingerprint): add dirty_fingerprint meson option and C define 2026-08-21 03:54:37 +00:00