-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
1.651.3.1, Pipeline 2.4
Steps to reproduce:
1. Create a new pipeline job with code similar to
```
#!groovy
def myVar
node {
myVar = getMyVar()
echo "myVar is ${myVar}"
echo "Loaded pipeline script."
}
def getMyVar() {
myVar ? myVar : my_var
}
```
2. Observe CPU spike, and that job cannot be terminated
See overflow.txt for exception in CPS.
The problem is the var is the same name as the getter and you're entering an infinite loop.
I've seen this once or twice before and think this is a Groovy CPS specific issue. jglick Do we have an issue for this?