You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm seeing a rare test fail (been able to reproduce twice over ~100 test runs) on a mac os x 10.10 machine. Tested with io.js 8a1e22a:
Path: parallel/test-child-process-stdout-flush-exit
assert.js:87
throw new assert.AssertionError({
^
AssertionError: false == true
at ChildProcess.<anonymous> (/Users/jbergstroem/io.js/test/parallel/test-child-process-stdout-flush-exit.js:43:5)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:169:7)
at maybeClose (child_process.js:984:16)
at Socket.<anonymous> (child_process.js:1153:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:166:7)
at Pipe.close (net.js:464:12)
Command: out/Release/iojs /Users/jbergstroem/io.js/test/parallel/test-child-process-stdout-flush-exit.js
@piscisaureus That seems to be the issue, yes. The test failure is 100% reproducible when you add a delay in the parent process:
diff --git a/test/parallel/test-child-process-stdout-flush-exit.js b/test/parallel/test-child-process-stdout-flush-exit.js
index eba8927..5fbb1e9 100644
--- a/test/parallel/test-child-process-stdout-flush-exit.js+++ b/test/parallel/test-child-process-stdout-flush-exit.js@@ -17,6 +17,8 @@ if (process.argv[2] === 'child') {
// spawn self as child
var child = spawn(process.argv[0], [process.argv[1], 'child']);
+ for (var t = Date.now(); t + 1e3 > Date.now(););+
var gotHello = false;
var gotBye = false;
It doesn't seem to be an issue of libuv buffering data and not getting a chance to flush it because even when all writes hit the kernel, the test still fails. I speculate that data ends up in the kernel pipe buffer and is subsequently lost when the child process exits.
Activity
jbergstroem commentedon Mar 3, 2015
Can't reproduce this any longer. Closing for now.
Fishrock123 commentedon Mar 4, 2015
There's something flaky going on here:
OS X 10.10.2, io.js at 78581c8, happened only once so far.
piscisaureus commentedon Mar 4, 2015
@bnoordhuis Could this have something to do with stdout being asynchronous?
tellnes commentedon Mar 4, 2015
I've also seen this on os x 10.9.5.
bnoordhuis commentedon Mar 5, 2015
@piscisaureus That seems to be the issue, yes. The test failure is 100% reproducible when you add a delay in the parent process:
It doesn't seem to be an issue of libuv buffering data and not getting a chance to flush it because even when all writes hit the kernel, the test still fails. I speculate that data ends up in the kernel pipe buffer and is subsequently lost when the child process exits.
Fishrock123 commentedon Mar 22, 2015
Also cropped up on the latest (otherwise green) windows build: https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/359/nodes=iojs-win2012r2/console
rvagg commentedon Mar 22, 2015
been a semi-regular offender on the Windows CI machines of late actually
abrady0 commentedon Apr 23, 2015
I'm seeing this 100% of the time when a child process outputs a large amount of text (>8k) and calls subprocess.exit().
here is a gist that repros: https://gist.github.com/abrady0/f69de07b79d1b50b0ca0
if you comment line 43 out it will succeed.
Fishrock123 commentedon Jun 2, 2015
Should be fixed in
311c3e4test: fix test-child-process-stdout-flush-exit
bnoordhuis commentedon Jun 2, 2015
Make that b926718.
test: fix test-child-process-stdout-flush-exit