Repository navigation
Investigate flaky test-worker-init-failure #33759
Copy link
Copy link
Closed
Labels
flaky-testIssues and PRs involving tests that fail intermittently in CI.Issues and PRs involving tests that fail intermittently in CI.macosIssues and PRs related to the macOS platform.Issues and PRs related to the macOS platform.
Description
- Test: test-worker-init-failure
- Platform: macOS
- Console Output:
2020-06-05T18:48:01.6873370Z === release test-worker-init-failure ===
2020-06-05T18:48:01.6873870Z Path: parallel/test-worker-init-failure
2020-06-05T18:48:01.6874340Z --- stderr ---
2020-06-05T18:48:01.6874460Z assert.js:103
2020-06-05T18:48:01.6874620Z throw new AssertionError(obj);
2020-06-05T18:48:01.6874720Z ^
2020-06-05T18:48:01.6874780Z
2020-06-05T18:48:01.6874950Z AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
2020-06-05T18:48:01.6875030Z
2020-06-05T18:48:01.6875120Z 1 !== 0
2020-06-05T18:48:01.6875180Z
2020-06-05T18:48:01.6875770Z at ChildProcess.<anonymous> (/Users/runner/runners/2.263.0/work/node/node/test/parallel/test-worker-init-failure.js:64:12)
2020-06-05T18:48:01.6875930Z at ChildProcess.<anonymous> (/Users/runner/runners/2.263.0/work/node/node/test/common/index.js:363:15)
2020-06-05T18:48:01.6876700Z at ChildProcess.emit (events.js:315:20)
2020-06-05T18:48:01.6876820Z at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12) {
2020-06-05T18:48:01.6876940Z generatedMessage: true,
2020-06-05T18:48:01.6877410Z code: 'ERR_ASSERTION',
2020-06-05T18:48:01.6877530Z actual: 1,
2020-06-05T18:48:01.6877630Z expected: 0,
2020-06-05T18:48:01.6878040Z operator: 'strictEqual'
2020-06-05T18:48:01.6878160Z }
2020-06-05T18:48:01.6878550Z --- stdout ---
2020-06-05T18:48:01.6878650Z child stdout:
2020-06-05T18:48:01.6878710Z
2020-06-05T18:48:01.6878810Z child stderr: assert.js:920
2020-06-05T18:48:01.6878910Z throw err;
2020-06-05T18:48:01.6879000Z ^
2020-06-05T18:48:01.6879060Z
2020-06-05T18:48:01.6879170Z AssertionError [ERR_ASSERTION]: The input did not match the regular expression /EMFILE/. Input:
2020-06-05T18:48:01.6879230Z
2020-06-05T18:48:01.6879660Z 'ENOENT: no such file or directory, uv_cwd'
2020-06-05T18:48:01.6879740Z
2020-06-05T18:48:01.6880250Z at Worker.<anonymous> (/Users/runner/runners/2.263.0/work/node/node/test/parallel/test-worker-init-failure.js:38:14)
2020-06-05T18:48:01.6880380Z at Worker.emit (events.js:315:20)
2020-06-05T18:48:01.6880820Z at Worker.[kOnErrorMessage] (internal/worker.js:235:10)
2020-06-05T18:48:01.6880990Z at Worker.[kOnMessage] (internal/worker.js:245:37)
2020-06-05T18:48:01.6881140Z at MessagePort.<anonymous> (internal/worker.js:166:57)
2020-06-05T18:48:01.6881260Z at MessagePort.emit (events.js:315:20)
2020-06-05T18:48:01.6881460Z at MessagePort.onmessage (internal/worker/io.js:80:8)
2020-06-05T18:48:01.6881580Z at MessagePort.exports.emitMessage (internal/per_context/messageport.js:11:10)
2020-06-05T18:48:01.6881700Z at Worker.[kOnExit] (internal/worker.js:217:5)
2020-06-05T18:48:01.6881810Z at Worker.<computed>.onexit (internal/worker.js:163:20) {
2020-06-05T18:48:01.6881920Z generatedMessage: true,
2020-06-05T18:48:01.6882380Z code: 'ERR_ASSERTION',
2020-06-05T18:48:01.6882840Z actual: 'ENOENT: no such file or directory, uv_cwd',
2020-06-05T18:48:01.6882960Z expected: /EMFILE/,
2020-06-05T18:48:01.6883350Z operator: 'match'
2020-06-05T18:48:01.6883460Z }
2020-06-05T18:48:01.6883950Z Command: out/Release/node /Users/runner/runners/2.263.0/work/node/node/test/parallel/test-worker-init-failure.js
2020-06-05T18:48:01.6884040Z
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
flaky-testIssues and PRs involving tests that fail intermittently in CI.Issues and PRs involving tests that fail intermittently in CI.macosIssues and PRs related to the macOS platform.Issues and PRs related to the macOS platform.
Activity
MylesBorins commentedon Jul 14, 2020
Seeing this flake a bunch locally while preparing a 14.x release
Trott commentedon Jul 15, 2020
Happened in node-daily-master today.
https://ci.nodejs.org/job/node-test-commit-osx/35263/nodes=osx1015/console
Trott commentedon Jul 15, 2020
cc @nodejs/workers @HarshithaKP
addaleax commentedon Jul 15, 2020
I think this might be specific to macOS. If somebody can reproduce locally, I’m up for a joint debugging session.
HarshithaKP commentedon Jul 15, 2020
I will try to reproduce it.
MylesBorins commentedon Jul 16, 2020
@addaleax I can reproduce this somewhat reliably if you want to pair.
Trott commentedon Jul 16, 2020
Showed up in node-daily-master again today.
https://ci.nodejs.org/job/node-test-commit-osx/35280/nodes=osx1015/console
Details
gireeshpunathil commentedon Jul 17, 2020
node/test/parallel/test-worker-init-failure.js
Lines 37 to 40 in bf0d82c
I think the assumption that only
EMFILE(too many open files) can occur in aulimit -nsetting is incorrect. Depending on where (early phase of process creation and setup versus runtime of the process) the inability to open new files occurs, the actual error code my differ.ENOENTAccommodating this error code too in the assertion seems to a pragmatic approach?
Trott commentedon Jul 17, 2020
Accommodating a helpful ENOENT error message would indeed be pragmatic. Does
'ENOENT: no such file or directory, uv_cwd'qualify as sufficiently useful to the end user?uv_cwdis internal. It seems like the message is less than ideal. The test has this comment:I'm conflicted about whether the right thing to do is to accommodate this error message or if the right thing to do is to try to improve it somehow.
gireeshpunathil commentedon Jul 17, 2020
@Trott - agree, makes sense!
I think part of it has also to do with a limitation in libuv: it does not tell which file was missing. We had discussions on that in a different issue, but there wasn't any solution.
gireeshpunathil commentedon Jul 17, 2020
Ref: #11520
addaleax commentedon Jul 17, 2020
I would suggest that it’s worth figuring out why libuv is failing with this error, particularly because it’s OS-dependent.
@MylesBorins I’m available most of next week, maybe we can find some time then :)
MylesBorins commentedon Jul 17, 2020
@addaleax next week is tough for me due to TC39. Ping me on chat and maybe we can work something out
5 remaining items
addaleax commentedon Jul 26, 2020
Yeah, that makes sense – I think it would be nice to wrap the
process.argv[1] = path.resolve(process.argv[1]);line in atry ... catch, we can’t expect it to succeed in all cases anyway.lib: absorb `path` error cases
Trott commentedon Aug 11, 2020
Still failing on CI on macOS.
https://ci.nodejs.org/job/node-test-commit-osx/35686/nodes=osx1015/console
Trott commentedon Aug 11, 2020
I wonder if the right thing to do is remove the
e.messagecheck and let thee.codecheck suffice.test: remove error message checking in test-worker-init-failure
gireeshpunathil commentedon Aug 11, 2020
looks like we have one more case that we missed here: the exact same
libuvfailure, but occurring after the worker is fully booted up - in which case the error isemittedas opposed tothrown.So if we accept the previous fix in principle, the right thing is to accommodate this error type in the test case itself.
/cc @addaleax for opinion.
gireeshpunathil commentedon Aug 11, 2020
o! failed to see @Trott 's PR. will review that instead.
lib: absorb `path` error cases
lib: absorb `path` error cases
lib: absorb `path` error cases