-
Notifications
You must be signed in to change notification settings - Fork 446
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
Improper locking bugs(e.g., deadlocks) on the lock #1329
Comments
Also, for the lock Line 3375 in 575db47
|
Thanks for the bug report. It looks like a real issue. I'm curious if you tripped over this with real data. I don't believe start should ever be < 1 on valid files, which is likely why we've never triggered it, but as we have an error case where we bail out here then we should also free the locks. Edit: I see |
@jkbonfield Thanks. |
This fixes samtools#1329, which was discovered by code scanning and reported by Github @ryancaicse. I do not believe it is likely to be triggered, but the value of this file can sometimes come from a CRAM file so it is possible malformed data could lead to a threading deadlock. (Untested)
This fixes #1329, which was discovered by code scanning and reported by Github @ryancaicse. I do not believe it is likely to be triggered, but the value of this file can sometimes come from a CRAM file so it is possible malformed data could lead to a threading deadlock. (Untested)
@ryancaicse Out of interest, what did you use to find this? |
@daviesrob Thank you for your interest. I used Pinpoint. Its code technique could be found here. |
Thanks, I'll take a look. |
Hi, developers, thank you for your checking. It seems the lock
fd->refs->lock
is not released correctly whenstart < 1
in the functioncram_get_ref
?htslib/cram/cram_io.c
Lines 3419 to 3443 in 575db47
Best,
The text was updated successfully, but these errors were encountered: