Skip to content

Conversation

@vitarb
Copy link
Contributor

@vitarb vitarb commented Jun 13, 2025

This backports all remaining PRs from Valkey 8.0 (view)

@vitarb vitarb force-pushed the backport/unstable-to-8.0 branch from 8528705 to 0ef3dc3 Compare June 13, 2025 19:06
@madolson madolson requested review from hpatro June 13, 2025 23:22
Copy link
Collaborator

@hpatro hpatro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's update the version.h file and update release notes under 00-RELEASENOTES
#2173

@hpatro
Copy link
Collaborator

hpatro commented Jun 14, 2025

@enjoy-binbin Seems like the replica is able to get the epoch update, possibly flaky?

*** [err]: Replica can update the config epoch when trigger the failover - automatic in tests/unit/cluster/failover2.tcl
Expected '5' not equal to '5' (context: type eval line 29 cmd {assert_not_equal $R0_config_epoch [dict get [cluster_get_node_by_id 3 $R0_nodeid] config_epoch]} proc ::test)
*** [err]: Replica can update the config epoch when trigger the failover - manual in tests/unit/cluster/failover2.tcl
Expected '5' not equal to '5' (context: type eval line 29 cmd {assert_not_equal $R0_config_epoch [dict get [cluster_get_node_by_id 3 $R0_nodeid] config_epoch]} proc ::test)

https://github.com/valkey-io/valkey/actions/runs/15642106732/job/44071643820?pr=2210

@enjoy-binbin
Copy link
Member

yeah, that is flaky i guess, it is odd since drop all the packets, i will take a look this day.

@zuiderkwast
Copy link
Contributor

zuiderkwast commented Jun 14, 2025

One PR missing? I see 10 commits but 11 PRs mentioned and 11 in To be backported.

@enjoy-binbin
Copy link
Member

One PR missing? I see 10 commits but 11 PRs mentioned and 11 in To be backported.

PR #1539 is an empty commit i saw. (That was already in 8.0.3)

@enjoy-binbin enjoy-binbin changed the title Backport/unstable to 8.0 Fixes for Valkey 8.0.4 Jun 16, 2025
@enjoy-binbin enjoy-binbin force-pushed the backport/unstable-to-8.0 branch from 8cc6cfb to 013924f Compare June 17, 2025 04:04
@codecov
Copy link

codecov bot commented Jun 17, 2025

Codecov Report

❌ Patch coverage is 83.33333% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.78%. Comparing base (f77cbfb) to head (85a2b9d).

Files with missing lines Patch % Lines
src/kvstore.c 69.23% 4 Missing ⚠️
src/io_threads.c 0.00% 3 Missing ⚠️
src/rdb.c 40.00% 3 Missing ⚠️
src/bio.c 66.66% 2 Missing ⚠️
src/config.c 50.00% 2 Missing ⚠️
src/valkey-check-aof.c 33.33% 2 Missing ⚠️
src/blocked.c 87.50% 1 Missing ⚠️
src/call_reply.c 0.00% 1 Missing ⚠️
src/cluster_legacy.c 97.14% 1 Missing ⚠️
src/module.c 0.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##              8.0    #2210      +/-   ##
==========================================
+ Coverage   70.73%   70.78%   +0.05%     
==========================================
  Files         114      114              
  Lines       62991    63062      +71     
==========================================
+ Hits        44554    44641      +87     
+ Misses      18437    18421      -16     
Files with missing lines Coverage Δ
src/acl.c 88.82% <100.00%> (ø)
src/adlist.c 75.38% <100.00%> (+0.38%) ⬆️
src/db.c 88.67% <100.00%> (ø)
src/debug.c 53.62% <ø> (ø)
src/eval.c 57.15% <100.00%> (ø)
src/evict.c 98.87% <100.00%> (+0.37%) ⬆️
src/functions.c 95.72% <100.00%> (+0.02%) ⬆️
src/listpack.c 91.63% <100.00%> (+1.43%) ⬆️
src/pubsub.c 97.04% <100.00%> (ø)
src/replication.c 87.81% <100.00%> (+0.25%) ⬆️
... and 18 more

... and 9 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.

@vitarb
Copy link
Contributor Author

vitarb commented Jun 17, 2025

One PR missing? I see 10 commits but 11 PRs mentioned and 11 in To be backported.

Was already merged, but still on the to be backported list, so my merge script skipped it and mentioned as merged. No-op.

@vitarb vitarb force-pushed the backport/unstable-to-8.0 branch from f44bbb4 to 4f6df61 Compare June 17, 2025 19:23
@zuiderkwast
Copy link
Contributor

test-sanitizer-undefined (clang) reports https://github.com/valkey-io/valkey/actions/runs/15717322590/job/44290197737?pr=2210#step:6:278 Not sure which PR it is from...

[err]: Sanitizer error: adlist.c:63:25: runtime error: call to function engineLibraryFree through pointer to incorrect function type 'void (*)(void *)'
/home/runner/work/valkey/valkey/src/functions.c:147: note: engineLibraryFree defined here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior adlist.c:63:25

Are the other failures just flaky tests?

@vitarb
Copy link
Contributor Author

vitarb commented Jun 17, 2025

test-sanitizer-undefined (clang) reports https://github.com/valkey-io/valkey/actions/runs/15717322590/job/44290197737?pr=2210#step:6:278 Not sure which PR it is from...

[err]: Sanitizer error: adlist.c:63:25: runtime error: call to function engineLibraryFree through pointer to incorrect function type 'void (*)(void *)'
/home/runner/work/valkey/valkey/src/functions.c:147: note: engineLibraryFree defined here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior adlist.c:63:25

Are the other failures just flaky tests?

TIMEOUTs look like flakes. I've added retries on CLUSTERDOWN error, that should address another cause.
For the sanitizer error, I've fixed the one that triggered before, but got another similar error with a function pointer

[err]: Sanitizer error: rax.c:1206:50: runtime error: call to function listRelease through pointer to incorrect function type 'void (*)(void *)'

@zuiderkwast
Copy link
Contributor

@vitarb For the last commits you added to fix sanitizer error and uninitialized variable, are there no PRs in unstable for these?

If we add custom commits in the 8.0 branch, it can become harder to backport more commits to 8.0 later, I guess. WDYT?

IMO we could ignore clang-format errors for the same reason. The formatting and code standard is useful for the unstable branch, but for old release branches like 8.0 it's more important to avoid changes.

@zuiderkwast
Copy link
Contributor

TIMEOUTs look like flakes. I've added retries on CLUSTERDOWN error, that should address another cause. For the sanitizer error, I've fixed the one that triggered before, but got another similar error with a function pointer

The errors we see here should be fixed in unstable so there should be some more PRs we can cherry-pick to fix these? If not, I don't understand why we get the errors here and not in unstable.

@hpatro
Copy link
Collaborator

hpatro commented Jun 17, 2025

TIMEOUTs look like flakes. I've added retries on CLUSTERDOWN error, that should address another cause. For the sanitizer error, I've fixed the one that triggered before, but got another similar error with a function pointer

The errors we see here should be fixed in unstable so there should be some more PRs we can cherry-pick to fix these? If not, I don't understand why we get the errors here and not in unstable.

Incorrect merge conflict resolution is a potential issue for backport.

@zuiderkwast
Copy link
Contributor

Yes, you're right, merge conflict can introduce many problems.

@hpatro
Copy link
Collaborator

hpatro commented Jun 17, 2025

This is a trick we used to do internally, we push out the first commit with the conflict and then the next commit with the resolved one. Helped reviewers understand what was accepted. Maybe we can go with the same approach here. However, that's feasible if we do independent PR per backport PR.

@vitarb
Copy link
Contributor Author

vitarb commented Jun 18, 2025

TIMEOUTs look like flakes. I've added retries on CLUSTERDOWN error, that should address another cause. For the sanitizer error, I've fixed the one that triggered before, but got another similar error with a function pointer

The errors we see here should be fixed in unstable so there should be some more PRs we can cherry-pick to fix these? If not, I don't understand why we get the errors here and not in unstable.

Incorrect merge conflict resolution is a potential issue for backport.

Do you see anything incorrect or just making an assumption?

TIMEOUTs look like flakes. I've added retries on CLUSTERDOWN error, that should address another cause. For the sanitizer error, I've fixed the one that triggered before, but got another similar error with a function pointer

The errors we see here should be fixed in unstable so there should be some more PRs we can cherry-pick to fix these? If not, I don't understand why we get the errors here and not in unstable.

This is my first time doing this, I'm seeking advice. Do we want to have a clean pass of all builds or is it okay to ignore some failures given we mostly know what they are? Should I revert custom commits and just keep backports?

@hpatro
Copy link
Collaborator

hpatro commented Jun 18, 2025

The errors we see here should be fixed in unstable so there should be some more PRs we can cherry-pick to fix these? If not, I don't understand why we get the errors here and not in unstable.

Incorrect merge conflict resolution is a potential issue for backport.

Do you see anything incorrect or just making an assumption?

Assumption hence mentioned potential. Very difficult to spot them without seeing the conflict(s).

@vitarb
Copy link
Contributor Author

vitarb commented Jun 23, 2025

I'll try to fix these test failures as much as possible to get a clean pass — then it should be easier to decide whether to land or forego those changes.


🔍 Current Summary of Failures

🧪 Platform-Specific Test Failures

  • 14_test-ubuntu-32bit.txt
  • 35_reply-schemas-validator.txt
  • 39_test-fedorarawhide-jemalloc.txt
2025-06-20T21:50:49.0029560Z [TIMEOUT]: clients state report follows.
2025-06-20T21:50:49.0030367Z sock55a50c439cb0 => (IN PROGRESS) Active defrag big list: standalone
2025-06-20T21:50:49.0179048Z Killing still running Valkey server

🧼 Valgrind Tests

  • 15_test-valgrind-test.txt
  • 25_test-valgrind-no-malloc-usable-size-test.txt
2025-06-21T00:01:33.7857660Z *** [err]: Multiple primary nodes are down, rank them based on the failed primary in tests/unit/cluster/failover2.tcl
2025-06-21T00:01:33.7858132Z No failover detected

🍏 macOS Test

  • 34_test-macos-latest.txt
2025-06-20T22:25:04.4074660Z *** [err]: Half-finish importing in tests/unit/cluster/half-migrated-slot.tcl
2025-06-20T22:25:04.4078200Z Expected 'xyz' to be equal to ''
  (context: type source line 88 file /Users/runner/work/valkey/valkey/tests/unit/cluster/half-migrated-slot.tcl 
   cmd {assert_equal "xyz" [$cluster get aga]} proc ::test)

🧯 Sanitizer Builds

  • 36_test-sanitizer-undefined (gcc).txt
    Likely no-op / cancelled build
2025-06-20T21:18:40.1048075Z ##[error]The operation was canceled.
  • 37_test-sanitizer-undefined (clang).txt
2025-06-20T21:18:28.5072653Z SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rax.c:1206:50 
2025-06-20T21:18:28.5124428Z Logged sanitizer errors (pid 3787):
2025-06-20T21:18:28.5126608Z rax.c:1206:50: runtime error: call to function listRelease through pointer to incorrect function type 'void (*)(void *)'
2025-06-20T21:18:28.5128986Z /home/runner/work/valkey/valkey/src/adlist.c:75:10: note: listRelease defined here

Will continue narrowing these down.

@vitarb
Copy link
Contributor Author

vitarb commented Jun 24, 2025

Backported couple more commits that seemed relevant for the failures that we are facing. Let's see if that helps.

@vitarb vitarb force-pushed the backport/unstable-to-8.0 branch 2 times, most recently from f982ec9 to f1ee142 Compare June 24, 2025 17:50
vitarb and others added 18 commits August 21, 2025 18:03
Signed-off-by: Viktor Söderqvist <[email protected]>
Signed-off-by: Viktor Söderqvist <[email protected]>
Signed-off-by: Viktor Söderqvist <[email protected]>
…key-io#1285)

If we become an empty primary for some reason, we still need to
check if we need to delete dirty slots, because we may have dirty
slots data left over from a bad migration. Like the target node forcibly
executes CLUSTER SETSLOT NODE to take over the slot without
performing key migration.

Signed-off-by: Binbin <[email protected]>
Signed-off-by: Viktor Söderqvist <[email protected]>
…valkey-io#1339)

After valkey-io#1009, we will reset the election when we received
a claim with an equal or higher epoch since a node can win
an election in the past.

But we need to consider the time before the node actually
obtains the failover_auth_epoch. The failover_auth_epoch
default is 0, so before the node actually get the failover
epoch, we might wrongly reset the election.

This is probably harmless, but will produce misleading log
output and may delay election by a cron cycle or beforesleep.
Now we will only reset the election when a node is actually
obtains the failover epoch.

Signed-off-by: Binbin <[email protected]>
Signed-off-by: Viktor Söderqvist <[email protected]>
The commands used in valkey-cli tests are not important the reply schema
validation. Skip them to avoid the problem if tests hanging. This has
failed lately in the daily job:

```
[TIMEOUT]: clients state report follows.
sock55fedcc19be0 => (IN PROGRESS) valkey-cli pubsub mode with single standard channel subscription
Killing still running Valkey server 33357
```

These test cases use a special valkey-cli command `:get pubsub` command,
which is an internal command to valkey-cli rather than a Valkey server
command. This command hangs when compiled with with logreqres enabled.
Easy solution is to skip the tests in this setup.

