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

Download build artifacts as zip generates a corrupted file

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • core
    • Windows XP 32
      java version "1.7.0"
      Java(TM) SE Runtime Environment (build 1.7.0-b147)
      Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode)

      The zip generated by the link http://server/job/myJob/lastSuccessfulBuild/artifact/*zip*/archive.zip generates a zip file in which everything seems ok, but when you try to unzip the content with 7z for instance, it fails (compression method not supported).

      I can't see anything in the logs.
      BTW, the size of the file in the archive are set to 0. Could be a side effect in 7z.

      It works fine with 1.531.

      And finally, there was a modification of something about the compression in 1.532 related to issue JENKINS-19473.

          [JENKINS-19752] Download build artifacts as zip generates a corrupted file

          Mathieu POUSSE created issue -
          Mathieu POUSSE made changes -
          Description Original: The zip generated by the link http://server/job/myJob/lastSuccessfulBuild/artifact/*zip*/archive.zip generates a zip file in which everything seems ok, but when you try to unzip the content with 7z for instance, it fails (compression method not supported).

          BTW, the size of the file in the archive are set to 0. Could be a side effect in 7z.

          It works fine with 1.531.

          And finally, there was a modification of something about the compression in 1.532 related to issue JENKINS-19473.
          New: The zip generated by the link http://server/job/myJob/lastSuccessfulBuild/artifact/*zip*/archive.zip generates a zip file in which everything seems ok, but when you try to unzip the content with 7z for instance, it fails (compression method not supported).

          I can't see anything in the logs.

          BTW, the size of the file in the archive are set to 0. Could be a side effect in 7z.

          It works fine with 1.531.

          And finally, there was a modification of something about the compression in 1.532 related to issue JENKINS-19473.
          Mathieu POUSSE made changes -
          Labels Original: artifact regression zip New: archive artifact gzip regression zip
          Mathieu POUSSE made changes -
          Assignee New: Jesse Glick [ jglick ]
          Mathieu POUSSE made changes -
          Environment Original: Windows XP 32 New: Windows XP 32
          java version "1.7.0"
          Java(TM) SE Runtime Environment (build 1.7.0-b147)
          Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode)

          Mathieu POUSSE added a comment - - edited

          In fact there is a typo in hudson.model.DirectoryBrowserSupport line 348
          should be

          Util.copyStream(f.open(), >>>>>>>zos<<<<<<);

          I have tested on my local and it works. the pull request is waiting !

          https://github.com/jenkinsci/jenkins/pull/954

          Mathieu POUSSE added a comment - - edited In fact there is a typo in hudson.model.DirectoryBrowserSupport line 348 should be Util.copyStream(f.open(), >>>>>>>zos<<<<<<); I have tested on my local and it works. the pull request is waiting ! https://github.com/jenkinsci/jenkins/pull/954

          Bruce Edge added a comment -

          I'm seeing the same thing with 1.532.

          Any zip I pull down using the artifact "all files in one zip" link gives me a zip that fails to unpack:

          Archive: ../upgrade.zip
          warning [../upgrade.zip]: 275536 extra bytes at beginning or within zipfile
          (attempting to process anyway)
          file #1: bad zipfile offset (local header sig): 275536
          (attempting to re-compensate)
          inflating: 1.0.1/prod/update-1.0.0-to-1.0.1.sql
          error: invalid compressed data to inflate
          file #2: bad zipfile offset (local header sig): 84
          (attempting to re-compensate)
          file #2: bad zipfile offset (local header sig): 84
          file #3: bad zipfile offset (local header sig): 275704
          file #4: bad zipfile offset (local header sig): 275786
          file #5: bad zipfile offset (local header sig): 275871
          file #6: bad zipfile offset (local header sig): 275954

          Happens on all projects and all archive directories that I spot checked.

          Bruce Edge added a comment - I'm seeing the same thing with 1.532. Any zip I pull down using the artifact "all files in one zip" link gives me a zip that fails to unpack: Archive: ../upgrade.zip warning [../upgrade.zip] : 275536 extra bytes at beginning or within zipfile (attempting to process anyway) file #1: bad zipfile offset (local header sig): 275536 (attempting to re-compensate) inflating: 1.0.1/prod/update-1.0.0-to-1.0.1.sql error: invalid compressed data to inflate file #2: bad zipfile offset (local header sig): 84 (attempting to re-compensate) file #2: bad zipfile offset (local header sig): 84 file #3: bad zipfile offset (local header sig): 275704 file #4: bad zipfile offset (local header sig): 275786 file #5: bad zipfile offset (local header sig): 275871 file #6: bad zipfile offset (local header sig): 275954 Happens on all projects and all archive directories that I spot checked.
          Mathieu POUSSE made changes -
          Assignee Original: Jesse Glick [ jglick ] New: Mathieu POUSSE [ poussma ]

          Bruce Edge added a comment -

          Confirm reverting to 1.531 resolves the issue.

          Bruce Edge added a comment - Confirm reverting to 1.531 resolves the issue.

          Code changed in jenkins
          User: mathieu-pousse
          Path:
          core/src/main/java/hudson/model/DirectoryBrowserSupport.java
          http://jenkins-ci.org/commit/jenkins/11fe787c0a62e70efb85935ae68b53e59f34c064
          Log:
          [FIXED JENKINS-19752] write in the correct outputstream

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: mathieu-pousse Path: core/src/main/java/hudson/model/DirectoryBrowserSupport.java http://jenkins-ci.org/commit/jenkins/11fe787c0a62e70efb85935ae68b53e59f34c064 Log: [FIXED JENKINS-19752] write in the correct outputstream
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            poussma Mathieu POUSSE
            poussma Mathieu POUSSE
            Votes:
            9 Vote for this issue
            Watchers:
            24 Start watching this issue

              Created:
              Updated:
              Resolved: