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] Overlapped send with 100 ms timeout on Windows. #2834

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

maxsharabayko
Copy link
Collaborator

An infinite hand up on the WSAGetOverlappedResult was observed when transferring files using srt-xtransmit on Windows.
Therefore adding a timeout of 100 ms to wait for the result.
This PR is mainly a reincarnation of #974.

SRT version with the issue: v1.5.3 (after PR #2632).

@maxsharabayko maxsharabayko added Type: Bug Indicates an unexpected problem or unintended behavior [core] Area: Changes in SRT library core labels Dec 15, 2023
@maxsharabayko maxsharabayko added this to the v1.6.0 milestone Dec 15, 2023
@maxsharabayko maxsharabayko merged commit b1c0be2 into Haivision:master Dec 20, 2023
8 of 10 checks passed
@maxsharabayko maxsharabayko deleted the hotfix/wsaoverlapped branch December 20, 2023 12:15
@mGaosi
Copy link
Contributor

mGaosi commented Dec 27, 2023

@maxsharabayko
This has a problem, The srt::CChannel::sendto will be call in CSndQueue(thread1) and CRcvQueue(thread2), and that not thread safety.

Them used same WSAOVERLAPPED, so WSASendTo maybe not completed when WSAWaitForMultipleEvents return.

From https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsasendto

The lpOverlapped parameter must be valid for the duration of the overlapped operation. If multiple I/O operations are simultaneously outstanding, each must reference a separate WSAOVERLAPPED structure.

mGaosi added a commit to mGaosi/srt that referenced this pull request Jan 22, 2024
…#2838).

The lpOverlapped parameter must be valid for the duration of the overlapped operation. If multiple I/O operations are simultaneously outstanding, each must reference a separate WSAOVERLAPPED structure.

This reverts commit b1c0be2.

resolves Haivision#2632 Haivision#2834 Haivision#2838
mGaosi added a commit to mGaosi/srt that referenced this pull request Jan 22, 2024
…#2838).

The lpOverlapped parameter must be valid for the duration of the overlapped operation. If multiple I/O operations are simultaneously outstanding, each must reference a separate WSAOVERLAPPED structure.

This reverts commit b1c0be2.

resolves Haivision#973 Haivision#2632 Haivision#2834 Haivision#2838
mGaosi added a commit to mGaosi/srt that referenced this pull request Jan 26, 2024
…#2838).

The lpOverlapped parameter must be valid for the duration of the overlapped operation. If multiple I/O operations are simultaneously outstanding, each must reference a separate WSAOVERLAPPED structure.

This reverts commit b1c0be2.

resolves Haivision#973 Haivision#2632 Haivision#2834 Haivision#2838
maxsharabayko added a commit to maxsharabayko/srt that referenced this pull request Apr 16, 2024
Overlapped send with 100 ms timeout on Windows added a data race.
maxsharabayko added a commit to maxsharabayko/srt that referenced this pull request Apr 16, 2024
The lpOverlapped parameter must be valid for the duration of the overlapped operation.
If multiple I/O operations are simultaneously outstanding, each must reference a separate WSAOVERLAPPED structure.
Resolves Haivision#973, Haivision#2632, Haivision#2834, Haivision#2838.

Co-authored-by: Jiangjie Gao <[email protected]>
maxsharabayko added a commit to maxsharabayko/srt that referenced this pull request Apr 16, 2024
Overlapped send with 100 ms timeout on Windows added a data race.
maxsharabayko added a commit to maxsharabayko/srt that referenced this pull request Apr 16, 2024
The lpOverlapped parameter must be valid for the duration of the overlapped operation.
If multiple I/O operations are simultaneously outstanding, each must reference a separate WSAOVERLAPPED structure.
Resolves Haivision#973, Haivision#2632, Haivision#2834, Haivision#2838.

Co-authored-by: Jiangjie Gao <[email protected]>
maxsharabayko added a commit to maxsharabayko/srt that referenced this pull request Apr 17, 2024
The lpOverlapped parameter must be valid for the duration of the overlapped operation.
If multiple I/O operations are simultaneously outstanding, each must reference a separate WSAOVERLAPPED structure.
Resolves Haivision#973, Haivision#2632, Haivision#2834, Haivision#2838.

Co-authored-by: Jiangjie Gao <[email protected]>
maxsharabayko added a commit that referenced this pull request Apr 17, 2024
Overlapped send with 100 ms timeout on Windows added a data race.
maxsharabayko added a commit that referenced this pull request Apr 17, 2024
The lpOverlapped parameter must be valid for the duration of the overlapped operation.
If multiple I/O operations are simultaneously outstanding, each must reference a separate WSAOVERLAPPED structure.
Resolves #973, #2632, #2834, #2838.

Co-authored-by: Jiangjie Gao <[email protected]>
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.

2 participants