Uploaded image for project: 'openflowjava'
  1. openflowjava
  2. OPNFLWJAVA-14

ActionsSerializer#computeLengthOfActions throws NullPointerException

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Won't Do
    • unspecified
    • None
    • General
    • None
    • Operating System: All
      Platform: All

    • 315

    Description

      2014-01-16 14:48:19.226 PST [nioEventLoopGroup-8-1] ERROR o.o.o.protocol.impl.core.OFEncoder - null
      java.lang.NullPointerException: null
      at org.opendaylight.openflowjava.protocol.impl.util.ActionsSerializer.computeLengthOfActions(ActionsSerializer.java:325) ~[bundlefile:na]
      at org.opendaylight.openflowjava.protocol.impl.util.InstructionsSerializer.computeInstructionsLength(InstructionsSerializer.java:169) ~[bundlefile:na]
      at org.opendaylight.openflowjava.protocol.impl.serialization.factories.FlowModInputMessageFactory.computeLength(FlowModInputMessageFactory.java:69) ~[bundlefile:na]
      at org.opendaylight.openflowjava.protocol.impl.serialization.factories.FlowModInputMessageFactory.computeLength(FlowModInputMessageFactory.java:28) ~[bundlefile:na]
      at org.opendaylight.openflowjava.protocol.impl.util.ByteBufUtils.writeOFHeader(ByteBufUtils.java:114) ~[bundlefile:na]
      at org.opendaylight.openflowjava.protocol.impl.serialization.factories.FlowModInputMessageFactory.messageToBuffer(FlowModInputMessageFactory.java:50) ~[bundlefile:na]
      at org.opendaylight.openflowjava.protocol.impl.serialization.factories.FlowModInputMessageFactory.messageToBuffer(FlowModInputMessageFactory.java:28) ~[bundlefile:na]
      at org.opendaylight.openflowjava.protocol.impl.serialization.SerializationFactory.messageToBuffer(SerializationFactory.java:36) ~[bundlefile:na]
      at org.opendaylight.openflowjava.protocol.impl.core.OFEncoder.encode(OFEncoder.java:39) [bundlefile:na]
      at org.opendaylight.openflowjava.protocol.impl.core.OFEncoder.encode(OFEncoder.java:25) [bundlefile:na]
      at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:111) [bundlefile:na]
      at io.netty.channel.DefaultChannelHandlerContext.invokeWrite(DefaultChannelHandlerContext.java:644) [bundlefile:na]
      at io.netty.channel.DefaultChannelHandlerContext.access$2000(DefaultChannelHandlerContext.java:28) [bundlefile:na]
      at io.netty.channel.DefaultChannelHandlerContext$WriteTask.run(DefaultChannelHandlerContext.java:891) [bundlefile:na]
      at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354) [bundlefile:na]
      at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:348) [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]

      It looks like an element in the list (which is another list) is null and that is why this happens.

      It looks like the NPE happens quite often but when it is invoked from OFEncoder#encode it is not being properly logged (I mean the stack trace is not being logged).

      We need to ensure that the logging is prominent to ensure that such problems are identified faster.

      To reproduce this problem do the following,

      1. Build a controller distribution from the openflow plugin
      2. Add a topology with mininet
      3. h1 ping h2

      You should see a NPE occur

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            michal.polkorab@gmail.com Michal Polkorab
            moraja@cisco.com Moiz Raja
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: