Fixing a random failure in WorkflowTest.buildShellScriptOnSlave (build 369).
Timed out after printing:
… org.jenkinsci.plugins.workflow.flow.FlowExecutionList$1 computeNext
WARNING: Failed to load Owner[demo/…:demo #1]. Unregistering
java.io.IOException: demo #1 did not yet start
	at org.jenkinsci.plugins.workflow.job.WorkflowRun$Owner.get(WorkflowRun.java:562)
	at org.jenkinsci.plugins.workflow.flow.FlowExecutionList$1.computeNext(FlowExecutionList.java:60)
	at org.jenkinsci.plugins.workflow.flow.FlowExecutionList$1.computeNext(FlowExecutionList.java:52)
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
	at org.jenkinsci.plugins.workflow.flow.FlowExecutionList$StepExecutionIteratorImpl.apply(FlowExecutionList.java:161)
	at org.jenkinsci.plugins.workflow.steps.StepExecution.applyAll(StepExecution.java:91)
	at org.jenkinsci.plugins.workflow.steps.StepExecution.applyAll(StepExecution.java:99)
	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Checker.doRun(DurableTaskStep.java:159)
Believed to have been a race condition: Owner was registered before WorkflowRun.execution was set.
Also making sure LOADING_RUNS is consistently synchronized.
And predefining Owner.run so that the lookup by key is not necessary unless and until you resume a flow.
Cache the configFile so we do not see race conditions during shutdown.
Exception in thread "CPS VM execution thread: org.jenkinsci.plugins.workflow.cps.CpsFlowExecution@45ef065f" java.lang.NullPointerException
	at org.jenkinsci.plugins.workflow.flow.FlowExecutionList.getConfigFile(FlowExecutionList.java:40)
	at org.jenkinsci.plugins.workflow.flow.FlowExecutionList.load(FlowExecutionList.java:78)
	at org.jenkinsci.plugins.workflow.flow.FlowExecutionList.<init>(FlowExecutionList.java:44)
	at org.jenkinsci.plugins.workflow.flow.FlowExecutionList.get(FlowExecutionList.java:127)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:386)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$800(WorkflowRun.java:95)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:613)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:594)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$4.run(CpsThreadGroup.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:744)