Closed
Conversation
On Windows there can exist some race condition where the notification of the client's `socket.destroy()` isn't received before the server writes to the socket. This race condition was more evident/reproducible on a single core system. This commit fixes the flakiness by waiting until the server's connection event handler has been called to destroy the client socket and perform the server socket write. Fixes: nodejs#4057
Contributor
Author
|
Stress test: https://ci.nodejs.org/job/node-stress-single-test/191/nodes=win2012r2/ |
Member
|
Works for me if it works for the others who have been looking at this: As I said in the other issue, I'd still like to know the mechanism by which adding |
Member
|
LGTM |
Member
|
LGTM The fact that this failed so reliably on Windows 2012 alone still worries me, together with the apparent interference with console. |
mscdex
added a commit
that referenced
this pull request
Dec 19, 2015
On Windows there can exist some race condition where the notification of the client's `socket.destroy()` isn't received before the server writes to the socket. This race condition was more evident/reproducible on a single core system. This commit fixes the flakiness by waiting until the server's connection event handler has been called to destroy the client socket and perform the server socket write. Fixes: #4057 PR-URL: #4342 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: João Reis <reis@janeasystems.com>
Contributor
Author
|
Landed in 4b0b991. |
Fishrock123
pushed a commit
to Fishrock123/node
that referenced
this pull request
Dec 22, 2015
On Windows there can exist some race condition where the notification of the client's `socket.destroy()` isn't received before the server writes to the socket. This race condition was more evident/reproducible on a single core system. This commit fixes the flakiness by waiting until the server's connection event handler has been called to destroy the client socket and perform the server socket write. Fixes: nodejs#4057 PR-URL: nodejs#4342 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: João Reis <reis@janeasystems.com>
Fishrock123
pushed a commit
to Fishrock123/node
that referenced
this pull request
Jan 6, 2016
On Windows there can exist some race condition where the notification of the client's `socket.destroy()` isn't received before the server writes to the socket. This race condition was more evident/reproducible on a single core system. This commit fixes the flakiness by waiting until the server's connection event handler has been called to destroy the client socket and perform the server socket write. Fixes: nodejs#4057 PR-URL: nodejs#4342 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: João Reis <reis@janeasystems.com>
mscdex
added a commit
that referenced
this pull request
Jan 7, 2016
On Windows there can exist some race condition where the notification of the client's `socket.destroy()` isn't received before the server writes to the socket. This race condition was more evident/reproducible on a single core system. This commit fixes the flakiness by waiting until the server's connection event handler has been called to destroy the client socket and perform the server socket write. Fixes: #4057 PR-URL: #4342 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: João Reis <reis@janeasystems.com>
MylesBorins
pushed a commit
that referenced
this pull request
Jan 19, 2016
On Windows there can exist some race condition where the notification of the client's `socket.destroy()` isn't received before the server writes to the socket. This race condition was more evident/reproducible on a single core system. This commit fixes the flakiness by waiting until the server's connection event handler has been called to destroy the client socket and perform the server socket write. Fixes: #4057 PR-URL: #4342 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: João Reis <reis@janeasystems.com>
Merged
scovetta
pushed a commit
to scovetta/node
that referenced
this pull request
Apr 2, 2016
On Windows there can exist some race condition where the notification of the client's `socket.destroy()` isn't received before the server writes to the socket. This race condition was more evident/reproducible on a single core system. This commit fixes the flakiness by waiting until the server's connection event handler has been called to destroy the client socket and perform the server socket write. Fixes: nodejs#4057 PR-URL: nodejs#4342 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: João Reis <reis@janeasystems.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Windows there can exist some race condition where the OS notification of the client's
socket.destroy()isn't received before the server writes to the socket, so the OS happily writes to the server socket and thesocket.destroy()notification is seen as an EOF. This race condition was more evident/reproducible on a single core system (for obvious reasons in hindsight).This commit fixes the flakiness by waiting until the server's connection event handler has been called to destroy the client socket and perform the server socket write.
Fixes: #4057