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

coredump in sdsfree #467

Closed
fanbojie opened this issue Sep 14, 2016 · 1 comment
Closed

coredump in sdsfree #467

fanbojie opened this issue Sep 14, 2016 · 1 comment

Comments

@fanbojie
Copy link

fanbojie commented Sep 14, 2016

I use hiredis in async mode, first i create a new thread and this thread only do aeCreateEvent、aemain.
all other hiredis function is done in another thread,such as redisAsyncConnect、redisAsyncCommand.
is this right, if not right right, how to use async mode with ae.

core dump:
#0 0x00a2a424 in __kernel_vsyscall ()
#1 0x00657871 in raise () from /lib/libc-2.12.so
#2 0x0065914a in abort () from /lib/libc-2.12.so
#3 0x00697735 in __libc_message () from /lib/libc-2.12.so
#4 0x0069db91 in malloc_printerr () from /lib/libc-2.12.so
#5 0x006a02f8 in _int_free () from /lib/libc-2.12.so
#6 0x08059ec4 in sdsfree (

s=0xb5c01310 "*4\r\n$4\r\nHSET\r\n$12\r\nfanbojie_123\r\n$4\r\ntpgw\r\n$14\r\n127.0.0.1:9999\r\n*3\r\n$4\r\nHGET\r\n$12\r\nfanbojie_123\r\n$4\r\ntpgw\r\n")
at sds.c:88

#7 0x08058178 in redisBufferWrite (c=0x81f3e88, done=0xb67fd20c) at hiredis.c:849
#8 0x0805c627 in redisAsyncHandleWrite (ac=0x81f3e88) at async.c:549
#9 0x0804c144 in redisAeWriteEvent (el=0xb5407040, fd=10, privdata=0x81f3c38, mask=2) at /app/fanbojie/hiredisTest/Include/redis/hiredis-vip/adapters/ae.h:61
#10 0x0806bd9e in aeProcessEvents (eventLoop=0xb5407040, flags=3) at ae.c:416
#11 0x0806c064 in aeMain (eventLoop=0xb5407040) at ae.c:455
#12 0x0804fa45 in CRedisProxyImpl::run (this=0x80bfa40) at /app/fanbojie/hiredisTest/Src/RedisProxyImpl.cpp:82
#13 0x0809bd0e in litebase::details::CThread::threadProc (arg=0x80bfa44) at /app/fanbojie/litebase/Build/../Src/Thread.cpp:36
#14 0x00618b39 in start_thread () from /lib/libpthread-2.12.so
#15 0x0070fc2e in clone () from /lib/libc-2.12.so

@badboy
Copy link
Contributor

badboy commented Nov 16, 2016

Sharing a single context across threads is likely the reason for issues. Without a minimal example I can't do anything more.

If you can provide this info, feel free to re-open this issue.

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

No branches or pull requests

2 participants