samtools / bcftools

This is the official development repository for BCFtools. See installation instructions and other documentation here http://samtools.github.io/bcftools/howtos/install.html
http://samtools.github.io/bcftools/
Other
633 stars 241 forks source link

Possible isec memory leak #2206

Closed sandra-selfdecode closed 1 week ago

sandra-selfdecode commented 1 month ago

Hello, I think bcftools isec might have a memory leak. I ran a script 3 times today that was having an error in the step after I ran isec, and even though it was the same command with the same files in the same docker container running on the same instance type, the memory profile was very different across runs.

The command was bcftools isec -c none -w1 -Oz /app/input.bcf /app/ref_variants.bcf -p /app/isec --threads $THREADS The below image shows the cpu and memory profiles for the 3 runs. I included the cpu so you can see the matching cpu profiles, and how the memory profiles are very different. That script was the only thing running so I'm not sure why they were so different.

image

pd3 commented 4 weeks ago

Thank you for the issue. The indirect evidence is likely to have a different explanation. You can test with valgrind, for example, to make sure (valgrind bcftools isec ...). In any case, we'd need a small test case to reproduce the leak, or the output from valgrind at least. Also, please make sure you are using the latest version of bcftools to rule out known bugs that have been already fixed.