Skip to content
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

[core] Improved mutex protection of the TSBPD. #3038

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

maxsharabayko
Copy link
Collaborator

Increased mutex protection of the TSBPDTime class, switched from a regular mutex to a shared mutex.

Fixes #3036, #3037.

@maxsharabayko maxsharabayko added Type: Bug Indicates an unexpected problem or unintended behavior [core] Area: Changes in SRT library core labels Oct 7, 2024
@maxsharabayko maxsharabayko added this to the v1.5.4 milestone Oct 7, 2024
@maxsharabayko
Copy link
Collaborator Author

@jlsantiago0 could you please test with tsan? My test with xtransmit and fsanitize=thread does not show the error.

@maxsharabayko
Copy link
Collaborator Author

Reproduced with xtransmit using two concurrent streams. Current PR resolves the issue (no warnings from TSAN).

srt-xtransmit receive "srt://:4200" -v --enable-metrics --concurrent-streams 2 --maxconns 2
srt-xtransmit generate "srt://ip:4200" --sendrate 70Mbps --enable-metrics -v --duration 25s --concurrent-streams 2 --maxconns 2

@maxsharabayko maxsharabayko marked this pull request as ready for review October 8, 2024 10:17
@maxsharabayko maxsharabayko merged commit 3c7022e into Haivision:master Oct 8, 2024
12 checks passed
@maxsharabayko maxsharabayko deleted the hotfix/tsbpd-mutex branch October 8, 2024 14:29
@jlsantiago0
Copy link
Contributor

@jlsantiago0 could you please test with tsan? My test with xtransmit and fsanitize=thread does not show the error.

Yes.

@jlsantiago0
Copy link
Contributor

@maxsharabayko I tested with 1.5.4.rc2 and the race issues and memory access violations are fixed.

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 Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] [TSAN] class DriftTracer is racey
3 participants