You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
removeFromGroup is getting executed under a lock of m_GlobControlLock. Theoretically packData checks the m_bClosing flag in the beginning, but no lock is applied there. Actually removal from the group is theoretically allowed on a socket that is processing an incoming packet, but then we need it either this field atomic, or we need to find a way to just skip the GC cycle by a socket that is under processing - and that was part of what this SocketKeeper was for. This skipping will not happen forever. You can have just one case of calling a processData function while m_bClosing field is not yet set. If the simultaneous call for removeFromGroup has happened, it means that this field is set at this time, so processData will not execute the next time.
This problem should be now addressed in #2893. The busy counter is added in the function that dispatches the packet to the given socket. This socket will not be deleted as long as processing isn't finished, but if the socket will be moved to trash in the meantime, any next dispatching will not be possible, so no more busy-acquisition will be done.
SRT v1.5.3+ (54c002f).
To Reproduce
Build srt-xtransmit with Thread Sanitizer (
-DCMAKE_CXX_FLAGS='-fsanitize=thread' -DWITH_COMPILER_TYPE=clang
).The error is reported on the receiver.
Epic #1610 – Core Synchronization Issues.
The text was updated successfully, but these errors were encountered: