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

Duplicate build numbers in the Build History

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • build-pipeline-plugin
    • Operating System: Linux-CentOS, Windows Server 2003 64bit
      gcc version: 4.4.4

      I have recently upgraded hudson to latest jenkins(1.437 and later to 1.439). Ofcourse the migration went pretty smooth, but recently I started facing a problem related the existing build numbers of one particular job. In the Build history(left sidebar of any job page) I am
      seeing duplicate build numbers. Check the first attachment named "duplicate_build_numbers". When you reload the same job page, it displays only one unique build and no duplicate builds. But after a few seconds(may be 3 or 4 secs) the duplicate build is coming up.

      I checked the "builds" directory related to that job and found only one directory related to the build. For the build mentioned in the
      figure I saw only one directory named: "2011-10-16_01-06-08"

      So is there any issue in the way Build History is shown to the users or Am I missing anything ?

          [JENKINS-11853] Duplicate build numbers in the Build History

          Still happens in Jenkins 1.455. Can someone please look into it? What information is needed to get this issue fixed?

          Maximilian Kernbach added a comment - Still happens in Jenkins 1.455. Can someone please look into it? What information is needed to get this issue fixed?

          Igor Mayanov added a comment -

          There is much more serious issue visible on the screenshot - take a look at build dates! Build shown as #44 has wrong number - it was built more than 1 month earlier than builds #42 and #43. Actually this build has different number (maybe 41 or even smaller), but it was later re-assigned to number 44 because of strange mistake. Please notice - latest build for this job is #43, and it was built successfully, however Jenkins displays this job as failed in the jobs list. We observe this error on our Jenkins build environment (RHEL 6.1) for a few months, it still happens even in the newest Jenkins release 1.460. This happens not too often, without any specific time or environment conditions. Can somebody investigate what happens with Jenkins builds numbering, please?

          Igor Mayanov added a comment - There is much more serious issue visible on the screenshot - take a look at build dates! Build shown as #44 has wrong number - it was built more than 1 month earlier than builds #42 and #43. Actually this build has different number (maybe 41 or even smaller), but it was later re-assigned to number 44 because of strange mistake. Please notice - latest build for this job is #43, and it was built successfully, however Jenkins displays this job as failed in the jobs list. We observe this error on our Jenkins build environment (RHEL 6.1) for a few months, it still happens even in the newest Jenkins release 1.460. This happens not too often, without any specific time or environment conditions. Can somebody investigate what happens with Jenkins builds numbering, please?

          Igor Mayanov added a comment -

          Please read my comment - there is not only build duplication in the list but serious mistake with builds numbering - old build from the past is shown with a number bigger than the latest build. Failed builds may look like successful in the jobs list and vice versa, user who wants to look at the latest build log clicks on the top build in the list and actually looks at old build, so I'm escalating this bug priority to Critical.

          Igor Mayanov added a comment - Please read my comment - there is not only build duplication in the list but serious mistake with builds numbering - old build from the past is shown with a number bigger than the latest build. Failed builds may look like successful in the jobs list and vice versa, user who wants to look at the latest build log clicks on the top build in the list and actually looks at old build, so I'm escalating this bug priority to Critical.

          alexlombardi added a comment -

          Seeing this issue in Jenkins 1.463 with a job that has a single build entry when running a Master-Slave setup as a Windows service. Have a single build in the folder but the entry appears twice in the Build History box (build was successful in my case though and is really old) in Jenkins about 5 seconds after I have navigated into the appplication and try to look at build details (it is NOT there immediately). Do not see this happen with any other projects but this one.

          alexlombardi added a comment - Seeing this issue in Jenkins 1.463 with a job that has a single build entry when running a Master-Slave setup as a Windows service. Have a single build in the folder but the entry appears twice in the Build History box (build was successful in my case though and is really old) in Jenkins about 5 seconds after I have navigated into the appplication and try to look at build details (it is NOT there immediately). Do not see this happen with any other projects but this one.

          Maximilian Kernbach added a comment - - edited

          Still occurs in Jenkins v1.472. So.. as I asked three months ago.. What information are needed that we can fix this annoying bug? Jenkins is currently not usable for me. (I'm only using 3 "broken" projects instead of 20-25 as I want to)

          Maximilian Kernbach added a comment - - edited Still occurs in Jenkins v1.472. So.. as I asked three months ago.. What information are needed that we can fix this annoying bug? Jenkins is currently not usable for me. (I'm only using 3 "broken" projects instead of 20-25 as I want to)

          Maximilian Kernbach added a comment - - edited

          (Comment to Attachment Broken Build History.jpg)
          Current Build-Numbers :
          Server: # 51
          Gerrit DevTest Build #793
          Project "Nightly DevTest Build" is DEACTIVATED, but also showing up on build history!

          Maximilian Kernbach added a comment - - edited (Comment to Attachment Broken Build History.jpg) Current Build-Numbers : Server: # 51 Gerrit DevTest Build #793 Project "Nightly DevTest Build" is DEACTIVATED, but also showing up on build history!

          Can you please confirm if this has been fixed using a different Bug# if yes, do you know the number? Thanks.

          Eduardo Aranega added a comment - Can you please confirm if this has been fixed using a different Bug# if yes, do you know the number? Thanks.

          Over in JENKINS-15156 I mentioned I wrote a tool in ruby for analyzing and fixed build history problems: https://github.com/docwhat/jenkins-job-checker

          If you run jobber.rb with --solve it'll try to fix problems, otherwise it just prints out how it would have solved the problem (in addition of a description of the problem(s)).

          You have to restart Jenkins (or better yet, run it while Jenkins is down) afterwards. A "reload from disk" may also work instead as well.

          Christian Höltje added a comment - Over in JENKINS-15156 I mentioned I wrote a tool in ruby for analyzing and fixed build history problems: https://github.com/docwhat/jenkins-job-checker If you run jobber.rb with --solve it'll try to fix problems, otherwise it just prints out how it would have solved the problem (in addition of a description of the problem(s)). You have to restart Jenkins (or better yet, run it while Jenkins is down) afterwards. A "reload from disk" may also work instead as well.

          We had the same issue on v1.480.3.
          My analyzis showed the following:
          The actual job was copied via the Jenkins UI.
          After a Jenkins reboot the wrong job history showed up.
          This wrong history was the old history from the original Job.
          The build folder of the new job practically contained the build history of the original and the new job.
          Since the old job had the higher build number those were taken by the Jenkins UI.
          This also explains the older date

          Holger Schmidt added a comment - We had the same issue on v1.480.3. My analyzis showed the following: The actual job was copied via the Jenkins UI. After a Jenkins reboot the wrong job history showed up. This wrong history was the old history from the original Job. The build folder of the new job practically contained the build history of the original and the new job. Since the old job had the higher build number those were taken by the Jenkins UI. This also explains the older date

            Unassigned Unassigned
            madhavbnk nanda kishore
            Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: