The pipeline will hang and after aborting display a backtrace
java.lang.IllegalStateException: countDownLatch step must be called with a body
at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:246)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:193)
at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:163)
at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:157)
at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:161)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:165)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135)
at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
at WorkflowScript.run(WorkflowScript:20)
at ___cps.transform___(Native Method)
...
More info
This pipeline used to work fine. I upgraded from Jenkins 2.249.2 to 2.263.4; it still worked. Then I upgraded all the plugins, which caused this error. However, there were a lot of plugins and I don't have the exact versions.
I had this issue but the syntax was not correct. Check the syntax, maybe brackets are missing. Another reason could be update in plugin and call method.
Version report
Jenkins and plugins versions report:
Debian 10
Reproduction steps
Results
Expected result:
Actual result:
The pipeline will hang and after aborting display a backtrace
More info
This pipeline used to work fine. I upgraded from Jenkins 2.249.2 to 2.263.4; it still worked. Then I upgraded all the plugins, which caused this error. However, there were a lot of plugins and I don't have the exact versions.