gymreklab / GangSTR

A tool for profiling long STRs from short reads
GNU General Public License v2.0
85 stars 16 forks source link

Seg fault error on Ubuntu 20.04 #92

Closed ileenamitra closed 3 years ago

ileenamitra commented 4 years ago

GangSTR doesn't work on ubuntu 20.04 but works on 16.04 and 18.04. On ubuntu 20.04 it gives segfault with any/all variations of parameters.

cimbusch commented 4 years ago

Same here, though just running Ubuntu 20.04, not tested on other systems. Yes, segfault without parameters or any other hints what the cause is:

GangSTR --bam [...]/60820188483107.sorted.markdup.bam --ref [...]/hg19_ucsc/hg19.fa --regions [...]/GangSTR/test/HTT.bed --out bla --verbose --very [GangSTR-2.4.4.8-f807-dirty] ProgressMeter: Loading read group id 60820188483107 for sample 60820188483107 [GangSTR-2.4.4.8-f807-dirty] ProgressMeter: Processing chr4:3074877 [GangSTR-2.4.4.8-f807-dirty] ProgressMeter: Setting flanking regions [GangSTR-2.4.4.8-f807-dirty] ProgressMeter: Loading read data Segmentation fault (core dumped)

Is there any idea on this issue?

cimbusch commented 4 years ago

Just test with Ubuntu 18.04, works indeed without any issues.

Could that be due to libhts3 in 20.04 and libhts2 in earlier Ubuntu versions? Could somebody confirm that?

nmmsv commented 4 years ago

I'm not sure, I'll try to reproduce the error this week and report back!

nmmsv commented 4 years ago

I just managed to reproduce this error in a docker. I am still not sure what the source is, as I used the default installation script that installs the dependencies based on the preset versions that we knew has worked before (htslib-1.8). I imagine that would rule out what you mentioned regarding libhts3? I'm not very familiar with libhts versions, so please correct me if I'm wrong.

I was able to narrow down the issue to read extraction, which means it could be due to htslib or our handling of data during realignment. I also tried using valgrind, but the output that I got didn't make a lot of sense. I assume running valgrind inside a docker may behave differently than what I expect.

Please let me know if you think there is a lead that I can look into. Otherwise, I suggest using a different version of Ubuntu for now. Thanks! Nima

jmarshall commented 3 years ago

This is in fact a miscompilation by the new Ubuntu version's compiler of a subtly incorrect function. Fixed by PR #97.

nmmsv commented 3 years ago

Release added: https://github.com/gymreklab/GangSTR/releases/tag/v2.4.6

Thanks again @jmarshall