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

Viosock: Take Care of Recv Requests Stucks After Socket Shutdown #1036

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

MartinDrab
Copy link
Contributor

When an other end (peer) of the socket reports a shutdown, the recv request queue is not processed. This means that some recv calls may get stuck forever. This pull request changes the behavior -- when a shutdown from its peer is received, the recv queue gets processed and all requests that would get stuck are completed with STATUS_SUCCESS (which usually ends in receiving zero bytes).

This should fix #1020. I tested with

  • client in WIndows VM, server on the host,
    • both client and server within the same Windows VM.

When an other end (peer) of the socket reports a shutdown, the recv request queue is not processed. This means that some recv calls may get stuck forever. This commit changes the behavior -- when a shutdown from its peer is received, the recv queue gets processed and all requests that would get stuck are completed with STATUS_SUCCESS (which usually ends in receiving zero bytes).

Signed-off-by: Martin Drab <[email protected]>
@YanVugenfirer
Copy link
Collaborator

@MartinDrab Thanks!
Waiting for CI to run before merging

@MartinDrab MartinDrab changed the title Viosock: Take Care of Recv Requests Stucks After Pocket Shutdown Viosock: Take Care of Recv Requests Stucks After Socket Shutdown Jan 28, 2024
@YanVugenfirer YanVugenfirer merged commit 091c35f into virtio-win:master Jan 30, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Viosock : recv stuck in client, while the socket is being SHUTDOWN from host
2 participants