The test cases were introduced in valkey-io#1432.

Signed-off-by: Viktor Söderqvist <[email protected]>
…o#1370)

Signed-off-by: Zvi Schneider <[email protected]>
Co-authored-by: Zvi Schneider <[email protected]>
Signed-off-by: Viktor Söderqvist <[email protected]>
Asan now supports making sure you are passing in the correct pointer
type, which seems useful but we can't support it since we pass in an
incorrect pointer in several places. This is most commonly done with
generic free functions, where we simply cast it to the correct type.

It's not a lot of code to clean up, so it seems appropriate to cleanup
instead of disabling the check.

---------

Signed-off-by: Madelyn Olson <[email protected]>
Co-authored-by: Viktor Söderqvist <[email protected]>
Signed-off-by: Viktor Söderqvist <[email protected]>
Since we paused the primary node earlier, the replica may enter
cluster down due to primary node pfail. Here set allow read to
prevent subsequent read errors.

Signed-off-by: Binbin <[email protected]>
Signed-off-by: Viktor Söderqvist <[email protected]>
After valkey-io#1545 disabled some tests for reply schema validation, we now have
another issue that ECHO is not covered.

```
WARNING! The following commands were not hit at all:
  echo
ERROR! at least one command was not hit by the tests
```

This patch adds a test case for ECHO in the unit/other test suite. I
haven't checked if there are more commands that aren't covered.

Signed-off-by: Viktor Söderqvist <[email protected]>
Based on @enjoy-binbin's suggestion on valkey-io#1611, I made the change to find
the available port. The test has been passing in the daily tests in my
local repo.

Resolved valkey-io#1611

Signed-off-by: Sarthak Aggarwal <[email protected]>
Signed-off-by: Viktor Söderqvist <[email protected]>
Signed-off-by: Viktor Söderqvist <[email protected]>
When calling the command `EVAL error{} 0`, Valkey crashes with the
following stack trace. This patch ensures we never leave the
`err_info.msg` field null when we fail to extract a proper error
message.

```
=== VALKEY BUG REPORT START: Cut & paste starting from here ===
2595901:M 18 Jun 2025 01:20:12.917 # valkey 8.1.2 crashed by signal: 11, si_code: 1
2595901:M 18 Jun 2025 01:20:12.917 # Accessing address: (nil)
2595901:M 18 Jun 2025 01:20:12.917 # Crashed running the instruction at: 0x726f8e57ed1d

------ STACK TRACE ------
EIP:
/usr/lib/libc.so.6(+0x16ed1d) [0x726f8e57ed1d]

2595905 bio_aof
/usr/lib/libc.so.6(+0x9de22) [0x726f8e4ade22]
/usr/lib/libc.so.6(+0x91fda) [0x726f8e4a1fda]
/usr/lib/libc.so.6(+0x9264c) [0x726f8e4a264c]
/usr/lib/libc.so.6(pthread_cond_wait+0x14e) [0x726f8e4a4d1e]
valkey-server *:6379(bioProcessBackgroundJobs+0x1b4) [0x6530abb46db4]
/usr/lib/libc.so.6(+0x957eb) [0x726f8e4a57eb]
/usr/lib/libc.so.6(+0x11918c) [0x726f8e52918c]

2595904 bio_close_file
/usr/lib/libc.so.6(+0x9de22) [0x726f8e4ade22]
/usr/lib/libc.so.6(+0x91fda) [0x726f8e4a1fda]
/usr/lib/libc.so.6(+0x9264c) [0x726f8e4a264c]
/usr/lib/libc.so.6(pthread_cond_wait+0x14e) [0x726f8e4a4d1e]
valkey-server *:6379(bioProcessBackgroundJobs+0x1b4) [0x6530abb46db4]
/usr/lib/libc.so.6(+0x957eb) [0x726f8e4a57eb]
/usr/lib/libc.so.6(+0x11918c) [0x726f8e52918c]

2595901 valkey-server *
/usr/lib/libc.so.6(+0x3def0) [0x726f8e44def0]
/usr/lib/libc.so.6(+0x16ed1d) [0x726f8e57ed1d]
valkey-server *:6379(sdscatfmt+0x894) [0x6530abaa24a4]
valkey-server *:6379(luaCallFunction+0x39a) [0x6530abbc66ea]
valkey-server *:6379(+0x1a0992) [0x6530abbc6992]
valkey-server *:6379(scriptingEngineCallFunction+0x98) [0x6530abbc1298]
valkey-server *:6379(+0x11ff55) [0x6530abb45f55]
valkey-server *:6379(call+0x174) [0x6530aba94454]
valkey-server *:6379(processCommand+0x93d) [0x6530aba958dd]
valkey-server *:6379(processCommandAndResetClient+0x21) [0x6530abaa9d11]
valkey-server *:6379(processInputBuffer+0xe3) [0x6530abaaee83]
valkey-server *:6379(readQueryFromClient+0x65) [0x6530abaaef55]
valkey-server *:6379(+0x18e31a) [0x6530abbb431a]
valkey-server *:6379(aeProcessEvents+0x24a) [0x6530aba790ca]
valkey-server *:6379(aeMain+0x2d) [0x6530aba7938d]
valkey-server *:6379(main+0x3f6) [0x6530aba6e7b6]
/usr/lib/libc.so.6(+0x276b5) [0x726f8e4376b5]
/usr/lib/libc.so.6(__libc_start_main+0x89) [0x726f8e437769]
valkey-server *:6379(_start+0x25) [0x6530aba70235]

2595906 bio_lazy_free
/usr/lib/libc.so.6(+0x9de22) [0x726f8e4ade22]
/usr/lib/libc.so.6(+0x91fda) [0x726f8e4a1fda]
/usr/lib/libc.so.6(+0x9264c) [0x726f8e4a264c]
/usr/lib/libc.so.6(pthread_cond_wait+0x14e) [0x726f8e4a4d1e]
valkey-server *:6379(bioProcessBackgroundJobs+0x1b4) [0x6530abb46db4]
/usr/lib/libc.so.6(+0x957eb) [0x726f8e4a57eb]
/usr/lib/libc.so.6(+0x11918c) [0x726f8e52918c]

4/4 expected stacktraces.

------ STACK TRACE DONE ------

------ REGISTERS ------
2595901:M 18 Jun 2025 01:20:12.920 #
RAX:0000000000000000 RBX:0000726f8dd35663
RCX:0000000000000000 RDX:0000000000000000
RDI:0000000000000000 RSI:0000000000000010
RBP:00007ffc2b821a80 RSP:00007ffc2b821938
R8 :000000000000000c R9 :00006530abc111b8
R10:0000000000000001 R11:0000000000000003
R12:00006530abc49adc R13:00006530abc111b7
R14:0000000000000001 R15:0000000000000001
RIP:0000726f8e57ed1d EFL:0000000000010283
CSGSFS:002b000000000033
2595901:M 18 Jun 2025 01:20:12.921 * hide-user-data-from-log is on, skip logging stack content to avoid spilling user data.

------ INFO OUTPUT ------
redis_version:7.2.4
server_name:valkey
valkey_version:8.1.2
valkey_release_stage:ga
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:38d65aa7b4148d2c
server_mode:standalone
os:Linux 6.14.6-arch1-1 x86_64
arch_bits:64
monotonic_clock:POSIX clock_gettime
multiplexing_api:epoll
gcc_version:15.1.1
process_id:2595901
process_supervised:no
run_id:a0b75f67a217a81142f17553028c010e86c1ee80
tcp_port:6379
server_time_usec:1750209612917634
uptime_in_seconds:16
uptime_in_days:0
hz:10
configured_hz:10
clients_hz:10
lru_clock:5379148
executable:/home/fusl/valkey-server
config_file:
io_threads_active:0
availability_zone:
listener0:name=tcp,bind=*,bind=-::*,port=6379

connected_clients:1
cluster_connections:0
maxclients:10000
client_recent_max_input_buffer:0
client_recent_max_output_buffer:0
blocked_clients:0
tracking_clients:0
pubsub_clients:0
watching_clients:0
clients_in_timeout_table:0
total_watched_keys:0
total_blocking_keys:0
total_blocking_keys_on_nokey:0
paused_reason:none
paused_actions:none
paused_timeout_milliseconds:0

used_memory:911824
used_memory_human:890.45K
used_memory_rss:15323136
used_memory_rss_human:14.61M
used_memory_peak:911824
used_memory_peak_human:890.45K
used_memory_peak_perc:100.29%
used_memory_overhead:892232
used_memory_startup:891824
used_memory_dataset:19592
used_memory_dataset_perc:97.96%
allocator_allocated:1845952
allocator_active:1986560
allocator_resident:6672384
allocator_muzzy:0
total_system_memory:67323842560
total_system_memory_human:62.70G
used_memory_lua:34816
used_memory_vm_eval:34816
used_memory_lua_human:34.00K
used_memory_scripts_eval:184
number_of_cached_scripts:1
number_of_functions:0
number_of_libraries:0
used_memory_vm_functions:33792
used_memory_vm_total:68608
used_memory_vm_total_human:67.00K
used_memory_functions:224
used_memory_scripts:408
used_memory_scripts_human:408B
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
allocator_frag_ratio:1.00
allocator_frag_bytes:0
allocator_rss_ratio:3.36
allocator_rss_bytes:4685824
rss_overhead_ratio:2.30
rss_overhead_bytes:8650752
mem_fragmentation_ratio:17.18
mem_fragmentation_bytes:14431168
mem_not_counted_for_evict:0
mem_replication_backlog:0
mem_total_replication_buffers:0
mem_clients_slaves:0
mem_clients_normal:0
mem_cluster_links:0
mem_aof_buffer:0
mem_allocator:jemalloc-5.3.0
mem_overhead_db_hashtable_rehashing:0
active_defrag_running:0
lazyfree_pending_objects:0
lazyfreed_objects:0

loading:0
async_loading:0
current_cow_peak:0
current_cow_size:0
current_cow_size_age:0
current_fork_perc:0.00
current_save_keys_processed:0
current_save_keys_total:0
rdb_changes_since_last_save:0
rdb_bgsave_in_progress:0
rdb_last_save_time:1750209596
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:-1
rdb_current_bgsave_time_sec:-1
rdb_saves:0
rdb_last_cow_size:0
rdb_last_load_keys_expired:0
rdb_last_load_keys_loaded:0
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_rewrites:0
aof_rewrites_consecutive_failures:0
aof_last_write_status:ok
aof_last_cow_size:0
module_fork_in_progress:0
module_fork_last_cow_size:0

total_connections_received:1
total_commands_processed:0
instantaneous_ops_per_sec:0
total_net_input_bytes:34
total_net_output_bytes:0
total_net_repl_input_bytes:0
total_net_repl_output_bytes:0
instantaneous_input_kbps:0.00
instantaneous_output_kbps:0.00
instantaneous_input_repl_kbps:0.00
instantaneous_output_repl_kbps:0.00
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
expired_stale_perc:0.00
expired_time_cap_reached_count:0
expire_cycle_cpu_milliseconds:0
evicted_keys:0
evicted_clients:0
evicted_scripts:0
total_eviction_exceeded_time:0
current_eviction_exceeded_time:0
keyspace_hits:0
keyspace_misses:0
pubsub_channels:0
pubsub_patterns:0
pubsubshard_channels:0
latest_fork_usec:0
total_forks:0
migrate_cached_sockets:0
slave_expires_tracked_keys:0
active_defrag_hits:0
active_defrag_misses:0
active_defrag_key_hits:0
active_defrag_key_misses:0
total_active_defrag_time:0
current_active_defrag_time:0
tracking_total_keys:0
tracking_total_items:0
tracking_total_prefixes:0
unexpected_error_replies:0
total_error_replies:0
dump_payload_sanitizations:0
total_reads_processed:1
total_writes_processed:0
io_threaded_reads_processed:0
io_threaded_writes_processed:0
io_threaded_freed_objects:0
io_threaded_accept_processed:0
io_threaded_poll_processed:0
io_threaded_total_prefetch_batches:0
io_threaded_total_prefetch_entries:0
client_query_buffer_limit_disconnections:0
client_output_buffer_limit_disconnections:0
reply_buffer_shrinks:0
reply_buffer_expands:0
eventloop_cycles:170
eventloop_duration_sum:17739
eventloop_duration_cmd_sum:0
instantaneous_eventloop_cycles_per_sec:9
instantaneous_eventloop_duration_usec:99
acl_access_denied_auth:0
acl_access_denied_cmd:0
acl_access_denied_key:0
acl_access_denied_channel:0

role:master
connected_slaves:0
replicas_waiting_psync:0
master_failover_state:no-failover
master_replid:d35a0bb7979f490a60174bb363524431d7eb2428
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:0
second_repl_offset:-1
repl_backlog_active:0
repl_backlog_size:10485760
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

used_cpu_sys:0.012543
used_cpu_user:0.016853
used_cpu_sys_children:0.000000
used_cpu_user_children:0.000000
used_cpu_sys_main_thread:0.012440
used_cpu_user_main_thread:0.016714

cluster_enabled:0

------ CLIENT LIST OUTPUT ------
id=2 addr=127.0.0.1:41372 laddr=127.0.0.1:6379 fd=10 name=*redacted* age=0 idle=0 flags=N capa= db=0 sub=0 psub=0 ssub=0 multi=-1 watch=0 qbuf=0 qbuf-free=0 argv-mem=12 multi-mem=0 rbs=16384 rbp=16384 obl=0 oll=0 omem=0 tot-mem=17060 events=r cmd=eval user=*redacted* redir=-1 resp=2 lib-name= lib-ver= tot-net-in=34 tot-net-out=0 tot-cmds=0

------ CURRENT CLIENT INFO ------
id=2 addr=127.0.0.1:41372 laddr=127.0.0.1:6379 fd=10 name=*redacted* age=0 idle=0 flags=N capa= db=0 sub=0 psub=0 ssub=0 multi=-1 watch=0 qbuf=0 qbuf-free=0 argv-mem=12 multi-mem=0 rbs=16384 rbp=16384 obl=0 oll=0 omem=0 tot-mem=17060 events=r cmd=eval user=*redacted* redir=-1 resp=2 lib-name= lib-ver= tot-net-in=34 tot-net-out=0 tot-cmds=0
argc: 3
argv[0]: "eval"
argv[1]: 7 bytes
argv[2]: 1 bytes

------ EXECUTING CLIENT INFO ------
id=2 addr=127.0.0.1:41372 laddr=127.0.0.1:6379 fd=10 name=*redacted* age=0 idle=0 flags=N capa= db=0 sub=0 psub=0 ssub=0 multi=-1 watch=0 qbuf=0 qbuf-free=0 argv-mem=12 multi-mem=0 rbs=16384 rbp=16384 obl=0 oll=0 omem=0 tot-mem=17060 events=r cmd=eval user=*redacted* redir=-1 resp=2 lib-name= lib-ver= tot-net-in=34 tot-net-out=0 tot-cmds=0
argc: 3
argv[0]: "eval"
argv[1]: 7 bytes
argv[2]: 1 bytes

------ MODULES INFO OUTPUT ------

------ CONFIG DEBUG OUTPUT ------
repl-diskless-load disabled
debug-context ""
sanitize-dump-payload no
lazyfree-lazy-user-del yes
lazyfree-lazy-server-del yes
import-mode no
lazyfree-lazy-user-flush yes
list-compress-depth 0
dual-channel-replication-enabled no
repl-diskless-sync yes
activedefrag no
lazyfree-lazy-expire yes
io-threads 1
replica-read-only yes
client-query-buffer-limit 1gb
slave-read-only yes
lazyfree-lazy-eviction yes
proto-max-bulk-len 512mb

------ FAST MEMORY TEST ------
2595901:M 18 Jun 2025 01:20:12.921 # Bio worker thread #0 terminated
2595901:M 18 Jun 2025 01:20:12.921 # Bio worker thread #1 terminated
2595901:M 18 Jun 2025 01:20:12.921 # Bio worker thread #2 terminated
*** Preparing to test memory region 6530abce2000 (212992 bytes)
*** Preparing to test memory region 726f8af7f000 (2621440 bytes)
*** Preparing to test memory region 726f8b200000 (8388608 bytes)
*** Preparing to test memory region 726f8ba00000 (4194304 bytes)
*** Preparing to test memory region 726f8bffe000 (8388608 bytes)
*** Preparing to test memory region 726f8c7ff000 (8388608 bytes)
*** Preparing to test memory region 726f8d000000 (8388608 bytes)
*** Preparing to test memory region 726f8dc00000 (4194304 bytes)
*** Preparing to test memory region 726f8e290000 (16384 bytes)
*** Preparing to test memory region 726f8e3d2000 (20480 bytes)
*** Preparing to test memory region 726f8e5f8000 (32768 bytes)
*** Preparing to test memory region 726f8eb58000 (12288 bytes)
*** Preparing to test memory region 726f8eb5c000 (16384 bytes)
*** Preparing to test memory region 726f8ed63000 (4096 bytes)
*** Preparing to test memory region 726f8eef2000 (397312 bytes)
*** Preparing to test memory region 726f8efc7000 (4096 bytes)
.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O
Fast memory test PASSED, however your memory can still be broken. Please run a memory test for several hours if possible.

------ DUMPING CODE AROUND EIP ------
Symbol: (null) (base: (nil))
Module: /usr/lib/libc.so.6 (base 0x726f8e410000)
$ xxd -r -p /tmp/dump.hex /tmp/dump.bin
$ objdump --adjust-vma=(nil) -D -b binary -m i386:x86-64 /tmp/dump.bin
------

=== VALKEY BUG REPORT END. Make sure to include from START to END. ===
```

