• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • core
    • Any
      Observed in LTS 1.509.2, LTS 1.509.3, 1.528, 1.532-SNAPSHOT (private-09/12/2013 13:02 GMT-jenkins)

      Builds disappear from Jenkins some time after a project has been renamed.

      We upgraded from 1.492 on July 4th and then renamed one build. Four days later we realized the renamed build had lost some or all of its builds. We recovered the builds by reloading from disk this morning. Later in the afternoon, another project was renamed, and some of its builds went missing too.

      Here are the builds of the renamed job on disk:

      $ ls -l
      total 25
      lrwxrwxrwx 1 jenkins jenkins  19 Mar  1 13:29 1 -> 2013-03-01_13-29-26
      lrwxrwxrwx 1 jenkins jenkins  19 Mar  1 13:31 2 -> 2013-03-01_13-31-20
      drwxrwxr-x 3 jenkins jenkins 141 Jul  9 08:24 2013-03-01_13-29-26
      drwxrwxr-x 3 jenkins jenkins 141 Jul  9 08:24 2013-03-01_13-31-20
      drwxrwxr-x 3 jenkins jenkins 141 Jul  9 08:24 2013-03-01_13-32-42
      drwxrwxr-x 3 jenkins jenkins 141 Jul  9 08:24 2013-03-28_09-56-31
      drwxrwxr-x 3 jenkins jenkins 141 Jul  9 08:24 2013-03-28_10-02-11
      lrwxrwxrwx 1 jenkins jenkins  19 Mar  1 13:32 3 -> 2013-03-01_13-32-42
      lrwxrwxrwx 1 jenkins jenkins  19 Mar 28 09:56 4 -> 2013-03-28_09-56-31
      lrwxrwxrwx 1 jenkins jenkins  19 Mar 28 10:02 5 -> 2013-03-28_10-02-11
      lrwxrwxrwx 1 jenkins jenkins   1 Jul  9 14:23 lastFailedBuild -> 4
      lrwxrwxrwx 1 jenkins jenkins   1 Jul  9 14:23 lastStableBuild -> 5
      lrwxrwxrwx 1 jenkins jenkins   1 Jul  4 11:18 lastSuccessfulBuild -> 5
      lrwxrwxrwx 1 jenkins jenkins   2 Jul  9 14:23 lastUnstableBuild -> -1
      lrwxrwxrwx 1 jenkins jenkins   1 Jul  9 14:23 lastUnsuccessfulBuild -> 4
      

      The disk shows 5 builds, 1 through 5, but the GUI only shows 4 and 5, it is missing 1, 2, and 3.

      JENKINS-19650 contains steps to reliably reproduce the problem.

      How do I debug this? One thing looks odd: the dates on the symbolic links differ from the dates in the build history, and differ from the directories they actually link.

          [JENKINS-18678] Builds disappear some time after renaming job

          Code changed in jenkins
          User: Jesse Glick
          Path:
          test/src/test/groovy/hudson/model/AbstractProjectTest.groovy
          http://jenkins-ci.org/commit/jenkins/9c7b5a1373bf0bf88a95c18afe166da3841fa42e
          Log:
          JENKINS-18678 Reproduced problem in test.

          (cherry picked from commit 1943801ba725bff83e1afaea5f4c7670754c5c61)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: test/src/test/groovy/hudson/model/AbstractProjectTest.groovy http://jenkins-ci.org/commit/jenkins/9c7b5a1373bf0bf88a95c18afe166da3841fa42e Log: JENKINS-18678 Reproduced problem in test. (cherry picked from commit 1943801ba725bff83e1afaea5f4c7670754c5c61)

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/model/AbstractProject.java
          core/src/main/java/jenkins/model/lazy/AbstractLazyLoadRunMap.java
          http://jenkins-ci.org/commit/jenkins/133f63332680bb750eca822ee21d3145b7482ddf
          Log:
          JENKINS-18678 Tweaking API, adding @since & changelog for #1075, fixing purgeCache so that test can pass.

          (cherry picked from commit 833c423268635ba79672ccdf6d17977a2a4d4181)

          Conflicts:
          changelog.html

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/AbstractProject.java core/src/main/java/jenkins/model/lazy/AbstractLazyLoadRunMap.java http://jenkins-ci.org/commit/jenkins/133f63332680bb750eca822ee21d3145b7482ddf Log: JENKINS-18678 Tweaking API, adding @since & changelog for #1075, fixing purgeCache so that test can pass. (cherry picked from commit 833c423268635ba79672ccdf6d17977a2a4d4181) Conflicts: changelog.html

          Vlad Aginsky added a comment -

          Thanks for the effort to fix this, what is Jenkins version that includes this fix?

          Vlad Aginsky added a comment - Thanks for the effort to fix this, what is Jenkins version that includes this fix?

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - The fix is available in jenkins-1.546 http://jenkins-ci.org/commit/jenkins/568ccba8187cfa859deeefb397983e049a9d942b http://jenkins-ci.org/commit/jenkins/833c423268635ba79672ccdf6d17977a2a4d4181

          amargono added a comment -

          When will the LTS version 1.532.2 be released? I noticed the issue has been fixed in this release.

          amargono added a comment - When will the LTS version 1.532.2 be released? I noticed the issue has been fixed in this release.

          amargono added a comment -

          The LTS 1.532.2 is now available, however after upgrading, I can't authenticate with LDAP.
          It turned out the whole ldap plugins classes missing.
          Copying the the ldap classes from the previous version to:
          <JENKINS_HOME>/plugins/ldap/WEB-INF/classes solved the authentication issue.

          I have logged the issue at:
          https://issues.jenkins-ci.org/browse/JENKINS-21865

          amargono added a comment - The LTS 1.532.2 is now available, however after upgrading, I can't authenticate with LDAP. It turned out the whole ldap plugins classes missing. Copying the the ldap classes from the previous version to: <JENKINS_HOME>/plugins/ldap/WEB-INF/classes solved the authentication issue. I have logged the issue at: https://issues.jenkins-ci.org/browse/JENKINS-21865

          Mishael Kim added a comment -

          Has anyone successfully tested this fix in the latest LTS build after migrating the older problem jobs/configs over? I'm still seeing my builds disappear in LTS version 1.532.2 when using jobs carried over from my backup. Does it possibly require the creation of a new job to get past this bug?

          @amargono
          BTW, I haven't run into any LDAP issues with this build.

          Mishael Kim added a comment - Has anyone successfully tested this fix in the latest LTS build after migrating the older problem jobs/configs over? I'm still seeing my builds disappear in LTS version 1.532.2 when using jobs carried over from my backup. Does it possibly require the creation of a new job to get past this bug? @amargono BTW, I haven't run into any LDAP issues with this build.

          Jesse Glick added a comment -

          @mishael you may be seeing a different bug that happens to have similar symptoms but for a completely different reason. File it separately with steps to reproduce if you have them.

          Does it possibly require the creation of a new job to get past this bug?

          No; and this bug would only ever manifest itself within a single Jenkins session, so after a restart the job would look fine.

          Jesse Glick added a comment - @mishael you may be seeing a different bug that happens to have similar symptoms but for a completely different reason. File it separately with steps to reproduce if you have them. Does it possibly require the creation of a new job to get past this bug? No; and this bug would only ever manifest itself within a single Jenkins session, so after a restart the job would look fine.

          We also have the same problem on 1.542.
          @jglick: I haven't tried upgrading to 1.546 yet, however I noticed that somebody else is still facing the same problem even with 1.547:
          https://issues.jenkins-ci.org/browse/JENKINS-17265?focusedCommentId=193358&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-193358
          Are you aware of this? Any feedback will be highly appreciated ...

          Thanks,
          Ioannis

          Ioannis Oikonomou added a comment - We also have the same problem on 1.542. @jglick: I haven't tried upgrading to 1.546 yet, however I noticed that somebody else is still facing the same problem even with 1.547: https://issues.jenkins-ci.org/browse/JENKINS-17265?focusedCommentId=193358&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-193358 Are you aware of this? Any feedback will be highly appreciated ... Thanks, Ioannis

          Deepthi D added a comment -

          We are using jenkins 2.7.4 and faced this problem.The build history does exist on the server but are not displayed in the UI

          Deepthi D added a comment - We are using jenkins 2.7.4 and faced this problem.The build history does exist on the server but are not displayed in the UI

            oleg_nenashev Oleg Nenashev
            deepchip Martin d'Anjou
            Votes:
            15 Vote for this issue
            Watchers:
            29 Start watching this issue

              Created:
              Updated:
              Resolved: