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

Wrong status for Matrix jobs when using "Execute concurrent builds if necessary" and "Set Build Name"

    Details

    • Similar Issues:

      Description

      Seen with Jenkins ver. 1.548

      Can be reproduced easily by creating a basic matrix job:
      AXIS_A: A1 A2
      AXIS_B: B1 B2 B3 B4

      And setting:
      Execute concurrent builds if necessary: True
      Set Build Name: 123456 #${BUILD_NUMBER}
      (Instead of 123456, we typically set the SCM Change ID)

      As a build step:
      Execute Shell: "sleep 30"

      Fire 2 or 3 times "Build Now"

      All the configurations should have a SUCCESS status and the global status should be SUCCESS too.

      But, even if all the configurations' consoles tell "Finished: SUCCESS", some of them get a red ball failure icon anyway. And the global console tells, for example:
      "A1,B1 completed with result FAILURE"
      Then, the global status is FAILED, while all the configurations succeeded!

      It works again if either of the options "Set Build Name" or "Execute concurrent builds if necessary" is removed.

        Attachments

          Activity

          Hide
          joeyharrington Joey Harrington added a comment -

          We are also seeing this same bug causing false failures in our Jenkins multiconfiguration jobs. I can reproduce this in the plugin dev environment for Jenkins 1.532.2 with no other additional plugins installed except for build-name-setter.

          Our settings are almost exactly as Benoit described, but can be simplified to just a single configuration:

          User-defined axis:

          {name: "Axis", values: "default"}

          Execute concurrent builds if necessary: True
          Set build name: "Example"
          Execute shell: "sleep 5 && exit 0"

          I can click "Build now" on this build several times in a row and usually all but the final run fails. I'm attaching a screenshot of the job with a "SUCCESS" message and a red failure ball.

          I've narrowed this down to the setDisplayName() call on line 37 of BuildNameSetter.java (the call in BuildNameSetter#setUp) by commenting out that line and confirming that this bug no longer occurs.

          Show
          joeyharrington Joey Harrington added a comment - We are also seeing this same bug causing false failures in our Jenkins multiconfiguration jobs. I can reproduce this in the plugin dev environment for Jenkins 1.532.2 with no other additional plugins installed except for build-name-setter. Our settings are almost exactly as Benoit described, but can be simplified to just a single configuration: User-defined axis: {name: "Axis", values: "default"} Execute concurrent builds if necessary: True Set build name: "Example" Execute shell: "sleep 5 && exit 0" I can click "Build now" on this build several times in a row and usually all but the final run fails. I'm attaching a screenshot of the job with a "SUCCESS" message and a red failure ball. I've narrowed this down to the setDisplayName() call on line 37 of BuildNameSetter.java (the call in BuildNameSetter#setUp) by commenting out that line and confirming that this bug no longer occurs.
          Hide
          joeyharrington Joey Harrington added a comment -

          I am unable to reproduce this issue on Jenkins 1.561.

          Show
          joeyharrington Joey Harrington added a comment - I am unable to reproduce this issue on Jenkins 1.561.
          Hide
          benoit_belbezet Benoit Belbezet added a comment -

          Thanks Joey for your investigations. (Sorry just seen your comments yesterday. For some reason I had not received any notification by email...)
          I've moved to the latest Jenkins version 1.568 and I confirm that it's fixed now.

          Show
          benoit_belbezet Benoit Belbezet added a comment - Thanks Joey for your investigations. (Sorry just seen your comments yesterday. For some reason I had not received any notification by email...) I've moved to the latest Jenkins version 1.568 and I confirm that it's fixed now.
          Hide
          benoit_belbezet Benoit Belbezet added a comment -

          Unable to reproduce / fixed since at least Jenkins 1.561.
          Closing

          Show
          benoit_belbezet Benoit Belbezet added a comment - Unable to reproduce / fixed since at least Jenkins 1.561. Closing
          Hide
          benoit_belbezet Benoit Belbezet added a comment -

          Verified. Closing.

          Show
          benoit_belbezet Benoit Belbezet added a comment - Verified. Closing.

            People

            • Assignee:
              kohsuke Kohsuke Kawaguchi
              Reporter:
              benoit_belbezet Benoit Belbezet
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: