Skip to content

Redis 2.8.2 crash #1624

Closed
Closed

Description

@mtarnovan

The server has 32GB RAM, of which only ~3GB are used, running baremetal Ubuntu, kernel is 3.8.0-31-generic #46~precise1-Ubuntu SMP Wed Sep 11 18:21:16 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

When trying to restart the server, it crashes and restarts again and again. Here's the dump for the crash.

After upgrading to 2.8.7, the error went away.

6886] 20 Mar 11:03:36.311 # Background saving terminated by signal 11
[6886] 20 Mar 11:03:42.018 * 1 changes in 900 seconds. Saving...
[6886] 20 Mar 11:03:42.018 * Background saving started by pid 13255
[13255] 20 Mar 11:03:42.019 # 

=== REDIS BUG REPORT START: Cut & paste starting from here ===
[13255] 20 Mar 11:03:42.019 #     Redis 2.8.2 crashed by signal: 11
[13255] 20 Mar 11:03:42.019 #     Failed assertion: <no assertion failed> (<no file>:0)
[13255] 20 Mar 11:03:42.019 # --- STACK TRACE
redis-rdb-bgsave 0.0.0.0:6379(logStackTrace+0x3e)[0x4431ae]
redis-rdb-bgsave 0.0.0.0:6379(dictNext+0x80)[0x415d90]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0)[0x7fd3501d1cb0]
redis-rdb-bgsave 0.0.0.0:6379(dictNext+0x80)[0x415d90]
redis-rdb-bgsave 0.0.0.0:6379(rdbSaveObject+0x306)[0x42bb66]
redis-rdb-bgsave 0.0.0.0:6379(rdbSaveKeyValuePair+0x94)[0x42bce4]
redis-rdb-bgsave 0.0.0.0:6379(rdbSave+0x2b6)[0x42bfb6]
redis-rdb-bgsave 0.0.0.0:6379(rdbSaveBackground+0x70)[0x42c180]
redis-rdb-bgsave 0.0.0.0:6379(serverCron+0x507)[0x418ee7]
redis-rdb-bgsave 0.0.0.0:6379(aeProcessEvents+0x20b)[0x413c1b]
redis-rdb-bgsave 0.0.0.0:6379(aeMain+0x2b)[0x413e2b]
redis-rdb-bgsave 0.0.0.0:6379(main+0x325)[0x412bf5]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7fd34fe2476d]
redis-rdb-bgsave 0.0.0.0:6379[0x412cfd]
[13255] 20 Mar 11:03:42.019 # --- INFO OUTPUT
[13255] 20 Mar 11:03:42.020 # # Server
redis_version:2.8.2
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:826b46788cdc4125
redis_mode:standalone
os:Linux 3.8.0-31-generic x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.6.3
process_id:13255
run_id:b8b162489e62d918e6da7af9e1dd8761c74c38a4
tcp_port:6379
uptime_in_seconds:9139236
uptime_in_days:105
hz:10
lru_clock:1118590
config_file:/etc/redis/redis.conf

# Clients
connected_clients:22
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0

# Memory
used_memory:5050808
used_memory_human:4.82M
used_memory_rss:2662400
used_memory_peak:7286096
used_memory_peak_human:6.95M
used_memory_lua:37888
mem_fragmentation_ratio:0.53
mem_allocator:jemalloc-3.4.1

# Persistence
loading:0
rdb_changes_since_last_save:36003
rdb_bgsave_in_progress:0
rdb_last_save_time:1395253643
rdb_last_bgsave_status:err
rdb_last_bgsave_time_sec:0
rdb_current_bgsave_time_sec:-1
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok

# Stats
total_connections_received:7076
total_commands_processed:140277451
instantaneous_ops_per_sec:430
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:251
evicted_keys:0
keyspace_hits:16605716
keyspace_misses:63183079
pubsub_channels:1
pubsub_patterns:0
latest_fork_usec:143

# Replication
role:master
connected_slaves:0
master_repl_offset:0
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

# CPU
used_cpu_sys:0.00
used_cpu_user:0.00
used_cpu_sys_children:0.00
used_cpu_user_children:0.00

# Commandstats
cmdstat_get:calls=63641219,usec=64727680,usec_per_call=1.02
cmdstat_set:calls=1173642,usec=6814962,usec_per_call=5.81
cmdstat_setex:calls=523598,usec=1302143,usec_per_call=2.49
cmdstat_psetex:calls=62724,usec=317304,usec_per_call=5.06
cmdstat_del:calls=586276,usec=799057,usec_per_call=1.36
cmdstat_exists:calls=62724,usec=210610,usec_per_call=3.36
cmdstat_rpush:calls=12239283,usec=42515569,usec_per_call=3.47
cmdstat_lpush:calls=325739,usec=1145248,usec_per_call=3.52
cmdstat_rpop:calls=76777,usec=557756,usec_per_call=7.26
cmdstat_brpop:calls=9254236,usec=67413567,usec_per_call=7.28
cmdstat_llen:calls=8615152,usec=6810794,usec_per_call=0.79
cmdstat_lrange:calls=2404140,usec=19500019,usec_per_call=8.11
cmdstat_ltrim:calls=61457,usec=300217,usec_per_call=4.88
cmdstat_lrem:calls=12239275,usec=65739098,usec_per_call=5.37
cmdstat_sadd:calls=1700198,usec=9612109,usec_per_call=5.65
cmdstat_srem:calls=262997,usec=929365,usec_per_call=3.53
cmdstat_sismember:calls=1020,usec=1624,usec_per_call=1.59
cmdstat_scard:calls=70085,usec=205373,usec_per_call=2.93
cmdstat_smembers:calls=1244298,usec=24167952,usec_per_call=19.42
cmdstat_zadd:calls=62180,usec=720253,usec_per_call=11.58
cmdstat_zrem:calls=62145,usec=609211,usec_per_call=9.80
cmdstat_zremrangebyscore:calls=1,usec=4,usec_per_call=4.00
cmdstat_zrange:calls=149,usec=6459,usec_per_call=43.35
cmdstat_zrangebyscore:calls=2498477,usec=30717528,usec_per_call=12.29
cmdstat_zcard:calls=140353,usec=488979,usec_per_call=3.48
cmdstat_hset:calls=262034,usec=1611191,usec_per_call=6.15
cmdstat_hdel:calls=517434,usec=2068618,usec_per_call=4.00
cmdstat_incrby:calls=524458,usec=1237772,usec_per_call=2.36
cmdstat_mset:calls=61365,usec=457741,usec_per_call=7.46
cmdstat_select:calls=3463,usec=6524,usec_per_call=1.88
cmdstat_expire:calls=1173677,usec=4277137,usec_per_call=3.64
cmdstat_keys:calls=5,usec=221,usec_per_call=44.20
cmdstat_type:calls=225,usec=1218,usec_per_call=5.41
cmdstat_multi:calls=913850,usec=1577283,usec_per_call=1.73
cmdstat_exec:calls=913847,usec=9828657,usec_per_call=10.76
cmdstat_info:calls=69751,usec=20462433,usec_per_call=293.36
cmdstat_subscribe:calls=680,usec=1319,usec_per_call=1.94
cmdstat_publish:calls=28755,usec=291523,usec_per_call=10.14
cmdstat_watch:calls=125448,usec=590316,usec_per_call=4.71
cmdstat_unwatch:calls=125448,usec=275646,usec_per_call=2.20
cmdstat_eval:calls=8887902,usec=861718954,usec_per_call=96.95
cmdstat_evalsha:calls=9360964,usec=694690426,usec_per_call=74.21

# Keyspace
db0:keys=2,expires=0,avg_ttl=0
db5:keys=155,expires=128,avg_ttl=10943409082
db6:keys=135,expires=114,avg_ttl=11311543842
hash_init_value: 1386058584

[13255] 20 Mar 11:03:42.020 # --- CLIENT LIST OUTPUT
[13255] 20 Mar 11:03:42.020 # addr=127.0.0.1:42917 fd=5 name= age=41038 idle=1 flags=N db=6 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=evalsha
addr=127.0.0.1:42918 fd=6 name= age=41038 idle=23367 flags=N db=6 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=zrangebyscore
addr=127.0.0.1:42929 fd=7 name= age=41036 idle=206 flags=N db=6 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=exec
addr=127.0.0.1:42934 fd=8 name= age=41034 idle=41034 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=sismember
addr=127.0.0.1:42935 fd=9 name= age=41034 idle=41034 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=sismember
addr=127.0.0.1:42936 fd=17 name= age=41034 idle=10 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=hdel
addr=127.0.0.1:42937 fd=18 name= age=41034 idle=41034 flags=N db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=subscribe
addr=127.0.0.1:42938 fd=19 name= age=41034 idle=41034 flags=N db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=subscribe
addr=127.0.0.1:42973 fd=20 name= age=40997 idle=237 flags=N db=6 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=exec
addr=127.0.0.1:43068 fd=21 name= age=40914 idle=441 flags=N db=6 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=zcard
addr=127.0.0.1:43073 fd=22 name= age=40913 idle=247 flags=N db=6 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=exec
addr=127.0.0.1:44639 fd=24 name= age=37296 idle=123 flags=N db=6 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=zrangebyscore
addr=144.76.97.83:51725 fd=10 name= age=974 idle=146 flags=N db=5 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=zrangebyscore
addr=144.76.97.83:51726 fd=11 name= age=974 idle=16 flags=N db=5 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=lrange
addr=144.76.97.83:51735 fd=12 name= age=969 idle=969 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=sismember
addr=144.76.97.83:51736 fd=13 name= age=969 idle=969 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=sismember
addr=144.76.97.83:51737 fd=14 name= age=969 idle=969 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=sadd
addr=144.76.97.83:51738 fd=15 name= age=969 idle=969 flags=N db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=subscribe
addr=144.76.97.83:51739 fd=16 name= age=969 idle=969 flags=N db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=subscribe
addr=144.76.97.83:51822 fd=23 name= age=862 idle=534 flags=N db=5 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=zcard
addr=144.76.97.83:51831 fd=25 name= age=858 idle=461 flags=N db=5 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=zcard
addr=144.76.97.83:52393 fd=26 name= age=146 idle=1 flags=N db=5 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=evalsha

[13255] 20 Mar 11:03:42.020 # --- REGISTERS
[13255] 20 Mar 11:03:42.020 # 
RAX:0000000000000017 RBX:40007fd34dc7ae20
RCX:5133524835536448 RDX:0000000000000000
RDI:00007fd34dc3a3a0 RSI:00007fd34f5a9c00
RBP:00007fd34dc3a3a0 RSP:00007fff6773be38
R8 :00007fd34f4431e0 R9 :00007fd350b34740
R10:0000000000000011 R11:00007fd34f5770ce
R12:00007fd34dc3a3a0 R13:00007fd34dca43a0
R14:00007fd34f4e32c0 R15:00000144debb51c2
RIP:0000000000415d90 EFL:0000000000010202
CSGSFS:0000000000000033
[13255] 20 Mar 11:03:42.020 # (00007fff6773be47) -> 0000000000000001
[13255] 20 Mar 11:03:42.020 # (00007fff6773be46) -> 000000000042bce4
[13255] 20 Mar 11:03:42.020 # (00007fff6773be45) -> 00007fd34f4e32c0
[13255] 20 Mar 11:03:42.020 # (00007fff6773be44) -> 00007fd34dca43a0
[13255] 20 Mar 11:03:42.020 # (00007fff6773be43) -> 00007fd34f4e32c0
[13255] 20 Mar 11:03:42.020 # (00007fff6773be42) -> 00007fff6773bf40
[13255] 20 Mar 11:03:42.020 # (00007fff6773be41) -> 00007fff6773bef0
[13255] 20 Mar 11:03:42.020 # (00007fff6773be40) -> e77628512c66da00
[13255] 20 Mar 11:03:42.020 # (00007fff6773be3f) -> 00007fd34f4e32c0
[13255] 20 Mar 11:03:42.020 # (00007fff6773be3e) -> 000000000042b0c4
[13255] 20 Mar 11:03:42.020 # (00007fff6773be3d) -> 00007fd34f4e32c0
[13255] 20 Mar 11:03:42.020 # (00007fff6773be3c) -> 000000000042bb66
[13255] 20 Mar 11:03:42.020 # (00007fff6773be3b) -> 00007fd34dca43a0
[13255] 20 Mar 11:03:42.020 # (00007fff6773be3a) -> 00007fd34dc3a3a0
[13255] 20 Mar 11:03:42.020 # (00007fff6773be39) -> 000000000000175e
[13255] 20 Mar 11:03:42.020 # (00007fff6773be38) -> 00007fff6773bef0
[13255] 20 Mar 11:03:42.020 # --- FAST MEMORY TEST
[13255] 20 Mar 11:03:42.245 # Fast memory test PASSED, however your memory can still be broken. Please run a memory test for several hours if possible.
[13255] 20 Mar 11:03:42.245 # 
=== 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

  Suspect RAM error? Use redis-server --test-memory to veryfy it.

Activity

  1. antirez commented on Jun 6, 2014

    @antirez
    Contributor

    Please could you run ./redis-server --test-memory for some time in this machine? Thanks.

  2. mtarnovan commented on Jun 6, 2014

    @mtarnovan
    Author

    @antirez We did run the memory test for a while before upgrading to 2.8.7, however we cannot run additional tests at this time as this is a production server. If it's of any help, another symptom at the time was memory exhaustion by the redis process (as noted above this machine has 32gb ram)

  3. antirez commented on Jun 6, 2014

    @antirez
    Contributor

    @mtarnovan thanks for the additional info, in the past I had the feeling that jemalloc sometimes corrupts on out of memory, but this is a very long shot...

    A few questions:

    • Did you noticed any further instabilities after the upgrade to a more recent 2.8.x release?
    • Do you use the sorted set data type?

    Thanks,
    Salvatore

  4. antirez commented on Jun 6, 2014

    @antirez
    Contributor

    p.s. interesting enough, it looks like this Redis process had 50% of pages swapped out on disk, that can be a different cause of corruption.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions