-
Notifications
You must be signed in to change notification settings - Fork 840
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
Crash in CRcvLossList::getFirstLostSeq() #1352
Comments
Hi @maxsharabayko, I checked the latest master and getFirstLostSeq() is not protected. Actually, I don't see any changes that address this issue. It seems to me that PR #1333 and #1335 are not related. Maybe, the m_RcvLossLock lock could be used as well for the getFirstLostSeq() access? Cheers |
@pcamina You are right, it is a different issue. Sorry, read the description too fluently.
On the other hand, all the work with |
Actually, So, my scenario is the following: What do you think? Patrick |
Right, I forgot about the TSBPD thread. That would explain this crash. Then the protection with |
I had added the lock and the problem disappeared. |
Bug description
My application crashes in the function CRcvLossList::getFirstLostSeq(). When the crash happens m_iHead is -1 whereas m_iLength is 1. This results in a EXC_BAD_ACCESS (SIGSEGV) exception since the index (m_iHead) into the array is -1. It does not happen very often and is difficult to reproduce, but since our application is used by many users there are many hundred SRT connections per day, it gets an issue.
I am wondering if it is a concurrency problem. I have seen that loss list accesses (remove and insert) are protected with the m_RcvLossLock lock. Since getFirstLostSeq() is not protected would it be possible that an ongoing remove operation (e.g. of the last element in the list) is interrupted at a point where m_iHead is already -1 but m_iLength is not yet 0?
To Reproduce
I am using SRT in SRTT_LIVE mode, TSBPD, non-blocking send / receive mode in sender and receiver. Up to nine connections per application.
As mentioned above it is very difficult to reproduce.
Desktop (please provide the following information):
Additional context
Otherwise SRT works really well for me!
Cheers
Patrick Camina
The text was updated successfully, but these errors were encountered: