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

Pipeline library with method name matching synthetic accessor crashes Jenkins

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • Jenkins 2.32.1
      workflow-cps 2.24 (and other plugins up to date)
      Oracle Java 1.7.0_111
      Debian 8

      I managed to program my pipeline library so that it leads to the Jenkins job eating up all CPU, OOMing and successfully still surviving any restarts or requests to stop the job.

      The following Jenkins file should help you to reproduce this:

      @Library('github.com/TYPO3-infrastructure/jenkins-pipeline-global-library-chefci@bug-git-reflist-hang')
      def dummy
      org.typo3.chefci.v2.Pipeline.builder(this, steps)
      	.buildDefaultPipeline()
      	.execute()
      

      This code here defines a method setKitchenLocalYmlName() which matches the synthetic accessor's name of the kitchenLocalYmlName class variable (a thing, of which I wasn't aware of).

      This seems to be something that Jenkins cannot handle. Renaming the method or variable solves the problem.

      The error occurs immediately after checking out the code (I thought it was during git ref-list parsing, that's why the branch is called like this).

          [JENKINS-41412] Pipeline library with method name matching synthetic accessor crashes Jenkins

          Steffen Gebert created issue -
          Steffen Gebert made changes -
          Description Original: I managed to program my pipeline library so that it leads to the Jenkins job eating up all CPU, OOMing and successfully still surviving any restarts or requests to stop the job.

          The following Jenkins file should help you to reproduce this:

          {{@Library('github.com/TYPO3-infrastructure/jenkins-pipeline-global-library-chefci@bug-git-reflist-hang')
          def dummy
          org.typo3.chefci.v2.Pipeline.builder(this, steps)
          .buildDefaultPipeline()
          .execute()}}

          This code [here|https://github.com/TYPO3-infrastructure/jenkins-pipeline-global-library-chefci/blob/688cdd1be568a71fd5b226432efc6f2332ce7b03/src/org/typo3/chefci/v2/stages/Acceptance.groovy#L9-L22] defines a method _setKitchenLocalYmlName()_ which matches the synthetic accessor's name of the _kitchenLocalYmlName_ class variable (a thing, of which I wasn't aware of).

          This seems to be something that Jenkins cannot handle. Renaming the method or variable solves the problem.

          The error occurs immediately after checking out the code (I thought it was during {{git ref-list}} parsing, that's why the branch is called like this).
          New: I managed to program my pipeline library so that it leads to the Jenkins job eating up all CPU, OOMing and successfully still surviving any restarts or requests to stop the job.

          The following Jenkins file should help you to reproduce this:

          {{
          @Library('github.com/TYPO3-infrastructure/jenkins-pipeline-global-library-chefci@bug-git-reflist-hang')
          def dummy
          org.typo3.chefci.v2.Pipeline.builder(this, steps)
          .buildDefaultPipeline()
          .execute()
          }}

          This code [here|https://github.com/TYPO3-infrastructure/jenkins-pipeline-global-library-chefci/blob/688cdd1be568a71fd5b226432efc6f2332ce7b03/src/org/typo3/chefci/v2/stages/Acceptance.groovy#L9-L22] defines a method _setKitchenLocalYmlName()_ which matches the synthetic accessor's name of the _kitchenLocalYmlName_ class variable (a thing, of which I wasn't aware of).

          This seems to be something that Jenkins cannot handle. Renaming the method or variable solves the problem.

          The error occurs immediately after checking out the code (I thought it was during {{git ref-list}} parsing, that's why the branch is called like this).
          Steffen Gebert made changes -
          Description Original: I managed to program my pipeline library so that it leads to the Jenkins job eating up all CPU, OOMing and successfully still surviving any restarts or requests to stop the job.

          The following Jenkins file should help you to reproduce this:

          {{
          @Library('github.com/TYPO3-infrastructure/jenkins-pipeline-global-library-chefci@bug-git-reflist-hang')
          def dummy
          org.typo3.chefci.v2.Pipeline.builder(this, steps)
          .buildDefaultPipeline()
          .execute()
          }}

          This code [here|https://github.com/TYPO3-infrastructure/jenkins-pipeline-global-library-chefci/blob/688cdd1be568a71fd5b226432efc6f2332ce7b03/src/org/typo3/chefci/v2/stages/Acceptance.groovy#L9-L22] defines a method _setKitchenLocalYmlName()_ which matches the synthetic accessor's name of the _kitchenLocalYmlName_ class variable (a thing, of which I wasn't aware of).

          This seems to be something that Jenkins cannot handle. Renaming the method or variable solves the problem.

          The error occurs immediately after checking out the code (I thought it was during {{git ref-list}} parsing, that's why the branch is called like this).
          New: I managed to program my pipeline library so that it leads to the Jenkins job eating up all CPU, OOMing and successfully still surviving any restarts or requests to stop the job.

          The following Jenkins file should help you to reproduce this:

          {noformat}
          @Library('github.com/TYPO3-infrastructure/jenkins-pipeline-global-library-chefci@bug-git-reflist-hang')
          def dummy
          org.typo3.chefci.v2.Pipeline.builder(this, steps)
          .buildDefaultPipeline()
          .execute()
          {noformat}

          This code [here|https://github.com/TYPO3-infrastructure/jenkins-pipeline-global-library-chefci/blob/688cdd1be568a71fd5b226432efc6f2332ce7b03/src/org/typo3/chefci/v2/stages/Acceptance.groovy#L9-L22] defines a method {{setKitchenLocalYmlName()}} which matches the synthetic accessor's name of the {{kitchenLocalYmlName}} class variable (a thing, of which I wasn't aware of).

          This seems to be something that Jenkins cannot handle. Renaming the method or variable solves the problem.

          The error occurs immediately after checking out the code (I thought it was during {{git ref-list}} parsing, that's why the branch is called like this).

          I've updated the branch to not kill my jenkins installation, so please use commit 688cdd1 to reproduce this.

          Steffen Gebert added a comment - I've updated the branch to not kill my jenkins installation, so please use commit 688cdd1 to reproduce this.
          Jesse Glick made changes -
          Link New: This issue duplicates JENKINS-31484 [ JENKINS-31484 ]
          Jesse Glick made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            Unassigned Unassigned
            stephenking Steffen Gebert
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: