myxce/src
Rongsong Shen a643966f50
fix(scheduler): plugin_end_session() guards on the wrong field (bug-1682/1492)
/xce-audit-invariants scheduler (dimension 1, driver state-equivalence,
re-run after scheduler-sim-live-allocation) found plugin_end_session()
still checked `plugin->begin_session_fn != NULL` before invoking
`plugin->end_session_fn(plugin)` -- a copy-paste of
plugin_begin_session()'s own (correct) guard. Two failure modes: a
plugin registering only end_session_fn silently never has it invoked;
a plugin registering only begin_session_fn crashes via a NULL
function-pointer call. Currently inert in production (no live plugin
hits either shape) but a real latent defect in exactly the
session-boundary code the driver-equivalence invariant governs.

This exact defect had been independently filed twice: bug-1492
(2026-08-04, scheduler-core task 5.2's review) and bug-1682
(2026-08-24, found adjacent to bug-1681's fix) -- neither investigation
cross-referenced the other. Both entries also carried a "fixed" tag
inconsistent with their own "not yet fixed" narrative text, caught by
this audit's independent code+text cross-check.

Fixed the one-line guard; added test_end_session_invokes_end_session_fn_
when_only_it_is_set() (test_plugin_hook_dispatch.c) proving the silent
non-invocation, confirmed RED (84/85) against the buggy guard and GREEN
(85/85) after the fix. Updated both buglog entries to FIXED with
cross-references, and corrected bug-1611's stale narrative to reflect
its narrowing (not elimination) by scheduler-sim-live-allocation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RLSNJhNoULvVcUhXEFafQC
2026-09-19 11:44:58 +00:00
..
autoscaler remove extralib 2026-09-04 11:24:43 +08:00
configs fix(scheduler): live-verify bug-1790 with a real global mem limit 2026-09-08 08:49:17 +00:00
controller fix(controller-status): ctrlstatus_fill must prefer a live registry slot over a stale disconnected one (task 8.6, bug-1819) 2026-09-16 17:53:13 +00:00
docs feat(eliminate-frontend-makefile): task 3.3 - update live documentation (11 files) 2026-09-03 14:22:54 +00:00
frontend fix(apiserver): fix job control union discriminant, add human-readable job ID support (gitea#45) 2026-09-07 08:31:54 +00:00
harness feat(controller-status): render per-controller connection status in ctrlstatus command (task 8.3) 2026-09-16 15:36:02 +00:00
include feat(controller-status): add per-controller connection-status field to CtrlPeer schema (task 8.1) 2026-09-16 14:12:04 +00:00
lib feat(controller-status): carry election time on the heartbeat (task 7.3) 2026-09-16 06:03:03 +00:00
nixSupport remove extralib 2026-09-04 11:24:43 +08:00
scheduler fix(scheduler): plugin_end_session() guards on the wrong field (bug-1682/1492) 2026-09-19 11:44:58 +00:00
schema feat(controller-status): add per-controller connection-status field to CtrlPeer schema (task 8.1) 2026-09-16 14:12:04 +00:00
tools fix(deploy-ha): stop-all.sh/cleanup.sh must find the real worker regardless of sudo process-tree depth (bug-1823) 2026-09-17 04:20:03 +00:00
worker fix(worker): stop treating systemd's UINT64_MAX sentinel as real rusage data 2026-09-15 11:21:55 +00:00
xceadmin feat(xceadmin): accept a comma-separated --controller failover list (bug-1821, bug-1822) 2026-09-17 03:53:35 +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