[BUG] Potential leak of TSBPD thread #1624
Labels
[core]
Area: Changes in SRT library core
Priority: High
Type: Bug
Indicates an unexpected problem or unintended behavior
Milestone
The
join()
operation on the TSBPD thread may be missed ifCUDT::releaseSynch()
finishes its execution while the receiving thread is still active and is only about to create this thread (seeStartThread(m_RcvTsbPdThread, CUDT::tsbpd, ...)
inCUDT::processData(..)
)..It can only happen if a socket was closed right before the very first DATA packet has arrived.
The issue does not happen if the reception has already started.
This issue was reported through #1606.
The potential TSBPD thread leak existed in previous versions as well and is not something introduced in v1.4.2.
However, only C++11 threads throw an exception from the destructor if the thread is still joinable (see ~thread()).
On Windows:
On Linux:
-DENABLE_STDCXX_SYNC=ON
).-DENABLE_STDCXX_SYNC=OFF
).The text was updated successfully, but these errors were encountered: