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

Endless loop when evaluating environment variables

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • versionnumber-plugin
    • Jenkins ver. 1.580.3
      Version Number Plug-In 1.4.1
      Parameterized Trigger plugin 2.25

      Recreation

      Have 2 jobs:
      Job 1 triggers Job 2 using the "Trigger/call builds on other projects"
      Uses "Predefined parameter": test_loop=${test_loop}

      Job 2 uses "Create a formatted version number" where:
      "Environment Variable Name": test_loop
      "Version Number Format String": ${test_loop}

      Outcome

      This causes the Job 2 to be stuck in an endless loop as test_loop keeps getting translated into ${test_loop} and tries to be translated again and again...

      threadDump looks as follows:

       Executor #0 for master : executing test_endless_loop #5
      "Executor #0 for master : executing test_endless_loop #5" Id=116 Group=main RUNNABLE
      	at org.jvnet.hudson.tools.versionnumber.VersionNumberBuilder.formatVersionNumber(VersionNumberBuilder.java:341)
      	at org.jvnet.hudson.tools.versionnumber.VersionNumberBuilder.setUp(VersionNumberBuilder.java:364)
      ...
      

      I stumbled on this by accident and this configuration should be avoided, but still it causes a job to be stuck in an endless loop which could not be stopped.
      Stopping it was only by restarting the server.

          [JENKINS-26729] Endless loop when evaluating environment variables

          Jason W created issue -
          Jason W made changes -
          Description Original: h5.Recreation
          Have 2 jobs:
          Job 1 triggers Job 2 using the "Trigger/call builds on other projects"
          Uses "Predefined parameter": test_loop=${test_loop}

          Job 2 uses "Create a formatted version number" where:
          "Environment Variable Name": test_loop
          "Version Number Format String": ${test_loop}

          h5.Outcome
          This causes the Job 2 to be stuck in an endless loop as test_loop keeps getting translated into ${test_loop} and tries to be translated again and again...

          threadDump looks as follows:
          {code} Executor #0 for master : executing test_endless_loop #5
          "Executor #0 for master : executing test_endless_loop #5" Id=116 Group=main RUNNABLE
          at org.jvnet.hudson.tools.versionnumber.VersionNumberBuilder.formatVersionNumber(VersionNumberBuilder.java:341)
          at org.jvnet.hudson.tools.versionnumber.VersionNumberBuilder.setUp(VersionNumberBuilder.java:364)
          ...
          {code}

          I stumbled on this by accident and this configuration should be avoided, but still it cause a job to be stuck in an endless loop which could not be stopped.
          Stopping it was only by restarting the server.


          New: h5.Recreation
          Have 2 jobs:
          Job 1 triggers Job 2 using the "Trigger/call builds on other projects"
          Uses "Predefined parameter": test_loop=${test_loop}

          Job 2 uses "Create a formatted version number" where:
          "Environment Variable Name": test_loop
          "Version Number Format String": ${test_loop}

          h5.Outcome
          This causes the Job 2 to be stuck in an endless loop as test_loop keeps getting translated into ${test_loop} and tries to be translated again and again...

          threadDump looks as follows:
          {code} Executor #0 for master : executing test_endless_loop #5
          "Executor #0 for master : executing test_endless_loop #5" Id=116 Group=main RUNNABLE
          at org.jvnet.hudson.tools.versionnumber.VersionNumberBuilder.formatVersionNumber(VersionNumberBuilder.java:341)
          at org.jvnet.hudson.tools.versionnumber.VersionNumberBuilder.setUp(VersionNumberBuilder.java:364)
          ...
          {code}

          I stumbled on this by accident and this configuration should be avoided, but still it causes a job to be stuck in an endless loop which could not be stopped.
          Stopping it was only by restarting the server.


          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 160806 ] New: JNJira + In-Review [ 180494 ]
          Deniz Bahadir made changes -
          Assignee New: Deniz Bahadir [ bahadir ]
          Deniz Bahadir made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            bahadir Deniz Bahadir
            jasonw Jason W
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: