[BGPCEP-175] MpUnreachNlri without withdrawnRoutes leads to NullPointerException Created: 08/Dec/14  Updated: 03/Mar/19  Resolved: 10/Dec/14

Status: Verified
Project: bgpcep
Component/s: BGP
Affects Version/s: Bugzilla Migration
Fix Version/s: Bugzilla Migration 1.0

Type: Bug
Reporter: Vratko Polak Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 2492

 Description   

Seen on recent build from stable/helium branch.
The NPE then breaks pipeline, which stops additional BGP processing.
When ODL comes up after restart, bundle activation is such that this bug does not affect basic BGP test result.

Here are snippets from karaf.log. I have not checked whether the message was parsed correctly, neither I have checked whether BGP speaker is even allowed to send such an update message.

2014-12-08 10:37:41,779 | TRACE | oupCloseable-4-4 | BGPByteToMessageDecoder

237 - org.opendaylight.bgpcep.bgp-rib-impl - 0.3.3.SNAPSHOT Received to decode
: ffffffffffffffffffffffffffffffff001d0200000006800f03400447

2014-12-08 10:37:41,788 | DEBUG | oupCloseable-4-4 | BGPUpdateMessageParser | 234 - org.opendaylight.bgpcep.bgp-parser-impl - 0.3.3.SNAPSHOT | BGP Update message was parsed Update [_pathAttributes=PathAttributes [augmentation=[PathAttributes2 [_mpUnreachNlri=MpUnreachNlri [_afi=class org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.LinkstateAddressFamily, _safi=class org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.LinkstateSubsequentAddressFamily, augmentation=[]]]]], augmentation=[]].

2014-12-08 10:37:41,790 | WARN | oupCloseable-4-4 | DefaultChannelPipeline | 184 - io.netty.common - 4.0.23.Final | An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.lang.NullPointerException
at org.opendaylight.protocol.bgp.linkstate.LinkstateAdjRIBsIn.removeRoutes(LinkstateAdjRIBsIn.java:216)[258:org.opendaylight.bgpcep.bgp-linkstate:0.3.3.SNAPSHOT]
at org.opendaylight.protocol.bgp.rib.impl.RIBImpl.updateTables(RIBImpl.java:209)[237:org.opendaylight.bgpcep.bgp-rib-impl:0.3.3.SNAPSHOT]
...



 Comments   
Comment by Vratko Polak [ 08/Dec/14 ]

After few tries, this patch got rid of symptomatic WARNing.
https://git.opendaylight.org/gerrit/#/c/13448/3

It does not contain a unit test. Also, a general re-write may be needed for the code to be defensive against similar situations in gray area of standards.

Comment by Vratko Polak [ 10/Dec/14 ]

Verified to be fixed on this build:
https://jenkins.opendaylight.org/integration/job/integration-helium-project-centralized-integration/81/artifact/distributions/extra/karaf/target/distribution-karaf-0.2.2-SNAPSHOT.tar.gz

Generated at Wed Feb 07 19:12:15 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.