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

Invalid file structure for zip with more than 64k files

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: core
    • Labels:
    • Environment:
      Jenkins ver. 1.625.3, running on Ubuntu 14.04 LTS. Clean install with latest patches and from official repo. All plugins upgraded.
    • Similar Issues:

      Description

      Downloading a ZIP file of the Workspace, as generated by the (all files in zip) link results in an archive with the "zip error: Zip file structure invalid" when testing using "zip -T".

      How to reproduce:
      1. Set up a free-style project that creates more than 64K files, such as:
        rm -Rf *
        env > env.txt
        ls -la > ls-la.txt
        mkdir pp
        for i in `seq 1 70000`; do echo $i> pp/$i.txt; done
        
      2. Build the project
      3. Download the ZIP file from the Workspace
      4. Test it with Info-ZIP and you'll get something like this:
        $ zip -T repro-64k.zip 
        	zip warning: expected 4466 entries but found 70002
        
        zip error: Zip file structure invalid (repro-64k.zip)
        

      This issue is circumvented by most decompressors, however rubyzip is not. According to Info-ZIP FAQ the limit of 64k files exists, but there should be a way of creating valid ZIP files with more than 64k files, because Info-ZIP's one is able to do it. Not sure if it's related to Zip64 extensions.

      This issue is also happening with Codedeploy plugin , that is uploading the same invalid ZIP file to S3 and then fails to be deployed because some files don't get decompressed. As far as my understanding of the code goes (which is not much), this is a core issue, so this can happen for any plugin that relies on ZIP files coming from Jenkins. Please correct me if I'm wrong.

      Let me know if you need any clarification or further testing.

      Thanks!

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              default50 Sebastian Cruz
            • Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: