-
Notifications
You must be signed in to change notification settings - Fork 26
Closed
Description
- Reported as: lp:1451184
- Reported by: lp:~0x3fffffff
- Reported at: 2015-05-03T12:43:22Z
Imported from Launchpad using lp2gh.
We are using libmemcached 1.0.18 and observed occasionally very high CPU consumption.
After some debugging, the cause is located in libmemcached/purge.cc :
bool memcached_purge(memcached_instance_st* ptr)
{
.............
uint32_t no_msg= memcached_server_response_count(ptr) - 1;
for (uint32_t x= 0; x < no_msg; x++) // busy loop here
{
.....
}
}
During debugging, we found that memcached_server_response_count(ptr) sometimes return a large value which equals to (uint32_t)(0-1) .
In order to fix this issue, we took an quick & dirty solution, which refuses to decrement by 1 when 0. This patch is attached below.
But still, I haven't found the root cause, and I'm afraid the root cause would leads to more possible hidden issues. So hope someone else could catch and fix this bug.
Metadata
Metadata
Assignees
Labels
No labels