Skip to content

ENT-14139: Fixed cf-agent SIGABRT on SIGTERM during early policy validation#6140

Merged
larsewi merged 1 commit into
cfengine:masterfrom
larsewi:sigabrt
May 27, 2026
Merged

ENT-14139: Fixed cf-agent SIGABRT on SIGTERM during early policy validation#6140
larsewi merged 1 commit into
cfengine:masterfrom
larsewi:sigabrt

Conversation

@larsewi
Copy link
Copy Markdown
Contributor

@larsewi larsewi commented May 26, 2026

When SIGTERM arrives before ThisAgentInit(), the signal handler calls TerminateCustomPromises() while custom_modules is still NULL, causing an assert to be triggered in MapIteratorInit().

Ticket: ENT-14139

Backported to:

When SIGTERM arrives before `ThisAgentInit()`, the signal handler calls
`TerminateCustomPromises()` while `custom_modules` is still `NULL`,
causing an assert to be triggered in `MapIteratorInit()`.

Ticket: ENT-14139
Changelog: Title
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
@larsewi larsewi added the cherry-pick? Fixes which may need to be cherry-picked to LTS branches label May 26, 2026
@larsewi
Copy link
Copy Markdown
Contributor Author

larsewi commented May 26, 2026

@cf-bottom Jenkins please :)

Copy link
Copy Markdown
Contributor

@craigcomstock craigcomstock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks smart and right.

I wonder about how this situation happens or how it could be reproduced. I think that would be a good addition to the commit message.

@larsewi
Copy link
Copy Markdown
Contributor Author

larsewi commented May 26, 2026

The change looks smart and right.

I wonder about how this situation happens or how it could be reproduced. I think that would be a good addition to the commit message.

@craigcomstock, I feel like the commit message already says this. Maybe it could be stated even clearer. It happens if you kill the agent very early.

@cfengine cfengine deleted a comment from cf-bottom May 26, 2026
@cf-bottom
Copy link
Copy Markdown

@larsewi larsewi merged commit 9b053b0 into cfengine:master May 27, 2026
43 checks passed
@larsewi larsewi deleted the sigabrt branch May 27, 2026 09:40
@larsewi larsewi removed the cherry-pick? Fixes which may need to be cherry-picked to LTS branches label May 27, 2026
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.

3 participants