Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEGFAULT #12

Open
inikep opened this issue Oct 10, 2016 · 6 comments
Open

SEGFAULT #12

inikep opened this issue Oct 10, 2016 · 6 comments

Comments

@inikep
Copy link

inikep commented Oct 10, 2016

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

@fusiyuan2010
Copy link
Owner

@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
Copy link
Owner

@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)

@inikep
Copy link
Author

inikep commented Oct 12, 2016

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

@fusiyuan2010
Copy link
Owner

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

@inikep
Copy link
Author

inikep commented Oct 15, 2016

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
Copy link
Author

inikep commented Oct 15, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants