CSC icon indicating copy to clipboard operation
CSC copied to clipboard

SEGFAULT

Open inikep opened this issue 9 years ago • 6 comments

The current version of CSC crashes with gcc and Visual C++ when there is many repeated compression calls: csc_crash

If you have problems with generating this issue use lzbench -ecsc filename compiled from: https://github.com/inikep/lzbench/commits/dev

inikep avatar Oct 10 '16 20:10 inikep

@inikep can you send me the file that causes the crash? I ran the command you showed on a few files and everything went well. Thanks!

fusiyuan2010 avatar Oct 11 '16 22:10 fusiyuan2010

@inikep here is my example output:

siyuan@devsiyuan:~/lzbench$ ./lzbench -ecsc /tmp/a.out lzbench 1.4 (64-bit Linux) Assembled by P.Skibinski WARNING: For small files with memcpy and fast compressors you can expect the cache effect causing much higher compression and decompression speed Compressor name Compress. Decompress. Compr. size Ratio Filename memcpy 10677 MB/s 11061 MB/s 8617 100.00 /tmp/a.out csc 3.3 -1 17 MB/s 48 MB/s 2337 27.12 /tmp/a.out csc 3.3 -2 14 MB/s 48 MB/s 2330 27.04 /tmp/a.out csc 3.3 -3 7.47 MB/s 48 MB/s 2299 26.68 /tmp/a.out csc 3.3 -4 5.21 MB/s 49 MB/s 2239 25.98 /tmp/a.out csc 3.3 -5 3.89 MB/s 49 MB/s 2241 26.01 /tmp/a.out done... (cIters=1 dIters=1 cTime=1.0 dTime=1.0 chunkSize=1706MB cSpeed=0MB)

fusiyuan2010 avatar Oct 11 '16 22:10 fusiyuan2010

Have you tried "dev" branch? I had no issues with "master" until Travis upgraded LLVM to 7.3.0: https://travis-ci.org/inikep/lzbench/jobs/166444914

I have problems with all files I test. It suggest that: a) CSC uses to much stack size which has limit of 1 MB on Windows b) there is a memory leak (try valgrind to find it)

You may also try compression for example for 60 seconds on Linux: lzbench -ecsc -t60 filename

inikep avatar Oct 12 '16 06:10 inikep

The crash should be fixed by c5dbe0944d07acbc97d2c04ec9f99a139c6f3931. Thanks for reporting.

fusiyuan2010 avatar Oct 13 '16 04:10 fusiyuan2010

Works fine now.

I would ask for one change in libcsc. Could all references be changed from #include <csc_XXX.h> to #include "csc_XXX.h" ? Current approach requires gcc compilation with -Ilibcsc because of this.

inikep avatar Oct 15 '16 07:10 inikep

There is still SEGFAULT on Apple LLVM version 7.3.0 (clang-703.0.31) Target: x86_64-apple-darwin15.6.0 https://travis-ci.org/inikep/lzbench/jobs/167837672

The issue concerns also very old version of libcsc: https://github.com/inikep/lzbench/tree/master/libcsc

For the first time I noticed this issue about a week ago when Travis CI upgraded version of MacOS/LLVM from this: Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn) Target: x86_64-apple-darwin13.4.0

inikep avatar Oct 15 '16 11:10 inikep