Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 2.1.0
-
Fix Version/s: 2.1.2
-
Component/s: Activity - Nested workflow, Engine - Workflow model
-
Labels:None
Description
WARN 2010-02-01 11:14:06,032 (net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Invoke:196) - Failed (INVOCATION) invoking Local service org.embl.ebi.escience.scuflworkers.java.StringConcat for job DispatchJobEvent facade1071:Workflow1:Workflow19:invocation84429:facade2133:Workflow19:Concatenate_two_strings[]: Uncaught exception while invoking Local service org.embl.ebi.escience.scuflworkers.java.StringConcat java.lang.NullPointerException at net.sf.taverna.t2.workflowmodel.impl.DataflowOutputPortImpl$1.receiveEvent(DataflowOutputPortImpl.java:65) at net.sf.taverna.t2.workflowmodel.impl.BasicEventForwardingOutputPort.sendEvent(BasicEventForwardingOutputPort.java:70) at net.sf.taverna.t2.workflowmodel.impl.ProcessorOutputPortImpl.receiveEvent(ProcessorOutputPortImpl.java:54) at net.sf.taverna.t2.workflowmodel.impl.ProcessorCrystalizerImpl.jobCreated(ProcessorCrystalizerImpl.java:66) at net.sf.taverna.t2.workflowmodel.impl.AbstractCrystalizer.receiveEvent(AbstractCrystalizer.java:88) at net.sf.taverna.t2.workflowmodel.impl.ProcessorImpl$2.pushEvent(ProcessorImpl.java:143) at net.sf.taverna.t2.workflowmodel.processor.dispatch.impl.DispatchStackImpl$TopLayer.receiveResult(DispatchStackImpl.java:277) at net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Parallelize.receiveResult(Parallelize.java:165) at net.sf.taverna.t2.workflowmodel.processor.dispatch.AbstractDispatchLayer.receiveResult(AbstractDispatchLayer.java:84) at net.sf.taverna.t2.workflowmodel.processor.dispatch.AbstractErrorHandlerLayer.receiveResult(AbstractErrorHandlerLayer.java:136) at net.sf.taverna.t2.workflowmodel.processor.dispatch.AbstractErrorHandlerLayer.receiveResult(AbstractErrorHandlerLayer.java:136) at net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Invoke$InvokeCallBack.receiveResult(Invoke.java:300) at net.sf.taverna.t2.activities.beanshell.BeanshellActivity$1.run(BeanshellActivity.java:181) at java.lang.Thread.run(Unknown Source)
due to: DataflowActivity doing:
facade.addResultListener(new ResultListener() { int outputPortCount = dataflow.getOutputPorts().size(); Map<String, T2Reference> outputData = new HashMap<String, T2Reference>(); public void resultTokenProduced( WorkflowDataToken dataToken, String port) { if (dataToken.getIndex().length == 0) { outputData.put(port, dataToken.getData()); synchronized (this) { if (--outputPortCount == 0) { callback.receiveResult(outputData, dataToken.getIndex()); facade.removeResultListener(this); } } } } })
notice that removeResultListener is called after receiveResults - meaning that it will be done after the output has been pushed up the stack and the next iteration of the nested workflow might already have started.
As net.sf.taverna.t2.workflowmodel.impl.DataflowOutputPortImpl don't synchronize access to it's resultListeners field it does not help that the WorkflowInstanceFacadeImpl does when calling addResultListener or removeResultListener, as they call down to add/remove on the dataflow port, which also internally does:
WorkflowDataToken newToken = token.popOwningProcess(); sendEvent(newToken); for (ResultListener listener : resultListeners .toArray(new ResultListener[] {})) { listener.resultTokenProduced(newToken, this.getName()); }
This can occur with iterations over nested workflows, for instance if running the workflow in T2-1124 including the T2-1124 fix.
Attachments
Issue Links
| Related | |||
|---|---|---|---|
|
|||
Attached workflow never made it past iteration 1070 in the nested workflow.