Getting exception - co.paralleluniverse.fibers.SuspendExecution while executing flow in CordaM13

777 views Asked by At

Hello Corda team,

I have created factorial oracle service and created two party flow in Corda M13.

I am getting following error while executing flow from console.

co.paralleluniverse.fibers.SuspendExecution: Oops. Forgot to instrument a method Run your program with -Dco.paralleluniverse.fibers.verifyInstrumentation=true to catch the culprit!

From logs, i found following warning message:
[WARN ] 2017-08-28T14:23:39,227 [Node thread] flow.[4845e28d-60dc-4899-bc9e-6bdfbe43d724].uncaughtException - Caught exception from flow
java.lang.AssertionError: Unexpected task state (fiber parking or parked has no chance to to call `park`): -2
    at co.paralleluniverse.fibers.RunnableFiberTask.park(RunnableFiberTask.java:213) ~[quasar-core-0.7.6-jdk8.jar:0.7.6]
    at co.paralleluniverse.fibers.Fiber.park1(Fiber.java:707) ~[quasar-core-0.7.6-jdk8.jar:0.7.6]
    at co.paralleluniverse.fibers.Fiber.park(Fiber.java:620) ~[quasar-core-0.7.6-jdk8.jar:0.7.6]
    at co.paralleluniverse.fibers.Fiber.park(Fiber.java:624) ~[quasar-core-0.7.6-jdk8.jar:0.7.6]
    at co.paralleluniverse.fibers.Fiber.parkAndSerialize(Fiber.java:1944) ~[quasar-core-0.7.6-jdk8.jar:0.7.6]
    at net.corda.node.services.statemachine.FlowStateMachineImpl.suspend(FlowStateMachineImpl.kt:396) ~[corda-node-0.13.0.jar:?]
    at net.corda.node.services.statemachine.FlowStateMachineImpl.suspendAndExpectReceive(FlowStateMachineImpl.kt:349) ~[corda-node-0.13.0.jar:?]
    at net.corda.node.services.statemachine.FlowStateMachineImpl.waitForMessage(FlowStateMachineImpl.kt:333) ~[corda-node-0.13.0.jar:?]
    at net.corda.node.services.statemachine.FlowStateMachineImpl.access$waitForMessage(FlowStateMachineImpl.kt:39) ~[corda-node-0.13.0.jar:?]
    at net.corda.node.services.statemachine.FlowStateMachineImpl.waitForConfirmation(FlowStateMachineImpl.kt:497) ~[corda-node-0.13.0.jar:?]
    at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:126) ~[corda-node-0.13.0.jar:?]
    at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:39) ~[corda-node-0.13.0.jar:?]
    at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1067) [quasar-core-0.7.6-jdk8.jar:0.7.6]
    at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:767) [quasar-core-0.7.6-jdk8.jar:0.7.6]
    at co.paralleluniverse.fibers.RunnableFiberTask.doExec(RunnableFiberTask.java:100) [quasar-core-0.7.6-jdk8.jar:0.7.6]
    at co.paralleluniverse.fibers.RunnableFiberTask.run(RunnableFiberTask.java:91) [quasar-core-0.7.6-jdk8.jar:0.7.6]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_131]
    at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_131]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) [?:1.8.0_131]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [?:1.8.0_131]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_131]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_131]
    at net.corda.node.utilities.AffinityExecutor$ServiceAffinityExecutor$1$thread$1.run(AffinityExecutor.kt:69) [corda-node-0.13.0.jar:?]
1

There are 1 answers

0
Joel On

It looks like you're missing an @Suspendable annotation on one of your flows, or one of the methods you call from your flows.

It might be best to add the annotation liberally to see if it removes the error, then gradually cut back to see which is the offending method.