What steps will reproduce the problem?
1. start jmemcached (cli or core)
2. send lots of set, gets and add operations to it via tcp until cpu load is
saturized.
What is the expected output? What do you see instead?
I expect that jmemcached processes all operations sent just like under low
load. But what I see instead are some IndexOutOfBoundsExceptions thrown
regularly (at about ~1% of the memcached operations).
What version of the product are you using? On what operating system?
0.9.3-SNAPSHOT
Please provide any additional information below.
The exception is thrown in netty's skipBytes(int length) method. This is
invoked in MemcachedFrameDecoder.decode() like follows:
buffer.skipBytes(minFrameLength + minDelimLength);
Unfortunately readableBytes() is not checked in advance. It looks like the
issue occurs in case the arrival of the CR+LF sequence is handled by two
separate invocations of MemcachedFrameDecoder.decode(ChannelHandlerContext ctx,
org.jboss.netty.channel.Channel channel, ChannelBuffer buffer).
I have attached a patch to illustrate the issue, please review whether this is
the best way to fix it.
Original issue reported on code.google.com by henning@ganix.de on 16 Nov 2010 at 3:37
Original issue reported on code.google.com by
henning@ganix.de
on 16 Nov 2010 at 3:37Attachments: