Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f138c1b
Only mark the client reprocessing flag when unblocked on keys (#2109)
ranshid May 25, 2025
f7f6749
Fix bad slot used in sharded pubsub unsubscribe (#2137)
uriyage May 25, 2025
31b9985
Free module context even if there was no content written in auxsave2 …
murphyjacob4 May 27, 2025
6010dc5
CLIENT UNBLOCK should't be able to unpause paused clients (#2117)
enjoy-binbin Jun 10, 2025
5ebadd9
Detect SSL_new() returning NULL in outgoing connections (#2140)
zuiderkwast May 27, 2025
4234a66
Correctly cast the extension lengths (#2144)
madolson May 28, 2025
05213cf
Incorporate Redis CVE for CVE-2025-27151 (#2146)
madolson May 28, 2025
879c55d
Fix replica can't finish failover when config epoch is outdated (#2178)
enjoy-binbin Jun 10, 2025
7b12b4a
Fix cluster myself CLUSTER SLOTS/NODES wrong port after updating port…
enjoy-binbin Jun 10, 2025
7aaea89
Add packet-drop to fix the new flaky failover test (#2196)
enjoy-binbin Jun 11, 2025
1100316
Add a filter option to drop all cluster packets (#1252)
madolson Nov 4, 2024
4e3d551
Minor log fixes when failover auth denied due to slot epoch (#1341)
enjoy-binbin Dec 19, 2024
de6394b
Trigger the election as soon as possible when doing a forced manual f…
enjoy-binbin Sep 25, 2024
c80c29e
Make manual failover reset the on-going election to promote failover …
enjoy-binbin Nov 22, 2024
657814b
Fixes
vitarb Jun 17, 2025
aab58d7
formatting
vitarb Jun 17, 2025
5fe3514
fix uninitialized variable warning
vitarb Jun 17, 2025
28547ae
Add retries on CLUSTERDOWN in tests and fix sanitizer error
vitarb Jun 17, 2025
f6fdd33
Fix empty primary may have dirty slots data due to bad migration (#1285)
enjoy-binbin Nov 11, 2024
f5a9951
Fix the election was reset wrongly before failover epoch was obtained…
enjoy-binbin Dec 9, 2024
b72fea2
Skip CLI tests with reply schema validation (#1545)
zuiderkwast Jan 12, 2025
1931405
Disable lazy free in defrag test to fix 32bit daily failure (#1370)
zvi-code Nov 28, 2024
a5c9342
Fix undefined behavior defined by ASAN (#1451)
madolson Dec 18, 2024
6964827
Avoid timing issue in diskless-load-swapdb test (#1077)
enjoy-binbin Oct 1, 2024
c6883b1
Test coverage for ECHO for reply schema validation (#1549)
zuiderkwast Jan 13, 2025
224ccf9
Try to stabilize aof test (#2399)
sarthakaggarwal97 Jul 31, 2025
8c343f5
Disable clang-format in 8.0 to simplify backporting
zuiderkwast Aug 15, 2025
2cc78d5
update build-debian-old to use Bullseye instead of EOL buster (#2345)
ranshid Jul 14, 2025
fba379c
Fix defrag timeouts in 8.0
zuiderkwast Aug 15, 2025
3751964
Ensure empty error tables in scripts don't crash Valkey (#2229)
Fusl Jun 18, 2025
0e7d648
Fix client tracking memory overhead calculation (#2360)
enjoy-binbin Jul 22, 2025
e05b7d1
Converge divergent shard-id persisted in nodes.conf to primary's shar…
hpatro Jun 20, 2025
6dc4112
Fix assumptions that pthread functions set errno (#2526)
TedLyngmo Aug 20, 2025
4166825
Fix pre-size hashtables per slot when reading RDB files (#2466)
enjoy-binbin Aug 22, 2025
b20251c
Add release notes for 8.0.5 and update version file
Nikhil-Manglore Jun 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:

build-debian-old:
runs-on: ubuntu-latest
container: debian:buster
container: debian:bullseye
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: make
Expand Down
52 changes: 0 additions & 52 deletions .github/workflows/clang-format.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ jobs:
if: |
(github.event_name == 'workflow_dispatch' ||
(github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') ||
(github.event_name == 'pull_request' && github.event.pull_request.base.ref != 'unstable')) &&
(github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) &&
!contains(github.event.inputs.skipjobs, 'reply-schema')
steps:
- name: prep
Expand Down
45 changes: 45 additions & 0 deletions 00-RELEASENOTES
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,51 @@ CRITICAL: There is a critical bug affecting MOST USERS. Upgrade ASAP.
SECURITY: There are security fixes in the release.
--------------------------------------------------------------------------------

================================================================================
Valkey 8.0.5 - Released Thu 22 Aug 2025
================================================================================

Upgrade urgency SECURITY: This release includes security fixes we recommend you
apply as soon as possible.

Bug fixes
=========
* Fix clients remaining blocked when reprocessing commands after certain
blocking operations (#2109)
* Fix a memory corruption issue in the sharded pub/sub unsubscribe logic (#2137)
* Fix potential memory leak by ensuring module context is freed when `aux_save2`
callback writes no data (#2132)
* Fix `CLIENT UNBLOCK` triggering unexpected errors when used on paused clients
(#2117)
* Fix missing NULL check on `SSL_new()` when creating outgoing TLS connections
(#2140)
* Fix incorrect casting of ping extension lengths to prevent silent packet drops
(#2144)
* Fix replica failover stall due to outdated config epoch (#2178)
* Fix incorrect port/tls-port info in `CLUSTER SLOTS`/`CLUSTER NODES` after
dynamic config change (#2186)
* Ensure empty error tables in Lua scripts don't crash Valkey (#2229)
* Fix client tracking memory overhead calculation (#2360)
* Handle divergent shard-id from nodes.conf and reconcile to the primary node's
shard-id (#2174)
* Fix pre-size hashtables per slot when reading RDB files (#2466)

Behavior changes
================
* Trigger election immediately during a forced manual failover (`CLUSTER
FAILOVER FORCE`) to avoid delay (#1067)
* Reset ongoing election state when initiating a new manual failover (#1274)

Logging and Tooling Improvements
================================
* Add support to drop all cluster packets (#1252)
* Improve log clarity in failover auth denial message (#1341)

Security fixes
==============
* CVE-2025-27151: Check length of AOF file name in valkey-check-aof and reject
paths longer than `PATH_MAX` (#2146)

================================================================================
Valkey 8.0.4 - Released Mon 07 July 2025
================================================================================
Expand Down
20 changes: 10 additions & 10 deletions src/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,6 @@ int ACLListMatchSds(void *a, void *b) {
return sdscmp(a, b) == 0;
}

/* Method to free list elements from ACL users password/patterns lists. */
void ACLListFreeSds(void *item) {
sdsfree(item);
}

/* Method to duplicate list elements from ACL users password/patterns lists. */
void *ACLListDupSds(void *item) {
return sdsdup(item);
Expand Down Expand Up @@ -374,7 +369,7 @@ aclSelector *ACLCreateSelector(int flags) {
listSetFreeMethod(selector->patterns, ACLListFreeKeyPattern);
listSetDupMethod(selector->patterns, ACLListDupKeyPattern);
listSetMatchMethod(selector->channels, ACLListMatchSds);
listSetFreeMethod(selector->channels, ACLListFreeSds);
listSetFreeMethod(selector->channels, sdsfreeVoid);
listSetDupMethod(selector->channels, ACLListDupSds);
memset(selector->allowed_commands, 0, sizeof(selector->allowed_commands));

Expand Down Expand Up @@ -445,7 +440,7 @@ user *ACLCreateUser(const char *name, size_t namelen) {
u->passwords = listCreate();
u->acl_string = NULL;
listSetMatchMethod(u->passwords, ACLListMatchSds);
listSetFreeMethod(u->passwords, ACLListFreeSds);
listSetFreeMethod(u->passwords, sdsfreeVoid);
listSetDupMethod(u->passwords, ACLListDupSds);

u->selectors = listCreate();
Expand Down Expand Up @@ -489,6 +484,11 @@ void ACLFreeUser(user *u) {
zfree(u);
}

/* Used for generic free functions. */
static void ACLFreeUserVoid(void *u) {
ACLFreeUser(u);
}

/* When a user is deleted we need to cycle the active
* connections in order to kill all the pending ones that
* are authenticated with such user. */
Expand Down Expand Up @@ -2449,12 +2449,12 @@ sds ACLLoadFromFile(const char *filename) {
c->user = new_user;
}

if (user_channels) raxFreeWithCallback(user_channels, (void (*)(void *))listRelease);
raxFreeWithCallback(old_users, (void (*)(void *))ACLFreeUser);
if (user_channels) raxFreeWithCallback(user_channels, listReleaseVoid);
raxFreeWithCallback(old_users, ACLFreeUserVoid);
sdsfree(errors);
return NULL;
} else {
raxFreeWithCallback(Users, (void (*)(void *))ACLFreeUser);
raxFreeWithCallback(Users, ACLFreeUserVoid);
Users = old_users;
errors =
sdscat(errors, "WARNING: ACL errors detected, no change to the previously active ACL rules was performed");
Expand Down
6 changes: 6 additions & 0 deletions src/adlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ void listRelease(list *list) {
zfree(list);
}

/* Just like listRelease, but takes the list as a (void *).
* Useful as generic free callback. */
void listReleaseVoid(void *l) {
listRelease((list *)l);
}

/* Add a new node to the list, to head, containing the specified 'value'
* pointer as value.
*
Expand Down
1 change: 1 addition & 0 deletions src/adlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ typedef struct list {
/* Prototypes */
list *listCreate(void);
void listRelease(list *list);
void listReleaseVoid(void *list);
void listEmpty(list *list);
list *listAddNodeHead(list *list, void *value);
list *listAddNodeTail(list *list, void *value);
Expand Down
10 changes: 6 additions & 4 deletions src/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ void bioInit(void) {
* responsible for. */
for (j = 0; j < BIO_WORKER_NUM; j++) {
void *arg = (void *)(unsigned long)j;
if (pthread_create(&thread, &attr, bioProcessBackgroundJobs, arg) != 0) {
serverLog(LL_WARNING, "Fatal: Can't initialize Background Jobs. Error message: %s", strerror(errno));
int err = pthread_create(&thread, &attr, bioProcessBackgroundJobs, arg);
if (err) {
serverLog(LL_WARNING, "Fatal: Can't initialize Background Jobs. Error message: %s", strerror(err));
exit(1);
}
bio_threads[j] = thread;
Expand Down Expand Up @@ -222,8 +223,9 @@ void *bioProcessBackgroundJobs(void *arg) {
* receive the watchdog signal. */
sigemptyset(&sigset);
sigaddset(&sigset, SIGALRM);
if (pthread_sigmask(SIG_BLOCK, &sigset, NULL))
serverLog(LL_WARNING, "Warning: can't mask SIGALRM in bio.c thread: %s", strerror(errno));
int err = pthread_sigmask(SIG_BLOCK, &sigset, NULL);
if (err)
serverLog(LL_WARNING, "Warning: can't mask SIGALRM in bio.c thread: %s", strerror(err));

while (1) {
listNode *ln;
Expand Down
19 changes: 18 additions & 1 deletion src/blocked.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,20 @@ void unblockClient(client *c, int queue_for_reprocessing) {
if (queue_for_reprocessing) queueClientForReprocessing(c);
}

/* Check if the specified client can be safely timed out using
* unblockClientOnTimeout(). */
int blockedClientMayTimeout(client *c) {
if (c->bstate.btype == BLOCKED_MODULE) {
return moduleBlockedClientMayTimeout(c);
}

if (c->bstate.btype == BLOCKED_LIST || c->bstate.btype == BLOCKED_ZSET || c->bstate.btype == BLOCKED_STREAM ||
c->bstate.btype == BLOCKED_WAIT) {
return 1;
}
return 0;
}

/* This function gets called when a blocked client timed out in order to
* send it a reply of some kind. After this function is called,
* unblockClient() will be called with the same client as argument. */
Expand Down Expand Up @@ -374,7 +388,7 @@ void blockForKeys(client *c, int btype, robj **keys, int numkeys, mstime_t timeo
list *l;
int j;

if (!c->flag.reprocessing_command) {
if (!c->flag.reexecuting_command) {
/* If the client is re-processing the command, we do not set the timeout
* because we need to retain the client's original timeout. */
c->bstate.timeout = timeout;
Expand Down Expand Up @@ -648,6 +662,7 @@ static void unblockClientOnKey(client *c, robj *key) {
* we need to re process the command again */
if (c->flag.pending_command) {
c->flag.pending_command = 0;
c->flag.reexecuting_command = 1;
/* We want the command processing and the unblock handler (see RM_Call 'K' option)
* to run atomically, this is why we must enter the execution unit here before
* running the command, and exit the execution unit after calling the unblock handler (if exists).
Expand All @@ -666,6 +681,8 @@ static void unblockClientOnKey(client *c, robj *key) {
}
exitExecutionUnit();
afterCommand(c);
/* Clear the reexecuting_command flag after the proc is executed. */
c->flag.reexecuting_command = 0;
server.current_client = old_client;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/call_reply.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ CallReply *callReplyCreateError(sds reply, void *private_data) {
sdsfree(reply);
}
list *deferred_error_list = listCreate();
listSetFreeMethod(deferred_error_list, (void (*)(void *))sdsfree);
listSetFreeMethod(deferred_error_list, sdsfreeVoid);
listAddNodeTail(deferred_error_list, sdsnew(err_buff));
return callReplyCreate(err_buff, deferred_error_list, private_data);
}
Loading
Loading