Commit Graph

9310 Commits

Author SHA1 Message Date
Salvatore Sanfilippo dd78f7463f
Merge pull request #7255 from madolson/dev-unstable-converge-hash-validation
Converge hash validation for adding and removing
2020-05-18 10:31:47 +02:00
Salvatore Sanfilippo c9ef9f1c48
Merge pull request #7247 from bsergean/patch-3
Redis-cli 6.0.1 `--cluster-yes` doesn't work (fix #7246)
2020-05-18 10:23:54 +02:00
Salvatore Sanfilippo 05db78e9c5
Merge pull request #7271 from oranagra/fix_valgrind_repl_test
fix valgrind test failure in replication test
2020-05-18 10:09:39 +02:00
Oran Agra 75c11d7fec fix valgrind test failure in replication test
in b4416280c i added more keys to that test to make it run longer
but in valgrind this now means the test times out, give valgrind more
time.
2020-05-18 10:26:53 +03:00
antirez 0ca2f4f824 Merge branch 'unstable' of github.com:/antirez/redis into unstable 2020-05-17 18:24:48 +02:00
antirez 96bb0c9471 Improve the PSYNC2 test reliability. 2020-05-17 18:24:34 +02:00
Salvatore Sanfilippo 08d00dad52
Merge pull request #7264 from oranagra/test_for_7205
add regression test for the race in #7205
2020-05-17 17:59:14 +02:00
Oran Agra 357aace895 add regression test for the race in #7205
with the original version of 6.0.0, this test detects an excessive full
sync.
with the fix in 1a7cd2c0e, this test detects memory corruption,
especially when using libc allocator with or without valgrind.
2020-05-17 18:26:02 +03:00
antirez 624742d9b4 Remove the client from CLOSE_ASAP list before caching the master.
This was broken in 1a7cd2c: we identified a crash in the CI, what
was happening before the fix should be like that:

1. The client gets in the async free list.
2. However freeClient() gets called again against the same client
   which is a master.
3. The client arrived in freeClient() with the CLOSE_ASAP flag set.
4. The master gets cached, but NOT removed from the CLOSE_ASAP linked
   list.
5. The master client that was cached was immediately removed since it
   was still in the list.
6. Redis accessed a freed cached master.

This is how the crash looked like:

=== REDIS BUG REPORT START: Cut & paste starting from here ===
1092:S 16 May 2020 11:44:09.731 # Redis 999.999.999 crashed by signal: 11
1092:S 16 May 2020 11:44:09.731 # Crashed running the instruction at: 0x447e18
1092:S 16 May 2020 11:44:09.731 # Accessing address: 0xffffffffffffffff
1092:S 16 May 2020 11:44:09.731 # Failed assertion:  (:0)

------ STACK TRACE ------
EIP:
src/redis-server 127.0.0.1:21300(readQueryFromClient+0x48)[0x447e18]

And the 0xffff address access likely comes from accessing an SDS that is
set to NULL (we go -1 offset to read the header).
2020-05-16 17:15:35 +02:00
antirez 3cd92e87d1 Merge branch 'unstable' of github.com:/antirez/redis into unstable 2020-05-15 10:21:51 +02:00
antirez 1a7cd2c0e2 Cache master without checking of deferred close flags.
The context is issue #7205: since the introduction of threaded I/O we close
clients asynchronously by default from readQueryFromClient(). So we
should no longer prevent the caching of the master client, to later
PSYNC incrementally, if such flags are set. However we also don't want
the master client to be cached with such flags (would be closed
immediately after being restored). And yet we want a way to understand
if a master was closed because of a protocol error, and in that case
prevent the caching.
2020-05-15 10:19:13 +02:00
Benjamin Sergeant f4d2abd3df do not handle --cluster-yes for cluster fix mode 2020-05-14 15:29:06 -07:00
Madelyn Olson f0f30fc43f Converge hash validation for adding and removing 2020-05-14 11:07:51 -07:00
Salvatore Sanfilippo 8f5c2bc8aa
Merge pull request #7229 from yossigo/tls-fails-on-recent-debian
TLS: Fix test failures on recent Debian/Ubuntu.
2020-05-14 18:15:17 +02:00
Salvatore Sanfilippo 112e19a59c
Merge pull request #7230 from yossigo/tls-crypto-locks
TLS: Add crypto locks for older OpenSSL support.
2020-05-14 18:14:49 +02:00
Salvatore Sanfilippo 67a4fb912f
Merge pull request #7244 from devnexen/netbsd_build_fix
NetBSD build update.
2020-05-14 18:14:06 +02:00
Salvatore Sanfilippo 0dea1142da
Merge pull request #7253 from madolson/unstable-ae-recursion
Added a refcount on timer events to prevent deletion of recursive timer events
2020-05-14 18:10:57 +02:00
Madelyn Olson 41cabca2ab Added a refcount on timer events to prevent deletion of recursive timer calls 2020-05-14 08:49:11 -07:00
antirez c38fd1f661 Merge branch 'free_clients_during_loading' into unstable 2020-05-14 11:28:08 +02:00
antirez dec6fd3adc Regression test for #7249. 2020-05-14 11:27:31 +02:00
antirez 3e6acc24d6 rax.c updated from upstream antirez/rax. 2020-05-14 11:17:47 +02:00
antirez a4d0720fa1 Tracking: send eviction messages when evicting entries.
A fix for #7249.
2020-05-14 11:17:04 +02:00
antirez bc4667acbc Track events processed while blocked globally.
Related to #7234.
2020-05-14 10:06:27 +02:00
Benjamin Sergeant db39b04d76 fix typo ... 2020-05-13 09:32:27 -07:00
Benjamin Sergeant 827e6cc644
Redis-cli 6.0.1 `--cluster-yes` doesn't work (fix #7246)
This make it so that all prompts for all redis-cli --cluster commands are automatically answered with a yes.
2020-05-13 09:24:51 -07:00
David Carlier 4715ce5903 NetBSD build update.
This platform supports CPU affinity (but not OpenBSD).
2020-05-12 21:21:22 +01:00
antirez 27e25e9d1e Some rework of #7234. 2020-05-12 13:07:44 +02:00
Salvatore Sanfilippo b726d64229
Merge pull request #7240 from oranagra/fix_replication_test
fix unstable replication test
2020-05-12 08:44:18 +02:00
Oran Agra b4416280cf fix unstable replication test
this test which has coverage for varoius flows of diskless master was
failing randomly from time to time.

the failure was:
[err]: diskless all replicas drop during rdb pipe in tests/integration/replication.tcl
log message of '*Diskless rdb transfer, last replica dropped, killing fork child*' not found

what seemed to have happened is that the master didn't detect that all
replicas dropped by the time the replication ended, it thought that one
replica is still connected.

now the test takes a few seconds longer but it seems stable.
2020-05-12 08:59:09 +03:00
Oran Agra 905e28ee87 fix redis 6.0 not freeing closed connections during loading.
This bug was introduced by a recent change in which readQueryFromClient
is using freeClientAsync, and despite the fact that now
freeClientsInAsyncFreeQueue is in beforeSleep, that's not enough since
it's not called during loading in processEventsWhileBlocked.
furthermore, afterSleep was called in that case but beforeSleep wasn't.

This bug also caused slowness sine the level-triggered mode of epoll
kept signaling these connections as readable causing us to keep doing
connRead again and again for ll of these, which keep accumulating.

now both before and after sleep are called, but not all of their actions
are performed during loading, some are only reserved for the main loop.

fixes issue #7215
2020-05-11 11:33:46 +03:00
Yossi Gottlieb 450f0d7248 TLS: Add crypto locks for older OpenSSL support.
This is really required only for older OpenSSL versions.

Also, at the moment Redis does not use OpenSSL from multiple threads so
this will only be useful if modules end up doing that.
2020-05-10 17:40:31 +03:00
Yossi Gottlieb 4d1178cc24 TLS: Fix test failures on recent Debian/Ubuntu.
Seems like on some systems choosing specific TLS v1/v1.1 versions no
longer works as expected. Test is reduced for v1.2 now which is still
good enough to test the mechansim, and matters most anyway.
2020-05-10 17:38:04 +03:00
antirez 1750513ac7 Merge branch 'unstable' of github.com:/antirez/redis into unstable 2020-05-09 11:13:32 +02:00
antirez 4387ba6a17 Cluster: clarify we always resolve the sender. 2020-05-09 11:12:51 +02:00
antirez 79de9d6c78 Cluster: refactor ping/data delay handling. 2020-05-09 11:10:38 +02:00
antirez 00a3bc4359 Cluster: introduce data_received field.
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.
2020-05-09 11:10:35 +02:00
Salvatore Sanfilippo 5fa6f9ebe1
Merge pull request #7204 from ShooterIT/benchmark-fix
Redis Benchmark: Fix coredump because of double free
2020-05-08 10:53:20 +02:00
antirez e17f9311c8 stringmatchlen() should not expect null terminated strings. 2020-05-06 16:18:21 +02:00
Salvatore Sanfilippo 2e2f57e23b
Merge pull request #7201 from braddunbar/stringmatchlen
Remove unreachable branch.
2020-05-06 16:17:10 +02:00
Salvatore Sanfilippo 028eb45723
Merge pull request #7207 from hwware/redisconffixx
add jemalloc-bg-thread config in redis conf
2020-05-06 15:42:03 +02:00
Salvatore Sanfilippo 18c4c7bfe7
Merge pull request #7206 from hwware/lolwutmarcofix
add include guard for lolwut.h
2020-05-06 15:40:26 +02:00
hwware 9cfb1c88d6 add jemalloc-bg-thread config in redis conf 2020-05-06 01:07:17 -04:00
hwware 24173d11bf add include guard for lolwut.h 2020-05-05 23:35:08 -04:00
Salvatore Sanfilippo 54cb8214d9
Merge pull request #7175 from bsergean/bsergean-patch-1
redis-cli cluster reshard does not work with ACL (AUTH2 MIGRATE args un-implemented)
2020-05-05 18:22:24 +02:00
ShooterIT 150ba0e1ff Redis Benchmark: Fix coredump because of double free 2020-05-05 23:09:45 +08:00
Brad Dunbar 5508c228e7
Remove unreachable branch. 2020-05-05 09:57:01 -04:00
antirez 373a3384ac Don't propagate spurious MULTI on DEBUG LOADAOF. 2020-05-05 15:50:00 +02:00
antirez 51ab31dbab Dump recent backlog on master query generating errors. 2020-05-05 13:40:33 +02:00
antirez 415c4f613c Merge branch 'unstable' of github.com:/antirez/redis into unstable 2020-05-05 13:19:01 +02:00
antirez e49d97298a Test: --dont-clean should do first cleanup. 2020-05-05 13:18:53 +02:00