Twemcache starts spinning with 100% CPU because of bad UDP packages #21

Merged
merged 1 commit into from Jan 31, 2013

Conversation

Projects
None yet
2 participants

dknecht commented Jan 4, 2013

Patch from Upstream Memcached - memcached/memcached@954f6dd

"Don't permanently close UDP listeners on error
Also, don't inflate rbytes as we can only ever process one UDP packet at a
time.

Patch by pi3orama. Fixed by Dormando to use the correct state and actually
work."

Applying patch so that UDP requests cannot cause the server to spin o…
…ut of control

Patch from Upstream Memcached - memcached/memcached@954f6dd

Don't permanently close UDP listeners on error
Also, don't inflate rbytes as we can only ever process one UDP packet at a
time.

Patch by pi3orama. Fixed by Dormando to use the correct state and actually
work.

I'm not fully convinced of the rbytes bit. We must ensure that a UDP packet
with multiple commands in it has all of its commands processed before we can
possibly call recvfrom again.

@ghost ghost assigned thinkingfish Jan 14, 2013

thinkingfish added a commit that referenced this pull request Jan 31, 2013

Merge pull request #21 from cloudflare/master
Twemcache starts spinning with 100% CPU because of bad UDP packages

@thinkingfish thinkingfish merged commit 1d0d8a5 into twitter:master Jan 31, 2013

1 check passed

default The Travis build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment