omec-project / up4

ONOS app and P4 program abstracting a network of switches as one big 4G/5G UPF
https://docs.sd-fabric.org/master/advanced/p4-upf.html
20 stars 13 forks source link

NullPointerException when processing counter read from PFCP agent #84

Closed Yi-Tseng closed 5 months ago

Yi-Tseng commented 3 years ago

Commit: test on both aeae3c and b65aa0 After start ONOS, I saw ONOS keeps showing logs below

java.lang.NullPointerException
    at org.omecproject.up4.impl.Up4NorthComponent.readCounterAndTranslate(Up4NorthComponent.java:261)
    at org.omecproject.up4.impl.Up4NorthComponent$Up4NorthService.read(Up4NorthComponent.java:477)
    at p4.v1.P4RuntimeGrpc$MethodHandlers.invoke(P4RuntimeGrpc.java:471)
    at io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:171)
    at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:331)
    at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:808)
    at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
    at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)

After some debugging, it looks like getUpfProgrammable() is returning null pointer.

ccascone commented 3 years ago

This is happening with the latest fabric-tna

robertmacdavid commented 3 years ago

Could you please see if https://github.com/omec-project/up4/pull/85 helps?