Skip to content
Permalink
Browse files

[JENKINS-34450] Dangerous to acquire the AsynchronousExecution monito…

…r while holding an Executor lock.
  • Loading branch information...
jglick committed Apr 26, 2016
1 parent b1505f8 commit 26bc9d79451b2909f96b55bbb6c83827a8c8de3b
Showing with 12 additions and 7 deletions.
  1. +12 −7 src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java
@@ -226,13 +226,18 @@ private AsynchronousExecution sleep() {
if (forShutdown) {
return;
}
try {
execution.interrupt(getExecutor().abortResult());
} catch (Exception x) {
LOGGER.log(Level.WARNING, null, x);
}
getExecutor().recordCauseOfInterruption(WorkflowRun.this, listener);
printLater("term", "Click here to forcibly terminate running steps");
Timer.get().submit(new Runnable() {
@Override public void run() {
Executor executor = getExecutor();
try {
execution.interrupt(executor.abortResult());
} catch (Exception x) {
LOGGER.log(Level.WARNING, null, x);
}
executor.recordCauseOfInterruption(WorkflowRun.this, listener);
printLater("term", "Click here to forcibly terminate running steps");
}
});
}
@Override public boolean blocksRestart() {
return execution.blocksRestart();

0 comments on commit 26bc9d7

Please sign in to comment.
You can’t perform that action at this time.