-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
test-child-process-fork-getconnections intermittently fails #1100
Comments
Fwiw, this has happened on the CI a bunch too. |
See also node's tracking issue: nodejs/node-v0.x-archive#16805 |
Not sure if this helps at all, but I applied this little debugging patch: diff --git a/test/sequential/test-child-process-fork-getconnections.js b/test/sequential/test-child-process-fork-getconnections.js
index a587713..0f10fce 100644
--- a/test/sequential/test-child-process-fork-getconnections.js
+++ b/test/sequential/test-child-process-fork-getconnections.js
@@ -34,7 +34,7 @@ if (process.argv[2] === 'child') {
child.on('exit', function(code, signal) {
if (!childKilled)
- throw new Error('child died unexpectedly!');
+ throw new Error(`child died unexpectedly with code: ${code} and signal: ${signal}!`);
});
var server = net.createServer(); And it exits with code 1 and a null signal. |
I glanced through the source code, but I couldn't find |
@thefourtheye yeah, when I went through the test before, I think |
I'm not certain, but I think there is a race condition somewhere in the code that handles passing sockets between processes (in core, not the test). I've basically rewritten this test from scratch and am seeing sockets being closed just by sending them to the child process. |
The I realize it was more than two years ago when that commit happened so any recollection may be very foggy, and he's busy CEO-ing these days, but gonna slip a /cc @isaacs in the off chance he'd like to take a look and maybe shed some light. Leftover debugging code? Always failing is actually correct behavior? Something else? |
I can't even find it by searching the codebase at or around the original commit's time. I suspect it is leftover debug code. Let's remove it. |
But if we yank it, does that mean the event should always throw and error or it should just be removed because it should never throw an error? I'm inclined to try to find the right place in the code to set that property, actually. Like, "if we're here, we are trying to close this socket, so no error". But maybe there isn't one and you're right. So... |
Yeah, let's ditch it, it should always throw. I wouldn't set a property in the code because it appeared in a test without any comment / commit log (grunt). |
#2609 should fix this test. I still need to submit an issue for the bug itself, but this test can be written and still test all the same stuff without tripping up on this bug. |
#2610 opened with slightly more minimal test code to trip the bug that caused the issue here. |
Anyone feel good enough about #2609 to give it a LGTM so we can close this issue? I know with all the shenanigans going on right now with 4.0 looming and a new PR-landing process, this is probably the worst possible time to ask, but that won't stop me. |
This retains the key elements of test-child-process-fork-getconnections (forks a child process, sends a bunch of sockets, uses getConnections() to enumerate them) but contains some code to work around an apparent intermittent bug that occurs on OS X where a socket seems to close itself unexpectedly. nodejs#2610 was opened for the bug that was causing the problem in the first place. PR-URL: nodejs#2609 Fixes: nodejs#1100
This retains the key elements of test-child-process-fork-getconnections (forks a child process, sends a bunch of sockets, uses getConnections() to enumerate them) but contains some code to work around an apparent intermittent bug that occurs on OS X where a socket seems to close itself unexpectedly. #2610 was opened for the bug that was causing the problem in the first place. PR-URL: #2609 Fixes: #1100 Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Fixed by 8ca9ea2 |
This retains the key elements of test-child-process-fork-getconnections (forks a child process, sends a bunch of sockets, uses getConnections() to enumerate them) but contains some code to work around an apparent intermittent bug that occurs on OS X where a socket seems to close itself unexpectedly. #2610 was opened for the bug that was causing the problem in the first place. PR-URL: #2609 Fixes: #1100 Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
This retains the key elements of test-child-process-fork-getconnections (forks a child process, sends a bunch of sockets, uses getConnections() to enumerate them) but contains some code to work around an apparent intermittent bug that occurs on OS X where a socket seems to close itself unexpectedly. nodejs#2610 was opened for the bug that was causing the problem in the first place. PR-URL: nodejs#2609 Fixes: nodejs#1100 Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
This retains the key elements of test-child-process-fork-getconnections (forks a child process, sends a bunch of sockets, uses getConnections() to enumerate them) but contains some code to work around an apparent intermittent bug that occurs on OS X where a socket seems to close itself unexpectedly. #2610 was opened for the bug that was causing the problem in the first place. PR-URL: #2609 Fixes: #1100 Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
This retains the key elements of test-child-process-fork-getconnections (forks a child process, sends a bunch of sockets, uses getConnections() to enumerate them) but contains some code to work around an apparent intermittent bug that occurs on OS X where a socket seems to close itself unexpectedly. #2610 was opened for the bug that was causing the problem in the first place. PR-URL: #2609 Fixes: #1100 Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
This retains the key elements of test-child-process-fork-getconnections (forks a child process, sends a bunch of sockets, uses getConnections() to enumerate them) but contains some code to work around an apparent intermittent bug that occurs on OS X where a socket seems to close itself unexpectedly. #2610 was opened for the bug that was causing the problem in the first place. PR-URL: #2609 Fixes: #1100 Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
This retains the key elements of test-child-process-fork-getconnections (forks a child process, sends a bunch of sockets, uses getConnections() to enumerate them) but contains some code to work around an apparent intermittent bug that occurs on OS X where a socket seems to close itself unexpectedly. #2610 was opened for the bug that was causing the problem in the first place. PR-URL: #2609 Fixes: #1100 Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Sometimes getting this when testing master (fe36076) on OS X 10.10.2
cc @bnoordhuis?
The text was updated successfully, but these errors were encountered: