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

Segmentation fault when trying to decompress #50

Open
Peter1339 opened this issue Apr 16, 2016 · 2 comments
Open

Segmentation fault when trying to decompress #50

Peter1339 opened this issue Apr 16, 2016 · 2 comments

Comments

@Peter1339
Copy link

i'm trying to decompress a file but i was getting segment fault/killed by SIGSEGV, downloaded the latest version and tried again, also segfault, so i tried enabling debug..
moinakg-pcompress-c6e779c# ./config --enable-debug --enable-debug-stats --wavpack-dir=wavpack-4.80.0 ; make
and now i can decompress the file just fine :/, i would like to help you to find the bug but i don't know how to best do that, so let me know if i can do anything to help narrow down this bug..

@moinakg
Copy link
Owner

moinakg commented Apr 19, 2016

Hi,

Thanks a lot for reporting the problem and I apologise for the delayed
response. I was traveling with little email access.
So this issue looks like an optimization problem. I would need a stack
trace to debug it. Can you please do the following and report back:

  1. Install gdb (GNU Debugger) if not already installed
  2. In the pcompress directory dump the file named "pcompress":
    cat ./pcompress
You should see something like this:
PC_PATH="/home/<your username>/pcompress"
LD_LIBRARY_PATH="${PC_PATH}"
export LD_LIBRARY_PATH

exec ${PC_PATH}/buildtmp/pcompress "$@"

Now set the same environment settings directly in your shell:
export LD_LIBRARY_PATH="/home/<your username>/pcompress"
  1. Load pcompress binary with gdb:
    gdb ./buildtmp/pcompress
You will see something line this (I am running Ubuntu):
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
....
....
Reading symbols from ./buildtmp/pcompress...(no debugging symbols

found)...done.
(gdb)

  1. Run with the arguments that you would pass to pcompress:
    (gdb) run

  2. When the program crashes it will come back to "(gdb)" prompt. At that
    point run the bt command:
    (gdb) bt

Copy the output of bt command and send it to me.

Hope you got all this :)

Regards,
Moinak.

On Sat, Apr 16, 2016 at 10:28 PM, Peter1339 notifications@github.com
wrote:

i'm trying to decompress a file but i was getting segment fault/killed by
SIGSEGV, downloaded the latest version and tried again, also segfault, so i
tried enabling debug..
moinakg-pcompress-c6e779c# ./config --enable-debug --enable-debug-stats
--wavpack-dir=wavpack-4.80.0 ; make
and now i can decompress the file just fine :/, i would like to help you
to find the bug but i don't know how to best do that, so let me know if i
can do anything to help narrow down this bug..


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#50

http://moinakg.wordpress.com/

@Peter1339
Copy link
Author

GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /root/pcompress/buildtmp/pcompress...(no debugging symbols found)...done.
(gdb) run -d /silo/wildfire/wildfire-home_28-May.pz
Starting program: /root/moinakg-pcompress-c6e779c/buildtmp/pcompress -d /silo/wildfire/wildfire-home_28-May.pz
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Using /silo/wildfire/wildfire-home_28-May.pz.out for output file name.
Scaling to 4 threads
[New Thread 0x7fffef4f0700 (LWP 17463)]
[New Thread 0x7fffe87ee700 (LWP 17464)]
[New Thread 0x7fffe1aec700 (LWP 17465)]
[New Thread 0x7fffdadea700 (LWP 17466)]
[New Thread 0x7fffda5e9700 (LWP 17467)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffdadea700 (LWP 17466)]
0x00007ffff6abc2b9 in bsc_lzp_decode_block () from /root/pcompress/libpcompress.so.1
(gdb) bt
#0 0x00007ffff6abc2b9 in bsc_lzp_decode_block () from /root/pcompress/libpcompress.so.1
#1 0x00007ffff6abcae6 in lzp_decompress () from /root/pcompress/libpcompress.so.1
#2 0x00007ffff6a97646 in preproc_decompress () from /root/pcompress/libpcompress.so.1
#3 0x00007ffff6a97ee8 in perform_decompress () from /root/pcompress/libpcompress.so.1
#4 0x00007ffff5da50a4 in start_thread (arg=0x7fffdadea700) at pthread_create.c:309
#5 0x00007ffff5ada87d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(gdb)

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