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

Cannot access memory at address 0x7fc2d4080230 #442

Closed
abigbigbird opened this issue Jun 23, 2016 · 6 comments
Closed

Cannot access memory at address 0x7fc2d4080230 #442

abigbigbird opened this issue Jun 23, 2016 · 6 comments

Comments

@abigbigbird
Copy link

code works well most of time, it appeared several times, so far.
the gdb core stack as below:
image
image
os:Red Hat Enterprise Linux Server release 6.4 (Santiago)
gcc version:4.6.3
hiredis version:0.13.3

@badboy
Copy link
Contributor

badboy commented Jun 23, 2016

Please post these things as text. Images are not searchable, copyable or easily read.
Also:

  • What code did you execute?
  • What did you expect to happen?
  • What happened instead?

@abigbigbird
Copy link
Author

I use hiredis in my project,It works fine in most of the time,but there are several times ,it hangs。

the gdb core stack as below::

#0 redisBufferRead (c=0x7f26c4013a10) at hiredis.c:800
#1 0x00007f27479e9cd0 in redisGetReply (c=0x7f26c4013a10, reply=0x7f26ea4e7ea0) at hiredis.c:903
#2 0x00007f27479ea02b in __redisBlockForReply (c=0x7f26c4013a10, argc=, argv=,
argvlen=) at hiredis.c:1010
#3 redisCommandArgv (c=0x7f26c4013a10, argc=, argv=, argvlen=)
at hiredis.c:1035
#4 0x00007f27479d31cc in bfd::codis::CodisClient::RedisCommand (this=0x200ceb0, command=..., tt=0) at src/CodisClient.cpp:995
#5 0x00007f27479d3662 in bfd::codis::CodisClient::RedisCommand (this=0x200ceb0, command=..., tt=0) at src/CodisClient.cpp:1035
#6 0x00007f27479c9f64 in bfd::codis::CodisClient::get (this=0x200ceb0, key=..., tt=0) at src/CodisClient.cpp:152
#7 0x00007f27479e5a18 in bfd::codis::BfdCodis::get (this=0x2130120, key=..., tt=0) at src/BfdCodis.cpp:60
#8 0x000000000050d89e in RedisClientProxy::get (this=0x20e34f0, key=...)
(gdb) p c
$1 = {err = 0, errstr = '\000' , fd = 72, flags = 3, obuf = 0x7f26b40087c8 "", reader = 0x7f26c4013af0,
connection_type = REDIS_CONN_TCP, timeout = 0x0, tcp = {host = 0x7f26c4013d50 "192.168.*", source_addr = 0x0, port = 19000},
unix_sock = {path = 0x0}}
(gdb) p *buf
Cannot access memory at address 0x7f26ea4e3d80

os:Red Hat Enterprise Linux Server release 6.4 (Santiago)
gcc version:4.6.3
hiredis version:0.13.3

@abigbigbird
Copy link
Author

thanks or sorry,Maybe i am not express my situation,i use a demo work fine all the time which just use set/get command,but when it run on my application ,it hangs!i can't find there are any different between the demo and my application。maybe it is not the hiredis‘s issue,but i don't know what i can do for resolve it。’

@badboy
Copy link
Contributor

badboy commented Jul 6, 2016

See the first comment. I can't act without more info.
Also are you using the context object from multiple threads? If so, that is likely the fault.

@liuxyc
Copy link

liuxyc commented Jul 18, 2016

as badboy mentioned, hiredis is not thread safe

@abigbigbird
Copy link
Author

Thanks,Maybe my code‘s fault,i will have a ’unit test to find the bug!Any progress,i would tell you here.

@badboy badboy closed this as completed Jul 18, 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

3 participants