Changes between Initial Version and Version 1 of Ticket #869


Ignore:
Timestamp:
Dec 7, 2007, 11:18:00 AM (17 years ago)
Author:
Nicklas Nordborg
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #869 – Description

    initial v1  
    1 More info shortly
     1When uploading some compressed files and selecting to decompress them things may go wrong. In the published release it seems like an exception is always thrown:
     2
     3{{{
     4com.ice.tar.InvalidHeaderException:
     5bad header in block 915 record 8, header magic is not 'ustar' or
     6unix-style zeros, it is '5649464895554', or
     7(dec) 56, 49, 46, 48, 9, 55, 54
     8  at com.ice.tar.TarInputStream.getNextEntry(Unknown Source)
     9  at net.sf.basedb.plugins.TarFileUnpacker.unpack(TarFileUnpacker.java:163)
     10  at org.apache.jsp.filemanager.upload.upload_jsp._jspService(upload_jsp.java:205)
     11}}}
     12
     13It seems like the exception is happening after processing a file. I have changed the code to ignore the exception just to see what happens. Everything seems fins but there are two issues:
     14
     15 * The decompressed file has been corrupted. This can be seen by them having different md5 values. The raw upload has the same md5 as I get if I run 'md5sum' from the local command prompt. Comparing the two files I find that the start to differ at line 393511. See below for examples.
     16
     17 * The tar.bz2 file is not complete. It's size on the BASE server (1.0MB) is smaller than the original file (2.1 MB).
     18
     19The most surprising thing is that if I upload the tar.bz2 without unpacking it the tar.bz2 file is uploaded correctly and it is then possible to decompress the file without corrupting the contents.
     20
     21'''Examples of corruption'''
     22
     23Original file around line 393511:
     24{{{
     25525     614     114.0   23.6     20
     26526     614     250.0   29.6     25
     27527     614     75.0    15.4     25
     28528     614     455.5   52.1     20
     29529     614     72.0    13.9     25
     30}}}
     31
     32Corrupted file:
     33{{{
     34525     614     114.0   23.6     20
     35526     614     250.0   29.6     25.0    25
     36139     22      618.0   46.3    19      617     77.7    114.8   118.0   48.3.0   25
     3734      62      633.0   16      627     77      64.0    32      6        20
     3823      19       20
     39}}}
     40
     41'''Workaround'''
     42
     43In the cases I have found an exception is always thrown if the file is corrupted, but since the exception seems to happen when looking for the next file, I am not sure that this is true in all possible cases. In all cases it also seems to work if the compressed file is first uploaded without decompressing. Decompressing can be done using the "Run plugin" button from the single-item view page of the compressed file.
     44
     45'''Test data'''
     46
     47I have added the test data files I have used to the testdata repository referenced from the DeveloperInformation page. It is located in the ticket.869 subdirectory and contains three uncompressed files and three compressed. The only one that can be uploaded and decompressed at the same time is the MG_U74Av2.cdf.bz2 file.