-
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
Investigate flaky test-https-set-timeout-server on Raspberry Pi #14133
Comments
Problem might be solved by moving |
(There could also be a case for moving each test into its own test file to rule out side effects.) |
Moving the test to parallel and running it under load reproduces the issue. $ tools/test.py -j92 --repeat 92 test/parallel/test-https-set-timeout-server.js
=== release test-https-set-timeout-server ===
Path: parallel/test-https-set-timeout-server
Mismatched <anonymous> function calls. Expected exactly 1, actual 0.
at Object.exports.mustCall (/Users/trott/io.js/test/common/index.js:484:10)
at serverTimeout (/Users/trott/io.js/test/parallel/test-https-set-timeout-server.js:57:12)
at /Users/trott/io.js/test/common/index.js:518:15
at run (/Users/trott/io.js/test/parallel/test-https-set-timeout-server.js:50:5)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:607:11)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:575:3
... |
If I comment out the first and last test case, the test becomes reliable. |
@nodejs/http Is the following a bug or is it expected behavior? Given this code: const https = require('https');
const server = https.createServer(
{key: keyfile, cert: certfile},
function connectionListener(req, res) {
// just do nothing, we should get a timeout event.
});
server.listen(() => {
const s = server.setTimeout(50, (socket) => {
socket.destroy();
server.close();
});
https.get({
port: server.address().port,
rejectUnauthorized: false
}).on('error', () => {});
}); ... Bug? Expected behavior? Incorrect observation on my part? Something else? |
Because of a race condition, connection listener may not be invoked if test is run under load. Remove `common.mustCall()` wrapper from the listener. Move the test to `parallel` because it now works under load. Make similar change to http test to keep them in synch even though it is much harder to trigger the race in http. Fixes: nodejs#14133
On the assumption that the behavior described in the above comment is Not A Bug, I've opened #14134. |
Because of a race condition, connection listener may not be invoked if test is run under load. Remove `common.mustCall()` wrapper from the listener. Move the test to `parallel` because it now works under load. Make similar change to http test to keep them in synch even though it is much harder to trigger the race in http. PR-URL: #14134 Fixes: #14133 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
Because of a race condition, connection listener may not be invoked if test is run under load. Remove `common.mustCall()` wrapper from the listener. Move the test to `parallel` because it now works under load. Make similar change to http test to keep them in synch even though it is much harder to trigger the race in http. PR-URL: #14134 Fixes: #14133 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
Because of a race condition, connection listener may not be invoked if test is run under load. Remove `common.mustCall()` wrapper from the listener. Move the test to `parallel` because it now works under load. Make similar change to http test to keep them in synch even though it is much harder to trigger the race in http. PR-URL: #14134 Fixes: #14133 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
Because of a race condition, connection listener may not be invoked if test is run under load. Remove `common.mustCall()` wrapper from the listener. Move the test to `parallel` because it now works under load. Make similar change to http test to keep them in synch even though it is much harder to trigger the race in http. PR-URL: #14134 Fixes: #14133 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
Because of a race condition, connection listener may not be invoked if test is run under load. Remove `common.mustCall()` wrapper from the listener. Move the test to `parallel` because it now works under load. Make similar change to http test to keep them in synch even though it is much harder to trigger the race in http. PR-URL: #14134 Fixes: #14133 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
Because of a race condition, connection listener may not be invoked if test is run under load. Remove `common.mustCall()` wrapper from the listener. Move the test to `parallel` because it now works under load. Make similar change to http test to keep them in synch even though it is much harder to trigger the race in http. PR-URL: #14134 Fixes: #14133 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
Because of a race condition, connection listener may not be invoked if test is run under load. Remove `common.mustCall()` wrapper from the listener. Move the test to `parallel` because it now works under load. Make similar change to http test to keep them in synch even though it is much harder to trigger the race in http. PR-URL: #14134 Fixes: #14133 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
https://ci.nodejs.org/job/node-test-binary-arm/9111/RUN_SUBSET=0,label=pi1-raspbian-wheezy/console
@nodejs/testing @nodejs/http
The text was updated successfully, but these errors were encountered: