-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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-debug-port-from-cmdline odd behaviour #2177
Comments
Not normal. I think it's safe to assume that there is some underlying bug here which results in intermittent test failures. We thought they were related to our CI machines, but your experience shows it happens in the wild too. See #2094 and #2149 for some (likely misguided) attempts at fixing it. @orangemocha another new error on this test. It translate to 'The system cannot find the given file':
|
@silverwind This error comes from OpenProcess in DebugProcess in node.cc because the child process is already terminated.The child process exits after stream.end() @ https://github.com/nodejs/io.js/blob/master/test/parallel/test-debug-port-from-cmdline.js#L11 |
This test was failing because the spawned process was terminated before anything could be done, by calling child.stdin.end. With this change, the child's stdin is no longer closed. When the stdin is not a tty, io.js waits for the whole input before starting, so the child must be run with --interactive to process the command sent by the parent. The child is killed explicitly by the parent before it exits. This test was failing silently because the asserts were not called if nothing was received from the child. This fix moves assertOutputLines to always run on exit. Fixes nodejs#2094 Fixes nodejs#2177
@mathiask88 I had the same problem, the debug build failed every time, exactly as yours. I investigated and found it is the same problem as #2149 . I opened a PR: #2186 . If you have the time, can you check if it fixes your issue? |
This test was failing because the spawned process was terminated before anything could be done, by calling child.stdin.end. With this change, the child's stdin is no longer closed. When the stdin is not a tty, io.js waits for the whole input before starting, so the child must be run with --interactive to process the command sent by the parent. The child is killed explicitly by the parent before it exits. This test was failing silently because the asserts were not called if nothing was received from the child. This fix moves assertOutputLines to always run on exit. Fixes: #2177 Refs: #2094 PR-URL: #2186 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
Fixed in 2b4b600 |
This change is a backport of 2b4b600 from io.js. Original commit message: This test was failing because the spawned process was terminated before anything could be done, by calling child.stdin.end. With this change, the child's stdin is no longer closed. When the stdin is not a tty, io.js waits for the whole input before starting, so the child must be run with --interactive to process the command sent by the parent. The child is killed explicitly by the parent before it exits. This test was failing silently because the asserts were not called if nothing was received from the child. This fix moves assertOutputLines to always run on exit. Fixes: nodejs/node#2177 Refs: nodejs/node#2094 PR-URL: nodejs/node#2186 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Alexis Campailla <alexis@janeasystems.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> PR-URL: #25748
This change is a backport of 2b4b600 from io.js. Original commit message: This test was failing because the spawned process was terminated before anything could be done, by calling child.stdin.end. With this change, the child's stdin is no longer closed. When the stdin is not a tty, io.js waits for the whole input before starting, so the child must be run with --interactive to process the command sent by the parent. The child is killed explicitly by the parent before it exits. This test was failing silently because the asserts were not called if nothing was received from the child. This fix moves assertOutputLines to always run on exit. Fixes: nodejs/node#2177 Refs: nodejs/node#2094 PR-URL: nodejs/node#2186 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Alexis Campailla <alexis@janeasystems.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> PR-URL: nodejs#25748
I recently ran the parallel tests on my win8.1x64 machine and saw a strange behaviour of
test-debug-port-from-cmdline
. For the release build the test passed but for the debug build not. The startup time for a node process in debug build is ~2secs and the child process was closed before the parent had a chance to connect the debugger.Is this normal that the release and debug builds show different behaviours?
Test gists:
https://gist.github.com/mathiask88/af67b5b7b60bab5ce990
https://gist.github.com/mathiask88/6e4763580649eb06fe2e
The text was updated successfully, but these errors were encountered: