[CONTROLLER-1516] NPE when karaf container is shutdown using shutdown -f Created: 17/May/16  Updated: 22/Jun/16  Resolved: 22/Jun/16

Status: Resolved
Project: controller
Component/s: clustering
Affects Version/s: Beryllium
Fix Version/s: None

Type: Bug
Reporter: Anil Vishnoi Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: Text File karaf.log    
External issue ID: 5903

 Description   

Whenever i shutdown the controller using "shutdown -f" i see following exception on the karaf console

opendaylight-user@root>shutdown -f
opendaylight-user@root>
[ERROR] [05/17/2016 15:09:31.874] [opendaylight-cluster-data-akka.actor.default-dispatcher-45] [akka.dispatch.Dispatcher] null
java.lang.NullPointerException
at org.opendaylight.controller.cluster.datastore.utils.ActorContext$4.onComplete(ActorContext.java:410)
at org.opendaylight.controller.cluster.datastore.utils.ActorContext$4.onComplete(ActorContext.java:407)

Following gist contains the full exception.

https://gist.github.com/vishnoianil/3e9fcf16d416c141152c7f8227316777

Karaf.log is attached with the bug.



 Comments   
Comment by Anil Vishnoi [ 17/May/16 ]

Attachment karaf.log has been added with description: karaf.log

Comment by Robert Varga [ 21/Jun/16 ]

The code has moved a bit, but going a bit back in time indicated that this comes from ActorContext.broadcast()'s OnComplete. Line 410 is:

Object message = messageSupplier.apply(primaryShardInfo.getPrimaryShardVersion());

There is already a failure check, hence this is trivial fix.

Comment by Robert Varga [ 21/Jun/16 ]

https://git.opendaylight.org/gerrit/40627

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