Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

pyhmmer.nhmmer throws error when the number of FASTA seqs is larger than 64 #62

Closed
moshi4 opened this issue Mar 11, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@moshi4
Copy link

moshi4 commented Mar 11, 2024

Hi @althonos, this is a bug report about pyhmmer.nhmmer.

I encountered an error when entering a multi-fasta in pyhmmer.nhmmer with pybarrnap.
After investigating the conditions for reproducing the error, it appears that the error occurs when the number of FASTA seqs is greater than 64. Also, the error contents are not always the same, such as Segmentation fault, corrupted size vs. prev_size, munmap_chunk(): invalid pointer.

You can reproduce the error with the following examples data and commands.

examples.zip

pybarrnap examples/64seqs_success.fa
pybarrnap examples/65seqs_failed.fa
pybarrnap examples/91seqs_failed.fa
@althonos althonos added the bug Something isn't working label Mar 12, 2024
@althonos
Copy link
Owner

Thanks for the report @moshi4,

There was a bug in the way i was computing array reallocation which caused arrays of 64 items to never be reallocated to a larger capacity, which was then causing some out-of-buffer writes and causing various memory issues later.

I fixed the problem, confirmed pybarrnap works properly now, and will push a patch.

@althonos
Copy link
Owner

Fixed in v0.10.9 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants