Skip to content

Revert libvalkey to 0.4.x to fix sentinel crash#3752

Merged
madolson merged 1 commit into
valkey-io:9.1from
madolson:revert-libvalkey-0.5.0
May 18, 2026
Merged

Revert libvalkey to 0.4.x to fix sentinel crash#3752
madolson merged 1 commit into
valkey-io:9.1from
madolson:revert-libvalkey-0.5.0

Conversation

@madolson

Copy link
Copy Markdown
Member

Reverts the libvalkey portion of #3697 (0.5.0 update).

The 0.5.0 update introduced a DICT_INCLUDE_DIR feature whose implementation is broken: #include "dict.h" in async.c and cluster.c resolves to libvalkey's local dict.h (5-field dictType) instead of valkey's (9-field dictType), causing a struct layout mismatch with the linked dictCreate. This crashes every sentinel instance on startup.

On unstable this works by coincidence because dict is typedef'd to hashtable and 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_DIR feature needs to use <dict.h> instead of "dict.h"). Once that's fixed upstream, we can re-update.

Crash signature:

signal 11, accessing address 0x90
sentinelReconnectInstance -> valkeyAsyncConnectBind -> dictCreate

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>
@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a6a5e743-c8da-41c8-b6c4-64e2856a9a11

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented May 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.76%. Comparing base (82c386d) to head (6bc050d).

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     

see 21 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sarthakaggarwal97

Copy link
Copy Markdown
Contributor

I didn't see this change before I raised #3755! Thanks @madolson for this, I will close my PR.

@madolson madolson merged commit a4a776f into valkey-io:9.1 May 18, 2026
77 of 79 checks passed
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.

3 participants