-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zip task hangs with latest Ionic.Zip.Reduced #2
Comments
Not able to reproduce this error. |
I downloaded the library today specifically for the Zip task, and I'm also experiencing that it hangs when it gets to the Zip step. It created a file named DotNetZip-mcgziv5n.tmp which quickly went to 6,189 KB and then... at least 10 minutes of nothing. I had to cancel the build, and repeating the process later produced the same result. |
This needs to be reopened! I am having the same issue! zip hangs in TFS Build, but works fine in a separate process! This leaves a file named "DotNetZip-lk2cvgvz.tmp" that doesn't grow |
Hi, folks! If you could send a project on which you were able to reproduce the issue, I believe it will help a lot to figure out a problem. Unfortunately I can't publish sources where task hangs (they are proprietary), I tried to reproduce on a small test project, but with no success. I could just confirm, that problem occurred only if Zip task called at the end of build process (if sources are compiled as one step and MSBuild called once again with just Zip task, it works). This could be one more workaround. It does not connected with TFS Build, since we are using Hudson, and the same behavior was observed on my local machine from pure commandline call of MSBuild |
The problem appears to be a deadlock inside Ionic.Zlib.ParallelDeflateOutputStream.EmitPendingBuffers. A thread will get stuck on _newlyCompressedBlob.WaitOne() forever which is why the process hangs. |
I'm also having this problem with a particular file. As far as I can tell, there seems to be a race condition. Sometimes the ZIP file will be created, but it will be corrupt, other times it just hangs. There seems to be a bug for this already, http://dotnetzip.codeplex.com/workitem/14252. Changing I do have a small test project that reproduces the issue, but it uses an assembly that I can't really give out. I will try to break it down further and send it out if I get a chance. In the meantime, I've added a |
Ok, I've added a pull request for my work around, no idea how to attach it to this issue. |
I had the same issue, and this change worked. One thing I had to figure out, that isn't obvious from the discussion above, is that you have to add the parameter |
confirm workaround that @ctigeek suggested, worked for me too |
workaround did solve the problem for me too, thx! |
We're not getting the task/build hanging, but in our case it repeatedly produced a corrupt zip file (on 1.4.0.88); always with the same file corrupt inside the zip. Disabling ParallelCompression (thanks @ctigeek !) also worked around this problem. Our specific issue seems almost certainly related to https://dotnetzip.codeplex.com/workitem/14087 (file is an exact multiple of 64kB which breaks parallel deflate) but highlights that perhaps parallel compression should be disabled by default in msbuildtasks; especially as Ionic seems unmaintained now and this bug is pretty dangerous for build automation primarily used to produce deployable artifacts and very hard to pin down. Alternative 1, perhaps given it is apparently unmaintained with serious defects it's time to abandon Ionic? |
The ParallelCompression workaround did solve the problem for me! Thank you! |
I've created a fork where I've replaced the DotNetZip with a better maintained fork. In particular, it fixes the issue with ParallelDeflateOutputStream, and allows use of ParallelCompression without fear of creating a corrupt archive. |
Just saying hi. Followed notifications a bit too eagerly =). Feel free to PR to that fork and it'll be merged. |
Hi :) |
I think this issue is resolved with the recent merged pull request. Would it be possible to update the nuget package? (I don't know what the standard release cycle is for this repository). Thanks a lot! |
I'll push today. |
Recently I have updated MSBuild.Community.Tasks library to the last version in my build process and found out that Zip task which compressed deployment package hangs (it displays that all files were added and stay in that state at least for 2 hrs). It worked if I run zip separately from build process, however.
I wasn't managed to figure out the problem, but using old version of Ionic.Zip (v1.9.1.5 instead of Ionic.Zip.Reduced v 1.9.1.8) solved the issue.
The text was updated successfully, but these errors were encountered: