After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 415056 - Cruft remaining after failed archive index attempt
Cruft remaining after failed archive index attempt
Status: VERIFIED FIXED
Product: beagle
Classification: Other
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: Beagle Bugs
Beagle Bugs
Depends on:
Blocks:
 
 
Reported: 2007-03-05 20:27 UTC by Pat Double
Modified: 2007-03-10 16:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tagsoup src, causes exception when extracting (79.85 KB, application/octet-stream)
2007-03-05 20:54 UTC, Pat Double
Details
ZIP file causing cruft in /tmp (380.28 KB, application/octet-stream)
2007-03-09 12:23 UTC, Pat Double
Details

Description Pat Double 2007-03-05 20:27:13 UTC
Please describe the problem:
I find cruft in /tmp that is due to failures of the archive filter. I find several exceptions in *-IndexHelperExceptions:

20070305 07:24:53.1690 09917 IndexH  WARN EX: Unable to filter /home/double/src/tagsoup-1.0.1-src.zip:
20070305 07:24:53.1690 09917 IndexH  WARN EX: System.ArgumentOutOfRangeException: Argument is out of range.
20070305 07:24:53.1690 09917 IndexH  WARN EX: Parameter name: length
20070305 07:24:53.1690 09917 IndexH  WARN EX:   at ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputBuffer.ReadClearTextBuffer (System.Byte[] outBuffer, Int32 offset, Int32 length) [0x00000]
20070305 07:24:53.1690 09917 IndexH  WARN EX:   at ICSharpCode.SharpZipLib.Zip.ZipInputStream.BodyRead (System.Byte[] b, Int32 off, Int32 len) [0x00000]

20070305 07:43:04.5459 09917 IndexH  WARN EX: Unable to filter /home/double/text/apple2/tw2.bas.zip:
20070305 07:43:04.5459 09917 IndexH  WARN EX: ICSharpCode.SharpZipLib.Zip.ZipException: Unknown compression method 1
20070305 07:43:04.5459 09917 IndexH  WARN EX:   at ICSharpCode.SharpZipLib.Zip.ZipInputStream.GetNextEntry () [0x00000]
20070305 07:43:04.5459 09917 IndexH  WARN EX:   at (wrapper remoting-invoke-with-check) ICSharpCode.SharpZipLib.Zip.ZipInputStream:GetNextEntry ()

20070305 07:51:40.7691 09917 IndexH  WARN EX: Unable to filter /home/double/qemu/drivers/amnhltm.zip:
20070305 07:51:40.7691 09917 IndexH  WARN EX: ICSharpCode.SharpZipLib.Zip.ZipException: Unknown compression method 6
20070305 07:51:40.7691 09917 IndexH  WARN EX:   at ICSharpCode.SharpZipLib.Zip.ZipInputStream.GetNextEntry () [0x00000]
20070305 07:51:40.7691 09917 IndexH  WARN EX:   at (wrapper remoting-invoke-with-check) ICSharpCode.SharpZipLib.Zip.ZipInputStream:GetNextEntry ()

20070305 07:54:04.9141 09917 IndexH  WARN EX: Unable to filter /home/double/projects/pdouble/DPMI.zip:
20070305 07:54:04.9141 09917 IndexH  WARN EX: System.ArgumentOutOfRangeException: Argument is out of range.
20070305 07:54:04.9141 09917 IndexH  WARN EX: Parameter name: length
20070305 07:54:04.9141 09917 IndexH  WARN EX:   at ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputBuffer.ReadClearTextBuffer (System.Byte[] outBuffer, Int32 offset, Int32 length) [0x00000]
20070305 07:54:04.9141 09917 IndexH  WARN EX:   at ICSharpCode.SharpZipLib.Zip.ZipInputStream.BodyRead (System.Byte[] b, Int32 off, Int32 len) [0x00000]

20070305 10:45:17.4957 09917 IndexH  WARN EX: Unable to filter /home/double/school/UNL/cse476/feature/prototype.ps.zip:
20070305 10:45:17.4957 09917 IndexH  WARN EX: ICSharpCode.SharpZipLib.Zip.ZipException: size mismatch: 31623;138722 <-> 31623;138798
20070305 10:45:17.4957 09917 IndexH  WARN EX:   at ICSharpCode.SharpZipLib.Zip.ZipInputStream.BodyRead (System.Byte[] b, Int32 off, Int32 len) [0x00000]

If you'd like the ZIP files I can upload those.

Steps to reproduce:
1. Run beagle-extract-content on one of these ZIP files


Actual results:
I get an exception and cruft in /tmp/tmp*.*

Expected results:
An exception is acceptable, but no files left in /tmp/tmp*.*

Does this happen every time?
Yes

Other information:
I'm running trunk as of approx Mon Mar  5 14:00:00 CST 2007.
Comment 1 Joe Shaw 2007-03-05 20:48:58 UTC
Ah, you found the cause straight away. :)

Sure, attaching one of the broken zip files would be good.  We probably can't fix the exception -- it is in an assembly shipped as part of Mono -- but we can definitely fix the tmpfile issue.
Comment 2 Debajyoti Bera 2007-03-05 20:53:16 UTC
> Sure, attaching one of the broken zip files would be good.  We probably can't
> fix the exception -- it is in an assembly shipped as part of Mono -- but we 

The SharpZLib package throws lots of exceptions for perfectly valid archives. Frustrated I downloaded mono's copy of SharpZLib source and built it and tested it. Surprisingly it does not throw some of the exceptions that the binary sharpzlib.dll throws. This was about 2 months back and things might have improved since. Putting it here just for record.
Comment 3 Pat Double 2007-03-05 20:54:44 UTC
Created attachment 84004 [details]
tagsoup src, causes exception when extracting
Comment 4 Joe Shaw 2007-03-05 20:55:55 UTC
Mono ships two versions of SharpZipLib: 0.60 and 0.84, IIRC.  We were using 0.60 until fairly recently -- around the time we switched to gmcs.  0.84 definitely improved things, but there are still a lot of archives it barfs on.
Comment 5 Joe Shaw 2007-03-05 21:05:40 UTC
I just checked in a fix for this, r3533.  Thanks!
Comment 6 Pat Double 2007-03-05 22:19:04 UTC
I updated to r3533 and I get the same behavior with the uploaded ZIP file. Any other info or tests you'd like me to try?
Comment 7 Pat Double 2007-03-06 20:04:02 UTC
I'm using mono 1.2.3.1 if that makes a difference.
Comment 8 Debajyoti Bera 2007-03-07 15:33:36 UTC
There was one other minor fix needed. r3539 fixes it. Tested with the attached archive.

Pat, if you are still seeing issues, please reopen it. Otherwise, please mark it verified.
Comment 9 Debajyoti Bera 2007-03-07 15:39:32 UTC
Ok. I lied. Its r3540.
Comment 10 Pat Double 2007-03-07 16:03:45 UTC
Hmmm, not sure how I missed the big "Bug Status Change" header below or I would have reopened. :-S

I verified with r3540, exception is logged (as expected) but processing continues on. Glad to see it even indexes what was able to be extracted and no cruft.

Thanks.
Comment 11 Pat Double 2007-03-09 12:21:26 UTC
Found another one. See attached ZIP. Note that these are not actually postscript files although they end in ".ps".
Comment 12 Pat Double 2007-03-09 12:23:28 UTC
Created attachment 84304 [details]
ZIP file causing cruft in /tmp

Filename: file:///home/double/school/UNL/cse476/feature/prototype.ps.zip
Debug: Loaded 53 filters from /usr/lib/beagle/Filters/Filters.dll
Error: Caught exception extracting data from archive /home/double/school/UNL/cse476/feature/prototype.ps.zip
ICSharpCode.SharpZipLib.Zip.ZipException: size mismatch: 31623;138722 <-> 31623;138798
  at ICSharpCode.SharpZipLib.Zip.ZipInputStream.BodyRead (System.Byte[] b, Int32 off, Int32 len) [0x00256] in /var/tmp/paludis/dev-lang/mono-1.2.3.1/work/mono-1.2.3.1/mcs/class/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib/Zip/ZipInputStream.cs:510
  at (wrapper delegate-invoke) System.MulticastDelegate:invoke_int_byte[]_int_int (byte[],int,int)
  at ICSharpCode.SharpZipLib.Zip.ZipInputStream.Read (System.Byte[] destination, Int32 index, Int32 count) [0x00000] in /var/tmp/paludis/dev-lang/mono-1.2.3.1/work/mono-1.2.3.1/mcs/class/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib/Zip/ZipInputStream.cs:425
  at Beagle.Filters.FilterArchive.StoreStreamInTempFile (System.IO.Stream stream, System.String extension, DateTime mtime) [0x00042] in /var/tmp/paludis/app-misc/beagle-9999/work/beagle/Filters/FilterArchive.cs:216
Warn: Unable to filter /home/double/school/UNL/cse476/feature/prototype.ps.zip:
ICSharpCode.SharpZipLib.Zip.ZipException: Wrong Local header signature: 0xD1E7B1B5
  at ICSharpCode.SharpZipLib.Zip.ZipInputStream.GetNextEntry () [0x0032e] in /var/tmp/paludis/dev-lang/mono-1.2.3.1/work/mono-1.2.3.1/mcs/class/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib/Zip/ZipInputStream.cs:259
  at (wrapper remoting-invoke-with-check) ICSharpCode.SharpZipLib.Zip.ZipInputStream:GetNextEntry ()
  at Beagle.Filters.FilterArchive.GetNextEntryZip () [0x0000c] in /var/tmp/paludis/app-misc/beagle-9999/work/beagle/Filters/FilterArchive.cs:276
  at (wrapper delegate-invoke) System.MulticastDelegate:invoke_FilterArchive/ArchiveEntry ()
  at Beagle.Filters.FilterArchive.DoPullSetup () [0x00154] in /var/tmp/paludis/app-misc/beagle-9999/work/beagle/Filters/FilterArchive.cs:170
  at Beagle.Daemon.Filter.Open (System.IO.FileSystemInfo info) [0x000c4] in /var/tmp/paludis/app-misc/beagle-9999/work/beagle/beagled/Filter.cs:620
No filter for application/zip
Comment 13 Debajyoti Bera 2007-03-10 02:34:47 UTC
Checked in some more protection against SharpZLib stupidism - r3543. Give that a try.
Comment 14 Pat Double 2007-03-10 16:08:13 UTC
Works here. I re-ran over all previously failed archives and no cruft. Thanks!