morispi / CONSENT

Scalable long read self-correction and assembly polishing with multiple sequence alignment
https://doi.org/10.1038/s41598-020-80757-5
GNU Affero General Public License v3.0
55 stars 5 forks source link

CONSENT-correct: line 202: 96410 Segmentation fault #32

Closed JonEilers closed 2 years ago

JonEilers commented 2 years ago

Hi, See below for a segmentation fault that occurred while trying to error correct pacbio reads. Data can be found at ncbi under the sra accession: SRR8499555. Any thoughts or help is appreciated.

./CONSENT-correct \
> --nproc 30 \
> --in /home/jon/Working_Files/sea_cuke_species_data/stichopus_chloronotus/pacbio/SRR8499555.oneline.fastq \
> --out SRR8499555.oneline.error_corrected.fastq \
> --type PB
[Sun 16 Jan 2022 12:08:43 PM PST] Overlapping the long reads (minimap2)
[Sun 16 Jan 2022 12:32:48 PM PST] Processing the overlaps
[Sun 16 Jan 2022 12:37:17 PM PST] Correcting the long reads
./CONSENT-correct: line 202: 96410 Segmentation fault      (core dumped) $LRSCf/bin/CONSENT-correction -a $tmpdir/"$alignments" -s "$minSupport" -S "$maxSupport" -l "$windowSize" -k "$merSize" -c "$commonKMers" -A "$minAnchors" -f "$solid" -m "$windowOverlap" -j "$nproc" -r "$reads" -M "$maxMSA" -p "$LRSCf" >> "$out"

it also fails on the initial test

./CONSENT-correct --in example/reads.fasta --out example/correctedReads.fasta --type PB
[Mon 17 Jan 2022 12:18:31 PM PST] Overlapping the long reads (minimap2)
[Mon 17 Jan 2022 12:18:38 PM PST] Correcting the long reads
free(): invalid pointer
./CONSENT-correct: line 202:  6992 Aborted                 (core dumped) $LRSCf/bin/CONSENT-correction -a $tmpdir/"$alignments" -s "$minSupport" -S "$maxSupport" -l "$windowSize" -k "$merSize" -c "$commonKMers" -A "$minAnchors" -f "$solid" -m "$windowOverlap" -j "$nproc" -r "$reads" -M "$maxMSA" -p "$LRSCf" >> "$out"
SwiftSeal commented 2 years ago

I'm also getting this fault on the CONSENT-correct test, have you had any success?

./CONSENT-correct --in example/reads.fasta --out example/correctedReads.fasta --type PB
[Tue 18 Jan 13:53:48 GMT 2022] Overlapping the long reads (minimap2)
[Tue 18 Jan 13:53:55 GMT 2022] Correcting the long reads
free(): invalid pointer
./CONSENT-correct: line 202: 748672 Aborted                 (core dumped) $LRSCf/bin/CONSENT-correction -a $tmpdir/"$alignments" -s "$minSupport" -S "$maxSupport" -l "$windowSize" -k "$merSize" -c "$commonKMers" -A "$minAnchors" -f "$solid" -m "$windowOverlap" -j "$nproc" -r "$reads" -M "$maxMSA" -p "$LRSCf" >> "$out"
JonEilers commented 2 years ago

I haven't. This is a bit outside of my realm of knowledge. The best I could find was a stack-overflow thread on invalid pointers being a memory allocation issue. Here's an article on how to fix it (?). I have no idea about C programming.

morispi commented 2 years ago

Hey guys,

Sorry, I left my academic career to move to another position, and unfortunately, I don't have much time to maintain my old software anymore.

Segmentation faults / invalid pointers / general memory issue are often pretty data dependent, so it's usually pretty tough to fix, especially with no real knowledge of C/C++ programming.

Given the SRA accession was mentioned at the beginning of the issue, I could probably easily reproduce the issue, and try to track down the bug to fix it. However, I can't promise when this will happen, since I'm pretty busy with my current position. I'll try to find a couple hours later this month and hopefully quickly find a fix.

Sorry for the inconvenience - I know how boring it can be, trying to run a software that crashes. I'll keep you posted.

Cheers! Pierre

SwiftSeal commented 2 years ago

Hey Pierre,

No worries! Seg faults are always a pain... I had a crack at fixing it but no luck - I ended up using the conda version (2.2.2) rather than building from the github repo and this worked correctly. Happy to pass on my data/logs if you start working on a fix!

JonEilers commented 2 years ago

The error occurred when I was using the conda version. It's on my to-do list to try the github version.

philiplin1212 commented 2 years ago

I have the same issue when I use the github version. Here is my solution. Replace robin_hood.h in BMEAN folder by the newer one in the src folder.