---------

Signed-off-by: Fusl <[email protected]>
Signed-off-by: Binbin <[email protected]>
Co-authored-by: Binbin <[email protected]>
Signed-off-by: Viktor Söderqvist <[email protected]>
This should be + instread of *, otherwise it does not make any sense.
Otherwise we would have to calculate 20 more bytes for each prefix rax
node in 64 bits build.

Signed-off-by: Binbin <[email protected]>
Signed-off-by: Viktor Söderqvist <[email protected]>
…d id (valkey-io#2174)

Fixes valkey-io#2171

Handle divergent shard-id across primary and replica from nodes.conf and
reconcile all the nodes in the shard to the primary node's shard-id.

---------

Signed-off-by: Harkrishn Patro <[email protected]>
Signed-off-by: Viktor Söderqvist <[email protected]>
@zuiderkwast zuiderkwast force-pushed the backport/unstable-to-8.0 branch from 1343593 to 3cb0de7 Compare August 21, 2025 16:04
pthread functions return the error instead of setting errno.

Fixes valkey-io#2525

Signed-off-by: Ted Lyngmo <[email protected]>
@zuiderkwast zuiderkwast force-pushed the backport/unstable-to-8.0 branch from 3cb0de7 to 1eab33f Compare August 21, 2025 19:05
@enjoy-binbin enjoy-binbin force-pushed the backport/unstable-to-8.0 branch from 0f83ef0 to 78582a3 Compare August 22, 2025 06:33
@zuiderkwast zuiderkwast force-pushed the backport/unstable-to-8.0 branch from 78582a3 to 85a2b9d Compare August 22, 2025 08:23
enjoy-binbin and others added 2 commits August 22, 2025 12:17
When reading RDB files with information about the number of keys per cluster slot,
we need to create the dicts if they don't exist.

Currently, when processing RDB slot-info, our expand has no effect because the dict
does not exist (we initialize it only when we need it).

We also update kvstoreExpand to use the kvstoreDictExpand to make
sure there is only one code path. Also see valkey-io#1199 for more details.

Signed-off-by: Binbin <[email protected]>
Co-authored-by: Viktor Söderqvist <[email protected]>
Signed-off-by: Nikhil Manglore <[email protected]>
Signed-off-by: Viktor Söderqvist <[email protected]>
@zuiderkwast zuiderkwast force-pushed the backport/unstable-to-8.0 branch from 85a2b9d to b20251c Compare August 22, 2025 10:17
@zuiderkwast
Copy link
Contributor

Tests look pretty green now. A few flaky tests failed occationally. I'm going to ignore them and release as is.

Failed jobs

test-ubuntu-tls:

*** [err]: evict clients only until below limit in tests/unit/client-eviction.tcl
Expected 4 == [expr 10 / 2] (context: type eval line 53 cmd {assert {$connected_clients == [expr $client_count / 2]}} proc ::test)

test-almalinux9-tls-module:

*** [err]: Replica can update the config epoch when trigger the failover - automatic in tests/unit/cluster/failover2.tcl
6428
Expected 'STILL 3' to match 'BUMPED *' (context: type eval line 18 cmd {assert_match {BUMPED *} $res} proc ::test) 

macos-latest: (uses TCL 8.5, while all other platforms have 8.6 or later?)

bad argument "": should be "nonewline"
    while executing
"read $fd $bytes"
    (procedure "read_from_test_client" line 3)
    invoked from within
"read_from_test_client sock6"
Executing test client: error flushing "sock7": broken pipe.
error flushing "sock7": broken pipe
    while executing
"flush $fd"
    (procedure "send_data_packet" line 5)
    invoked from within
"send_data_packet $::test_server_fd server-killing $pid"
    (procedure "kill_server" line 53)
    invoked from within
"kill_server $srv"
    (procedure "start_server" line 269)
    invoked from within
"start_server {tags {"obuf-limits external:skip logreqres:skip"}} {
    test {CONFIG SET client-output-buffer-limit} {
        set oldval [lindex [r co..."
    (file "tests/unit/obuf-limits.tcl" line 1)
    invoked from within
"source $path"
    (procedure "execute_test_file" line 4)
    invoked from within
"execute_test_file $data"
    (procedure "test_client_main" line 10)
    invoked from within
"test_client_main $::test_server_port "
[TIMEOUT]: clients state report follows.
sock6 => (IN PROGRESS) Client output buffer hard limit is enforced
Killing still running Valkey server 10476

code-coverage:

(some crash...)

@zuiderkwast zuiderkwast merged commit 8310135 into valkey-io:8.0 Aug 22, 2025
52 of 58 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.