-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
-
workflow-cps 2.76
On Jenkins 2.176.2 and credentials-binding-plugin 1.19, the following pipeline will intermittently hang:
pipeline {
agent any
stages {
stage('bug') {
steps {
script {
for (int i = 0; i < 100; i++) {
withEnv(['A=b']) {
withCredentials([]) {
sh "echo hello ${i}"
}
}
}
}
}
}
}
}
The build log looks like this:
...
[Pipeline] withEnv
[Pipeline] {
[Pipeline] withCredentials
until the build is aborted.
I've seen two independent things that both seem to work around the problem:
- flipping so `withCredentials([])` wraps `withEnv([...])` seems to avoid the hang.
- ensuring there's always at least one item in the `withCredentials` list parameter seems to avoid the hang.
We run into this in a pipeline where the parameter to withCredentials varies by projects, and sometimes is an empty list.
- is duplicated by
-
JENKINS-54480 ConcurrentModificationException in CPS VM thread (CpsFlowExecution): org.jenkinsci.plugins.workflow.cps.DSL
-
- Closed
-
- links to