-
Notifications
You must be signed in to change notification settings - Fork 326
Persistent connections in the session handler are not documented and wrong string causing segfaults #196
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
Comments
Ok, found it, works correctly with: PERSISTENT=1 localhost:11211 So probably it needs to be documented + segfault for paths like PERSISTENT=host:port needs to be resolved |
Are you able to create a backtrace out of the segfault? |
@mkoppanen interesting, i am able to reproduce segfault on my OSX machine, but when i am trying to reproduce this on Linux - it works correctly:
I will try to debug segfault on osx and will let you know. |
I been able to get some debug with lldb: This is message after crash;
And this is backtrace:
|
i think that problem is that PS_WRITE_FUNC is called when PS_OPEN_FUNC returns FAILURE and this causing access to non-allocated data (memc_sess). |
I wonder why it's getting called. Almost sounds like incorrect behaviour. Does changing PS_WRITE_FUNC to following fix the issue:
|
@mkoppanen i fixed this issue and i think that i know the reason - its called because default (file) handler failed, probably because of permissions. Anyway, i think it is good idea to check that pointer is correct before doing any operations on data. I sent PR for that. |
Merged both of them. Thanks for your contribution! |
Thank you! |
I found that there is a possibility to use persistent connections in memcached session handler. However, i cant find any reference on it. From the code i found that it expects PERSISTENT= in the save_path string. I tried PERSISTENT=host:port and got segfault. Could you please tell if this functionality is complete or not and how to use it? Thank you.
The text was updated successfully, but these errors were encountered: