I am using redis since last couple of years.
Its working fine in RHEL-5, RHEL-6 but it crashes in RHEL-7 while executing SAVE command.
Below is my working environment.
System: Red Hat Enterprise Linux Server release 7.4 (Maipo)
Kernel: 3.10.0-693.el7.x86_64
GCC version: gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)
Redis: redis-2.8.3
I have attached the full core file with this post.
I have GDB output as below.
=======================================================================================================================
#0 lzf_compress (in_data=in_data@entry=0x7f4996c8f3bb, in_len=in_len@entry=47, out_data=out_data@entry=0x7f4996c1c5d0, out_len=out_len@entry=43)
at lzf_c.c:146
hslot = 0x7ffea25902c4
htab = <error reading variable htab (Cannot access memory at address 0x7ffea258e8a0)>
ip = 0x7f4996c8f3bc "MAX:V1H:01:Dashboard:1523968950:SwitchAttempts"
op = 0x7f4996c1c5d2 ""
in_end = 0x7f4996c8f3ea ""
out_end = 0x7f4996c1c5fb ""
ref = <optimized out>
off = <optimized out>
hval = 1229799768
lit = 1
#1 0x00000000004478eb in rdbSaveLzfStringObject (rdb=rdb@entry=0x7ffea25cea60,
s=s@entry=0x7f4996c8f3bb "IMAX:V1H:01:Dashboard:1523968950:SwitchAttempts", len=len@entry=47) at rdb.c:319
comprlen = <optimized out>
outlen = 43
out = 0x7f4996c1c5d0
nwritten = <optimized out>
#2 0x0000000000447c9e in rdbSaveRawString (rdb=0x7ffea25cea60, s=0x7f4996c8f3bb "IMAX:V1H:01:Dashboard:1523968950:SwitchAttempts", len=47)
at rdb.c:391
enclen = <optimized out>
n = <optimized out>
nwritten = 0
#3 0x000000000044901e in rdbSaveKeyValuePair (rdb=rdb@entry=0x7ffea25cea60, key=key@entry=0x7ffea25cea00, val=val@entry=0x7f4996c351e0,
expiretime=1523992352247, now=now@entry=1523968965691) at rdb.c:823
No locals.
#4 0x000000000044955c in rdbSaveRio (rdb=rdb@entry=0x7ffea25cea60, error=error@entry=0x7ffea25cea5c, flags=flags@entry=0, rsi=rsi@entry=0x0)
at rdb.c:934
keystr = <optimized out>
key = {type = 0, encoding = 0, lru = 0, refcount = 1, ptr = 0x7f4996c8f3bb}
o = 0x7f4996c351e0
expire = <optimized out>
db = 0x7f4996d4f000
d = <optimized out>
db_size = <optimized out>
---Type <return> to continue, or q <return> to quit---
expires_size = <optimized out>
di = 0x7f4996c1c5a0
de = <optimized out>
magic = "REDIS0008"
j = 0
now = 1523968965691
cksum = 4294967296
processed = 0
#5 0x00000000004499e8 in rdbSave (filename=0x7f4996c17000 "dump.rdb", rsi=0x0) at rdb.c:1028
tmpfile = "temp-6749.rdb\000\000\000\020\000\000\000\000\000\000\000\002", '\000' <repeats 15 times>, "\274\236{\235I\177\000\000\000\000\000\000\000\000\000\000\005ă\235I\177\000\000\177\003\000\000\000\000\000\000\377\377\377\377\377\377\377\377\300\351\\\242\376\177\000\000\000\000\000\000\000\000\000\000\272\354\\\242\376\177\000\000\000\020\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000PȖI\177\000\000\020\363ȖI\177\000\000\367,C\000\000\000\000\000/proc/6749/stat\000\220\361\\\242\376\177\000\000\200\361\\\242\376\177\000\000\200LO\000\000\000\000\000\b\000\000\000\000\000\000\000XLO\000\000\000\000\000\211\"|"...
cwd = "\001\000\000\000\000\000\000\000\020\354\\\242\376\177", '\000' <repeats 11 times>, "\355\\\242\376\177\000\000\210\071|\235I\177\000\000////////\002", '\000' <repeats 15 times>, "\370\377\377\377\377\377\377\377\000\000\000\000\n\000\000\000P\003e\001\000\000\000\000\002\000\000\000\000\000\000\000 \002\000\000\000\000\000\000\000\000\000\000I\177", '\000' <repeats 18 times>, "@\361\\\242\376\177\000\000\000\000\000\000\000\000\000\000\066\067\064\071 (redis-server) R 1 6749 6749 0 -1 4202816 402 0 0 0"...
fp = 0x1447460
rdb = {read = 0x47aaf0 <rioFileRead>, write = 0x47ab10 <rioFileWrite>, tell = 0x47aae0 <rioFileTell>, flush = 0x47aac0 <rioFileFlush>,
update_cksum = 0x47aff0 <rioGenericUpdateChecksum>, cksum = 8233767897234857521, processed_bytes = 98, max_processing_chunk = 0, io = {
buffer = {ptr = 0x1447460 "\204,\255", <incomplete sequence \373>, pos = 98}, file = {fp = 0x1447460, buffered = 98, autosync = 0},
fdset = {fds = 0x1447460, state = 0x62, numfds = 0, pos = 0, buf = 0x0}}}
error = 0
#6 0x000000000044bf8f in saveCommand (c=0x7f4996d61600) at rdb.c:2006
rsi = {repl_stream_db = -1, repl_id_is_set = 0, repl_id = '0' <repeats 30 times>, "\000\000\000\000\000\000\000\000\000\000",
repl_offset = -1}
rsiptr = <optimized out>
#7 0x000000000042c03e in call (c=c@entry=0x7f4996d61600, flags=flags@entry=15) at server.c:2229
dirty = 4
start = 139954038621648
duration = <optimized out>
client_old_flags = 0
prev_also_propagate = {ops = 0x0, numops = 0}
#8 0x000000000042c6e7 in processCommand (c=0x7f4996d61600) at server.c:2510
=======================================================================================================================