fix(scheduler): clock/resval/jobid-format fixes plus REPL live-operator gaps (task 12.5)
Bugs fixed, discovered across a day of live-operator testing against a real deployed cluster: - bug-1584: clock anchors never initialized to real wall-clock values, timestamps showed system uptime instead of Unix epoch. - bug-1585: heap-use-after-free in the normal-mode driver's periodic resval update path -- core_events.c's RESVALS_FULL/_DELTA handlers do a shallow zarray_put() of the wire-decoded xce_val_t*, but driver.c's release_translated_payload() unconditionally freed the same decoded array right after, so the next periodic report for the same worker+resource triggered a UAF read via kill_sched_resval(). New regression test: test_resval_ownership.c. - bug-1587/1588/1591: raw-ns/raw-uint64 jobid/timestamp prints across the REPL/SIM family converted to the same human-readable formatting already used elsewhere (fmt_jobid(), timestamp formatting). - bug-1590: repl_info.c's XCE_VAL_NUMERIC checks corrected to Value_u_fvalue, fixing `info worker`/`info resource` falling back to 0.00 for real numeric resvals. task 12.5 (Req 5.22 amendment) -- five REPL gaps surfaced by a live operator session, each with its own bug id: - bug-1594: `continue`/`step` reaching EOF with no breakpoint hit now re-enters the REPL via xce_repl_on_replay_complete() instead of exiting the process; step/continue issued after replay is already complete re-prompt instead of silently exiting. - bug-1595: `step`/`continue` now echo each input event (not just decisions) via repl_print_event_summary(), in real event/decision order. - bug-1593: `info resource <name>|all` now reports resource definition metadata restricted to XCE_RESF_GLOBAL/XCE_RESF_SHARED resources, read from core->sharedInst, instead of aggregating host-based resources across every worker. - bug-1596: repl_split_tokens() strips one matching pair of surrounding quote characters from each token. See requirements.md's Req 5 AC 22 "Amendment (2026-08-19)" for the full rationale on each of the five task 12.5 gaps. Full scheduler suite green (41/42; the one remaining failure, test_recordstart_symlink_escape_replies_error, is the pre-existing unrelated bug-1560).
This commit is contained in:
parent
515f4ca098
commit
c9acd502c0
32 changed files with 2547 additions and 295 deletions
|
|
@ -95,6 +95,20 @@ extern void xce_repl_on_begin_round(xce_sched_sim_driver_t* sim,
|
|||
extern void xce_repl_on_decision(xce_sched_sim_driver_t* sim,
|
||||
xce_decision_t* d);
|
||||
|
||||
/*
|
||||
* xce_repl_on_replay_complete (task 12.5, Req 5 AC 22 amendment, bug-1594) -
|
||||
* called once, by sched_sim_driver_run() (sim_loop.c), immediately after the
|
||||
* replay loop reaches EOF or the AC 20 end-of-stream marker -- the ONE point
|
||||
* in the whole REPL integration that requirements.md's original pseudocode
|
||||
* let fall through to process exit with no re-entry into the command loop.
|
||||
* Prints the existing "[sim] replay complete" banner, marks
|
||||
* sim->repl_state->replay_complete, and re-enters repl_command_loop() so the
|
||||
* operator can inspect final state; the only remaining exit paths at that
|
||||
* point are an explicit `quit` or stdin EOF (both already funnel through
|
||||
* repl_cmd_quit()). Implemented in repl.c.
|
||||
*/
|
||||
extern void xce_repl_on_replay_complete(xce_sched_sim_driver_t* sim);
|
||||
|
||||
static inline void xce_repl_pre_replay_pause(xce_sched_sim_driver_t* sim)
|
||||
{
|
||||
if (sim->interactive) {
|
||||
|
|
@ -133,4 +147,11 @@ static inline void xce_repl_check_decision(xce_sched_sim_driver_t* sim,
|
|||
}
|
||||
}
|
||||
|
||||
static inline void xce_repl_check_replay_complete(xce_sched_sim_driver_t* sim)
|
||||
{
|
||||
if (sim->interactive) {
|
||||
xce_repl_on_replay_complete(sim);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue