-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Memory corruption using bioconda::samtools + miniforge #47137
Comments
Hi!
And then builds it with these commands: https://github.com/bioconda/bioconda-recipes/blob/76794693913ab648d37f7c4d2ddc14413dd9d206/recipes/samtools/build.sh |
99999999999999999999 is larger than 264. It shouldn't really crash (I haven't reproduced that yet), but it's also not something you should expect to work and is not very useful as a test case. Do you really have a chromosome that long? I suggest you reduce the position in your unit test to something rather more realistic. Positions internally in samtools are signed 64-bit integers. I would not assume that positions beyond 9223372034707292159 work correctly. |
The The workaround for your test case is the same as I suggested above. Samtools does not read in these 99999…99999 values correctly, as it only represents values up to 263-1 and does not currently reject extreme values beyond that. So I would recommend you adjust your test case to use a position within that range — moreover with 13 or fewer digits to avoid the crash you've discovered with existing samtools versions. Me, I don't have any particular advice about your differing mpileup output, other than that such things are often due to BAQ recalculation and/or overlapping read handling. So you might try experimenting with the |
Hi!
We use samtools tview to generate some output we then share via an internal API endpoint. Historically, we used samtools 1.9 + miniconda and everything worked as expected.
However, we had to move from miniconda to miniforge because of the update to miniconda's terms and conditions. Making the switch seemed to be relatively straightforward, till we noticed the endpoint was erroring for all requests. Right now I do not recall the exact error we were getting with samtools 1.9, but updating the library appeared to fix it. We moved to samtools 1.19 (which is the latest version as of today).
The endpoint works for most requests I have tried, but a unit test has been failing consistently. This unit test runs the command below:
Which fails with
malloc(): memory corruption Aborted
I set the verbosity level to 8 (
--verbosity=8
), but no extra information is given:I also noticed that the memory allocation error is not raised if I remove one 9 from the command above. So I wonder if it is either running out of memory or if the bam has issues around that position.
This issue does not happen at all (not even with all the 9s/bigger numbers) if I run samtools installed from brew.
I see that the output of
samtools --version
is different, so I was wondering if some flag set when installing samtools from bioconda using miniforge is to blame.Bioconda + Miniforge:
Brew:
The problematic samtools installation is on an Ubuntu container:
uname -m
returns "x86_64"gcc --version
returns:The container has not changed other than switching from miniconda to miniforge (using
Miniforge3-4.10.0-0-Linux-x86_64
, newer versions caused dependency issues for other libraries).I am opening an issue because I could not get much in terms of error messages and I could not find anything helpful googling. I am not very familiar with ~scientific stuff (including but not limited to bam files), but the bam in question opens in IGV (2.16.0) without issues (so I assume the file is OK?). I am not sharing the file because it is private, hopefully the other information is enough to determine what the issue is.
Thank you!
The text was updated successfully, but these errors were encountered: