Skip to content

[core] Fixed remaining problems with data races - #3381

Merged
ethouris merged 2 commits into
Haivision:devfrom
ethouris:dev-dev-fix-race1
Sep 16, 2026
Merged

ethouris merged 2 commits into
Haivision:devfrom
ethouris:dev-dev-fix-race1

Conversation

@ethouris

Copy link
Copy Markdown
Collaborator

Fixes:

  1. Separated stop() and close() on CChannel. The multiplexer now calls stop() before stopping the queue worker threads, and then calls close() after making sure that these threads have exit. This avoids potential outdated use of the socket descriptor value by the receiver worker thread after another thread has closed it.
  2. In the unit test facility, UniqueSocket has been made atomic to avoid data race in the test cases.

@ethouris ethouris added this to the v1.6.0 milestone Sep 15, 2026
@ethouris ethouris added Type: Maintenance Work required to maintain or clean up the code [core] Area: Changes in SRT library core [tests] Area: Unit tests labels Sep 15, 2026
@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.81818% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.99%. Comparing base (679f83a) to head (9fc962f).
⚠️ Report is 341 commits behind head on dev.

Files with missing lines Patch % Lines
srtcore/api.cpp 50.00% 2 Missing ⚠️
srtcore/channel.cpp 85.71% 1 Missing ⚠️
srtcore/srt_c_api.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##              dev    #3381       +/-   ##
===========================================
- Coverage   71.12%   53.99%   -17.13%     
===========================================
  Files         101      115       +14     
  Lines       19776    25337     +5561     
  Branches        0     3896     +3896     
===========================================
- Hits        14065    13681      -384     
- Misses       5711    10237     +4526     
- Partials        0     1419     +1419     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ethouris
ethouris merged commit 7ce3e93 into Haivision:dev Sep 16, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[core] Area: Changes in SRT library core [tests] Area: Unit tests Type: Maintenance Work required to maintain or clean up the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DEV][test] UniqueSocket should contain atomic socket variable [MAINT] Solve the problem of multi-thread access to a UDP socket.

1 participant