-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Jenkins 2.73.3, Jenkins 2.89.4 LTS, Jenkins 2.111
Related to this issue reported to Groovy team:
https://issues.apache.org/jira/browse/GROOVY-8507
The groovyc compiler hangs and freezes if enum is declared nested inside another enum. The problem is, when this happens, the Job and the executor in Jenkins become zombie threads, and they need to be killed by finding the Thread name on the Jenkins console and stopping both the executor and the Job threads, as instructed here:
The red cross icon next to the executor does not cancel the Job.
So, I think the processes should not become zombie and impossible to kill, and this situation should be either detected, or allow the user to kill the freezed Job.
How to reproduce
Simply create a Pipeline type Job, and include the following code in the Pipeline:
enum OuterEnum { VALUE, enum InnerEnum { A } } node { stage('Break') { echo '########' + "${OuterEnum.values()}" } }
The Job and the executor will freeze, and there is no way to kill them from the UI.
I'm not sure how we can do anything about this at this point - if the Groovy compiler freezes, we can't exactly catch the problem ahead of time, and I'm not sure if we've got a way to kill the frozen thread. But hey, we'll take a look.