Fix crash when freeing newly created node when nodeIp2String fail#14055
Merged
sundb merged 2 commits intoredis:unstablefrom May 21, 2025
Merged
Fix crash when freeing newly created node when nodeIp2String fail#14055sundb merged 2 commits intoredis:unstablefrom
sundb merged 2 commits intoredis:unstablefrom
Conversation
Co-authored-by: Binbin <[email protected]>
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR addresses a crash issue by handling the failure of nodeIp2String gracefully when processing a MEET packet in a cluster node setup.
- Added an error check for nodeIp2String and, if it fails, logs the error and frees the associated link.
- Removed an assertion by replacing it with a memcpy of the validated IP from a local buffer.
Comments suppressed due to low confidence (1)
src/cluster_legacy.c:2893
- Consider including additional connection details or context in the log message to aid troubleshooting.
serverLog(LL_NOTICE, "Closing link even though we received a MEET packet on it, because the connection has an error");
ShooterIT
approved these changes
May 21, 2025
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.
This PR is a reference from valkey-io/valkey#1535
In the process of handling the failure(#14024) of ARM64 CI with TLS, found in slow environment, the nodes might frequent disconnect and trigger this assertion.
Co-authored-by: Binbin [email protected]