gpertea / gffcompare

classify, merge, tracking and annotation of GFF files by comparing to a reference annotation GFF
MIT License
199 stars 32 forks source link

Memory corruption while running gffcompare #29

Closed Florianus closed 5 years ago

Florianus commented 6 years ago

Hello!

I have been following the procedures provided in the article (HISAT2, Pertea et al., 2016) and successfully merged 34 single-end RNA-seq samples into a stringtie_merged.gtf. I am having trouble running the gffcompare program where it simply crashes out. The error looks like this:

gffcompare -r /home/slab/s6ma/archive/bin/hisat_indices/gene_annotations/Homo_sapiens.GRCh38.91.gtf -G -o merged stringtie_merged.gtf glibc detected gffcompare: malloc(): memory corruption: 0x000000000c3ea820 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x76e46)[0x7f69f4576e46] /lib/x86_64-linux-gnu/libc.so.6(+0x79eb3)[0x7f69f4579eb3] /lib/x86_64-linux-gnu/libc.so.6(libc_malloc+0x70)[0x7f69f457bcd0] gffcompare[0x422440] gffcompare[0x42a379] gffcompare[0x4406fc] /lib/x86_64-linux-gnu/libc.so.6(libc_start_main+0xfd)[0x7f69f451eeed] gffcompare[0x401fe9] ======= Memory map: ======== 00400000-00465000 r-xp 00000000 00:27 61384051 /home/slab/s6ma/archive/src/gffcompare-0.10.2.Linux_x86_64/gffcompare 00664000-00666000 rw-p 00064000 00:27 61384051 /home/slab/s6ma/archive/src/gffcompare-0.10.2.Linux_x86_64/gffcompare 00666000-00680000 rw-p 00000000 00:00 0 020ae000-119d8000 rw-p 00000000 00:00 0 [heap] 7f69f0000000-7f69f0021000 rw-p 00000000 00:00 0 7f69f0021000-7f69f4000000 ---p 00000000 00:00 0 7f69f42e8000-7f69f42fd000 r-xp 00000000 00:11 1060115 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f69f42fd000-7f69f44fd000 ---p 00015000 00:11 1060115 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f69f44fd000-7f69f44fe000 rw-p 00015000 00:11 1060115 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f69f4500000-7f69f4682000 r-xp 00000000 00:11 3164071 /lib/x86_64-linux-gnu/libc-2.13.so 7f69f4682000-7f69f4881000 ---p 00182000 00:11 3164071 /lib/x86_64-linux-gnu/libc-2.13.so 7f69f4881000-7f69f4885000 r--p 00181000 00:11 3164071 /lib/x86_64-linux-gnu/libc-2.13.so 7f69f4885000-7f69f4886000 rw-p 00185000 00:11 3164071 /lib/x86_64-linux-gnu/libc-2.13.so 7f69f4886000-7f69f488b000 rw-p 00000000 00:00 0 7f69f4890000-7f69f4911000 r-xp 00000000 00:11 3164075 /lib/x86_64-linux-gnu/libm-2.13.so 7f69f4911000-7f69f4b10000 ---p 00081000 00:11 3164075 /lib/x86_64-linux-gnu/libm-2.13.so 7f69f4b10000-7f69f4b11000 r--p 00080000 00:11 3164075 /lib/x86_64-linux-gnu/libm-2.13.so 7f69f4b11000-7f69f4b12000 rw-p 00081000 00:11 3164075 /lib/x86_64-linux-gnu/libm-2.13.so 7f69f4b18000-7f69f4b38000 r-xp 00000000 00:11 3164068 /lib/x86_64-linux-gnu/ld-2.13.so 7f69f4d17000-7f69f4d37000 rw-p 00000000 00:00 0 7f69f4d37000-7f69f4d38000 r--p 0001f000 00:11 3164068 /lib/x86_64-linux-gnu/ld-2.13.so 7f69f4d38000-7f69f4d39000 rw-p 00020000 00:11 3164068 /lib/x86_64-linux-gnu/ld-2.13.so 7f69f4d39000-7f69f4d3a000 rw-p 00000000 00:00 0 7f69f4d3c000-7f69f4d41000 rw-p 00000000 00:00 0 7fffd4764000-7fffd4785000 rw-p 00000000 00:00 0 [stack] 7fffd4800000-7fffd4801000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]

Does anyone know how to fix this? I have tried to re-install the gffcompare program but this error still occurs. I have also tried gffcompare on unmerged gtf files but still would not work. So I am highly certain that the issue is within the gffcompare program. Thank you

gpertea commented 6 years ago

Ouch, that's an ugly crash indeed. Could you also tell me:

It looks like you're running the precompiled binary I put there (which was built on an old CentOS 5 [virtual] machine). That's fine and that should work for most systems (or so I thought), but I guess it's still possible that there is an incompatibility between the precompiled binary and the libraries your Linux system..

When you say that you tried to re-install the program, I suppose that means re-downloading the binary, not building from source, right? If you can rebuild from source, would you please give it a try to the program built on your system?

The easiest way to weed out a bug in my code would be to try to reproduce the error on my side here on your data. Is it possible to somehow share with me the Homo_sapiens.GRCh38.91.gtf and any of the GTF files which caused the error?

Florianus commented 6 years ago

Thank you for the quick response!!

To answer your question:

For the gffcompare installation, first time I used Github. Then I tried to download the precompiled Linux x86_64 binary (gffcompare-0.10.2.Linux_x86_64.tar.gz). I guess these two are exactly the same.

I attached one of the 34 unmerged gtf files (hESC-No1_passage-No0_trim.gtf). You can download the Homo_sapiens.GRCh38.91.gtf file from the Ensembl website. The link should be: ftp://ftp.ensembl.org/pub/release-91/gtf/homo_sapiens

Thank you so much for your help. hESC-No1_passage-No0_trim.gtf.zip

gpertea commented 6 years ago

Thanks a lot for the example data. Ouch, I just found out this was caused by a terrible typo in my recent changes to an auxiliary class (GStr). Feeling pretty bad about it -- that's what I get if I don't have some basic unit testing set up..

Sorry about that, I pushed a corrected v0.10.4 out which should have fixed this. Please let me know if you encounter any more problems.

Florianus commented 6 years ago

I have tried the new version and it works perfectly.

Thank you!

Sincerely