[OPNFLWJAVA-15] IndexOutofBoundsException Created: 26/Jan/14  Updated: 03/May/18  Resolved: 27/Mar/14

Status: Resolved
Project: openflowjava
Component/s: General
Affects Version/s: unspecified
Fix Version/s: None

Type: Improvement
Reporter: Ed Warnicke Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Mac OS
Platform: PC


Issue Links:
Duplicate
is duplicated by OPNFLWJAVA-16 Constantly seeing an exception on dec... Resolved

 Description   

java.lang.IndexOutOfBoundsException: readerIndex(463) + length(8) exceeds writerIndex(463): SlicedByteBuf(ridx: 463, widx: 463, cap: 463/463, unwrapped: UnpooledUnsafeDirectByteBuf(ridx: 0, widx: 16, cap: 512))
at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1160) ~[bundlefile:na]
at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:668) ~[bundlefile:na]
at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:676) ~[bundlefile:na]
at org.opendaylight.openflowjava.protocol.impl.deserialization.factories.MultipartReplyMessageFactory.setTable(MultipartReplyMessageFactory.java:341) ~[bundlefile:na]
at org.opendaylight.openflowjava.protocol.impl.deserialization.factories.MultipartReplyMessageFactory.bufferToMessage(MultipartReplyMessageFactory.java:211) ~[bundlefile:na]
at org.opendaylight.openflowjava.protocol.impl.deserialization.factories.MultipartReplyMessageFactory.bufferToMessage(MultipartReplyMessageFactory.java:144) ~[bundlefile:na]
at org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializationFactory.bufferToMessage(DeserializationFactory.java:41) ~[bundlefile:na]
at org.opendaylight.openflowjava.protocol.impl.core.OFDecoder.decode(OFDecoder.java:46) [bundlefile:na]
at org.opendaylight.openflowjava.protocol.impl.core.OFDecoder.decode(OFDecoder.java:26) [bundlefile:na]
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) [bundlefile:na]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [bundlefile:na]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [bundlefile:na]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:173) [bundlefile:na]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [bundlefile:na]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [bundlefile:na]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:173) [bundlefile:na]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [bundlefile:na]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [bundlefile:na]
at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:253) [bundlefile:na]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [bundlefile:na]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [bundlefile:na]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [bundlefile:na]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:100) [bundlefile:na]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:480) [bundlefile:na]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:447) [bundlefile:na]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:341) [bundlefile:na]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [bundlefile:na]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]



 Comments   
Comment by Michal Polkorab [ 26/Jan/14 ]

Hello,

can you please provide some context / usecase on how to reproduce this issue ?
Which vswitch was used (+ its version), commands in osgi console, ... ?

But I believe that this might be simmilar issue as https://bugs.opendaylight.org/show_bug.cgi?id=306 (for OF1.0), the ovs-switch responds with incorrect length of statistics (packets captured via wireshark are malformed, missing or the length is incorrect - when computing the length manually)

Thanks

Michal

Comment by Colin Dixon [ 27/Jan/14 ]

Even if this is an issue with OVS, it seems like we should:
1.) fix it on our end for now with a special case
2.) file a bug with OVS
3.) track that bug and make sure we know what's going on

Comment by Michal Polkorab [ 27/Mar/14 ]

Hello,

the issue has been fixed by next change: https://git.opendaylight.org/gerrit/#/c/5793/

It was caused by a bug inside Netty.

Regards
Michal Polkorab

Generated at Wed Feb 07 20:28:44 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.