Skip to content
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 parallel/test-http-dump-req-when-res-ends.js #19139

Closed
apapirovski opened this issue Mar 4, 2018 · 6 comments
Closed

Investigate flaky parallel/test-http-dump-req-when-res-ends.js #19139

apapirovski opened this issue Mar 4, 2018 · 6 comments
Labels
flaky-test Issues and PRs related to the tests with unstable failures on the CI. http Issues or PRs related to the http subsystem.

Comments

@apapirovski
Copy link
Member

This recently failed on alpine37-container-x64.

resume called
events.js:116
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at WriteWrap.afterWrite [as oncomplete] (net.js:866:14)

https://ci.nodejs.org/job/node-test-commit-linux/16829/nodes=alpine37-container-x64/tapResults/

/cc @mcollina @addaleax

@apapirovski apapirovski added flaky-test Issues and PRs related to the tests with unstable failures on the CI. http Issues or PRs related to the http subsystem. labels Mar 4, 2018
@addaleax
Copy link
Member

addaleax commented Mar 5, 2018

I can reproduce this locally, and get errors even on Node 8; so it’s most likely a bug in the test.

It also looks like increasing the timer duration in the test helps. Ideally, we’d just get rid of it, and instead call res.end() based on other events happening?

@mcollina
Copy link
Member

mcollina commented Mar 5, 2018

@addaleax I tried that approach, but couldn't get the dump to happen reliably. It would be good if someone else brought in some new eyes into the problem. That part of the codebase was never tested :/.

@Trott
Copy link
Member

Trott commented Apr 5, 2018

Happened on FreeBSD today:

https://ci.nodejs.org/job/node-test-commit-freebsd/16727/nodes=freebsd10-64/console

not ok 732 parallel/test-http-dump-req-when-res-ends
  ---
  duration_ms: 1.242
  severity: fail
  stack: |-
    resume called
    Mismatched <anonymous> function calls. Expected at least 1, actual 0.
        at Object.exports.mustCallAtLeast (/usr/home/iojs/build/workspace/node-test-commit-freebsd/nodes/freebsd10-64/test/common/index.js:431:10)
        at IncomingMessage.<anonymous> (/usr/home/iojs/build/workspace/node-test-commit-freebsd/nodes/freebsd10-64/test/parallel/test-http-dump-req-when-res-ends.js:12:27)
        at IncomingMessage.<anonymous> (/usr/home/iojs/build/workspace/node-test-commit-freebsd/nodes/freebsd10-64/test/common/index.js:467:15)
        at IncomingMessage.emit (events.js:182:13)
        at resume_ (_stream_readable.js:855:10)
        at process._tickCallback (internal/process/next_tick.js:174:19)

@Trott
Copy link
Member

Trott commented Apr 5, 2018

Very easy to reproduce:

$ tools/test.py -j 96 --repeat 192 test/parallel/test-http-dump-req-when-res-ends.js 
=== release test-http-dump-req-when-res-ends ===                    
Path: parallel/test-http-dump-req-when-res-ends
resume called
Mismatched <anonymous> function calls. Expected at least 1, actual 0.
    at Object.exports.mustCallAtLeast (/Users/trott/io.js/test/common/index.js:431:10)
    at IncomingMessage.<anonymous> (/Users/trott/io.js/test/parallel/test-http-dump-req-when-res-ends.js:12:27)
    at IncomingMessage.<anonymous> (/Users/trott/io.js/test/common/index.js:467:15)
    at IncomingMessage.emit (events.js:182:13)
    at resume_ (_stream_readable.js:855:10)
    at process._tickCallback (internal/process/next_tick.js:174:19)
Command: out/Release/node /Users/trott/io.js/test/parallel/test-http-dump-req-when-res-ends.js
=== release test-http-dump-req-when-res-ends ===                    
Path: parallel/test-http-dump-req-when-res-ends
resume called
Mismatched <anonymous> function calls. Expected at least 1, actual 0.
    at Object.exports.mustCallAtLeast (/Users/trott/io.js/test/common/index.js:431:10)
    at IncomingMessage.<anonymous> (/Users/trott/io.js/test/parallel/test-http-dump-req-when-res-ends.js:12:27)
    at IncomingMessage.<anonymous> (/Users/trott/io.js/test/common/index.js:467:15)
    at IncomingMessage.emit (events.js:182:13)
    at resume_ (_stream_readable.js:855:10)
    at process._tickCallback (internal/process/next_tick.js:174:19)
Command: out/Release/node /Users/trott/io.js/test/parallel/test-http-dump-req-when-res-ends.js
[SNIP]

@Trott
Copy link
Member

Trott commented Apr 5, 2018

Opening PR to move to sequential. That's more of a mitigation strategy than a fix, but it's better than doing nothing.

@Trott
Copy link
Member

Trott commented Apr 5, 2018

PR: #19819

Trott added a commit to Trott/io.js that referenced this issue Apr 5, 2018
The implementataion is sensitive to system resource availability, so
move it to sequential instead of running out of parallel directory.

Fixes: nodejs#19139
@Trott Trott closed this as completed in a639ec4 Apr 7, 2018
mcollina added a commit to mcollina/node that referenced this issue Apr 7, 2018
mcollina added a commit that referenced this issue Apr 7, 2018
Make sure the dump test actually verify what is happening and it is
not flaky.

See: #19139
PR-URL: #19823
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
BridgeAR pushed a commit to BridgeAR/node that referenced this issue May 1, 2018
Make sure the dump test actually verify what is happening and it is
not flaky.

See: nodejs#19139
PR-URL: nodejs#19823
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaky-test Issues and PRs related to the tests with unstable failures on the CI. http Issues or PRs related to the http subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants