antirez/redis — Issue #348: Crash in t_zset.c using 2.4.7
Author: rmcdonough
Created: 2012-02-21 21:01:16+00:00
State: open

We are testing an upgrade from Redis 1.2.2 to 2.4.7 and found that our server crashed almost immediately. This is from one of our QA servers, which only has a 30MB database. RHEL 5.6, x64, 4GB RAM.

If this is due to something in our build environment then recompiling will not be an issue, however the bigger concern is that there may trouble upgrading from 1.2.2.

Feb 21 15:40:29 app02q-cl-tor01 redis[15989]: WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: === REDIS BUG REPORT START: Cut & paste starting from here ===
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: === ASSERTION FAILED ===
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: ==> t_zset.c:507 'p != NULL' is not true
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: (forcing SIGSEGV to print the bug report.)
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: Redis 2.4.7 crashed by signal: 11
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: Failed assertion: p != NULL (t_zset.c:507)
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: --- STACK TRACE
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: /opt/redis-2.4/src/redis-server(_redisAssert+0x72) [0x42ef02]
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: /opt/redis-2.4/src/redis-server(_redisAssert+0x72) [0x42ef02]
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: /opt/redis-2.4/src/redis-server(zzlIsInRange+0xa5) [0x4248e5]
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: /opt/redis-2.4/src/redis-server(zzlFirstInRange+0x32) [0x424a32]
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: /opt/redis-2.4/src/redis-server(genericZrangebyscoreCommand+0x574) [0x425054]
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: /opt/redis-2.4/src/redis-server(call+0x34) [0x40f0c4]
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: /opt/redis-2.4/src/redis-server(processCommand+0x210) [0x40f3b0]
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: /opt/redis-2.4/src/redis-server(processInputBuffer+0x4d) [0x41795d]
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: /opt/redis-2.4/src/redis-server(readQueryFromClient+0x10f) [0x41838f]
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: /opt/redis-2.4/src/redis-server(aeProcessEvents+0x173) [0x40bed3]
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: /opt/redis-2.4/src/redis-server(aeMain+0x2e) [0x40c0ee]
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: /opt/redis-2.4/src/redis-server(main+0xed) [0x41105d]
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: /lib64/libc.so.6(__libc_start_main+0xf4) [0x3ed361d994]
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: /opt/redis-2.4/src/redis-server [0x40b4a9]
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: --- INFO OUTPUT
db0:keys=543713,expires=345046 redis[15989]: redis_version:2.4.7
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: --- CLIENT LIST OUTPUT
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: addr=127.0.0.1:37843 fd=6 idle=1 flags=N db=0 sub=0 psub=0 qbuf=0 obl=0 oll=0 events=r cmd=sismember addr=127.0.0.1:37845 fd=7 idle=2 flags=N db=0 sub=0 psub=0 qbuf=0 obl=0 oll=0 events=r cmd=lpop addr=127.0.0.1:37846 fd=8 idle=103 flags=N db=0 sub=0 psub=0 qbuf=0 obl=0 oll=0 events=r cmd=get addr=127.0.0.1:37847 fd=9 idle=2 flags=N db=0 sub=0 psub=0 qbuf=0 obl=0 oll=0 events=r cmd=lpop addr=127.0.0.1:37849 fd=10 idle=2 flags=N db=0 sub=0 psub=0 qbuf=0 obl=0 oll=0 events=r cmd=lpop addr=127.0.0.1:37850 fd=11 idle=2 flags=N db=0 sub=0 psub=0 qbuf=0 obl=0 oll=0 events=r cmd=lpop addr=127.0.0.1:37851 fd=12 idle=0 flags=N db=0 sub=0 psub=0 qbuf=2 obl=0 oll=0 events=r cmd=zrangebyscore
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: --- CURRENT CLIENT INFO
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: client: addr=127.0.0.1:37851 fd=12 idle=0 flags=N db=0 sub=0 psub=0 qbuf=2 obl=0 oll=0 events=r cmd=zrangebyscore
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: argv[0]: 'zrangebyscore'
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: argv[1]: 'resque:delayed_queue_schedule'
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: argv[2]: '-inf'
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: argv[3]: '1329857012'
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: argv[4]: 'LIMIT'
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: argv[5]: '0'
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: argv[6]: '1'
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: key 'resque:delayed_queue_schedule' found in DB containing the following object:
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: Object type: 3
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: Object encoding: 5
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: Object refcount: 1
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: Sorted set size: 0
Feb 21 15:43:32 app02q-cl-tor01 redis[15989]: === REDIS BUG REPORT END. Make sure to include from START to END. === Please report the crash opening an issue on github: http://github.com/antirez/redis/issues