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

StackOverflowError in CpsTransformer running Declarative on JVMs with small -Xss in workflow-cps 2.33

    Details

    • Similar Issues:

      Description

      With the last update of Pipeline plugins of today, a crash occurs just after the SCM step with the crash. See the joined file for the stack.

        Attachments

        1. pluginlist.xml
          7 kB
        2. stack.txt
          78 kB
        3. visited-lines
          166 kB

          Issue Links

            Activity

            edtech Ed Ed created issue -
            Hide
            edtech Ed Ed added a comment - - edited

            I roll back the following plugins and it works :

            Pipeline: API 2.16 -> 2.15
            Pipeline: Basic Steps 2.5 -> 2.4
            Pipeline: Groovy 2.33 -> 2.32

            Show
            edtech Ed Ed added a comment - - edited I roll back the following plugins and it works : Pipeline: API 2.16 -> 2.15 Pipeline: Basic Steps 2.5 -> 2.4 Pipeline: Groovy 2.33 -> 2.32
            Hide
            jglick Jesse Glick added a comment -

            Seems to be happening during compilation, perhaps of a secondary script. Any known way to reproduce from scratch?

            Show
            jglick Jesse Glick added a comment - Seems to be happening during compilation, perhaps of a secondary script. Any known way to reproduce from scratch?
            Hide
            eckki RJE added a comment - - edited

            same problem for me(updated yesterday), i can reproduce it:

            pipeline {
             agent any
             stages {
               stage('Beispiel') {
                steps {
                  echo 'Hallo Welt'
                }
              }
             }
            
             post {
               always {
                 echo 'Ich bin immer da'
               }
             }
            }

             

            edit: Thank you Ed Ed !! rollback works also for me. (need a manuell installation, because no updates for a longer time )

            Show
            eckki RJE added a comment - - edited same problem for me(updated yesterday), i can reproduce it: pipeline { agent any stages { stage( 'Beispiel' ) { steps { echo 'Hallo Welt' } } } post { always { echo 'Ich bin immer da' } } }   edit: Thank you Ed Ed  !! rollback works also for me. (need a manuell installation, because no updates for a longer time )
            Hide
            jglick Jesse Glick added a comment -

            Most likely caused by the fix of JENKINS-26481.

            Show
            jglick Jesse Glick added a comment - Most likely caused by the fix of  JENKINS-26481 .
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Link This issue blocks JENKINS-26481 [ JENKINS-26481 ]
            Hide
            jglick Jesse Glick added a comment -

            Possibly limited to Declarative Pipeline (CC Andrew Bayer). Did not occur to me to run tests against that plugin; doing so now.

            Show
            jglick Jesse Glick added a comment - Possibly limited to Declarative Pipeline (CC Andrew Bayer ). Did not occur to me to run tests against that plugin; doing so now.
            jglick Jesse Glick made changes -
            Summary Stackoverflow with the last Pipeline plugins Stack overflow after workflow-cps update
            Component/s workflow-cps-plugin [ 21713 ]
            Component/s pipeline [ 21692 ]
            Labels pipeline regression
            Assignee Jesse Glick [ jglick ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            Hide
            jglick Jesse Glick added a comment -

            I see four flakes but no consistent failures

            Results :
            
            Flaked tests: 
            org.jenkinsci.plugins.pipeline.modeldefinition.AgentTest.agentInStageAutoCheckout(org.jenkinsci.plugins.pipeline.modeldefinition.AgentTest)
              Run 1: AgentTest.agentInStageAutoCheckout:118 » Interrupted sleep interrupted
              Run 2: PASS
            
            org.jenkinsci.plugins.pipeline.modeldefinition.BasicModelDefTest.metaStepSyntax(org.jenkinsci.plugins.pipeline.modeldefinition.BasicModelDefTest)
              Run 1: BasicModelDefTest.metaStepSyntax:191 » Interrupted sleep interrupted
              Run 2: PASS
            
            org.jenkinsci.plugins.pipeline.modeldefinition.BuildConditionResponderTest.postOnChanged(org.jenkinsci.plugins.pipeline.modeldefinition.BuildConditionResponderTest)
              Run 1: BuildConditionResponderTest.postOnChanged:83 unexpected build status; build log was:
            ------
            Started
            org.jenkinsci.plugins.scriptsecurity.scripts.UnapprovedUsageException: script not yet approved for use
            	at org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval.using(ScriptApproval.java:459)
            	at org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition.create(CpsFlowDefinition.java:109)
            	at org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition.create(CpsFlowDefinition.java:58)
            	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:215)
            	at hudson.model.ResourceController.execute(ResourceController.java:98)
            	at hudson.model.Executor.run(Executor.java:410)
            Finished: FAILURE
            
            ------
            
            Expected: is <SUCCESS>
                 but: was <FAILURE>
              Run 2: PASS
            
            org.jenkinsci.plugins.pipeline.modeldefinition.parser.ExecuteConvertedTest.testJSONToASTToGroovyExecution[Name: parallelPipelineQuoteEscaping](org.jenkinsci.plugins.pipeline.modeldefinition.parser.ExecuteConvertedTest)
              Run 1: ExecuteConvertedTest.testJSONToASTToGroovyExecution:118->executeBuild:123 » Interrupted
              Run 2: PASS
            
            
            Tests run: 904, Failures: 0, Errors: 0, Skipped: 1, Flakes: 4
            

            from

            diff --git a/pom.xml b/pom.xml
            index a4ab22c5..893963fc 100644
            --- a/pom.xml
            +++ b/pom.xml
            @@ -75,7 +75,7 @@
                   <dependency>
                     <groupId>org.jenkins-ci.plugins.workflow</groupId>
                     <artifactId>workflow-cps</artifactId>
            -        <version>2.29</version>
            +        <version>2.33</version>
                   </dependency>
                   <dependency>
                     <groupId>org.jenkins-ci.plugins.workflow</groupId>
            @@ -85,7 +85,7 @@
                   <dependency>
                     <groupId>org.jenkins-ci.plugins.workflow</groupId>
                     <artifactId>workflow-api</artifactId>
            -        <version>2.11</version>
            +        <version>2.16</version>
                   </dependency>
                   <dependency>
                     <groupId>org.jenkins-ci.plugins.workflow</groupId>
            @@ -95,12 +95,12 @@
                   <dependency>
                     <groupId>org.jenkins-ci.plugins.workflow</groupId>
                     <artifactId>workflow-scm-step</artifactId>
            -        <version>2.3</version>
            +        <version>2.4</version>
                   </dependency>
                   <dependency>
                     <groupId>org.jenkins-ci.plugins.workflow</groupId>
                     <artifactId>workflow-scm-step</artifactId>
            -        <version>2.3</version>
            +        <version>2.4</version>
                     <classifier>tests</classifier>
                   </dependency>
                   <dependency>
            @@ -142,7 +142,7 @@
                   <dependency>
                     <groupId>org.jenkins-ci.plugins</groupId>
                     <artifactId>scm-api</artifactId>
            -        <version>1.3</version>
            +        <version>2.0.8</version>
                   </dependency>
                   <dependency>
                     <groupId>org.jenkins-ci.plugins.workflow</groupId>
            @@ -200,12 +200,12 @@
                   <dependency>
                     <groupId>org.jenkins-ci.plugins.workflow</groupId>
                     <artifactId>workflow-step-api</artifactId>
            -        <version>2.9</version>
            +        <version>2.10</version>
                   </dependency>
                   <dependency>
                     <groupId>org.jenkins-ci.plugins</groupId>
                     <artifactId>structs</artifactId>
            -        <version>1.5</version>
            +        <version>1.7</version>
                   </dependency>
                   <dependency>
                     <groupId>org.mockito</groupId>
            @@ -261,7 +261,7 @@
               </build>
             
               <properties>
            -    <jenkins.version>2.7.1</jenkins.version>
            +    <jenkins.version>2.7.3</jenkins.version>
                 <java.level>7</java.level>
                 <groovy.version>2.4.7</groovy.version>
                 <concurrency>0.5C</concurrency>
            

            Will next check to see if I can reproduce manually.

            Show
            jglick Jesse Glick added a comment - I see four flakes but no consistent failures Results : Flaked tests: org.jenkinsci.plugins.pipeline.modeldefinition.AgentTest.agentInStageAutoCheckout(org.jenkinsci.plugins.pipeline.modeldefinition.AgentTest) Run 1: AgentTest.agentInStageAutoCheckout:118 » Interrupted sleep interrupted Run 2: PASS org.jenkinsci.plugins.pipeline.modeldefinition.BasicModelDefTest.metaStepSyntax(org.jenkinsci.plugins.pipeline.modeldefinition.BasicModelDefTest) Run 1: BasicModelDefTest.metaStepSyntax:191 » Interrupted sleep interrupted Run 2: PASS org.jenkinsci.plugins.pipeline.modeldefinition.BuildConditionResponderTest.postOnChanged(org.jenkinsci.plugins.pipeline.modeldefinition.BuildConditionResponderTest) Run 1: BuildConditionResponderTest.postOnChanged:83 unexpected build status; build log was: ------ Started org.jenkinsci.plugins.scriptsecurity.scripts.UnapprovedUsageException: script not yet approved for use at org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval.using(ScriptApproval.java:459) at org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition.create(CpsFlowDefinition.java:109) at org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition.create(CpsFlowDefinition.java:58) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:215) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Finished: FAILURE ------ Expected: is <SUCCESS> but: was <FAILURE> Run 2: PASS org.jenkinsci.plugins.pipeline.modeldefinition.parser.ExecuteConvertedTest.testJSONToASTToGroovyExecution[Name: parallelPipelineQuoteEscaping](org.jenkinsci.plugins.pipeline.modeldefinition.parser.ExecuteConvertedTest) Run 1: ExecuteConvertedTest.testJSONToASTToGroovyExecution:118->executeBuild:123 » Interrupted Run 2: PASS Tests run: 904, Failures: 0, Errors: 0, Skipped: 1, Flakes: 4 from diff --git a/pom.xml b/pom.xml index a4ab22c5..893963fc 100644 --- a/pom.xml +++ b/pom.xml @@ -75,7 +75,7 @@ <dependency> <groupId> org.jenkins-ci.plugins.workflow </groupId> <artifactId> workflow-cps </artifactId> - <version> 2.29 </version> + <version> 2.33 </version> </dependency> <dependency> <groupId> org.jenkins-ci.plugins.workflow </groupId> @@ -85,7 +85,7 @@ <dependency> <groupId> org.jenkins-ci.plugins.workflow </groupId> <artifactId> workflow-api </artifactId> - <version> 2.11 </version> + <version> 2.16 </version> </dependency> <dependency> <groupId> org.jenkins-ci.plugins.workflow </groupId> @@ -95,12 +95,12 @@ <dependency> <groupId> org.jenkins-ci.plugins.workflow </groupId> <artifactId> workflow-scm-step </artifactId> - <version> 2.3 </version> + <version> 2.4 </version> </dependency> <dependency> <groupId> org.jenkins-ci.plugins.workflow </groupId> <artifactId> workflow-scm-step </artifactId> - <version> 2.3 </version> + <version> 2.4 </version> <classifier> tests </classifier> </dependency> <dependency> @@ -142,7 +142,7 @@ <dependency> <groupId> org.jenkins-ci.plugins </groupId> <artifactId> scm-api </artifactId> - <version> 1.3 </version> + <version> 2.0.8 </version> </dependency> <dependency> <groupId> org.jenkins-ci.plugins.workflow </groupId> @@ -200,12 +200,12 @@ <dependency> <groupId> org.jenkins-ci.plugins.workflow </groupId> <artifactId> workflow-step-api </artifactId> - <version> 2.9 </version> + <version> 2.10 </version> </dependency> <dependency> <groupId> org.jenkins-ci.plugins </groupId> <artifactId> structs </artifactId> - <version> 1.5 </version> + <version> 1.7 </version> </dependency> <dependency> <groupId> org.mockito </groupId> @@ -261,7 +261,7 @@ </build> <properties> - <jenkins.version> 2.7.1 </jenkins.version> + <jenkins.version> 2.7.3 </jenkins.version> <java.level> 7 </java.level> <groovy.version> 2.4.7 </groovy.version> <concurrency> 0.5C </concurrency> Will next check to see if I can reproduce manually.
            Hide
            jglick Jesse Glick added a comment -

            Nope, started 2.46.3 on a fresh home directory using JDK 8, installed Pipeline from the setup wizard, created a new Pipeline job, pasted in the script as supplied by RJE, and clicked Build Now, and got

            Started by user admin
            [Pipeline] node
            Running on master in …
            [Pipeline] {
            [Pipeline] stage
            [Pipeline] { (Beispiel)
            [Pipeline] echo
            Hallo Welt
            [Pipeline] }
            [Pipeline] // stage
            [Pipeline] stage
            [Pipeline] { (Declarative: Post Actions)
            [Pipeline] echo
            Ich bin immer da
            [Pipeline] }
            [Pipeline] // stage
            [Pipeline] }
            [Pipeline] // node
            [Pipeline] End of Pipeline
            Finished: SUCCESS
            

            as expected. Is there something else I need to do in order to reproduce this?

            Show
            jglick Jesse Glick added a comment - Nope, started 2.46.3 on a fresh home directory using JDK 8, installed Pipeline from the setup wizard, created a new Pipeline job, pasted in the script as supplied by RJE , and clicked Build Now , and got Started by user admin [Pipeline] node Running on master in … [Pipeline] { [Pipeline] stage [Pipeline] { (Beispiel) [Pipeline] echo Hallo Welt [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Declarative: Post Actions) [Pipeline] echo Ich bin immer da [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline Finished: SUCCESS as expected. Is there something else I need to do in order to reproduce this?
            Hide
            jglick Jesse Glick added a comment -

            Just to make sure I was running with the fix active, I also successfully tried this script:

            node {
              [1, 2, 3].each {x ->
                sh "sleep $x"
              }
            }
            Show
            jglick Jesse Glick added a comment - Just to make sure I was running with the fix active, I also successfully tried this script: node { [1, 2, 3].each {x -> sh "sleep $x" } }
            Hide
            jglick Jesse Glick added a comment -

            Even without being able to reproduce, it seems that it would be wise to convert CpsTransformer from Groovy to Java for performance and debuggability and type safety and general sanity reasons. AFAIK there is no particular reason we need to pay the cost of using Groovy for internal code.

            Show
            jglick Jesse Glick added a comment - Even without being able to reproduce, it seems that it would be wise to convert CpsTransformer  from Groovy to Java for performance and debuggability and type safety and general sanity reasons. AFAIK there is no particular reason we need to pay the cost of using Groovy for internal code.
            eckki RJE made changes -
            Attachment pluginlist.xml [ 38205 ]
            Hide
            eckki RJE added a comment -

            pluginlist.xml

             

            Do you need any further information from me?

            Show
            eckki RJE added a comment - pluginlist.xml   Do you need any further information from me?
            bonuspunkt Robert Zach made changes -
            Link This issue is duplicated by JENKINS-44617 [ JENKINS-44617 ]
            Hide
            edtech Ed Ed added a comment -

            I use Multibranch Project, with pipeline configuration in the Jenkinsfile in each branch of my repository.

            The first step in my Jenkinsfile is :

            pipeline {
              agent any
              stages {
                stage('Extraction révision SVN') {
                  steps {
                    script {
                      bat(script: 'svn cleanup --remove-unversioned --remove-ignored', encoding: 'cp850')
                      env.SVN_REVISION = bat (script: '@echo off\n./Resources/SVNRevision.bat', encoding: 'cp850', returnStdout: true).trim().split(':')[1].split('M')[0]
                      env.VERSION = '2.2.0.' + env.SVN_REVISION
                      env.VERSION_STRING = '"2,2,0,' + env.SVN_REVISION + '"'
                      env.Configuration = 'Debug'
                    }
                 }
              }
            

            The log file is :

            Branch indexing
            Opening connection to https://xxx/svn/project/
            Checking out svn https://xxx/svn/project/trunk to read Jenkinsfile
            Checking out a fresh workspace because C:\Program Files (x86)\Jenkins\workspace\Project_trunk-AR6UGOS5FSECYEHFCVFNFSEGWO4ZJAMAAV5YHIOFB7S3SKFWMK6Q@script doesn't exist
            Cleaning local Directory .
            Checking out https://xxx/svn/project/trunk at revision 4686
            ...
            At revision 4686
            
            [Pipeline] End of Pipeline
            ...The crash occurs here...
            Show
            edtech Ed Ed added a comment - I use Multibranch Project, with pipeline configuration in the Jenkinsfile in each branch of my repository. The first step in my Jenkinsfile is : pipeline { agent any stages { stage( 'Extraction révision SVN' ) { steps { script { bat(script: 'svn cleanup --remove-unversioned --remove-ignored' , encoding: 'cp850' ) env.SVN_REVISION = bat (script: '@echo off\n./Resources/SVNRevision.bat' , encoding: 'cp850' , returnStdout: true ).trim().split( ':' )[1].split( 'M' )[0] env.VERSION = '2.2.0.' + env.SVN_REVISION env.VERSION_STRING = ' "2,2,0,' + env.SVN_REVISION + '" ' env.Configuration = 'Debug' } } } The log file is : Branch indexing Opening connection to https: //xxx/svn/project/ Checking out svn https: //xxx/svn/project/trunk to read Jenkinsfile Checking out a fresh workspace because C:\Program Files (x86)\Jenkins\workspace\Project_trunk-AR6UGOS5FSECYEHFCVFNFSEGWO4ZJAMAAV5YHIOFB7S3SKFWMK6Q@script doesn't exist Cleaning local Directory . Checking out https: //xxx/svn/project/trunk at revision 4686 ... At revision 4686 [Pipeline] End of Pipeline ...The crash occurs here...
            Hide
            jglick Jesse Glick added a comment -

            I do not know how to reproduce this, and until i can, no fix is likely to be forthcoming. So anyone who sees this, please try to find a way to reproduce the problem from scratch in a fresh Jenkins installation using precise and minimal steps, as in my failed attempt above.

            Show
            jglick Jesse Glick added a comment - I do not know how to reproduce this, and until i can, no fix is likely to be forthcoming. So anyone who sees this, please try to find a way to reproduce the problem from scratch in a fresh Jenkins installation using precise and minimal steps, as in my failed attempt above.
            Hide
            irish_paul Paul Carter added a comment -

            I have had exactly the same issue today on a fresh install of jenkins on a new Windows 2012 datacenter VM.

            This is the full list of steps:

            • Create new Windows 2012 VM and added IIS feature
            • Install Java SE 8u131 RE
            • Install latest dotnet core SDK
            • Install NodeJS
            • Install Angular CLI globally:  npm install -g @angular/cli
            • installed some other tools:
              • Kiln client
              • VS Code
              • Sublime Text
            • Install Jenkins 2.46.3 from the windows installer
            • Installed all the default plugins on initial launch
            • Installed latest versions of 
              • HTML Publisher
              • Pipeline NPM Integration
              • Slack notification
              • Mercurial
            • Added SCM credentials and Slack token credentials

            I then created a declarative pipeline job that made use of the SCM and Slack credentials.  When it failed, I ran RJE's pipeline script posted above and it failed as well.
            pipeline {
            agent any
            stages {
            stage('Beispiel') {
            steps {
            echo 'Hallo Welt'
            }
            }
            }

            post {
            always {
            echo 'Ich bin immer da'
            }
            }
            }
             

            Rolling back the plugins fixed it

            Pipeline: API 2.16 -> 2.15
            Pipeline: Basic Steps 2.5 -> 2.4
            Pipeline: Groovy 2.33 -> 2.32

            Show
            irish_paul Paul Carter added a comment - I have had exactly the same issue today on a fresh install of jenkins on a new Windows 2012 datacenter VM. This is the full list of steps: Create new Windows 2012 VM and added IIS feature Install Java SE 8u131 RE Install latest dotnet core SDK Install NodeJS Install Angular CLI globally:  npm install -g @angular/cli installed some other tools: Kiln client VS Code Sublime Text Install Jenkins 2.46.3 from the windows installer Installed all the default plugins on initial launch Installed latest versions of  HTML Publisher Pipeline NPM Integration Slack notification Mercurial Added SCM credentials and Slack token credentials I then created a declarative pipeline job that made use of the SCM and Slack credentials.  When it failed, I ran RJE's pipeline script posted above and it failed as well. pipeline { agent any stages { stage('Beispiel') { steps { echo 'Hallo Welt' } } } post { always { echo 'Ich bin immer da' } } }   Rolling back the plugins fixed it Pipeline: API 2.16 -> 2.15 Pipeline: Basic Steps 2.5 -> 2.4 Pipeline: Groovy 2.33 -> 2.32
            Hide
            jglick Jesse Glick added a comment -

            No luck reproducing (on Linux) with the plugin set mentioned by Paul Carter. Will check on Windows in case it is platform-specific.

            Show
            jglick Jesse Glick added a comment - No luck reproducing (on Linux) with the plugin set mentioned by Paul Carter . Will check on Windows in case it is platform-specific.
            Hide
            edtech Ed Ed added a comment -

            I have Jenkins installed on Windows Server 2016, maybe a bug specific with Windows, not with Linux?

            Show
            edtech Ed Ed added a comment - I have Jenkins installed on Windows Server 2016, maybe a bug specific with Windows, not with Linux?
            Hide
            jglick Jesse Glick added a comment -

            Ha! Reproduced on a default installation in Windows 10. So it does look to be platform-specific, though I have no clue why the platform would matter for this code. Will try to diagnose better.

            Show
            jglick Jesse Glick added a comment - Ha! Reproduced on a default installation in Windows 10. So it does look to be platform-specific, though I have no clue why the platform would matter for this code. Will try to diagnose better.
            Hide
            jglick Jesse Glick added a comment -

            Reproduces with minimal Declarative (but not scripted)

            pipeline {
                agent any
                stages {
                    stage('x') {
                        steps {
                            echo 'OK'
                        }
                    }
                }
            }
            

            with only Pipeline: Model Definition and its dependencies enabled. Next, to check whether functional tests reproduce it when run on Windows.

            Show
            jglick Jesse Glick added a comment - Reproduces with minimal Declarative (but not scripted) pipeline { agent any stages { stage( 'x' ) { steps { echo 'OK' } } } } with only Pipeline: Model Definition and its dependencies enabled. Next, to check whether functional tests reproduce it when run on Windows.
            jglick Jesse Glick made changes -
            Summary Stack overflow after workflow-cps update StackOverflowError in CpsTransformer running Declarative on Windows in workflow-cps 2.33
            jglick Jesse Glick made changes -
            Labels regression regression windows
            Hide
            jglick Jesse Glick added a comment -

            Hard to say. The tests are not generally runnable on Windows it seems Andrew Bayer. I did run some representative ones which did not attempt to run sh steps or whatever, and they passed. There appear to be no tests in acceptance-test-harness using Declarative.

            Show
            jglick Jesse Glick added a comment - Hard to say. The tests are not generally runnable on Windows it seems Andrew Bayer . I did run some representative ones which did not attempt to run sh steps or whatever, and they passed. There appear to be no tests in acceptance-test-harness using Declarative.
            Hide
            jglick Jesse Glick added a comment -

            Hmm, can reproduce in Windows 10 using java -jar jenkins.war using JDK 8u66 (that bundled in the Windows installer currently) but not 8u131. Yet Paul Carter claims to have seen this with 8u131. Are you sure Jenkins was really running that? Check /systemInfo. And note that the Windows installer apparently ignores the currently installed JDK.

            I am going to check whether this problem is reproducible using obsolete JDK versions on Linux.

            Show
            jglick Jesse Glick added a comment - Hmm, can reproduce in Windows 10 using  java -jar jenkins.war  using JDK 8u66 (that bundled in the Windows installer currently) but not 8u131. Yet Paul Carter claims to have seen this with 8u131. Are you sure Jenkins was really running that? Check /systemInfo . And note that the Windows installer apparently ignores the currently installed JDK. I am going to check whether this problem is reproducible using obsolete JDK versions on Linux.
            Hide
            jglick Jesse Glick added a comment - - edited

            Unfortunately I cannot reproduce on Linux even using 8u66, which does not support the hypothesis that this is purely a matter of a bug in some obsolete Java builds.

            Show
            jglick Jesse Glick added a comment - - edited Unfortunately I cannot reproduce on Linux even using 8u66, which does not support the hypothesis that this is purely a matter of a bug in some obsolete Java builds.
            Hide
            jglick Jesse Glick added a comment -

            And on Windows it only fails when using the JRE bundled in the installer. Not using a downloaded JDK 8u66. ??

            Show
            jglick Jesse Glick added a comment - And on Windows it only fails when using the JRE bundled in the installer. Not using a downloaded JDK 8u66. ??
            Hide
            jglick Jesse Glick added a comment -

            Apparently because the bundled JRE is a 32-bit client JVM whereas I had downloaded a 64-bit server JVM. If I download the 32-bit JDK for Windows I can see the failure.

            Finally I can see the error on Linux, using JDK 8u66 in a 32-bit download (though not passing -client, so using the server JVM). Yet a 32-bit 8u131 is fine, and when I go back to the 32-bit 8u66 it works too. So perhaps it occurs only under some nondeterministic conditions.

            Show
            jglick Jesse Glick added a comment - Apparently because the bundled JRE is a 32-bit client JVM whereas I had downloaded a 64-bit server JVM. If I download the 32-bit JDK for Windows I can see the failure. Finally I can see the error on Linux, using JDK 8u66 in a 32-bit download (though not passing -client , so using the server JVM). Yet a 32-bit 8u131 is fine, and when I go back to the 32-bit 8u66 it works too. So perhaps it occurs only under some nondeterministic conditions.
            jglick Jesse Glick made changes -
            Attachment visited-lines [ 38217 ]
            Hide
            jglick Jesse Glick added a comment -

            Attaching list of calls being made to CpsTransformer.visit(ASTNode). Does not really look like an infinite loop of any kind; just like a lot of recursion, which sometimes bombs out. Indeed when I run on the 32-bit Windows JRE but add -Xss4m it works. So I think the changes made in 2.33 just used deeper calls than before, and on JVMs with small defaults from ergonomics, that was the frame that broke the camel’s stack.

            Show
            jglick Jesse Glick added a comment - Attaching list of calls being made to CpsTransformer.visit(ASTNode) . Does not really look like an infinite loop of any kind; just like a lot of recursion, which sometimes bombs out. Indeed when I run on the 32-bit Windows JRE but add -Xss4m it works. So I think the changes made in 2.33 just used deeper calls than before, and on JVMs with small defaults from ergonomics, that was the frame that broke the camel’s stack.
            Hide
            jglick Jesse Glick added a comment -

            Andrew Bayer so it looks like it exploded somewhere around here. Just look at that indentation!

            Show
            jglick Jesse Glick added a comment - Andrew Bayer so it looks like it exploded somewhere around here . Just look at that indentation!
            jglick Jesse Glick made changes -
            Remote Link This issue links to "workflow-cps PR 140 (Web Link)" [ 16950 ]
            jglick Jesse Glick made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            jglick Jesse Glick made changes -
            Summary StackOverflowError in CpsTransformer running Declarative on Windows in workflow-cps 2.33 StackOverflowError in CpsTransformer running Declarative on JVMs with small -Xss in workflow-cps 2.33
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            http://jenkins-ci.org/commit/workflow-cps-plugin/0595328fc0ba6fc8743ea67937c6da2386156d6e
            Log:
            Merge pull request #140 from jglick/StackOverflowError-JENKINS-44578

            JENKINS-44578 Use native CpsTransformer

            Compare: https://github.com/jenkinsci/workflow-cps-plugin/compare/875d2bc36582...0595328fc0ba

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml http://jenkins-ci.org/commit/workflow-cps-plugin/0595328fc0ba6fc8743ea67937c6da2386156d6e Log: Merge pull request #140 from jglick/StackOverflowError- JENKINS-44578 JENKINS-44578 Use native CpsTransformer Compare: https://github.com/jenkinsci/workflow-cps-plugin/compare/875d2bc36582...0595328fc0ba
            jglick Jesse Glick made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-44607 [ JENKINS-44607 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-42227 [ JENKINS-42227 ]

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                edtech Ed Ed
              • Votes:
                4 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: