Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redis client crashes in assert #193

Closed
ghost opened this issue Oct 3, 2013 · 3 comments
Closed

redis client crashes in assert #193

ghost opened this issue Oct 3, 2013 · 3 comments

Comments

@ghost
Copy link

ghost commented Oct 3, 2013

When the redis server goes down some times client dumps core in the following location.

(gdb) p cb
$1 = {next = 0x0, fn = 0x7f4b4848668e <vz::CacheRedis::selectDbCallback(redisAsyncContext*, void*, void*)>, privdata = 0x0}

p *ac->c.reader
$2 = {err = 0, errstr = '\000' <repeats 127 times>, buf = 0x7f4b37c59188 "+OK\r\n+OK\r\n", pos = 10, len = 10, maxbuf = 16384,
rstack = {{type = 5, elements = -1, idx = -1, obj = 0x0, parent = 0x0, privdata = 0x0}, {type = 0, elements = 0, idx = 0, obj = 0x0,
parent = 0x0, privdata = 0x0}, {type = 0, elements = 0, idx = 0, obj = 0x0, parent = 0x0, privdata = 0x0}, {type = 0,
elements = 0, idx = 0, obj = 0x0, parent = 0x0, privdata = 0x0}, {type = 0, elements = 0, idx = 0, obj = 0x0, parent = 0x0,
privdata = 0x0}, {type = 0, elements = 0, idx = 0, obj = 0x0, parent = 0x0, privdata = 0x0}, {type = 0, elements = 0, idx = 0,
obj = 0x0, parent = 0x0, privdata = 0x0}, {type = 0, elements = 0, idx = 0, obj = 0x0, parent = 0x0, privdata = 0x0}, {type = 0,
elements = 0, idx = 0, obj = 0x0, parent = 0x0, privdata = 0x0}}, ridx = -1, reply = 0x0, fn = 0x7f4b40a28280, privdata = 0x0}

(gdb) p ac
$1 = {c = {err = 0, errstr = '\000' <repeats 127 times>, fd = 22, flags = 2, obuf = 0x7f4b37c29b78 "", reader = 0x7f4b37ca2300},
err = 0, errstr = 0x7f4b37c173c4 "", data = 0x7f4b37c40900, ev = {data = 0x7f4b37c9b200,
addRead = 0x7f4b48481d9c <redisLibevAddRead(void
)>, delRead = 0x7f4b48481deb <redisLibevDelRead(void*)>,
addWrite = 0x7f4b48481e3a <redisLibevAddWrite(void*)>, delWrite = 0x7f4b48481e89 <redisLibevDelWrite(void*)>,
cleanup = 0x7f4b48481ed8 <redisLibevCleanup(void*)>},
onDisconnect = 0x7f4b48486d1e <vz::CacheRedis::disconnectCallback(redisAsyncContext const*, int)>,
onConnect = 0x7f4b484862fe <vz::CacheRedis::connectCallback(redisAsyncContext const*, int)>, replies = {head = 0x0, tail = 0x0},
sub = {invalid = {head = 0x0, tail = 0x0}, channels = 0x7f4b37c0e9a0, patterns = 0x7f4b37c0e970}}
(gdb) bt
#0 0x00007f4b4317e425 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f4b43181b8b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007f4b431770ee in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3 0x00007f4b43177192 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x00007f4b408258c7 in redisProcessCallbacks (ac=0x7f4b37c173c0) at async.c:436
#5 0x00007f4b48481d6a in redisLibevReadEvent (loop=0x7f4b37c30100, watcher=0x7f4b37c9b218, revents=1)

at /home/skrishnamoorthy/repo/VISP/build/x86_64-unknown-linux-gnu/thirdparty/include/libev.h:23

#6 0x00007f4b484d28cf in ev_invoke_pending (loop=0x7f4b37c30100) at src/ev/ev.cpp:3013
#7 0x00007f4b484d3800 in ev_run (loop=0x7f4b37c30100, flags=0) at src/ev/ev.cpp:3413
#8 0x00007f4b484d7636 in vz::EventLoop::start (this=0x7f4b4873c8c0) at src/EventLoopEv.cpp:104
#9 0x00007f4b4812ae61 in vz::ServiceRunner::process (this=0x7f4b3cc36300) at src/ServiceRunner.cpp:142
#10 0x00007f4b48468099 in vz::Thread::startPoint (arg=0x7f4b3cc36300) at src/ThreadPthread.cpp:222
#11 0x00007f4b49c87e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#12 0x00007f4b4323bccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#13 0x0000000000000000 in ?? ()

@pietern
Copy link
Contributor

pietern commented Oct 3, 2013

Which version of hiredis are you using? Can you include the message of the failed assertion?

@ghost
Copy link
Author

ghost commented Oct 4, 2013

version = 0.10.0
assert is failing in assert((c->flags & REDIS_SUBSCRIBED || c->flags & REDIS_MONITORING));

@badboy
Copy link
Contributor

badboy commented Jul 28, 2015

Unclear whether this is still a bug, no followup for quite some time and no reproducible test case. Closing for now.

@badboy badboy closed this as completed Jul 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants