Skip to content

Fixing segfault in cluster_update_slot #2552

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

JacobBrownAustin
Copy link
Contributor

When the slot's->slaves was null, it was dereferencing null, causing segfault.
This happens in weird scenario when some of the nodes in cluster are down or having changed IP addresses without knowing about it.

When the slot's->slaves was null, it was dereferencing null, causing
segfault.
This happens in weird scenario when some of the nodes in cluster are
down or having changed IP addresses without knowing about it.
@michael-grunder
Copy link
Member

Thanks!

I'm actually tagging 6.1.0RC2 right now. This is a small change, so we might be able to get it into 6.1.0 GA; if not, we can do 6.1.1 soon after 6.1.0

@JacobBrownAustin
Copy link
Contributor Author

JacobBrownAustin commented Sep 23, 2024

No problem. If you wanted to spend time on it, there might be a better solution, as I only added throwing an exception right before it dereferences a null ->slaves in the case where I saw my php-fpm segfaulting. There may be other places where this is happening, as I haven't checked yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants