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

Concurrent fingerprint corruption

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • core
    • Red Hat Enterprise Linux Server release 5.6

      We use the fingerprinting in Jenkins to determine whether the deployed version of an artifact is the latest from Jenkins. So if the md5sum of the deployed artifact matches that of the last successful build in Jenkins, then there is no need to redeploy.

      I have a job with a single artifact called "artifactfile" to demonstrate:

      [pashmore@gfedev-36145 fingerprint-test]$ wget http://ho-gfe-test:8080/job/pashmore_test_fingerprints/lastSuccessfulBuild/artifact/dist/artifactfile
      :
      2011-06-24 10:41:18 (111 MB/s) - `artifactfile' saved [29075783/29075783]

      [pashmore@gfedev-36145 fingerprint-test]$ md5sum artifactfile
      0643d0a71011f319c6e313ec35c204fa artifactfile
      [pashmore@gfedev-36145 fingerprint-test]$

      If I get the fingerprint from Jenkins, it consistently matches the md5sum of the retrieved artifact file:

      [pashmore@gfedev-36145 fingerprint-test]$ wget 'http://ho-gfe-test:8080/job/pashmore_test_fingerprints/lastSuccessfulBuild/artifact/dist/artifactfile/fingerprint/' --output-document=fp
      :
      2011-06-24 10:49:45 (311 MB/s) - `fp' saved [5285]

      [pashmore@gfedev-36145 fingerprint-test]$ grep md5sum fp
      </h1><div class="md5sum">MD5: 0643d0a71011f319c6e313ec35c204fa</div><div>
      [pashmore@gfedev-36145 fingerprint-test]$

      However, if I attempt to concurrently get two copies of the same fingerprint URL, then both of the retrieved files have a different md5sum not matching what it should be:

      [pashmore@gfedev-36145 fingerprint-test]$ wget 'http://ho-gfe-test:8080/job/pashmore_test_fingerprints/lastSuccessfulBuild/artifact/dist/artifactfile/fingerprint/' --output-document=fp1 & wget 'http://ho-gfe-test:8080/job/pashmore_test_fingerprints/lastSuccessfulBuild/artifact/dist/artifactfile/fingerprint/' --output-document=fp2
      :
      2011-06-24 10:53:20 (287 MB/s) - `fp2' saved [4989]
      :
      2011-06-24 10:53:20 (104 MB/s) - `fp1' saved [4989]

      [pashmore@gfedev-36145 fingerprint-test]$ grep md5sum fp1
      [pashmore@gfedev-36145 fingerprint-test]$ grep "The fingerprint" fp1
      </h1><p>The fingerprint 0b7bde3cea17b21c1f4b2f4e8746617e did not match any of the recorded data.</p><ol><li>Perhaps the file was not created under Jenkins. Maybe it's a version that someone built locally on his/her own machine.</li><li>Perhaps the projects are not set up correctly and not recording fingerprints. Check the project setting. </li></ol></td></tr></table><table width="100%"><tr><td id="footer"><span style="padding-right:2em; color:gray">
      [pashmore@gfedev-36145 fingerprint-test]$ grep md5sum fp2
      [pashmore@gfedev-36145 fingerprint-test]$ grep "The fingerprint" fp2
      </h1><p>The fingerprint 99994289181233f39dfcbe4740539e0a did not match any of the recorded data.</p><ol><li>Perhaps the file was not created under Jenkins. Maybe it's a version that someone built locally on his/her own machine.</li><li>Perhaps the projects are not set up correctly and not recording fingerprints. Check the project setting. </li></ol></td></tr></table><table width="100%"><tr><td id="footer"><span style="padding-right:2em; color:gray">
      [pashmore@gfedev-36145 fingerprint-test]$

      We are using version 1.413.

            kohsuke Kohsuke Kawaguchi
            pashmore Paul Ashmore
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: