Re: [update] redis 5.0.8

2020-03-16 Thread Uwe Werler
On 16 Mar 08:20, Stuart Henderson wrote:
> Yes, please try to get a backtrace.
> 
> --
> Sent from a phone, apologies for poor formatting.
> 
> On 16 March 2020 07:00:06 Uwe Werler  wrote:
> 
> > Hi Stuart,
> > 
> > thanks for the advice!
> > 
> > The output is as follows:
> > 
> > ##
> > 
> > egdb /usr/local/sbin/redis-sentinel /tmp/redis-server.core
> > GNU gdb (GDB) 7.12.1
> > Copyright (C) 2017 Free Software Foundation, Inc.
> > License GPLv3+: GNU GPL version 3 or later 
> > 
> > This is free software: you are free to change and redistribute it.
> > There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> > and "show warranty" for details.
> > This GDB was configured as "x86_64-unknown-openbsd6.6".
> > Type "show configuration" for configuration details.
> > For bug reporting instructions, please see:
> > .
> > Find the GDB manual and other documentation resources online at:
> > .
> > For help, type "help".
> > Type "apropos word" to search for commands related to "word"...
> > Reading symbols from /usr/local/sbin/redis-sentinel...done.
> > [New process 170084]
> > [New process 585452]
> > [New process 382927]
> > [New process 407733]
> > Core was generated by `redis-server'.
> > Program terminated with signal SIGSEGV, Segmentation fault.
> > #0  0x08a5b359cfe8 in sentinelRefreshInstanceInfo (ri=0x8a89bf44608,
> > info=) at sentinel.c:2161
> > 2161sentinel.c: No such file or directory.
> > [Current thread is 1 (process 170084)]
> > (gdb)
> > 
> > ##
> > 
> > Something else what I can do?
> > 
> > With kind regards
> > 
> > Uwe

egdb /usr/local/sbin/redis-sentinel /tmp/redis-server.core
GNU gdb (GDB) 7.12.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-openbsd6.6".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/local/sbin/redis-sentinel...done.
[New process 170084]
[New process 585452]
[New process 382927]
[New process 407733]
Core was generated by `redis-server'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x08a5b359cfe8 in sentinelRefreshInstanceInfo (ri=0x8a89bf44608, 
info=) at sentinel.c:2161
2161sentinel.c: No such file or directory.
[Current thread is 1 (process 170084)]
(gdb) backtrace full
#0  0x08a5b359cfe8 in sentinelRefreshInstanceInfo (ri=0x8a89bf44608, 
info=) at sentinel.c:2161
l = 
slave = 
role = 2
numlines = 149
j = 148
lines = 0x8a81a6c2008
#1  0x08a5b35ce843 in __redisRunCallback (ac=, cb=, reply=) at async.c:269
c = 
#2  redisProcessCallbacks (ac=0x8a87407fc00) at async.c:469
c = 0x8a87407fc00
reply = 0x8a7bb7cba00
status = 
#3  0x08a5b351b6c7 in aeProcessEvents (eventLoop=, flags=11) 
at ae.c:443
mask = 
fired = 
shortest = 
j = 0
processed = 
numevents = 1
#4  0x08a5b351ba3e in aeMain (eventLoop=0x8a7e628ee08) at ae.c:501
No locals.
#5  0x08a5b3528497 in main (argc=, argv=0x7f7de5b8) at 
server.c:4234
hashseed = "05b63ac8a3bb4659"
tv = {tv_sec = 1584341494, tv_usec = 882702}
j = 
(gdb) 


-- 



Re: [update] redis 5.0.8

2020-03-16 Thread Stuart Henderson

Yes, please try to get a backtrace.

--
Sent from a phone, apologies for poor formatting.

On 16 March 2020 07:00:06 Uwe Werler  wrote:


On 15 Mar 17:34, Stuart Henderson wrote:

On 2020/03/15 17:27, Uwe Werler wrote:
>
> ###
>
>
> gdb /usr/local/sbin/redis-server /tmp/redis-server.core
> GNU gdb 6.3
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "amd64-unknown-openbsd6.6"...(no debugging 
symbols found)

>
> Core was generated by `redis-server'.
> Program terminated with signal 11, Segmentation fault.
> Reading symbols from /usr/lib/libpthread.so.26.1...done.
> Loaded symbols for /usr/lib/libpthread.so.26.1
> Loaded symbols for /usr/local/sbin/redis-server
> Reading symbols from /usr/lib/libm.so.10.1...done.
> Loaded symbols for /usr/lib/libm.so.10.1
> Symbols already loaded for /usr/lib/libpthread.so.26.1
> Reading symbols from /usr/local/lib/liblua5.1.so.5.1...done.
> Loaded symbols for /usr/local/lib/liblua5.1.so.5.1
> Reading symbols from /usr/lib/libc.so.95.1...done.
> Loaded symbols for /usr/lib/libc.so.95.1
> Reading symbols from /usr/libexec/ld.so...Error while reading shared 
library symbols:
> Dwarf Error: wrong version in compilation unit header (is 4, should be 2) 
[in module /usr/libexec/ld.so]

> #0  0x127e6e9c4ff8 in SHA1Final () from /usr/local/sbin/redis-server

gdb in base is useless for many things on clang arches - pkg_add gdb and
use "egdb" not "gdb". also pkg_add debug-redis for debug symbols, then try
again and see if you can get a backtrace.



Hi Stuart,

thanks for the advice!

The output is as follows:

##

egdb /usr/local/sbin/redis-sentinel /tmp/redis-server.core
GNU gdb (GDB) 7.12.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-openbsd6.6".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/local/sbin/redis-sentinel...done.
[New process 170084]
[New process 585452]
[New process 382927]
[New process 407733]
Core was generated by `redis-server'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x08a5b359cfe8 in sentinelRefreshInstanceInfo (ri=0x8a89bf44608, 
info=) at sentinel.c:2161

2161sentinel.c: No such file or directory.
[Current thread is 1 (process 170084)]
(gdb)

##

Something else what I can do?

With kind regards

Uwe

--






Re: [update] redis 5.0.8

2020-03-16 Thread Uwe Werler
On 15 Mar 17:34, Stuart Henderson wrote:
> On 2020/03/15 17:27, Uwe Werler wrote:
> > 
> > ###
> > 
> > 
> > gdb /usr/local/sbin/redis-server /tmp/redis-server.core
> > GNU gdb 6.3
> > Copyright 2004 Free Software Foundation, Inc.
> > GDB is free software, covered by the GNU General Public License, and you are
> > welcome to change it and/or distribute copies of it under certain 
> > conditions.
> > Type "show copying" to see the conditions.
> > There is absolutely no warranty for GDB.  Type "show warranty" for details.
> > This GDB was configured as "amd64-unknown-openbsd6.6"...(no debugging 
> > symbols found)
> > 
> > Core was generated by `redis-server'.
> > Program terminated with signal 11, Segmentation fault.
> > Reading symbols from /usr/lib/libpthread.so.26.1...done.
> > Loaded symbols for /usr/lib/libpthread.so.26.1
> > Loaded symbols for /usr/local/sbin/redis-server
> > Reading symbols from /usr/lib/libm.so.10.1...done.
> > Loaded symbols for /usr/lib/libm.so.10.1
> > Symbols already loaded for /usr/lib/libpthread.so.26.1
> > Reading symbols from /usr/local/lib/liblua5.1.so.5.1...done.
> > Loaded symbols for /usr/local/lib/liblua5.1.so.5.1
> > Reading symbols from /usr/lib/libc.so.95.1...done.
> > Loaded symbols for /usr/lib/libc.so.95.1
> > Reading symbols from /usr/libexec/ld.so...Error while reading shared 
> > library symbols:
> > Dwarf Error: wrong version in compilation unit header (is 4, should be 2) 
> > [in module /usr/libexec/ld.so]
> > #0  0x127e6e9c4ff8 in SHA1Final () from /usr/local/sbin/redis-server
> 
> gdb in base is useless for many things on clang arches - pkg_add gdb and
> use "egdb" not "gdb". also pkg_add debug-redis for debug symbols, then try
> again and see if you can get a backtrace.
> 

Hi Stuart,

thanks for the advice!

The output is as follows:

##

egdb /usr/local/sbin/redis-sentinel /tmp/redis-server.core
GNU gdb (GDB) 7.12.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-openbsd6.6".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/local/sbin/redis-sentinel...done.
[New process 170084]
[New process 585452]
[New process 382927]
[New process 407733]
Core was generated by `redis-server'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x08a5b359cfe8 in sentinelRefreshInstanceInfo (ri=0x8a89bf44608, 
info=) at sentinel.c:2161
2161sentinel.c: No such file or directory.
[Current thread is 1 (process 170084)]
(gdb) 

##

Something else what I can do?

With kind regards

Uwe

-- 



Re: [update] redis 5.0.8

2020-03-15 Thread Stuart Henderson
On 2020/03/15 17:27, Uwe Werler wrote:
> 
> ###
> 
> 
> gdb /usr/local/sbin/redis-server /tmp/redis-server.core
> GNU gdb 6.3
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "amd64-unknown-openbsd6.6"...(no debugging symbols 
> found)
> 
> Core was generated by `redis-server'.
> Program terminated with signal 11, Segmentation fault.
> Reading symbols from /usr/lib/libpthread.so.26.1...done.
> Loaded symbols for /usr/lib/libpthread.so.26.1
> Loaded symbols for /usr/local/sbin/redis-server
> Reading symbols from /usr/lib/libm.so.10.1...done.
> Loaded symbols for /usr/lib/libm.so.10.1
> Symbols already loaded for /usr/lib/libpthread.so.26.1
> Reading symbols from /usr/local/lib/liblua5.1.so.5.1...done.
> Loaded symbols for /usr/local/lib/liblua5.1.so.5.1
> Reading symbols from /usr/lib/libc.so.95.1...done.
> Loaded symbols for /usr/lib/libc.so.95.1
> Reading symbols from /usr/libexec/ld.so...Error while reading shared library 
> symbols:
> Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in 
> module /usr/libexec/ld.so]
> #0  0x127e6e9c4ff8 in SHA1Final () from /usr/local/sbin/redis-server

gdb in base is useless for many things on clang arches - pkg_add gdb and
use "egdb" not "gdb". also pkg_add debug-redis for debug symbols, then try
again and see if you can get a backtrace.



Re: [update] redis 5.0.8

2020-03-15 Thread Uwe Werler
On 15 Mar 06:40, Theo Buehler wrote:
> > Hi Theo,
> > 
> > just "back ported" redis to 6.6 and it works like a charm on amd64 (except 
> > sentinel which segfaults - but it did also on 4.0.14).
> > 
> 
> Thanks. Yes, there should be no major problems backporting this.
> 
> Could you share a reproducer for this sentinel segfault so I can look
> into it?
> 

Hi Theo,


I tried the following setup:

1 master + 3 slaves. On all machines running sentinel with the following 
(default) config:

 /etc/redis/sentinel.conf

protected-mode no
port 26379
sentinel deny-scripts-reconfig yes
sentinel monitor mymaster A.B.C.23 6379 2
dir "/tmp"
sentinel down-after-milliseconds mymaster 5000
sentinel failover-timeout mymaster 1

###

I run sentinel as user _redis so the owner of the config is _redis.

Start sentinel on all nodes:

doas -u _redis /usr/local/sbin/redis-sentinel /etc/redis/sentinel.conf 
--sentinel

21836:X 15 Mar 2020 17:09:59.806 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
21836:X 15 Mar 2020 17:09:59.807 # Redis version=5.0.8, bits=64, 
commit=, modified=0, pid=21836, just started
21836:X 15 Mar 2020 17:09:59.807 # Configuration loaded
_._  
   _.-``__ ''-._ 
  _.-```.  `_.  ''-._   Redis 5.0.8 (/0) 64 bit
  .-`` .-```.  ```\/_.,_ ''-._   
 ('  ,   .-`  | `,) Running in sentinel mode
 |`-._`-...-` __...-.``-._|'` _.-'| Port: 26379
 |`-._   `._/ _.-'| PID: 21836
  `-._`-._  `-./  _.-'_.-'   
 |`-._`-._`-.__.-'_.-'_.-'|  
 |`-._`-.__.-'_.-'|   http://redis.io
  `-._`-._`-.__.-'_.-'_.-'   
 |`-._`-._`-.__.-'_.-'_.-'|  
 |`-._`-.__.-'_.-'|  
  `-._`-._`-.__.-'_.-'_.-'   
  `-._`-.__.-'_.-'   
  `-.__.-'   
  `-.__.-'   

21836:X 15 Mar 2020 17:09:59.811 # Sentinel ID is 
7c56c258f3b6d91a276d66d37edb4a7d34fd46db
21836:X 15 Mar 2020 17:09:59.811 # +monitor master mymaster A.B.C.23 6379 
quorum 2
21836:X 15 Mar 2020 17:10:04.874 # +sdown slave A.B.C.52:6379 A.B.C.52 6379 @ 
mymaster A.B.C.D 6379
21836:X 15 Mar 2020 17:10:04.874 # +sdown slave A.B.C.51:6379 A.B.C.51 6379 @ 
mymaster A.B.C.D 6379
21836:X 15 Mar 2020 17:10:55.617 # +sdown sentinel 
fcb4b40293a180b56f4e00c9c0ac6c719f8b3251 A.B.C.51 26379 @ mymaster A.B.C.23 6379
21836:X 15 Mar 2020 17:11:58.393 # +sdown sentinel 
1891b2bf811eae3ccf2e9dee9ad71f234148f6d7 A.B.C.24 26379 @ mymaster A.B.C.23 6379
21836:X 15 Mar 2020 17:12:02.303 # -sdown sentinel 
fcb4b40293a180b56f4e00c9c0ac6c719f8b3251 A.B.C.51 26379 @ mymaster A.B.C.23 6379
21836:X 15 Mar 2020 17:12:22.703 # -sdown sentinel 
1891b2bf811eae3ccf2e9dee9ad71f234148f6d7 A.B.C.24 26379 @ mymaster A.B.C.23 6379
21836:X 15 Mar 2020 17:12:26.459 # +sdown sentinel 
fcb4b40293a180b56f4e00c9c0ac6c719f8b3251 A.B.C.51 26379 @ mymaster A.B.C.23 6379
21836:X 15 Mar 2020 17:12:35.003 # -sdown sentinel 
fcb4b40293a180b56f4e00c9c0ac6c719f8b3251 A.B.C.51 26379 @ mymaster A.B.C.23 6379
Segmentation fault 

This happens after some time on all 4 nodes.

Kdump shows this:

 94624 redis-server RET   write 14/0xe
 94624 redis-server CALL  kevent(5,0x7f7bddb0,1,0,0,0)
 94624 redis-server STRU  struct kevent { ident=12, filter=EVFILT_WRITE, 
flags=0x2, fflags=0<>, data=0, udata=0x0 }
 94624 redis-server RET   kevent 0
 94624 redis-server CALL  gettimeofday(0x7f7bde10,0)
 94624 redis-server STRU  struct timeval { 1584292747<"Mar 15 17:19:07 
2020">.390804 }
 94624 redis-server RET   gettimeofday 0
 94624 redis-server CALL  gettimeofday(0x7f7bde60,0)
 94624 redis-server STRU  struct timeval { 1584292747<"Mar 15 17:19:07 
2020">.390820 }
 94624 redis-server RET   gettimeofday 0
 94624 redis-server CALL  gettimeofday(0x7f7bddd8,0)
 94624 redis-server STRU  struct timeval { 1584292747<"Mar 15 17:19:07 
2020">.390837 }
 94624 redis-server RET   gettimeofday 0
 94624 redis-server CALL  read(3,0x7f7bde4f,0x1)
 94624 redis-server RET   read -1 errno 35 Resource temporarily unavailable
 94624 redis-server CALL  gettimeofday(0x7f7bde60,0)
 94624 redis-server STRU  struct timeval { 1584292747<"Mar 15 17:19:07 
2020">.390868 }
 94624 redis-server RET   gettimeofday 0
 94624 redis-server CALL  kevent(5,0,0,0x1b3c3e9e0008,224,0x7f7bde60)
 94624 redis-server STRU  struct timespec { 0.05800 }
 94624 redis-server STRU  struct kevent { ident=8, filter=EVFILT_READ, 
flags=0x1, fflags=0<>, data=2896, udata=0x0 }
 94624 redis-server RET   keven

Re: [update] redis 5.0.8

2020-03-14 Thread Theo Buehler
> Hi Theo,
> 
> just "back ported" redis to 6.6 and it works like a charm on amd64 (except 
> sentinel which segfaults - but it did also on 4.0.14).
> 

Thanks. Yes, there should be no major problems backporting this.

Could you share a reproducer for this sentinel segfault so I can look
into it?



Re: [update] redis 5.0.8

2020-03-14 Thread Uwe Werler
On 12 Mar 22:19, Theo Buehler wrote:
> Released earlier today. According to the changelog [1]:
> 
> Upgrade urgency HIGH: This release fixes security issues.
> 
> HIGH means that there is a critical bug that affects a subset of users.
> I'm unsure which one of the listed bugs that is, though.
> 
> The source diff to 5.0.7 is relatively small and there should not be any
> fallout from backwards-incompatible changes.
> 
> The new hunk in src/Makefile fixes the build on armv7 (the resulting
> redis-server binary is still completely broken).  I added a fix for a
> small 32-bit time_t truncation issue in src/networking.c.
> 
> Built and regress tests run successfully on amd64, macppc and sparc64.
> Some further light testing on amd64 with some toy databases.
> 
> [1]: https://raw.githubusercontent.com/antirez/redis/5.0/00-RELEASENOTES
> 
> Index: Makefile
> ===
> RCS file: /var/cvs/ports/databases/redis/Makefile,v
> retrieving revision 1.109
> diff -u -p -r1.109 Makefile
> --- Makefile  11 Feb 2020 08:11:13 -  1.109
> +++ Makefile  12 Mar 2020 19:15:42 -
> @@ -1,7 +1,7 @@
>  # $OpenBSD: Makefile,v 1.109 2020/02/11 08:11:13 tb Exp $
>  
>  COMMENT =persistent key-value database
> -DISTNAME =   redis-5.0.7
> +DISTNAME =   redis-5.0.8
>  CATEGORIES = databases
>  HOMEPAGE =   https://redis.io/
>  
> Index: distinfo
> ===
> RCS file: /var/cvs/ports/databases/redis/distinfo,v
> retrieving revision 1.84
> diff -u -p -r1.84 distinfo
> --- distinfo  11 Feb 2020 08:11:13 -  1.84
> +++ distinfo  12 Mar 2020 19:17:51 -
> @@ -1,2 +1,2 @@
> -SHA256 (redis-5.0.7.tar.gz) = Ydt06r9oAfBX/SS1kCMvLzN9QiKA/RlIbsoDvofTqCs=
> -SIZE (redis-5.0.7.tar.gz) = 1984203
> +SHA256 (redis-5.0.8.tar.gz) = 88fqxC9DMyao2YG1DboBaf369Gq7I/zaL5M6dVLuTtc=
> +SIZE (redis-5.0.8.tar.gz) = 1985757
> Index: patches/patch-src_Makefile
> ===
> RCS file: /var/cvs/ports/databases/redis/patches/patch-src_Makefile,v
> retrieving revision 1.30
> diff -u -p -r1.30 patch-src_Makefile
> --- patches/patch-src_Makefile11 Feb 2020 08:11:13 -  1.30
> +++ patches/patch-src_Makefile12 Mar 2020 19:57:00 -
> @@ -28,7 +28,16 @@ Index: src/Makefile
>   endif
>   endif
>   
> -@@ -127,7 +128,7 @@ endif
> +@@ -82,7 +83,7 @@ ifneq (,$(filter aarch64 armv,$(uname_M)))
> + FINAL_LIBS+=-latomic
> + else
> + ifneq (,$(findstring armv,$(uname_M)))
> +-FINAL_LIBS+=-latomic
> ++#FINAL_LIBS+=-latomic
> + endif
> + endif
> + 
> +@@ -136,7 +137,7 @@ endif
>   endif
>   endif
>   # Include paths to dependencies
> @@ -37,7 +46,7 @@ Index: src/Makefile
>   
>   ifeq ($(MALLOC),tcmalloc)
>   FINAL_CFLAGS+= -DUSE_TCMALLOC
> -@@ -165,6 +166,7 @@ endif
> +@@ -174,6 +175,7 @@ endif
>   REDIS_SERVER_NAME=redis-server
>   REDIS_SENTINEL_NAME=redis-sentinel
>   REDIS_SERVER_OBJ=adlist.o quicklist.o ae.o anet.o dict.o server.o sds.o 
> zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o 
> networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o 
> t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o 
> intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o scripting.o bio.o 
> rio.o rand.o memtest.o crc64.o bitops.o sentinel.o notify.o setproctitle.o 
> blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o 
> redis-check-aof.o geo.o lazyfree.o module.o evict.o expire.o geohash.o 
> geohash_helper.o childinfo.o defrag.o siphash.o rax.o t_stream.o listpack.o 
> localtime.o lolwut.o lolwut5.o
> @@ -45,7 +54,7 @@ Index: src/Makefile
>   REDIS_CLI_NAME=redis-cli
>   REDIS_CLI_OBJ=anet.o adlist.o dict.o redis-cli.o zmalloc.o release.o anet.o 
> ae.o crc64.o siphash.o crc16.o
>   REDIS_BENCHMARK_NAME=redis-benchmark
> -@@ -216,7 +218,7 @@ endif
> +@@ -225,7 +227,7 @@ endif
>   
>   # redis-server
>   $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)
> @@ -54,7 +63,7 @@ Index: src/Makefile
>   
>   # redis-sentinel
>   $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME)
> -@@ -259,7 +261,7 @@ distclean: clean
> +@@ -268,7 +270,7 @@ distclean: clean
>   .PHONY: distclean
>   
>   test: $(REDIS_SERVER_NAME) $(REDIS_CHECK_AOF_NAME)
> @@ -63,7 +72,7 @@ Index: src/Makefile
>   
>   test-sentinel: $(REDIS_SENTINEL_NAME)
>   @(cd ..; ./runtest-sentinel)
> -@@ -303,13 +305,14 @@ src/help.h:
> +@@ -312,13 +314,14 @@ src/help.h:
>   @../utils/generate-command-help.rb > help.h
>   
>   install: all
> Index: patches/patch-src_networking_c
> ===
> RCS file: patches/patch-src_networking_c
> diff -N patches/patch-src_networking_c
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ patches/patch-src_networking_c12 Mar 2020 19:59:42 -
> @@ -0,0 +1,14 @@
> +$OpenBSD$
> +
> +Index: src

Re: [update] redis 5.0.8

2020-03-13 Thread Daniel Jakots
On Fri, 13 Mar 2020 17:53:12 +0100, Theo Buehler 
wrote:

> Opinions?

I vote for "move forward" :)

Cheers,
Daniel



Re: [update] redis 5.0.8

2020-03-13 Thread Theo Buehler
> Built and regress tests run successfully on amd64, macppc and sparc64.
> Some further light testing on amd64 with some toy databases.

I have run the regression tests a few more times and it looks like I got
lucky when running the tests on sparc64 the first two times. Running
them results in one test failure seemingly a bit more often than not:

*** [err]: pending querybuf: check size of pending_querybuf after set a big 
value in tests/unit/pendingquerybuf.tcl
the used_memory of replica is much larger than master. Master:35666976 
Replica:69051032

The numbers aren't exactly the same each time, but they're in the same
ballpark.

I've seen this test fail on sparc64 before (not sure if elsewhere). 
The update seems to trigger it far more often.

I don't think we need to rush this update in, but I'm also not sure if
reason enough to hold it back.

Opinions?



Re: [update] redis 5.0.8

2020-03-12 Thread Klemens Nanni
OK kn



[update] redis 5.0.8

2020-03-12 Thread Theo Buehler
Released earlier today. According to the changelog [1]:

Upgrade urgency HIGH: This release fixes security issues.

HIGH means that there is a critical bug that affects a subset of users.
I'm unsure which one of the listed bugs that is, though.

The source diff to 5.0.7 is relatively small and there should not be any
fallout from backwards-incompatible changes.

The new hunk in src/Makefile fixes the build on armv7 (the resulting
redis-server binary is still completely broken).  I added a fix for a
small 32-bit time_t truncation issue in src/networking.c.

Built and regress tests run successfully on amd64, macppc and sparc64.
Some further light testing on amd64 with some toy databases.

[1]: https://raw.githubusercontent.com/antirez/redis/5.0/00-RELEASENOTES

Index: Makefile
===
RCS file: /var/cvs/ports/databases/redis/Makefile,v
retrieving revision 1.109
diff -u -p -r1.109 Makefile
--- Makefile11 Feb 2020 08:11:13 -  1.109
+++ Makefile12 Mar 2020 19:15:42 -
@@ -1,7 +1,7 @@
 # $OpenBSD: Makefile,v 1.109 2020/02/11 08:11:13 tb Exp $
 
 COMMENT =  persistent key-value database
-DISTNAME = redis-5.0.7
+DISTNAME = redis-5.0.8
 CATEGORIES =   databases
 HOMEPAGE = https://redis.io/
 
Index: distinfo
===
RCS file: /var/cvs/ports/databases/redis/distinfo,v
retrieving revision 1.84
diff -u -p -r1.84 distinfo
--- distinfo11 Feb 2020 08:11:13 -  1.84
+++ distinfo12 Mar 2020 19:17:51 -
@@ -1,2 +1,2 @@
-SHA256 (redis-5.0.7.tar.gz) = Ydt06r9oAfBX/SS1kCMvLzN9QiKA/RlIbsoDvofTqCs=
-SIZE (redis-5.0.7.tar.gz) = 1984203
+SHA256 (redis-5.0.8.tar.gz) = 88fqxC9DMyao2YG1DboBaf369Gq7I/zaL5M6dVLuTtc=
+SIZE (redis-5.0.8.tar.gz) = 1985757
Index: patches/patch-src_Makefile
===
RCS file: /var/cvs/ports/databases/redis/patches/patch-src_Makefile,v
retrieving revision 1.30
diff -u -p -r1.30 patch-src_Makefile
--- patches/patch-src_Makefile  11 Feb 2020 08:11:13 -  1.30
+++ patches/patch-src_Makefile  12 Mar 2020 19:57:00 -
@@ -28,7 +28,16 @@ Index: src/Makefile
  endif
  endif
  
-@@ -127,7 +128,7 @@ endif
+@@ -82,7 +83,7 @@ ifneq (,$(filter aarch64 armv,$(uname_M)))
+ FINAL_LIBS+=-latomic
+ else
+ ifneq (,$(findstring armv,$(uname_M)))
+-FINAL_LIBS+=-latomic
++#FINAL_LIBS+=-latomic
+ endif
+ endif
+ 
+@@ -136,7 +137,7 @@ endif
  endif
  endif
  # Include paths to dependencies
@@ -37,7 +46,7 @@ Index: src/Makefile
  
  ifeq ($(MALLOC),tcmalloc)
FINAL_CFLAGS+= -DUSE_TCMALLOC
-@@ -165,6 +166,7 @@ endif
+@@ -174,6 +175,7 @@ endif
  REDIS_SERVER_NAME=redis-server
  REDIS_SENTINEL_NAME=redis-sentinel
  REDIS_SERVER_OBJ=adlist.o quicklist.o ae.o anet.o dict.o server.o sds.o 
zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o 
networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o 
t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o 
intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o scripting.o bio.o 
rio.o rand.o memtest.o crc64.o bitops.o sentinel.o notify.o setproctitle.o 
blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o 
redis-check-aof.o geo.o lazyfree.o module.o evict.o expire.o geohash.o 
geohash_helper.o childinfo.o defrag.o siphash.o rax.o t_stream.o listpack.o 
localtime.o lolwut.o lolwut5.o
@@ -45,7 +54,7 @@ Index: src/Makefile
  REDIS_CLI_NAME=redis-cli
  REDIS_CLI_OBJ=anet.o adlist.o dict.o redis-cli.o zmalloc.o release.o anet.o 
ae.o crc64.o siphash.o crc16.o
  REDIS_BENCHMARK_NAME=redis-benchmark
-@@ -216,7 +218,7 @@ endif
+@@ -225,7 +227,7 @@ endif
  
  # redis-server
  $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)
@@ -54,7 +63,7 @@ Index: src/Makefile
  
  # redis-sentinel
  $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME)
-@@ -259,7 +261,7 @@ distclean: clean
+@@ -268,7 +270,7 @@ distclean: clean
  .PHONY: distclean
  
  test: $(REDIS_SERVER_NAME) $(REDIS_CHECK_AOF_NAME)
@@ -63,7 +72,7 @@ Index: src/Makefile
  
  test-sentinel: $(REDIS_SENTINEL_NAME)
@(cd ..; ./runtest-sentinel)
-@@ -303,13 +305,14 @@ src/help.h:
+@@ -312,13 +314,14 @@ src/help.h:
@../utils/generate-command-help.rb > help.h
  
  install: all
Index: patches/patch-src_networking_c
===
RCS file: patches/patch-src_networking_c
diff -N patches/patch-src_networking_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-src_networking_c  12 Mar 2020 19:59:42 -
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: src/networking.c
+--- src/networking.c.orig
 src/networking.c
+@@ -1939,7 +1939,7 @@ void securityWarningCommand(client *c) {
+ static time_t logged_time;
+ time_t now = time(NULL);
+ 
+-if (labs(now-logged_time) > 60) {
++if (llabs(now-logged_time) > 60) {
+