Revert libvalkey to 0.4.x to fix sentinel crash#3752
Merged
Conversation
Reverts the libvalkey portion of valkey-io#3697. The 0.5.0 update introduced a DICT_INCLUDE_DIR feature that causes a struct layout mismatch between libvalkey's compiled code and valkey's linked dictCreate, crashing every sentinel instance on startup (signal 11, address 0x90). The root cause is that #include "dict.h" in async.c/cluster.c resolves to libvalkey's local dict.h (small 5-field dictType) while the linked dictCreate expects valkey's 9-field dictType. This is a bug in libvalkey's DICT_INCLUDE_DIR implementation that should be fixed upstream before re-updating. Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 9.1 #3752 +/- ##
==========================================
+ Coverage 76.53% 76.76% +0.23%
==========================================
Files 163 163
Lines 80991 80991
==========================================
+ Hits 61987 62175 +188
+ Misses 19004 18816 -188 🚀 New features to boost your workflow:
|
Contributor
zuiderkwast
approved these changes
May 18, 2026
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.
Reverts the libvalkey portion of #3697 (0.5.0 update).
The 0.5.0 update introduced a
DICT_INCLUDE_DIRfeature whose implementation is broken:#include "dict.h"inasync.candcluster.cresolves to libvalkey's localdict.h(5-fielddictType) instead of valkey's (9-fielddictType), causing a struct layout mismatch with the linkeddictCreate. This crashes every sentinel instance on startup.On unstable this works by coincidence because
dictis typedef'd tohashtableand the memory layout happens to have zeros at the critical offset. On 9.1 with the traditional dict implementation, it reads garbage and crashes.The fix should be done upstream in libvalkey (the
DICT_INCLUDE_DIRfeature needs to use<dict.h>instead of"dict.h"). Once that's fixed upstream, we can re-update.Crash signature: