Skip to content

ENT-3868: Improved persistent class logging and plugged memory leak (3.27)#6169

Merged
nickanderson merged 2 commits into
cfengine:3.27.xfrom
nickanderson:nickanderson/3.27.x-backport-persistent-leak
Jun 8, 2026
Merged

ENT-3868: Improved persistent class logging and plugged memory leak (3.27)#6169
nickanderson merged 2 commits into
cfengine:3.27.xfrom
nickanderson:nickanderson/3.27.x-backport-persistent-leak

Conversation

@nickanderson

Copy link
Copy Markdown
Member

This change makes it easier to see when a persistent class timer is being reset. It highlighted a gap in classes promises, they are not able to specify the timer_policy, the ability to specify timer_policy is currently only available in classes bodies. Thus, currently, classes promises always cause a timer reset.

Ticket: ENT-3868

existing_info was allocated via xcalloc but never freed on the
early-return (preserve) path, the early-return (read error) path,
or the normal fall-through path.

(cherry picked from commit 9eaebef)
Replace the generic "Updating persistent class" verbose message with
context-aware messages that distinguish between:

- Creating a new persistent class (no prior DB record)
- Resetting a timer (existing record, policy=reset)
- Updating a preserved class (tags changed or class expired)

This makes it easier to diagnose persistent class timer behavior from
verbose logs without needing to add custom debugging builds.

Ticket: ENT-3868
Changelog: Title
(cherry picked from commit 51650ed)
@nickanderson nickanderson merged commit df7c6fe into cfengine:3.27.x Jun 8, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant