Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-34751

StackOverflowError in Groovy scripts

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Due to a regression in Groovy 2.4 (GROOVY-7826) scripts using some of the core classes with complex generic type arguments (e.g. hudson.model.Run or hudson.model.Job) will cause a StackoverflowError.

      Run this script in Script Console to reproduce the problem:

      def foo(hudson.model.Run run) {}
      

      This affects Script Console, Pipeline, Job DSL, Groovy plugin (system Groovy script) and probably other plugins using the Groovy runtime provided by Jenkins core.

      java.lang.StackOverflowError
      	at java.lang.StringBuilder.append(StringBuilder.java:132)
      	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1173)
      	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1159)
      	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1178)
      	at org.codehaus.groovy.ast.ClassNode.genericTypeAsString(ClassNode.java:1199)
      	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1173)
      	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1159)
      	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1178)
      	at org.codehaus.groovy.ast.ClassNode.genericTypeAsString(ClassNode.java:1199)
      	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1173)
      	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1159)
      	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1178)
      	at org.codehaus.groovy.ast.ClassNode.genericTypeAsString(ClassNode.java:1199)
              ...
      

        Attachments

          Issue Links

            Activity

            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            The fix has been released in jenkins-2.7
            Now we need to upgrade to 2.4.7 once it gets released

            Show
            oleg_nenashev Oleg Nenashev added a comment - The fix has been released in jenkins-2.7 Now we need to upgrade to 2.4.7 once it gets released
            Hide
            daspilker Daniel Spilker added a comment -

            Follow-up PR to update to Groovy 2.4.7: https://github.com/jenkinsci/jenkins/pull/2399

            Show
            daspilker Daniel Spilker added a comment - Follow-up PR to update to Groovy 2.4.7: https://github.com/jenkinsci/jenkins/pull/2399
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Daniel Spilker
            Path:
            core/pom.xml
            http://jenkins-ci.org/commit/jenkins/96a782853eb006d76eb8eb2aad68d3046a5f9756
            Log:
            updated Groovy to 2.4.7

            follow-up for JENKINS-34751

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: core/pom.xml http://jenkins-ci.org/commit/jenkins/96a782853eb006d76eb8eb2aad68d3046a5f9756 Log: updated Groovy to 2.4.7 follow-up for JENKINS-34751
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oliver Gondža
            Path:
            core/pom.xml
            http://jenkins-ci.org/commit/jenkins/057791ca34c8f85080ca1f4957843fb7c72b615b
            Log:
            Merge pull request #2399 from daspilker/JENKINS-34751

            JENKINS-34751 updated Groovy to 2.4.7

            Compare: https://github.com/jenkinsci/jenkins/compare/f1dfc7207fc3...057791ca34c8

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: core/pom.xml http://jenkins-ci.org/commit/jenkins/057791ca34c8f85080ca1f4957843fb7c72b615b Log: Merge pull request #2399 from daspilker/ JENKINS-34751 JENKINS-34751 updated Groovy to 2.4.7 Compare: https://github.com/jenkinsci/jenkins/compare/f1dfc7207fc3...057791ca34c8
            Hide
            olivergondza Oliver Gondža added a comment -

            Backporting bump to 2.4.7 into 2.7.1 not to depend on forked build.

            Show
            olivergondza Oliver Gondža added a comment - Backporting bump to 2.4.7 into 2.7.1 not to depend on forked build.

              People

              • Assignee:
                daspilker Daniel Spilker
                Reporter:
                daspilker Daniel Spilker
              • Votes:
                2 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: