Skip to content
New issue

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

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

Already on GitHub? # to your account

Hiredis client crashes at assert #197

Closed
ghost opened this issue Oct 16, 2013 · 1 comment
Closed

Hiredis client crashes at assert #197

ghost opened this issue Oct 16, 2013 · 1 comment

Comments

@ghost
Copy link

ghost commented Oct 16, 2013

we are using Hiredis client version of 0.10.0
we have active standby redis server setup .
Whenever there is switch-over occasionally we find the following core-dump

(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 ?? ()

The process crashes at asyn.c while asserting the following condition.
assert((c->flags & REDIS_SUBSCRIBED || c->flags & REDIS_MONITORING))

@badboy
Copy link
Contributor

badboy commented Dec 8, 2014

Is this still relevant? If so, further input is needed. Closing for now.

@badboy badboy closed this as completed Dec 8, 2014
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant