fix(scheduler): downgrade routine EEXIST resync log, dedup hash_string
xce_core_push_events() WARNed on every JOBS_PUSH resync redelivery (sched_add_job rc=-EEXIST), which is the expected outcome under on_scheduler_join()'s full resync or the array-push dedup race (bug-1734/bug-1714) and flooded operational logs. Only that case now logs via a new DBG() macro (utils.h); any other add_rc (e.g. -ENOMEM) still WARNs. DBG is named to avoid colliding with the build's own -DDEBUG command-line define (debug/asan buildtypes). Also collapsed hash_string()'s duplicated djb2 loop to delegate to hash_block(), which already implements the same RUN_HASH loop. Logged as bug-1809 in .wolf/buglog.json. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RLSNJhNoULvVcUhXEFafQC
This commit is contained in:
parent
868c6427c8
commit
b7250c2ec6
7 changed files with 115 additions and 19 deletions
|
|
@ -21943,6 +21943,39 @@
|
|||
],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-09-14T15:50:00Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-1809",
|
||||
"timestamp": "2026-09-14T16:20:00Z",
|
||||
"error_message": "User-reported: live scheduler logs are flooded with WARN lines for every ordinary XCE_CORE_EVENT_JOBS_PUSH resync redelivery: \"xce_core_push_events JOBS_PUSH: sched_add_job failed for jobid <id> (rc=-17), merging state into existing tracked job instead of discarding\" (src/scheduler/src/core_events.c). rc=-17 is -EEXIST -- the expected, routine outcome of on_scheduler_join()'s full resync (bug-1734) or the array-push dedup race (bug-1714), already correctly handled by the bug-1734/bug-1738/bug-1739 merge logic in the same branch, not a functional defect.",
|
||||
"file": "src/scheduler/src/core_events.c (XCE_CORE_EVENT_JOBS_PUSH duplicate-jobid merge branch, ~line 845)",
|
||||
"root_cause": "Not a defect -- a UX/observability request. sched_add_job() (core.c) wraps key_add()->kvtab_add() (lib/kv.c), whose only failure modes for the core->jobs table (KVMGR_KEY_INT, no keyops->assign) are -EEXIST (duplicate jobid) or -ENOMEM (allocation failure). The EEXIST case is therefore the near-universal, routine shape of this branch under a reconnect/resync storm (confirmed live in bug-1714's own investigation: 700+ of these WARNs fired from a single 8-reconnect burst) -- WARN was the wrong level for an outcome the code already handles correctly by design; it was originally added at WARN by bug-1734's own fix pass without considering steady-state log volume under the reconnect-storm conditions that same session's investigation had just captured.",
|
||||
"fix": "FIXED (2026-09-14). Split the single WARN call in the JOBS_PUSH EEXIST branch (core_events.c) on add_rc: when add_rc == -EEXIST, log via a new DBG(...) macro (utils.h, wraps tlog_debug() -- DEBUG level, silent by default, visible with -vvv) instead of WARN -- preserves the message (still valuable forensic evidence per bug-1734/bug-1714) without flooding default-verbosity operational logs. Any OTHER negative add_rc (e.g. -ENOMEM) still logs at WARN, since that would be a genuine anomaly, not a routine resync artifact. The new macro is named DBG, not DEBUG, matching the existing TRACE/INFO/WARN/ERROR one-line wrapper convention in utils.h: a first attempt to name it DEBUG(...) collided with the build's own bare -DDEBUG command-line define (src/meson.build, set for BOTH the debug and asan buildtypes -- confirmed via build warning \"DEBUG redefined ... this is the location of the previous definition <command-line>\" across every file that includes utils.h under either profile), so DBG was used instead per user decision after the tradeoff was surfaced. Verified: xce-build.sh scheduler debug --incremental and xce-build.sh scheduler asan --incremental both compile clean (zero DBG/DEBUG-redefinition warnings in either profile); full scheduler suite 77/77 Ok, zero regressions.",
|
||||
"tags": [
|
||||
"scheduler",
|
||||
"logging",
|
||||
"observability",
|
||||
"core_events-c",
|
||||
"jobs_push",
|
||||
"sched_add_job",
|
||||
"eexist",
|
||||
"log-level",
|
||||
"noise-reduction",
|
||||
"not-a-defect",
|
||||
"session-sibling-of-bug-1734",
|
||||
"session-sibling-of-bug-1714",
|
||||
"fixed",
|
||||
"DBG-macro",
|
||||
"utils-h"
|
||||
],
|
||||
"related_bugs": [
|
||||
"bug-1734",
|
||||
"bug-1714",
|
||||
"bug-1739",
|
||||
"bug-1738"
|
||||
],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-09-14T16:20:00Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue