When running the unit tests (make test) I repeatably get "Not enough good slaves to write", per the following log (also pasted below).

https://bpaste.net/raw/27765e6791ce

Additional notes: - Server version: Redis server v=2.8.17 sha=00000000:0 malloc=jemalloc-3.6.0 bits=32 build=9706dc92185542f1 - Compiled in a linux VM (local VMware Workstation instance) with gcc 4.7.2 - badboy reviewed the log on #redis and suspected it might be a "nasty timing issue" - I found a similar report on the forum - compiled with CFLAGS='-march=i486 -mtune=i686 -pipe' and LDFLAGS='-Wl,-O1'

The full make test report is replicated below:

$ make test
cd src && make test
make[1]: Entering directory `/home/admin/tmp/redis-stable/src'
rm -rf redis-server redis-sentinel redis-cli redis-benchmark redis-check-dump redis-check-aof *.o *.gcda *.gcno *.gcov redis.info lcov-html
(cd ../deps && make distclean)
make[2]: Entering directory `/home/admin/tmp/redis-stable/deps'
(cd hiredis && make clean) > /dev/null || true
(cd linenoise && make clean) > /dev/null || true
(cd lua && make clean) > /dev/null || true
(cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true
(rm -f .make-*)
make[2]: Leaving directory `/home/admin/tmp/redis-stable/deps'
(rm -f .make-*)
echo STD=-std=c99 -pedantic >> .make-settings
echo WARN=-Wall -W >> .make-settings
echo OPT=-O2 >> .make-settings
echo MALLOC=jemalloc >> .make-settings
echo CFLAGS=-march=i486 -mtune=i686 -pipe >> .make-settings
echo LDFLAGS=-Wl,-O1 >> .make-settings
echo REDIS_CFLAGS= >> .make-settings
echo REDIS_LDFLAGS= >> .make-settings
echo PREV_FINAL_CFLAGS=-std=c99 -pedantic -Wall -W -O2 -g -ggdb -march=i486 -mtune=i686 -pipe  -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -DUSE_JEMALLOC -I../deps/jemalloc/include >> .make-settings
echo PREV_FINAL_LDFLAGS=-Wl,-O1  -g -ggdb -rdynamic >> .make-settings
(cd ../deps && make hiredis linenoise lua jemalloc)
make[2]: Entering directory `/home/admin/tmp/redis-stable/deps'
(cd hiredis && make clean) > /dev/null || true
(cd linenoise && make clean) > /dev/null || true
(cd lua && make clean) > /dev/null || true
(cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true
(rm -f .make-*)
(echo "-march=i486 -mtune=i686 -pipe" > .make-cflags)
(echo "-Wl,-O1" > .make-ldflags)
MAKE hiredis
cd hiredis && make static
make[3]: Entering directory `/home/admin/tmp/redis-stable/deps/hiredis'
cc -std=c99 -pedantic -c -O3 -fPIC -march=i486 -mtune=i686 -pipe -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb  net.c
cc -std=c99 -pedantic -c -O3 -fPIC -march=i486 -mtune=i686 -pipe -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb  hiredis.c
cc -std=c99 -pedantic -c -O3 -fPIC -march=i486 -mtune=i686 -pipe -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb  sds.c
cc -std=c99 -pedantic -c -O3 -fPIC -march=i486 -mtune=i686 -pipe -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb  async.c
ar rcs libhiredis.a net.o hiredis.o sds.o async.o
make[3]: Leaving directory `/home/admin/tmp/redis-stable/deps/hiredis'
MAKE linenoise
cd linenoise && make
make[3]: Entering directory `/home/admin/tmp/redis-stable/deps/linenoise'
cc  -Wall -Os -g -march=i486 -mtune=i686 -pipe -c linenoise.c
make[3]: Leaving directory `/home/admin/tmp/redis-stable/deps/linenoise'
MAKE lua
cd lua/src && make all CFLAGS="-O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe" MYLDFLAGS="-Wl,-O1" AR="ar rcu"
make[3]: Entering directory `/home/admin/tmp/redis-stable/deps/lua/src'
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o lapi.o lapi.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o lcode.o lcode.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o ldebug.o ldebug.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o ldo.o ldo.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o ldump.o ldump.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o lfunc.o lfunc.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o lgc.o lgc.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o llex.o llex.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o lmem.o lmem.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o lobject.o lobject.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o lopcodes.o lopcodes.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o lparser.o lparser.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o lstate.o lstate.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o lstring.o lstring.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o ltable.o ltable.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o ltm.o ltm.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o lundump.o lundump.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o lvm.o lvm.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o lzio.o lzio.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o strbuf.o strbuf.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o lauxlib.o lauxlib.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o lbaselib.o lbaselib.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o ldblib.o ldblib.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o liolib.o liolib.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o lmathlib.o lmathlib.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o loslib.o loslib.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o ltablib.o ltablib.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o lstrlib.o lstrlib.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o loadlib.o loadlib.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o linit.o linit.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o lua_cjson.o lua_cjson.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o lua_struct.o lua_struct.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o lua_cmsgpack.o lua_cmsgpack.c
lua_cmsgpack.c: In function 'table_is_an_array':
lua_cmsgpack.c:370:21: warning: variable 'max' set but not used [-Wunused-but-set-variable]
ar rcu liblua.a lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o strbuf.o lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o lstrlib.o loadlib.o linit.o lua_cjson.o lua_struct.o lua_cmsgpack.o # DLL needs all object files
ranlib liblua.a
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o lua.o lua.c
cc -o lua -Wl,-O1 lua.o liblua.a -lm 
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o luac.o luac.c
cc -O2 -Wall -DLUA_ANSI -march=i486 -mtune=i686 -pipe   -c -o print.o print.c
cc -o luac -Wl,-O1 luac.o print.o liblua.a -lm 
make[3]: Leaving directory `/home/admin/tmp/redis-stable/deps/lua/src'
MAKE jemalloc
cd jemalloc && ./configure --with-jemalloc-prefix=je_ --enable-cc-silence CFLAGS="-std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe" LDFLAGS="-Wl,-O1"
checking for xsltproc... false
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/local/bin/grep
checking for egrep... /usr/local/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking size of void *... 4
checking size of int... 4
checking size of long... 4
checking size of intmax_t... 8
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking whether pause instruction is compilable... yes
checking whether SSE2 intrinsics is compilable... no
checking for ar... ar
checking whether __attribute__ syntax is compilable... yes
checking whether compiler supports -fvisibility=hidden... yes
checking whether compiler supports -Werror... yes
checking whether tls_model attribute is compilable... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking for ld... /usr/local/bin/ld
checking for autoconf... false
checking for memalign... yes
checking for valloc... yes
checking configured backtracing method... N/A
checking for sbrk... yes
checking whether utrace(2) is compilable... no
checking whether valgrind is compilable... no
checking STATIC_PAGE_SHIFT... 12
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_create in -lpthread... yes
checking for _malloc_thread_cleanup... no
checking for _pthread_mutex_init_calloc_cb... no
checking for TLS... yes
checking whether a program using ffsl is compilable... yes
checking whether atomic(9) is compilable... no
checking whether Darwin OSAtomic*() is compilable... no
checking whether to force 32-bit __sync_{add,sub}_and_fetch()... no
checking whether to force 64-bit __sync_{add,sub}_and_fetch()... no
checking whether Darwin OSSpin*() is compilable... no
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/html.xsl
config.status: creating doc/manpages.xsl
config.status: creating doc/jemalloc.xml
config.status: creating include/jemalloc/jemalloc_macros.h
config.status: creating include/jemalloc/jemalloc_protos.h
config.status: creating include/jemalloc/internal/jemalloc_internal.h
config.status: creating test/test.sh
config.status: creating test/include/test/jemalloc_test.h
config.status: creating config.stamp
config.status: creating bin/jemalloc.sh
config.status: creating include/jemalloc/jemalloc_defs.h
config.status: creating include/jemalloc/internal/jemalloc_internal_defs.h
config.status: creating test/include/test/jemalloc_test_defs.h
config.status: executing include/jemalloc/internal/private_namespace.h commands
config.status: executing include/jemalloc/internal/private_unnamespace.h commands
config.status: executing include/jemalloc/internal/public_symbols.txt commands
config.status: executing include/jemalloc/internal/public_namespace.h commands
config.status: executing include/jemalloc/internal/public_unnamespace.h commands
config.status: executing include/jemalloc/internal/size_classes.h commands
config.status: executing include/jemalloc/jemalloc_protos_jet.h commands
config.status: executing include/jemalloc/jemalloc_rename.h commands
config.status: executing include/jemalloc/jemalloc_mangle.h commands
config.status: executing include/jemalloc/jemalloc_mangle_jet.h commands
config.status: executing include/jemalloc/jemalloc.h commands
===============================================================================
jemalloc version   : 3.6.0-0-g46c0af68bd248b04df75e4f92d5fb804c3d75340
library revision   : 1    

CC                 : gcc
CPPFLAGS           :  -D_GNU_SOURCE -D_REENTRANT
CFLAGS             : -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -fvisibility=hidden
LDFLAGS            : -Wl,-O1
EXTRA_LDFLAGS      : 
LIBS               :  -lpthread
RPATH_EXTRA        :     

XSLTPROC           : false
XSLROOT            :     

PREFIX             : /usr/local
BINDIR             : /usr/local/bin
INCLUDEDIR         : /usr/local/include
LIBDIR             : /usr/local/lib
DATADIR            : /usr/local/share
MANDIR             : /usr/local/share/man    

srcroot            : 
abs_srcroot        : /home/admin/tmp/redis-stable/deps/jemalloc/
objroot            : 
abs_objroot        : /home/admin/tmp/redis-stable/deps/jemalloc/    

JEMALLOC_PREFIX    : je_
JEMALLOC_PRIVATE_NAMESPACE
                   : je_
install_suffix     : 
autogen            : 0
experimental       : 1
cc-silence         : 1
debug              : 0
code-coverage      : 0
stats              : 1
prof               : 0
prof-libunwind     : 0
prof-libgcc        : 0
prof-gcc           : 0
tcache             : 1
fill               : 1
utrace             : 0
valgrind           : 0
xmalloc            : 0
mremap             : 0
munmap             : 0
dss                : 0
lazy_lock          : 0
tls                : 1
===============================================================================
cd jemalloc && make CFLAGS="-std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe" LDFLAGS="-Wl,-O1" lib/libjemalloc.a
make[3]: Entering directory `/home/admin/tmp/redis-stable/deps/jemalloc'
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/jemalloc.o src/jemalloc.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/arena.o src/arena.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/atomic.o src/atomic.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/base.o src/base.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/bitmap.o src/bitmap.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/chunk.o src/chunk.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/chunk_dss.o src/chunk_dss.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/chunk_mmap.o src/chunk_mmap.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/ckh.o src/ckh.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/ctl.o src/ctl.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/extent.o src/extent.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/hash.o src/hash.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/huge.o src/huge.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/mb.o src/mb.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/mutex.o src/mutex.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/prof.o src/prof.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/quarantine.o src/quarantine.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/rtree.o src/rtree.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/stats.o src/stats.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/tcache.o src/tcache.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/util.o src/util.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -march=i486 -mtune=i686 -pipe -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/tsd.o src/tsd.c
ar crus lib/libjemalloc.a src/jemalloc.o src/arena.o src/atomic.o src/base.o src/bitmap.o src/chunk.o src/chunk_dss.o src/chunk_mmap.o src/ckh.o src/ctl.o src/extent.o src/hash.o src/huge.o src/mb.o src/mutex.o src/prof.o src/quarantine.o src/rtree.o src/stats.o src/tcache.o src/util.o src/tsd.o
make[3]: Leaving directory `/home/admin/tmp/redis-stable/deps/jemalloc'
make[2]: Leaving directory `/home/admin/tmp/redis-stable/deps'
    CC adlist.o
    CC ae.o
    CC anet.o
    CC dict.o
    CC redis.o
    CC sds.o
    CC zmalloc.o
    CC lzf_c.o
    CC lzf_d.o
    CC pqsort.o
    CC zipmap.o
    CC sha1.o
    CC ziplist.o
    CC release.o
    CC networking.o
    CC util.o
    CC object.o
    CC db.o
    CC replication.o
    CC rdb.o
    CC t_string.o
    CC t_list.o
    CC t_set.o
    CC t_zset.o
    CC t_hash.o
    CC config.o
    CC aof.o
    CC pubsub.o
    CC multi.o
    CC debug.o
    CC sort.o
    CC intset.o
    CC syncio.o
    CC migrate.o
    CC endianconv.o
    CC slowlog.o
    CC scripting.o
    CC bio.o
    CC rio.o
    CC rand.o
    CC memtest.o
    CC crc64.o
    CC bitops.o
    CC sentinel.o
    CC notify.o
    CC setproctitle.o
    CC hyperloglog.o
    CC latency.o
    CC sparkline.o
    LINK redis-server
    CC redis-check-aof.o
    LINK redis-check-aof
Cleanup: may take some time... OK
Starting test server at port 11111
[ready]: 6375
Testing unit/printver
[ready]: 6376
Testing unit/auth
[ready]: 6378
Testing unit/protocol
[ready]: 6377
Testing unit/basic
[ready]: 6379
Testing unit/scan
[ready]: 6380
Testing unit/type/list
[ready]: 6381
Testing unit/type/list-2
[ready]: 6382
Testing unit/type/list-3
[ready]: 6383
Testing unit/type/set
[ready]: 6384
Testing unit/type/zset
[ready]: 6385
Testing unit/type/hash
[ready]: 6386
Testing unit/sort
[ready]: 6387
Testing unit/expire
[ready]: 6388
Testing unit/other
[ready]: 6389
Testing unit/multi
[ready]: 6390
Testing unit/quit
[ok]: HSET/HLEN - Small hash creation
[ok]: Is the small hash encoded with a ziplist?
[ok]: Handle an empty query
[ok]: Negative multibulk length
[ok]: Out of range multibulk length
[ok]: Wrong multibulk payload header
[ok]: Negative multibulk payload length
[ok]: Out of range multibulk payload length
[ok]: Non-number multibulk payload length
[ok]: Multi bulk request not followed by bulk arguments
[ok]: Generic wrong number of args
[ok]: Unbalanced number of quotes
[ok]: SAVE - make sure there are all the types as values
[ok]: SADD, SCARD, SISMEMBER, SMEMBERS basics - regular set
[ok]: SADD, SCARD, SISMEMBER, SMEMBERS basics - intset
[ok]: SADD against non set
[ok]: SADD a non-integer against an intset
[ok]: SADD an integer larger than 64 bits
[ok]: AUTH fails if there is no password configured server side
[ok]: SCAN basic
[ok]: QUIT returns OK
[ok]: Pipelined commands after QUIT must not be executed
[ok]: Pipelined commands after QUIT that exceed read buffer size
[ok]: Explicit regression for a list bug
[1/36 done]: unit/quit (2 seconds)
Testing unit/aofrw
[ok]: SADD overflows the maximum allowed integers in an intset
[ok]: Variadic SADD
[ok]: SCAN COUNT
[ok]: Check encoding - ziplist
[ok]: ZSET basic ZADD and score update - ziplist
[ok]: ZSET element can't be set to NaN with ZADD - ziplist
[ok]: ZSET element can't be set to NaN with ZINCRBY
[ok]: ZINCRBY calls leading to NaN result in error
[ok]: ZADD - Variadic version base case
[ok]: ZADD - Return value is the number of actually added items
[ok]: ZADD - Variadic version does not add nothing on single parsing err
[ok]: ZADD - Variadic version will raise error on missing arg
[ok]: ZINCRBY does not work variadic even if shares ZADD implementation
[ok]: ZCARD basics - ziplist
[ok]: ZREM removes key after last element is removed
[ok]: ZREM variadic version
[ok]: ZREM variadic version -- remove elements after key deletion
[ok]: ZRANGE basics - ziplist
[ok]: SCAN MATCH
[ok]: ZREVRANGE basics - ziplist
[ok]: ZRANK/ZREVRANK basics - ziplist
[ok]: ZRANK - after deletion - ziplist
[ok]: SSCAN with encoding intset
[ok]: ZINCRBY - can create a new sorted set - ziplist
[ok]: ZINCRBY - increment and decrement - ziplist
[ok]: MUTLI / EXEC basics
[ok]: DISCARD
[ok]: Nested MULTI are not allowed
[ok]: MULTI where commands alter argc/argv
[ok]: SSCAN with encoding hashtable
[ok]: WATCH inside MULTI is not allowed
[ok]: HSCAN with encoding ziplist
[ok]: EXPIRE - set timeouts multiple times
[ok]: EXPIRE - It should be still possible to read 'x'
[ok]: EXEC fails if there are errors while queueing commands #1
[ok]: EXEC fails if there are errors while queueing commands #2
[ok]: If EXEC aborts, the client MULTI state is cleared
[ok]: EXEC works on WATCHed key not modified
[ok]: EXEC fail on WATCHed key modified (1 key of 1 watched)
[ok]: EXEC fail on WATCHed key modified (1 key of 5 watched)
[ok]: EXEC fail on WATCHed key modified by SORT with STORE even if the result is empty
[ok]: After successful EXEC key is no longer watched
Testing Redis version 2.8.17 (00000000)
[ok]: After failed EXEC key is no longer watched
[ok]: It is possible to UNWATCH
[ok]: UNWATCH when there is nothing watched works as expected
[ok]: FLUSHALL is able to touch the watched keys
[ok]: FLUSHALL does not touch non affected keys
[ok]: ZRANGEBYSCORE/ZREVRANGEBYSCORE/ZCOUNT basics
[ok]: FLUSHDB is able to touch the watched keys
[ok]: Protocol desync regression test #1
[ok]: FLUSHDB does not touch non affected keys
[ok]: WATCH is able to remember the DB a key belongs to
[ok]: ZRANGEBYSCORE with WITHSCORES
[ok]: WATCH will consider touched keys target of EXPIRE
[ok]: ZRANGEBYSCORE with LIMIT
[ok]: ZRANGEBYSCORE with LIMIT and WITHSCORES
[ok]: ZRANGEBYSCORE with non-value min or max
[ok]: ZRANGEBYLEX/ZREVRANGEBYLEX/ZCOUNT basics
[ok]: ZRANGEBYSLEX with LIMIT
[ok]: ZRANGEBYLEX with invalid lex range specifiers
[ok]: DEL all keys to start with a clean DB
[ok]: SET and GET an item
[ok]: SET and GET an empty item
[ok]: DEL against a single item
[ok]: Vararg DEL
[ok]: LPUSH, RPUSH, LLENGTH, LINDEX, LPOP - ziplist
[ok]: KEYS with pattern
[ok]: KEYS to get all keys
[ok]: DBSIZE
[ok]: DEL all keys
[ok]: ZREMRANGEBYSCORE basics
[ok]: ZREMRANGEBYSCORE with non-value min or max
[ok]: ZREMRANGEBYRANK basics
[ok]: ZUNIONSTORE against non-existing key doesn't set destination - ziplist
[ok]: LPUSH, RPUSH, LLENGTH, LINDEX, LPOP - regular list
[ok]: R/LPOP against empty list
[ok]: ZUNIONSTORE with empty set - ziplist
[ok]: ZUNIONSTORE basics - ziplist
[ok]: HSET/HLEN - Big hash creation
[ok]: Is the big hash encoded with a ziplist?
[ok]: ZUNIONSTORE with weights - ziplist
[ok]: ZUNIONSTORE with a regular set and weights - ziplist
[ok]: Variadic RPUSH/LPUSH
[ok]: DEL a list - ziplist
[ok]: ZUNIONSTORE with AGGREGATE MIN - ziplist
[ok]: HGET against the small hash
[ok]: DEL a list - regular list
[ok]: ZUNIONSTORE with AGGREGATE MAX - ziplist
[ok]: ZINTERSTORE basics - ziplist
[ok]: ZINTERSTORE with weights - ziplist
[ok]: ZINTERSTORE with a regular set and weights - ziplist
[ok]: ZINTERSTORE with AGGREGATE MIN - ziplist
[ok]: ZINTERSTORE with AGGREGATE MAX - ziplist
[ok]: ZUNIONSTORE with +inf/-inf scores - ziplist
[ok]: ZUNIONSTORE with NaN weights ziplist
[ok]: ZINTERSTORE with +inf/-inf scores - ziplist
[ok]: ZINTERSTORE with NaN weights ziplist
[ok]: Check encoding - skiplist
[ok]: BLPOP, BRPOP: single existing list - linkedlist
[ok]: ZSET basic ZADD and score update - skiplist
[ok]: ZSET element can't be set to NaN with ZADD - skiplist
[ok]: ZSET element can't be set to NaN with ZINCRBY
[ok]: ZINCRBY calls leading to NaN result in error
[ok]: ZADD - Variadic version base case
[ok]: ZADD - Return value is the number of actually added items
[ok]: ZADD - Variadic version does not add nothing on single parsing err
[ok]: ZADD - Variadic version will raise error on missing arg
[ok]: ZINCRBY does not work variadic even if shares ZADD implementation
[ok]: BLPOP, BRPOP: multiple existing lists - linkedlist
[ok]: ZCARD basics - skiplist
[ok]: BLPOP, BRPOP: second list has an entry - linkedlist
[ok]: ZREM removes key after last element is removed
[ok]: ZREM variadic version
[ok]: ZREM variadic version -- remove elements after key deletion
[ok]: ZRANGE basics - skiplist
[ok]: ZREVRANGE basics - skiplist
[ok]: ZRANK/ZREVRANK basics - skiplist
[ok]: ZRANK - after deletion - skiplist
[ok]: ZINCRBY - can create a new sorted set - skiplist
[ok]: ZINCRBY - increment and decrement - skiplist
[ok]: ZRANGEBYSCORE/ZREVRANGEBYSCORE/ZCOUNT basics
[ok]: ZRANGEBYSCORE with WITHSCORES
[ok]: ZRANGEBYSCORE with LIMIT
[ok]: ZRANGEBYSCORE with LIMIT and WITHSCORES
[ok]: ZRANGEBYSCORE with non-value min or max
[ok]: BRPOPLPUSH - linkedlist
[ok]: ZRANGEBYLEX/ZREVRANGEBYLEX/ZCOUNT basics
[ok]: ZRANGEBYSLEX with LIMIT
[ok]: ZRANGEBYLEX with invalid lex range specifiers
[ok]: BLPOP, BRPOP: single existing list - ziplist
[ok]: BLPOP, BRPOP: multiple existing lists - ziplist
[ok]: HSCAN with encoding hashtable
[ok]: ZREMRANGEBYSCORE basics
[ok]: ZREMRANGEBYSCORE with non-value min or max
[ok]: ZSCAN with encoding ziplist
[ok]: ZREMRANGEBYRANK basics
[ok]: ZUNIONSTORE against non-existing key doesn't set destination - skiplist
[ok]: ZUNIONSTORE with empty set - skiplist
[ok]: ZUNIONSTORE basics - skiplist
[ok]: BLPOP, BRPOP: second list has an entry - ziplist
[ok]: ZUNIONSTORE with weights - skiplist
[ok]: Ziplist: SORT BY key
[ok]: Ziplist: SORT BY key with limit
[ok]: ZUNIONSTORE with a regular set and weights - skiplist
[ok]: Ziplist: SORT BY hash field
[ok]: BRPOPLPUSH - ziplist
[ok]: ZUNIONSTORE with AGGREGATE MIN - skiplist
[ok]: ZUNIONSTORE with AGGREGATE MAX - skiplist
[ok]: ZINTERSTORE basics - skiplist
[ok]: ZINTERSTORE with weights - skiplist
[ok]: ZINTERSTORE with a regular set and weights - skiplist
[ok]: ZINTERSTORE with AGGREGATE MIN - skiplist
[ok]: ZINTERSTORE with AGGREGATE MAX - skiplist
[ok]: BLPOP, LPUSH + DEL should not awake blocked client
[ok]: BLPOP, LPUSH + DEL + SET should not awake blocked client
[ok]: ZUNIONSTORE with +inf/-inf scores - skiplist
[ok]: ZUNIONSTORE with NaN weights skiplist
[ok]: ZINTERSTORE with +inf/-inf scores - skiplist
[ok]: ZINTERSTORE with NaN weights skiplist
[ok]: ZINTERSTORE regression with two sets, intset+hashtable
[ok]: ZUNIONSTORE regression, should not create NaN in scores
[ok]: BLPOP with same key multiple times should work (issue #801)
[ok]: ZINTERSTORE #516 regression, mixed sets and ziplist zsets
[2/36 done]: unit/printver (2 seconds)
Testing integration/replication
[ok]: MULTI/EXEC is isolated from the point of view of BLPOP
[ok]: BLPOP with variadic LPUSH
[ok]: ZSCAN with encoding skiplist
[ok]: Set encoding after DEBUG RELOAD
[ok]: HGET against the big hash
[ok]: HGET against non existing key
[ok]: SREM basics - regular set
[ok]: SCAN guarantees check under write load
[ok]: HSET in update and insert mode
[ok]: HSETNX target key missing - small hash
[ok]: SSCAN with integer encoded object (issue #1345)
[ok]: SSCAN with PATTERN
[ok]: HSETNX target key exists - small hash
[ok]: SREM basics - intset
[ok]: HSETNX target key missing - big hash
[ok]: HSCAN with PATTERN
[ok]: HSETNX target key exists - big hash
[ok]: SREM with multiple arguments
[ok]: HMSET wrong number of args
[ok]: SREM variadic version with more args needed to destroy the key
[ok]: ZSCAN with PATTERN
[ok]: HMSET - small hash
[3/36 done]: unit/scan (3 seconds)
Testing integration/replication-2
[ok]: ZUNIONSTORE result is sorted
[ok]: Generated sets must be encoded as hashtable
[ok]: SINTER with two sets - hashtable
[ok]: SINTERSTORE with two sets - hashtable
[ok]: HMSET - big hash
[ok]: HMGET against non existing key and fields
[ok]: HMGET against wrong type
[ok]: HMGET - small hash
[ok]: SINTERSTORE with two sets, after a DEBUG RELOAD - hashtable
[ok]: Protocol desync regression test #2
[ok]: ZSCORE - ziplist
[ok]: SUNION with two sets - hashtable
[ok]: HMGET - big hash
[ok]: HKEYS - small hash
[ok]: SUNIONSTORE with two sets - hashtable
[ok]: SINTER against three sets - hashtable
[ok]: SINTERSTORE with three sets - hashtable
[ok]: SUNION with non existing keys - hashtable
[ok]: SDIFF with two sets - hashtable
[ok]: SDIFF with three sets - hashtable
[ok]: SDIFFSTORE with three sets - hashtable
[ok]: HKEYS - big hash
[ok]: HVALS - small hash
[ok]: ZSCORE after a DEBUG RELOAD - ziplist
[ok]: HVALS - big hash
[ok]: HGETALL - small hash
[ok]: ZSET sorting stresser - ziplist
[ok]: Generated sets must be encoded as intset
[ok]: SINTER with two sets - intset
[ok]: SINTERSTORE with two sets - intset
[ok]: SINTERSTORE with two sets, after a DEBUG RELOAD - intset
[ok]: SUNION with two sets - intset
[ok]: SUNIONSTORE with two sets - intset
[ok]: SINTER against three sets - intset
[ok]: SINTERSTORE with three sets - intset
[ok]: SUNION with non existing keys - intset
[ok]: Protocol desync regression test #3
[ok]: WATCH will not consider touched expired keys
[ok]: DISCARD should clear the WATCH dirty flag on the client
[ok]: DISCARD should UNWATCH all the keys
[ok]: SDIFF with two sets - intset
[ok]: SDIFF with three sets - intset
[ok]: SDIFFSTORE with three sets - intset
[ok]: SDIFF with first set empty
[ok]: SDIFF with same set two times
[ok]: HGETALL - big hash
[ok]: HDEL and return value
[ok]: HDEL - more than a single value
[ok]: HDEL - hash becomes empty before deleting all specified fields
[ok]: HEXISTS
[ok]: Is a ziplist encoded Hash promoted on big payload?
[ok]: HINCRBY against non existing database key
[ok]: HINCRBY against non existing hash key
[ok]: HINCRBY against hash key created by hincrby itself
[ok]: HINCRBY against hash key originally set with HSET
[ok]: HINCRBY over 32bit value
[ok]: HINCRBY over 32bit value with over 32bit increment
[ok]: HINCRBY fails against hash value with spaces (left)
[ok]: HINCRBY fails against hash value with spaces (right)
[ok]: HINCRBY can detect overflows
[ok]: HINCRBYFLOAT against non existing database key
[ok]: HINCRBYFLOAT against non existing hash key
[ok]: HINCRBYFLOAT against hash key created by hincrby itself
[ok]: HINCRBYFLOAT against hash key originally set with HSET
[ok]: HINCRBYFLOAT over 32bit value
[ok]: HINCRBYFLOAT over 32bit value with over 32bit increment
[ok]: HINCRBYFLOAT fails against hash value with spaces (left)
[ok]: HINCRBYFLOAT fails against hash value with spaces (right)
[ok]: Hash ziplist regression test for large keys
[ok]: Hash fuzzing #1 - 10 fields
[ok]: BRPOPLPUSH with zero timeout should block indefinitely
[ok]: Hash fuzzing #2 - 10 fields
[ok]: Linked list: SORT BY key
[ok]: Linked list: SORT BY key with limit
[ok]: Linked list: SORT BY hash field
[ok]: AUTH fails when a wrong password is given
[ok]: Arbitrary command gives an error when AUTH is required
[ok]: AUTH succeeds when the right password is given
[ok]: Once AUTH succeeded we can actually send commands to the server
[4/36 done]: unit/auth (4 seconds)
Testing integration/replication-3
[ok]: EXPIRE - After 2.1 seconds the key should no longer be here
[ok]: EXPIRE - write on expire should work
[ok]: EXPIREAT - Check for EXPIRE alike behavior
[ok]: SETEX - Set + Expire combo operation. Check for TTL
[ok]: SETEX - Check value
[ok]: SETEX - Overwrite old key
[ok]: MULTI / EXEC is propagated correctly (single write command)
[ok]: FUZZ stresser with data model binary
[ok]: BRPOPLPUSH with a client BLPOPing the target list
[ok]: BRPOPLPUSH with wrong source type
[ok]: Regression for a crash with blocking ops and pipelining
[5/36 done]: unit/protocol (5 seconds)
Testing integration/replication-4
[ok]: MULTI / EXEC is propagated correctly (empty transaction)
[ok]: SETEX - Wait for the key to expire
[ok]: SETEX - Wrong time parameter
[ok]: PERSIST can undo an EXPIRE
[ok]: PERSIST returns 0 against non existing or non volatile keys
[ok]: BRPOPLPUSH with wrong destination type
[ok]: BRPOPLPUSH maintains order of elements after failure
[ok]: BRPOPLPUSH with multiple blocked clients
[ok]: Linked BRPOPLPUSH
[ok]: Circular BRPOPLPUSH
[ok]: Self-referential BRPOPLPUSH
[ok]: BRPOPLPUSH inside a transaction
[ok]: PUSH resulting from BRPOPLPUSH affect WATCH
[ok]: BRPOPLPUSH does not affect WATCH while still blocked
[ok]: Very big payload in GET/SET
[ok]: MULTI / EXEC is propagated correctly (read-only commands)
[ok]: MULTI / EXEC is propagated correctly (write command, no effect)
[6/36 done]: unit/multi (6 seconds)
Testing integration/replication-psync
[ok]: First server should have role slave after SLAVEOF
[ok]: First server should have role slave after SLAVEOF
[ok]: BRPOPLPUSH replication, when blocking against empty list    

Logged warnings (pid 6570):
(none)    


Logged warnings (pid 6530):
(none)    

[exception]: Executing test client: NOREPLICAS Not enough good slaves to write..
NOREPLICAS Not enough good slaves to write.
    while executing
"[srv $level "client"] {*}$args"
    (procedure "r" line 7)
    invoked from within
"r set foo 12345"
    ("uplevel" body line 4)
    invoked from within
"uplevel 1 $code"
    (procedure "test" line 29)
    invoked from within
"test {If min-slaves-to-write is honored, write is accepted} {
            r config set min-slaves-to-write 1
            r config set min-slaves-max-l..."
    ("uplevel" body line 8)
    invoked from within
"uplevel 1 $code "
    (procedure "start_server" line 3)
    invoked from within
"start_server {} {
        test {First server should have role slave after SLAVEOF} {
            r -1 slaveof [srv 0 host] [srv 0 port]
            af..."
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $code "
    (procedure "start_server" line 3)
    invoked from within
"start_server {tags {"repl"}} {
    start_server {} {
        test {First server should have role slave after SLAVEOF} {
            r -1 slaveof [srv ..."
    (file "tests/integration/replication-2.tcl" line 1)
    invoked from within
"source $path"
    (procedure "execute_tests" line 4)
    invoked from within
"execute_tests $data"
    (procedure "test_client_main" line 10)
    invoked from within
"test_client_main $::test_server_port "
make[1]: *** [test] Error 1
make[1]: Leaving directory `/home/admin/tmp/redis-stable/src'
make: *** [test] Error 2

Comment From: mattsta

Can you reproduce the error or does it only happen sometimes?

I tried a few tests, but I can't reproduce that error on OS X or Linux.

If you are running in a VM with potential timing issues, it's possible the replica instance hasn't had time to become available yet. We could probably improve the test to wait for a verified replication connection instead of using a default 1 second delay.

We can replace sleeping for 1 second with a wait_for_condition loop checking for ROLE[3] == "connected" instead of just checking for role==slave. (I can't seem to get tcl to give me the other return fields from the ROLE command though, so... not sure how to check for the multiple return values from ROLE at the moment.)

But, on OS X with make 32bit test, I do get this:

[err]: Memory efficiency with values in range 1024 in tests/unit/memefficiency.tcl
Expected condition '$efficiency >= $expected_min_efficiency' to be true (0.71922549271049363 >= 0.75)

Comment From: rwarren

I have been able to reproduce the error many times when compiling from scratch..

However, after you pointed out the 1 second delay issue I figured I'd go lengthen that delay and see if it helps. As a pre-check (before I even changed the tcl code) I ran make test again from the src dir (without a make clean or anything) and am getting a different set of errors. The relevant/clipped tail is below:

[ok]: No write if min-slaves-max-lag is > of the slave lag
[ok]: min-slaves-to-write is ignored by slaves
[err]: Unfinished MULTI: Server should start if load-truncated is yes in tests/integration/aof.tcl
Expected '0' to be equal to '1'
[ok]: BRPOP: timeout
[ok]: BRPOP: arguments are empty
[ok]: BLPOP inside a transaction
[ok]: LPUSHX, RPUSHX - generic
[ok]: LPUSHX, RPUSHX - linkedlist
[ok]: LINSERT - linkedlist
[ok]: LPUSHX, RPUSHX - ziplist
[ok]: LINSERT - ziplist
[ok]: LINSERT raise error on bad syntax
[ok]: LPUSHX, RPUSHX convert from ziplist to list
[ok]: BGSAVE
[ok]: SELECT an out of range DB
[err]: Short read: Server should start if load-truncated is yes in tests/integration/aof.tcl
Expected '0' to be equal to '1'
[ok]: LINSERT convert from ziplist to list
[exception]: Executing test client: LOADING Redis is loading the dataset in memory.
LOADING Redis is loading the dataset in memory
    while executing
"$client get foo"
    invoked from within
"expr {[$client get foo] eq "5"}"
    ("uplevel" body line 1)
    invoked from within
"uplevel 1 [list expr $condition]"
    (procedure "assert" line 2)
    invoked from within
"assert {[$client get foo] eq "5"}"
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $code"
    (procedure "test" line 29)
    invoked from within
"test "Truncated AOF loaded: we expect foo to be equal to 5" {
            assert {[$client get foo] eq "5"}
        }"
    ("uplevel" body line 8)
    invoked from within
"uplevel 1 $code"
    (procedure "start_server_aof" line 5)
    invoked from within
"start_server_aof [list dir $server_path aof-load-truncated yes] {
        test "Short read: Server should start if load-truncated is yes" {
          ..."
    ("uplevel" body line 26)
    invoked from within
"uplevel 1 $code"
    (procedure "tags" line 3)
    invoked from within
"tags {"aof"} {
    ## Server can start when aof-load-truncated is set to yes and AOF
    ## is truncated, with an incomplete MULTI block.
    create_a..."
    (file "tests/integration/aof.tcl" line 25)
    invoked from within
"source $path"
    (procedure "execute_tests" line 4)
    invoked from within
"execute_tests $data"
    (procedure "test_client_main" line 10)
    invoked from within
"test_client_main $::test_server_port "
make: *** [test] Error 1    

I will also try a make from scratch, then lengthen the delay in the original test, and see what results (as I'm sure a fresh make test will/should yield the originally reported error again).

Comment From: mattsta

Executing test client: LOADING Redis is loading the dataset in memory.

That means the slave is still being initialized even after the timeout.

Slaves report their ROLE as "slave" even before the data sync happens. Ideally, we should check for slave+connected.

Increase the timeout even more!

Comment From: mariano-perez-rodriguez

FWIW I'm also experiencing this issue, and I can confirm it seems to have something to do with system load (ie. replica time to availability), being able to reproduce it with almost 100% certainty if trying to load a VirtualBox VM alongside the Redis build process.

Comment From: rwarren

@mattsta - I had not actually lengthened the delay yet for my previous update! That was my test in advance of doing that.

However, after some hackery it certainly seems to be a timing issue. I hacked in the following delays: - Set the delay to 5000 ms (from 1000 ms) on this line of the previously mentioned replication-2.tcl file - Thanks again for the pointer to that, @mattsta , as it got me started digging for delay issues in the tcl - Increased the delays in the server_is_up proc here - initial delay bumped to 100 ms (from 10 ms) - in-loop delay bumped to 250 ms (from 50 ms)

After doing this, I am actually able to get through almost the full test suite without exception (\o/), but everything still does not pass. Here is the complete make test output:

https://bpaste.net/raw/83b218286b4b

Below is an excerpt of the closing summary, where you can see that all errors seem to be related to server starts. I am curious how those test times fare, as well.

[36/36 done]: unit/memefficiency (860 seconds)

                   The End

Execution time of different units:
  2 seconds - unit/printver
  2 seconds - unit/quit
  3 seconds - unit/auth
  3 seconds - unit/scan
  5 seconds - unit/multi
  5 seconds - unit/protocol
  12 seconds - unit/expire
  5 seconds - integration/aof
  18 seconds - unit/type/list
  20 seconds - unit/type/list-2
  3 seconds - integration/convert-zipmap-hash-on-load
  1 seconds - unit/pubsub
  1 seconds - unit/slowlog
  23 seconds - unit/type/hash
  1 seconds - unit/introspection
  2 seconds - unit/limits
  26 seconds - unit/other
  10 seconds - unit/scripting
  35 seconds - unit/type/set
  20 seconds - integration/rdb
  12 seconds - unit/dump
  41 seconds - unit/type/zset
  43 seconds - unit/sort
  50 seconds - integration/replication-2
  31 seconds - unit/maxmemory
  22 seconds - unit/bitops
  48 seconds - integration/replication-psync
  52 seconds - unit/aofrw
  61 seconds - unit/type/list-3
  64 seconds - unit/basic
  62 seconds - integration/replication
  38 seconds - unit/hyperloglog
  75 seconds - integration/replication-4
  78 seconds - integration/replication-3
  299 seconds - unit/obuf-limits
  860 seconds - unit/memefficiency

!!! WARNING The following tests failed:

*** [err]: Unfinished MULTI: Server should start if load-truncated is yes in tests/integration/aof.tcl
Expected '0' to be equal to '1'
*** [err]: Short read: Server should start if load-truncated is yes in tests/integration/aof.tcl
Expected '0' to be equal to '1'
*** [err]: Short read + command: Server should start in tests/integration/aof.tcl
Expected '0' to be equal to '1'
*** [err]: Fixed AOF: Server should have been started in tests/integration/aof.tcl
Expected '0' to be equal to '1'
*** [err]: AOF+SPOP: Server should have been started in tests/integration/aof.tcl
Expected '0' to be equal to '1'
*** [err]: AOF+EXPIRE: Server should have been started in tests/integration/aof.tcl
Expected '0' to be equal to '1'
*** [err]: Server should not start if RDB file can't be open in tests/integration/rdb.tcl
Server started even if RDB was unreadable!
*** [err]: Server should not start if RDB is corrupted in tests/integration/rdb.tcl
Server started even if RDB was corrupted!
Cleanup: may take some time... OK
make[1]: *** [test] Error 1
make[1]: Leaving directory `/home/admin/tmp/redis-stable/src'
make: *** [test] Error 2

Comment From: rwarren

It is also worth noting that I'm left with 79 separate redis-server process at the end of this that I need to kill with pgrep redis | xargs kill -9. There were also several servers left when the tests were aborted due to exception.

Comment From: bschnur

I just installed redis on CentOS 7 x64. After my first make test (which returned the "Not enough good slaves to write" error), I ran pgrep redis thanks to your post and found that several processes were still running. After killing them as you did, I ran make test again, and passed all tests. (Not sure if this helps you, but thought it worth mentioning in case it does.)

Comment From: emerak

Hey guys I also got this error today, I did what @rwarren suggested, kill all redis process and then run make test, after that everything passed.

Comment From: adam-vioozer

Happened to me too, on an EC2 machine. Killing all redis processes made the tests pass:

Execution time of different units:
  2 seconds - unit/quit
  2 seconds - unit/printver
  3 seconds - unit/auth
  5 seconds - unit/multi
  9 seconds - unit/scan
  12 seconds - unit/expire
  12 seconds - unit/protocol
  25 seconds - integration/aof
  46 seconds - unit/type/list
  10 seconds - integration/rdb
  5 seconds - unit/pubsub
  8 seconds - integration/convert-zipmap-hash-on-load
  2 seconds - unit/slowlog
  70 seconds - integration/replication-psync
  81 seconds - unit/aofrw
  4 seconds - unit/introspection
  4 seconds - unit/limits
  35 seconds - unit/scripting
  106 seconds - unit/other
  40 seconds - unit/dump
  127 seconds - unit/type/hash
  128 seconds - unit/type/list-2
  59 seconds - unit/bitops
  110 seconds - unit/maxmemory
  165 seconds - integration/replication
  168 seconds - unit/type/set
  173 seconds - integration/replication-2
  205 seconds - unit/type/zset
  214 seconds - unit/sort
  215 seconds - unit/type/list-3
  221 seconds - unit/basic
  244 seconds - integration/replication-4
  131 seconds - unit/hyperloglog
  264 seconds - integration/replication-3
  366 seconds - unit/obuf-limits
  395 seconds - unit/memefficiency

\o/ All tests passed without errors!

Comment From: mattsta

kill all redis process and then run make test, after that everything passed.

New commits from November may help prevent these problems in the future: 8acb3a8843c2cb92c3acaf0ce30a765649496f69, bd3a51615c7752186d8a4740affedc269ce5dfc6, fe0d3719956cc140115f30c4a684cbcb1a9928ad

Comment From: bjackson

I'm running from the unstable branch, and I still get Not enough good slaves to write..

Comment From: lulyon

No more explanation about this issue? I run across the problem when build from source code(redis-3.0.7 version) on ubuntu 14.04 LTS, too.

Comment From: flitbit

New Centos 7 instance in EC2 this morning, based on official ami-d2c924b2 -- encountered same error after building Redis 3.2.5. I increased the delay [ref.@mattsta on Sept 22, 2014 above] from 1 second to 5 seconds, all tests pass.

Comment From: steowens

I am seeing the same thing just now

uname -a
Linux ip-10-177-202-131.us-east-1.semfs.pvt.engsvc.go.com 3.10.0-327.36.2.el7.x86_64 #1 SMP Tue Sep 27 16:01:21 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
/etc/os-release 
NAME="Red Hat Enterprise Linux Server"
VERSION="7.3 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="7.3"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.3 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.3:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.3
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.3"

ok]: Connect multiple slaves at the same time (issue #141), diskless=yes

Logged warnings (pid 4218):
(none)

[exception]: Executing test client: LOADING Redis is loading the dataset in memory.
LOADING Redis is loading the dataset in memory
    while executing
"$slave debug digest"
    ("uplevel" body line 27)
    invoked from within
"uplevel 1 $code"
    (procedure "test" line 29)
    invoked from within
"test "Test replication partial resync: $descr (diskless: $diskless, reconnect: $reconnect)" {
                # Now while the clients are writing data..."
    ("uplevel" body line 36)
    invoked from within
"uplevel 1 $code "
    (procedure "start_server" line 3)
    invoked from within
"start_server {} {

            set master [srv -1 client]
            set master_host [srv -1 host]
            set master_port [srv -1 port]
        ..."
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $code "
    (procedure "start_server" line 3)
    invoked from within
"start_server {tags {"repl"}} {
        start_server {} {

            set master [srv -1 client]
            set master_host [srv -1 host]
           ..."
    (procedure "test_psync" line 2)
    invoked from within
"test_psync {backlog expired} 3 100000000 1 3 {
        assert {[s -1 sync_partial_err] > 0}
    } $diskless 1"
    ("foreach" body line 17)
    invoked from within
"foreach diskless {no yes} {
    test_psync {no reconnection, just sync} 6 1000000 3600 0 {
    } $diskless 0

    test_psync {ok psync} 6 1000000 3600..."
    (file "tests/integration/replication-psync.tcl" line 109)
    invoked from within
"source $path"
    (procedure "execute_tests" line 4)
    invoked from within
"execute_tests $data"
    (procedure "test_client_main" line 10)
    invoked from within
"test_client_main $::test_server_port "
Killing still running Redis server 31311
Killing still running Redis server 31386
Killing still running Redis server 31521
Killing still running Redis server 31552
Killing still running Redis server 2281
Killing still running Redis server 2310
Killing still running Redis server 2324
Killing still running Redis server 2338
make[1]: *** [test] Error 1
make[1]: Leaving directory `/root/redis-3.2.6/src'
make: *** [test] Error 2
[root@ip-10-177-202-131 redis-3.2.6]# ps -efwww | grep redis
root      4557 17065  0 20:11 pts/0    00:00:00 grep --color=auto redis
[root@ip-10-177-202-131 redis-3.2.6]# 

Comment From: jerzygangi

Same problem here with brand new CentOS 7 running on EC2. Changed 1000 to 5000 in replication-2.tcl, as per https://github.com/antirez/redis/issues/2023#issuecomment-56451410, and the problem went away.

Comment From: jerzygangi

@mattsta This issue should not be closed. ^^^ Lots of people still having issue after November commits.

Comment From: Pluto1010

@jerzygangi @mattsta +1

I have the same problem and did what you've said. It works for now.

But a long time ago I've learned using "sleep" in tests is not optimal. Maybe that should be changed. Testing in a loop if its ready yet and if not wait another second. With an much longer overall timeout.

I have no experience with TCL but I think its starting a redis slave and waits a second before starting sentinel. Is that correct?

Comment From: ax-jason

I met the same problem with CentOS 6.8 on Virtual Box. I moved the source code directory from a shared folder (shared from windows host to a vhost centos 6.8) to the local virtual disk and the test passed. Hope that helps.

Comment From: lipsumar

Same issue on a Rasperry pi running Raspbian 8.0.
Good old reboot was enough to get it to pass.

Comment From: fanruinet

I'm experiencing this issue on CentOS with redis 4.0 rc3: [exception]: Executing test client: NOREPLICAS Not enough good slaves to write.. NOREPLICAS Not enough good slaves to write. while executing "[srv $level "client"] {*}$args" (procedure "r" line 7) invoked from within "r set foo 12345" ("uplevel" body line 4) invoked from within "uplevel 1 $code" (procedure "test" line 29) invoked from within "test {If min-slaves-to-write is honored, write is accepted} { r config set min-slaves-to-write 1 r config set min-slaves-max-l..." ("uplevel" body line 8) invoked from within "uplevel 1 $code " (procedure "start_server" line 3) invoked from within "start_server {} { test {First server should have role slave after SLAVEOF} { r -1 slaveof [srv 0 host] [srv 0 port] af..." ("uplevel" body line 2) invoked from within "uplevel 1 $code " (procedure "start_server" line 3) invoked from within "start_server {tags {"repl"}} { start_server {} { test {First server should have role slave after SLAVEOF} { r -1 slaveof [srv ..." (file "tests/integration/replication-2.tcl" line 1) invoked from within "source $path" (procedure "execute_tests" line 4) invoked from within "execute_tests $data" (procedure "test_client_main" line 10) invoked from within "test_client_main $::test_server_port " Killing still running Redis server 324 Killing still running Redis server 342 Killing still running Redis server 340 Killing still running Redis server 341 Killing still running Redis server 338 Killing still running Redis server 337 Killing still running Redis server 335 Killing still running Redis server 333 Killing still running Redis server 332 Killing still running Redis server 613 Killing still running Redis server 710 Killing still running Redis server 793 Killing still running Redis server 833 Killing still running Redis server 860 Killing still running Redis server 893 Killing still running Redis server 930 Killing still running Redis server 951 make[1]: *** [test] Error 1 make[1]: Leaving directory `/home/fanrui/redis-4.0-rc3/src' make: *** [test] Error 2

Comment From: bruno-garcia

Same for me with: CentOS 7.4 Redis 4.0.2

Comment From: jpantsjoha

same here. testing this whole vanilla run on CentOS Linux release 7.4.1708 (Core) 1GB downloaded http://download.redis.io/releases/redis-4.0.2.tar.gz

==== UPDATE ==== Increased memory on my VM to 4GB

no difference. failing.

...
Logged warnings (pid 11924):
[ok]: LINDEX random access - quicklist
[ok]: SET - use EX/PX option, TTL should not be reseted after loadaof
(none)

[exception]: Executing test client: NOREPLICAS Not enough good slaves to write..
NOREPLICAS Not enough good slaves to write.
    while executing
"[srv $level "client"] {*}$args"
    (procedure "r" line 7)
    invoked from within
"r set foo 12345"
    ("uplevel" body line 4)
    invoked from within
"uplevel 1 $code"
    (procedure "test" line 29)
    invoked from within
"test {If min-slaves-to-write is honored, write is accepted} {
            r config set min-slaves-to-write 1
            r config set min-slaves-max-l..."
    ("uplevel" body line 8)
    invoked from within
"uplevel 1 $code "
    (procedure "start_server" line 3)
    invoked from within
"start_server {} {
        test {First server should have role slave after SLAVEOF} {
            r -1 slaveof [srv 0 host] [srv 0 port]
            af..."
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $code "
    (procedure "start_server" line 3)
    invoked from within
"start_server {tags {"repl"}} {
    start_server {} {
        test {First server should have role slave after SLAVEOF} {
            r -1 slaveof [srv ..."
    (file "tests/integration/replication-2.tcl" line 1)
    invoked from within
"source $path"
    (procedure "execute_tests" line 4)
    invoked from within
"execute_tests $data"
    (procedure "test_client_main" line 10)
    invoked from within
"test_client_main $::test_server_port "
Killing still running Redis server 11505
...

Comment From: erick2red

This issue shouldn't be closed. It is still happening and can be fixed by extending the wait from 1s to 5s.

Comment From: quinefang

Hello everyone, I made a small path for this, just run the below command and run make test again and it will work: $ cd redis-4.0.2 && patch tests/integration/replication-2.tcl issue-2023.patch

Attachment: issue-2023.patch.txt

Comment From: fabiopaiva

On my case it was not enough memory. After creating a swapfile it's work

Comment From: zhou-zheng

same problem popped up, have tried applying patch and increasing memory, useless. And for god knows reason, it passes all tests after I make clean and make/make test again.

Comment From: m3hdiii

had the same problem on ubuntu (16.04 64-Bit) installed on VirtualBox and the solution of @rwarren helped out : pgrep redis | xargs kill -9

Comment From: djrobby

It is also worth noting that I'm left with 79 separate redis-server process at the end of this that I need to kill with pgrep redis | xargs kill -9. There were also several servers left when the tests were aborted due to exception.

God send bud! Thank you!