- 22 Feb, 2021 5 commits
-
-
Yossi Gottlieb authored
At least in one case the arm64 cow kernel bug test triggers an assert, which is a problem because it cannot be ignored like cases where the bug is found. On older systems (Linux <4.5) madvise fails because MADV_FREE is not supported. We treat these failures as an indication the system is not affected. Fixes #8351, #8406 (cherry picked from commit 3a504904)
-
George Prekas authored
Older arm64 Linux kernels have a bug that could lead to data corruption during background save under the following scenario: 1) jemalloc uses MADV_FREE on a page, 2) jemalloc reuses and writes the page, 3) Redis forks the background save process, and 4) Linux performs page reclamation. Under these conditions, Linux will reclaim the page wrongfully and the background save process will read zeros when it tries to read the page. The bug has been fixed in Linux with commit: ff1712f953e27f0b0718762ec17d0adb15c9fd0b ("arm64: pgtable: Ensure dirty bit is preserved across pte_wrprotect()") This Commit adds an ignore-warnings config, when not found, redis will print a warning and exit on startup (default behavior). Co-authored-by:
Oran Agra <oran@redislabs.com> (cherry picked from commit b02780c4)
-
Yossi Gottlieb authored
Makes spt_init more careful with assumptions about what memory regions may be overwritten. It will now only consider a contiguous block of argv and envp elements and mind any gaps. (cherry picked from commit ec02c761)
-
Yossi Gottlieb authored
Seems to have gone unnoticed for a long time, because at least with glibc it will only be triggered if setenv() was called before spt_init, which Redis doesn't. Fixes #8064. (cherry picked from commit 7e5a6313)
-
namtsui authored
The Redis sentinel would crash with a segfault after a few minutes because it tried to read from a page without read permissions. Check up front whether the sds is long enough to contain redis:slave or redis:master before memcmp() as is done everywhere else in sentinelRefreshInstanceInfo(). Bug report and commit message from Theo Buehler. Fix from Nam Nguyen. Co-authored-by:
Nam Nguyen <namn@berkeley.edu> (cherry picked from commit 63dae523)
-
- 27 Oct, 2020 19 commits
-
-
Oran Agra authored
-
Yossi Gottlieb authored
This fixes the issue described in CVE-2014-5461. At this time we cannot confirm that the original issue has a real impact on Redis, but it is included as an extra safety measure. (cherry picked from commit d75ad774) (cherry picked from commit 941174d9c9ed438f1c70dd46cddc02468614db12)
-
Yossi Gottlieb authored
When using a system with no malloc_usable_size(), zmalloc_size() assumed that the heap allocator always returns blocks that are long-padded. This may not always be the case, and will result with zmalloc_size() returning a size that is bigger than allocated. At least in one case this leads to out of bound write, process crash and a potential security vulnerability. Effectively this does not affect the vast majority of users, who use jemalloc or glibc. This problem along with a (different) fix was reported by Drew DeVault. (cherry picked from commit 9824fe3e) (cherry picked from commit ce0d74d8fdff55d07929f562ec9acf2d00caf893)
-
WuYunlong authored
We should sync temp DB file before renaming as rdb_fsync_range does not use flag `SYNC_FILE_RANGE_WAIT_AFTER`. Refer to `Linux Programmer's Manual`: SYNC_FILE_RANGE_WAIT_AFTER Wait upon write-out of all pages in the range after performing any write. (cherry picked from commit 0d62caab)
-
Ariel Shtul authored
redis-check-rdb was unable to parse rdb files containing module aux data. Co-authored-by:
Oran Agra <oran@redislabs.com> (cherry picked from commit 63a05dde)
-
Oran Agra authored
I suppose that it was overlooked, since till recently none of the blocked commands were readonly. other changes: - add test for the above. - add better support for additional (and deferring) clients for cluster tests - improve a test which left the client in MULTI state. (cherry picked from commit 216c1106)
-
Angus Pearson authored
This addresses two problems, one where infinite (negative) repeat count is broken for all types for Redis, and another specific to cluster mode where redirection is needed. Now allows and works correctly for negative (i.e. -1) repeat values passed with `-r` argument to redis-cli as documented here https://redis.io/topics/rediscli#continuously-run-the-same-command which seems to have regressed as a feature in 95b988 (though that commit removed bad integer wrap-around to `0` behaviour). This broken behaviour exists currently (e50458), and redis-cli will just exit immediately with repeat `-r <= 0` as opposed to send commands indefinitely as it should with `-r < 0` Additionally prevents a repeat * interval seconds hang/time spent doing nothing at the start before issuing commands in cluster mode (`-c`), where the command needed to redirect to a slot on another node, as commands where failing and waiting to be reissued but this was fully repeated before being reissued. For example, redis-cli -c -r 10 -i 0.5 INCR test_key_not_on_6379 Would hang and show nothing for 5 seconds (10 * 0.5) before showing (integer) 1 (integer) 2 (integer) 3 (integer) 4 (integer) 5 (integer) 6 (integer) 7 (integer) 8 (integer) 9 (integer) 10 at half second intervals as intended. (cherry picked from commit 2f6ed933)
-
antirez authored
We want to send pings and pongs at specific intervals, since our packets also contain information about the configuration of the cluster and are used for gossip. However since our cluster bus is used in a mixed way for data (such as Pub/Sub or modules cluster messages) and metadata, sometimes a very busy channel may delay the reception of pong packets. So after discussing it in #7216, this commit introduces a new field that is not exposed in the cluster, is only an internal information about the last time we received any data from a given node: we use this field in order to avoid detecting failures, claiming data reception of new data from the node is a proof of liveness. (cherry picked from commit 960186a7)
-
Madelyn Olson authored
partial cherry pick from 7d217547
-
Guy Benoish authored
Fixes GitHub issue #6492 Added stream support in RM_KeyType and RM_ValueLength. Also moduleDelKeyIfEmpty was updated, even though it has no effect now (It will be relevant when stream type direct API will be coded - i.e. RM_StreamAdd) cherry picked from commit 1833d008 * modified to avoid adding new API to 5.0 (reverting the change to RM_KeyType)
-
Itamar Haber authored
Otherwise, it is treated as a single allocation and freed synchronously. The following logic is used for estimating the effort in constant-ish time complexity: 1. Check the number of nodes. 1. Add an allocation for each consumer group registered inside the stream. 1. Check the number of PELs in the first CG, and then add this count times the number of CGs. 1. Check the number of consumers in the first CG, and then add this count times the number of CGs. (cherry picked from commit 5b0a06af) (cherry picked from commit 5a9a653f)
-
Oran Agra authored
Similarly to EXPIREAT with TTL in the past, which implicitly deletes the key and return success, RESTORE should not store key that are already expired into the db. When used together with REPLACE it should emit a DEL to keyspace notification and replication stream. (cherry picked from commit 5977a948) (cherry picked from commit 95ba01b5)
-
Liu Zhen authored
`clusterStartHandshake` will start hand handshake and eventually send CLUSTER MEET message, which is strictly prohibited in the REDIS CLUSTER SPEC. Only system administrator can initiate CLUSTER MEET message. Futher, according to the SPEC, rather than IP/PORT pairs, only nodeid can be trusted. (cherry picked from commit 84a7a905)
-
Guy Benoish authored
Same goes for XGROUP DELCONSUMER (But in this case, it doesn't have any visible effect) (cherry picked from commit 3a441c7d)
-
- 24 Apr, 2020 1 commit
-
-
antirez authored
-
- 23 Apr, 2020 2 commits
-
-
yanhui13 authored
-
srzhao authored
Checking OOM by `getMaxMemoryState` inside script might get different result with `freeMemoryIfNeededAndSafe` at script start, because lua stack and arguments also consume memory. This leads to memory `borderline` when memory grows near server.maxmemory: - `freeMemoryIfNeededAndSafe` at script start detects no OOM, no memory freed - `getMaxMemoryState` inside script detects OOM, script aborted We solve this 'borderline' issue by saving OOM state at script start to get stable lua OOM state. related to issue #6565 and #5250.
-
- 17 Apr, 2020 2 commits
- 08 Apr, 2020 1 commit
-
-
antirez authored
See #7071.
-
- 12 Mar, 2020 2 commits
-
-
antirez authored
-
Salvatore Sanfilippo authored
Fix Pi building needing -latomic, 5.0 branch backport
-
- 11 Mar, 2020 1 commit
-
-
Dustin Collins authored
-
- 05 Mar, 2020 7 commits
-
-
srzhao authored
-
Ariel authored
-
Guy Benoish authored
Use built-in alsoPropagate mechanism that wraps commands in MULTI/EXEC before sending them to replica/AOF
-
Oran Agra authored
currently there's no bug since the flags these functions handle are always lower than 32bit, but still better fix the type to prevent future bugs.
-
Guy Benoish authored
1. server.repl_no_slaves_since can be set when a MONITOR client disconnects 2. c->repl_ack_time can be set by a newline from a MONITOR client 3. Improved comments
-
WuYunlong authored
-
antirez authored
-