- 22 Feb, 2021 2 commits
- 
- 
Yossi Gottlieb authoredAt 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 authoredOlder 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) 
 
- 
- 27 Oct, 2020 1 commit
- 
- 
Madelyn Olson authoredpartial cherry pick from 7d217547 
 
- 
- 23 Apr, 2020 1 commit
- 
- 
srzhao authoredChecking 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 1 commit
- 
- 
antirez authoredSee issue #7105. 
 
- 
- 08 Apr, 2020 1 commit
- 
- 
antirez authoredSee #7071. 
 
- 
- 05 Mar, 2020 1 commit
- 
- 
Guy Benoish authored1. 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 
 
- 
- 19 Nov, 2019 4 commits
- 
- 
Oran Agra authoredIt seeems that since I added the creation of the jemalloc thread redis sometimes fails to start with the following error: Inconsistency detected by ld.so: dl-tls.c: 493: _dl_allocate_tls_init: Assertion `listp->slotinfo[cnt].gen <= GL(dl_tls_generation)' failed! This seems to be due to a race bug in ld.so, in which TLS creation on the thread, collide with dlopen. Move the creation of BIO and jemalloc threads to after modules are loaded. plus small bugfix when trying to disable the jemalloc thread at runtime 
- 
antirez authoredThis is what happened: 1. Instance starts, is a slave in the cluster configuration, but actually server.masterhost is not set, so technically the instance is acting like a master. 2. loadDataFromDisk() calls replicationCacheMasterUsingMyself() even if the instance is a master, in the case it is logically a slave and the cluster is enabled. So now we have a cached master even if the instance is practically configured as a master (from the POV of server.masterhost value and so forth). 3. clusterCron() sees that the instance requires to replicate from its master, because logically it is a slave, so it calls replicationSetMaster() that will in turn call replicationCacheMasterUsingMyself(): before this commit, this call would overwrite the old cached master, creating a memory leak. 
- 
antirez authored
- 
Oran Agra authoredloading flag was missing from docs, and fork chidl indicator was removed from the code but left int he doc and header, re-adding it to the doc together with the missing function that was needed for it to work. 
 
- 
- 06 Nov, 2019 3 commits
- 
- 
antirez authoredOne problem with the solution proposed so far in #6537 is that key lookups outside a command execution via call(), still used a cached time. The cached time needed to be refreshed in multiple places, especially because of modules callbacks from timers, cluster bus, and thread safe contexts, that may use RM_Open(). In order to avoid this problem, this commit introduces the ability to detect if we are inside call(): this way we can use the reference fixed time only when we are in the context of a command execution or Lua script, but for the asynchronous lookups, we can still use mstime() to get a fresh time reference. 
- 
antirez authoredAfter the thread in #6537 and thanks to the suggestions received, this commit updates the original patch in order to: 1. Solve the problem of updating the time in multiple places by updating it in call(). 2. Avoid introducing a new field but use our cached time. This required some minor refactoring to the function updating the time, and the introduction of a new cached time in microseconds in order to use less gettimeofday() calls. 
- 
zhaozhao.zz authoredCalling lookupKey*() many times to search a key in one command may get different result. That's because lookupKey*() calls expireIfNeeded(), and delete the key when reach the expire time. So we can get an robj before the expire time, but a NULL after the expire time. The worst is that may lead to Redis crash, for example `RPOPLPUSH foo foo` the first time we get a list form `foo` and hold the pointer, but when we get `foo` again it's expired and deleted. Now we hold a freed memory, when execute rpoplpushHandlePush() redis crash. To fix it, we can refactor the judgment about whether a key is expired, using the same basetime `server.cmd_start_mstime` instead of calling mstime() everytime. 
 
- 
- 13 May, 2019 4 commits
- 
- 
WuYunlong authored
- 
liaotonglang authoredsdsTest() defined in sds.c dit not match the call in server.c. remove it from REDIS_TEST, since test-sds defined in Makefile. 
- 
Yossi Gottlieb authored
- 
Oran Agra authoredthis is very confusing to see the server disappears as if it got SIGKILL when it was not the case. 
 
- 
- 13 Mar, 2019 1 commit
- 
- 
antirez authored
 
- 
- 01 Mar, 2019 1 commit
- 
- 
chendianqiang authored
 
- 
- 12 Dec, 2018 1 commit
- 
- 
antirez authoredRelated to issue #5686 and PR #5689. 
 
- 
- 11 Dec, 2018 4 commits
- 
- 
Oran Agra authoredthese metrics become negative when RSS is smaller than the used_memory. This can easily happen when the program allocated a lot of memory and haven't written to it yet, in which case the kernel doesn't allocate any pages to the process 
- 
antirez authored
- 
Chris Lamb authoredThis really helps spot it in the logs, otherwise it does not look like a warning/error. For example: Creating Server TCP listening socket ::1:6379: bind: Cannot assign requested address ... is not nearly as clear as: Could not create server TCP listening listening socket ::1:6379: bind: Cannot assign requested address 
- 
Chris Lamb authoredIf we encounter an unsupported protocol in the "bind" list, don't ipso-facto consider it a fatal error. We continue to abort startup if there are no listening sockets at all. This ensures that the lack of IPv6 support does not prevent Redis from starting on Debian where we try to bind to the ::1 interface by default (via "bind 127.0.0.1 ::1"). A machine with IPv6 disabled (such as some container systems) would simply fail to start Redis after the initiall call to apt(8). This is similar to the case for where "bind" is not specified: https://github.com/antirez/redis/issues/3894 ... and was based on the corresponding PR: https://github.com/antirez/redis/pull/4108 ... but also adds EADDRNOTAVAIL to the list of errors to catch which I believe is missing from there. This issue was raised in Debian as both <https://bugs.debian.org/900284> & <https://bugs.debian.org/914354>. 
 
- 
- 07 Nov, 2018 1 commit
- 
- 
valentino authoredserver.hz was uninitialized between initServerConfig and initServer. this can lead to someone (e.g. queued modules) doing createObject, and accessing an uninitialized variable, that can potentially be 0, and lead to a crash. 
 
- 
- 05 Nov, 2018 2 commits
- 
- 
David Carlier authoredtimezone global is a linux-ism whereas it is a function under BSD. Here a helper to get the timezone value in a more portable manner. 
- 
zhaozhao.zz authored
 
- 
- 17 Oct, 2018 3 commits
- 
- 
zhaozhao.zz authoredxadd with id * generates random stream id xadd & xtrim with approximate maxlen count may trim stream randomly xinfo may get random radix-tree-keys/nodes xpending may get random idletime xclaim: master and slave may have different idletime in stream 
- 
antirez authoredKeep vanilla stream commands at toplevel, see #5426. 
- 
zhaozhao.zz authoredXSTREAM CREATE <key> <id or *> -- Create a new empty stream. XSTREAM SETID <key> <id or $> -- Set the current stream ID. 
 
- 
- 15 Oct, 2018 1 commit
- 
- 
antirez authoredIssue #5433. 
 
- 
- 03 Oct, 2018 6 commits
- 
- 
antirez authored
- 
Oran Agra authored
- 
Bruce Merry authoredWhen HAVE_MALLOC_SIZE is false, each call to zrealloc causes used_memory to increase by PREFIX_SIZE more than it should, due to mis-matched accounting between the original zmalloc (which includes PREFIX size in its increment) and zrealloc (which misses it from its decrement). I've also supplied a command-line test to easily demonstrate the problem. It's not wired into the test framework, because I don't know TCL so I'm not sure how to automate it. 
- 
antirez authored
- 
antirez authored
 
- 
- 14 Sep, 2018 2 commits