May be related to
One of our jobs has a directory in its workspace containing about 30,000 files (small files < 100KB). A zip-download of this directory results in a zip file (size 12MB) that cannot be unzipped:
"End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive."
Zipping this directory at the command prompt results in a valid, unzippable file with size 42MB.
While analyzing this, I tried downloading the Jenkins created zip file a few times using wget and the browser. Most of the time wget aborted with error 500. Trying the download in the browser sometimes resulted in an IO error (Stack trace attached).
While I was trying around, another job was started and failed with "Too many open files".
So it seems to me that the zip download opens all the files when adding them to the zip but apparently they are not closed.