slimina / xmemcached

Automatically exported from code.google.com/p/xmemcached
Apache License 2.0
0 stars 0 forks source link

Throw "Not a proper response" MemcachedException when using binary protocol #150

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Use xmemcached with binary protocol to talk with memcached.
2.increase/decrease a  non-numeric value

It will threw a MemcachedException with message

 "Incr/Decr on non-numeric value."

And then threw another MemcachedException with message
"Not a proper response"

At last,the connection to memcached was closed by xmemcached,and futher 
requests to memcached failed with MemcachedException "Session has been closed".

This is because xmemcached decode binary command in an error way,when the 
response status from server is NOT  NO_ERROR,it still try to read value from 
buffer,and so it readed an error value and make bad data reserved in buffer,so 
next read to buffer failed at once and closed connection.

Original issue reported on code.google.com by killme2...@gmail.com on 7 Sep 2011 at 11:37

GoogleCodeExporter commented 9 years ago
Fixed by 
https://github.com/killme2008/xmemcached/commit/09868d8be396f5843b37e8cb470db93f
d788dead

and 

https://github.com/killme2008/xmemcached/commit/a93d5b5d95a4a1925d1de008495b5501
e35ed36b

Original comment by killme2...@gmail.com on 7 Sep 2011 at 11:41

GoogleCodeExporter commented 9 years ago
1.3.4 was released.

Original comment by killme2...@gmail.com on 8 Sep 2011 at 3:45