-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
async.c:451: redisProcessCallbacks: Assertion `(c->flags & 0x20 || c->flags & 0x40)' failed. #490
Comments
This is a huge example of code I absolutely don't know. Plus on first sight it's completely unclear what the Please provide a reduced example triggering the error. |
code reduced. |
I find problem that is UNSUBSCRIBE command call. The problem gone away when comment redisAsyncCommand(c_sub, subCallback, NULL, "UNSUBSCRIBE %s", c->id.c_str());. |
There are still hundreds of lines of code. What exactly did you reduce? |
Reduced again |
I'm experiencing the same failed assertion. My code is nearly identical to the pub / sub sample in the wiki, with only an additional call to unsubscribe. Once I call:
After the
Is there anything I need to do before unsubscribing to prevent this? |
After some digging I found a potential cause of the issue. I found the issue occurs when my program does the following:
It seems the only way I can prevent the failed assertion is by not subscribing to a new channel until I've processed a Is this intended? I was under the impression that you could have multiple subscriptions on a single context. |
I also faced the same problem. After I have unsubscribed all the channel and then call redisAsyncHandleRead, hiredis assert failed at async.c: 478. |
This issue seems to describe what is fixed on master by #1036. |
I think you're right. Going to close this but if the problem isn't actually solved feel free to reopen |
redis-adapter.h
server.cc
I am coding a IM Server using redis sub/pub pattern, server.cc crash on assert occasionally while client forking 100 client processes and use ctrl + c to close client processes. if u comment server.cc redisAsyncCommand(c_sub, subCallback, NULL, "SUBSCRIBE %s", name); and redisAsyncCommand(c_sub, subCallback, NULL, "UNSUBSCRIBE %s", c->id.c_str()); problem will go away.
The text was updated successfully, but these errors were encountered: