7
Vote

Deadlock on running out of disk space

description

I ran into an issue when using the ZipFile.Save() function and testing the exceptional condition of running out of disk space. I believe the default multithreaded functionality was causing a deadlock issue to occur. ParallelDeflateOutputStream.Write was stuck on Monitor.Wait. Turning off multithreading (Setting ZipFile.ParallelDeflateThreshold to -1) fixed this behavior by throwing an IOException as originally expected. I wanted to share this experience in case any one else runs into this.

comments

Neibaf wrote Sep 3, 2010 at 1:10 PM

Thank you for this comment now I have a workaround for this problem!

I have the same problem so I will try the workaround methode.
So the problem also occurs when I remove my usb stick while running the Save() method.

Fearuth wrote Mar 23, 2011 at 5:14 PM

Same problem here, thanks for the workaround !

rstegers wrote Feb 27, 2012 at 8:57 PM

Deadlock also occurs in some cases when writing to an ASP stream. I haven't figure out yet what the exact problem is. The stacktrace shows involvement of the ParallelDeflate and Multithreading off does indeed work around the issue.