g1mv / density

Superfast compression library
Apache License 2.0
1.02k stars 48 forks source link

Possible issues with lion #17

Closed nemequ closed 9 years ago

nemequ commented 9 years ago

I updated the Squash plugin to the dev branch, and I have a couple problems with lion. These may be bugs in the Squash plugin—I tried the dev branch of sharc and everything stalls during decompression (also, you need to include <sys/resource.h> for RUSAGE_SELF and struct rusage), so I can't really be sure, but I thought you would want to check before rolling a release.

osdb (from silesa) crashes during decompression:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6d9492c in density_lion_decode_read_signature_from_memory (in=<optimized out>, state=0x7ffff6b44010)
    at /home/nemequ/local/src/squash/plugins/density/density/src/kernel_lion_decode.c:77
77      state->signature = DENSITY_LITTLE_ENDIAN_64(*(density_lion_signature *) (in->pointer));
Missing separate debuginfos, use: debuginfo-install glibc-2.20-8.fc21.x86_64
(gdb) bt
#0  0x00007ffff6d9492c in density_lion_decode_read_signature_from_memory (in=<optimized out>, state=0x7ffff6b44010)
    at /home/nemequ/local/src/squash/plugins/density/density/src/kernel_lion_decode.c:77
#1  density_lion_decode_read_1bit_from_signature (state=0x7ffff6b44010, in=0x60c140) at /home/nemequ/local/src/squash/plugins/density/density/src/kernel_lion_decode.c:130
#2  density_lion_decode_read_form (state=0x7ffff6b44010, in=0x60c140) at /home/nemequ/local/src/squash/plugins/density/density/src/kernel_lion_decode.c:390
#3  density_lion_decode_process_unit (state=0x7ffff6b44010, out=0x60c1a0, in=0x60c140) at /home/nemequ/local/src/squash/plugins/density/density/src/kernel_lion_decode.c:419
#4  density_lion_decode_finish (in=0x60e8b0, out=0x60c1a0, state=0x7ffff6b44010) at /home/nemequ/local/src/squash/plugins/density/density/src/kernel_lion_generic_decode.h:80
#5  0x00007ffff6d8aeb8 in density_block_decode_finish (in=in@entry=0x60e8b0, out=out@entry=0x60c1a0, state=state@entry=0x61172c, mem_free=mem_free@entry=0x7ffff726a440 <free>)
    at /home/nemequ/local/src/squash/plugins/density/density/src/block_decode.c:315
#6  0x00007ffff6d9fbe4 in density_decode_finish (in=0x60e8b0, out=0x60c1a0, state=0x611708, mem_free=0x7ffff726a440 <free>)
    at /home/nemequ/local/src/squash/plugins/density/density/src/main_decode.c:152
#7  0x00007ffff6da0a5b in density_stream_decompress_finish (stream=0x60e750) at /home/nemequ/local/src/squash/plugins/density/density/src/stream.c:246
#8  0x00007ffff6d8a140 in squash_density_process_stream (stream=0x604090, operation=SQUASH_OPERATION_FINISH)
    at /home/nemequ/local/src/squash/plugins/density/squash-density.c:372
#9  0x00007ffff7bd60f3 in squash_stream_process_internal (stream=0x604090, operation=SQUASH_OPERATION_FINISH) at /home/nemequ/local/src/squash/squash/stream.c:545
#10 0x00007ffff7bd628b in squash_stream_finish (stream=0x604090) at /home/nemequ/local/src/squash/squash/stream.c:647
#11 0x00007ffff7bd15fa in squash_codec_process_file_with_options (codec=0x60e7a0, stream_type=SQUASH_STREAM_DECOMPRESS, output=0x6113d0, output_length=0, input=0x611180, 
    options=0x611620) at /home/nemequ/local/src/squash/squash/codec.c:1107
#12 0x00007ffff7bd16e9 in squash_codec_decompress_file_with_options (codec=0x60e7a0, decompressed=0x6113d0, decompressed_length=0, compressed=0x611180, options=0x611620)
    at /home/nemequ/local/src/squash/squash/codec.c:1162
#13 0x0000000000401efc in main (argc=5, argv=0x7fffffffd868) at /home/nemequ/local/src/squash/utils/squash.c:292

sao (also from silesa) decompresses to a file which is 2 bytes smaller than the input.

Both of these happen on x86_64 (Fedora 21). I've put the compressed files up at http://code.coeusgroup.com/osdb.lion and http://code.coeusgroup.com/sao.lion though the problem could be on the compression side, too—in which case both files are available at http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia

The same code works for chameleon and cheetah, as well as all the other benchmark files I am using (see https://github.com/quixdb/squash-benchmark for a list).

g1mv commented 9 years ago

Thanks I was aware of this and I'm actually working on it right now. BTW I haven't received an access to your ARM board to fix #16 .

nemequ commented 9 years ago

Thanks I was aware of this and I'm actually working on it right now. BTW I haven't received an access to your ARM board to fix #16 .

Hm, I sent you a reply. Here is a copy:

I created a gpnuma user on an ODROID C1 which has the issue.  Use port
42001 on 174.65.107.124 to connect.  If you have any problems just let
me know.
g1mv commented 9 years ago

Fixed in c67ac6801f4e592ab0c47a31e87662dc080dc68c