Repository navigation
Conversation
Lt-Flash
force-pushed
the
fix/clusterer-sync-nullcb
branch
from
December 1, 2026 09:51
8802f2d to
49a8fac
Compare
A capability registered without an event callback (tm, ratelimit, pua, dialog profiles) crashed the node that received a sync request for it, which called the missing callback; the node that asked crashed the same way when the empty sync ended. The request is answered with an empty sync, and neither side calls a callback that is not there.
Lt-Flash
force-pushed
the
fix/clusterer-sync-nullcb
branch
from
December 1, 2026 18:07
49a8fac to
f97ca48
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
clusterer: answer a sync request for a capability that has no event callback, instead of crashing.
Details
A module may register a capability with a NULL event callback; tm, ratelimit, pua and dialog's profile replication do.
send_sync_repl()callscap->reg.event_cb(SYNC_REQ_RCV, ...)unconditionally, so a SYNC_REQ for such a capability crashes the node that receives it. On the requesting node,run_cb_buf_pkt()callsevent_cb(SYNC_DONE, ...)unconditionally when the SYNC_END arrives, so that node crashes too once the donor survives. The node event paths indo_actions_node_ev()already check the callback; these two did not.Solution
Call the event callback in both places only when there is one. A capability without one has nothing to sync, so the donor still sends a SYNC_END with zero chunks, which is what ends the requester's wait, and the requester marks the sync as done.
Tested with the reproduction in the issue on master (9c442ad): without the fix the donor crashes; with only the donor-side check the requester crashes; with both, both nodes stay up and log a completed empty sync.
Compatibility
No change for capabilities that have an event callback.
Closing issues
closes #4516