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
01:14:51 not ok 518 parallel/test-worker-syntax-error-file01:14:51 ---01:14:51 duration_ms: 0.21101:14:51 severity: fail01:14:51 exitcode: 101:14:51 stack: |-01:14:51 Mismatched <anonymous> function calls. Expected exactly 1, actual 0.01:14:51 at Object.mustCall (c:\workspace\node-test-binary-windows\test\common\index.js:312:10)01:14:51 at Object.<anonymous> (c:\workspace\node-test-binary-windows\test\parallel\test-worker-syntax-error-file.js:13:24)01:14:51 at Module._compile (internal/modules/cjs/loader.js:689:30)01:14:51 at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)01:14:51 at Module.load (internal/modules/cjs/loader.js:599:32)01:14:51 at tryModuleLoad (internal/modules/cjs/loader.js:538:12)01:14:51 at Function.Module._load (internal/modules/cjs/loader.js:530:3)01:14:51 at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)01:14:51 at startup (internal/bootstrap/node.js:270:19)01:14:51 ...
not ok 521 parallel/test-worker-syntax-error
---
duration_ms: 0.195
severity: fail
exitcode: 1
stack: |-
Mismatched <anonymous> function calls. Expected exactly 1, actual 0.
at Object.mustCall (c:\workspace\node-test-binary-windows\test\common\index.js:310:10)
at Object.<anonymous> (c:\workspace\node-test-binary-windows\test\parallel\test-worker-syntax-error.js:12:24)
at Module._compile (internal/modules/cjs/loader.js:693:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:704:10)
at Module.load (internal/modules/cjs/loader.js:603:32)
at tryModuleLoad (internal/modules/cjs/loader.js:542:12)
at Function.Module._load (internal/modules/cjs/loader.js:534:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:746:12)
at startup (internal/bootstrap/node.js:270:19)
...
22:48:52 not ok 2016 parallel/test-worker-syntax-error-file22:48:52 ---22:48:52 duration_ms: 0.34322:48:52 severity: fail22:48:52 exitcode: 122:48:52 stack: |-22:48:52 Mismatched <anonymous> function calls. Expected exactly 1, actual 0.22:48:52 at Object.mustCall (/home/iojs/build/workspace/node-test-commit-linux/nodes/centos7-64-gcc6/test/common/index.js:306:10)22:48:52 at Object.<anonymous> (/home/iojs/build/workspace/node-test-commit-linux/nodes/centos7-64-gcc6/test/parallel/test-worker-syntax-error-file.js:13:24)22:48:52 at Module._compile (internal/modules/cjs/loader.js:707:30)22:48:52 at Object.Module._extensions..js (internal/modules/cjs/loader.js:718:10)22:48:52 at Module.load (internal/modules/cjs/loader.js:605:32)22:48:52 at tryModuleLoad (internal/modules/cjs/loader.js:544:12)22:48:52 at Function.Module._load (internal/modules/cjs/loader.js:536:3)22:48:52 at Function.Module.runMain (internal/modules/cjs/loader.js:760:12)22:48:52 at startup (internal/bootstrap/node.js:304:19)22:48:52 ...
ncu-ci walk commit isn't pulling this up. I'm going to close this, but feel free to re-open if there's reason to believe it's still a bug. There's a good chance other fixes that have landed have also fixed this.
00:13:00 not ok 2142 parallel/test-worker-syntax-error-file00:13:00 ---00:13:00 duration_ms: 0.48700:13:00 severity: fail00:13:00 exitcode: 100:13:00 stack: |-00:13:00 Mismatched <anonymous> function calls. Expected exactly 1, actual 0.00:13:00 at Object.mustCall (/home/iojs/build/workspace/node-test-commit-linux/nodes/centos7-64-gcc6/test/common/index.js:339:10)00:13:00 at Object.<anonymous> (/home/iojs/build/workspace/node-test-commit-linux/nodes/centos7-64-gcc6/test/parallel/test-worker-syntax-error-file.js:12:24)00:13:00 at Module._compile (internal/modules/cjs/loader.js:759:30)00:13:00 at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)00:13:00 at Module.load (internal/modules/cjs/loader.js:628:32)00:13:00 at Function.Module._load (internal/modules/cjs/loader.js:555:12)00:13:00 at Function.Module.runMain (internal/modules/cjs/loader.js:824:10)00:13:00 at internal/main/run_main_module.js:17:1100:13:00 ...
@Trott I don’t think this can be fixed without somebody logging into the CI machines and figuring out where one can get a reasonable reproduction rate, and then work on that machine
(Debug logs might also be helpful, esp. NODE_DEBUG_NATIVE=message,worker)
Was able to replicate it on test-rackspace-centos7-x64-1 with ./tools/test.py -J --repeat 1000 test/parallel/test-worker-syntax-error-file.js in /home/iojs/build/workspace/node-test-commit-linux/nodes/centos7-64-gcc6. Had to get through about 200 runs before it failed.
Running it prefaced with NODE_DEBUG_NATIVE=message,worker generates this output upon failure:
=== release test-worker-syntax-error-file === Path: parallel/test-worker-syntax-error-fileMismatched <anonymous> function calls. Expected exactly 1, actual 0. at Object.mustCall (/home/iojs/build/workspace/node-test-commit-linux/nodes/centos7-64-gcc6/test/common/index.js:339:10) at Object.<anonymous> (/home/iojs/build/workspace/node-test-commit-linux/nodes/centos7-64-gcc6/test/parallel/test-worker-syntax-error-file.js:12:24) at Module._compile (internal/modules/cjs/loader.js:759:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10) at Module.load (internal/modules/cjs/loader.js:628:32) at Function.Module._load (internal/modules/cjs/loader.js:555:12) at Function.Module.runMain (internal/modules/cjs/loader.js:824:10) at internal/main/run_main_module.js:17:11Worker (0:2) Creating new worker instance with thread id 1MessagePort (0:3) Created message portWorker (0:2) Preparation for worker 1 finishedMessagePort (0:3) Start receiving messagesMessagePort (0:3) Start receiving messagesMessagePort (0:6) Created message portMessagePort (0:7) Created message portMessagePort (0:6) Start receiving messagesMessagePort (0:7) Closing message port, data set = 1MessagePort (0:6) Start receiving messagesMessagePort (0:7) MessagePort::OnClose()Worker (0:2) Creating isolate for worker with id 1Worker (0:2) Starting worker with id 1Worker (0:2) Created Environment for worker with id 1MessagePort (1:2) Created message portWorker (0:2) Created message port for worker 1MessagePort (1:2) Start receiving messagesMessagePort (1:2) Start receiving messagesWorker (0:2) Loaded environment for worker 1MessagePort (1:2) Running MessagePort::OnMessage()MessagePort (1:2) MessagePort has message, receiving = 1MessagePort (1:3) Created message portMessagePort (0:3) Adding message to incoming queueMessagePort (0:3) Running MessagePort::OnMessage()MessagePort (0:3) MessagePort has message, receiving = 1MessagePort (0:3) MessagePort has message, receiving = 1MessagePort (0:3) Adding message to incoming queueWorker (0:2) Worker 1 called Exit(1)Worker (0:2) Exiting thread for worker 1 with exit code 1MessagePort (1:2) Closing message port, data set = 1MessagePort (1:2) Closing message port, data set = 1MessagePort (1:3) Closing message port, data set = 1MessagePort (1:3) MessagePort::OnClose()MessagePort (1:2) MessagePort::OnClose()MessagePort (0:3) Closing message port, data set = 1MessagePort (0:6) Running MessagePort::OnMessage()MessagePort (0:6) MessagePort has message, receiving = 1MessagePort (0:6) Closing message port, data set = 1MessagePort (0:6) MessagePort::OnClose()MessagePort (0:3) MessagePort::OnClose()Worker (0:2) Worker 1 thread stopsWorker (0:2) Worker 1 dispose isolateWorker (0:2) Worker 1 destroyedCommand: out/Release/node /home/iojs/build/workspace/node-test-commit-linux/nodes/centos7-64-gcc6/test/parallel/test-worker-syntax-error-file.js
MessagePort (0:3) Closing message port, data set = 1
For some reasons, it seems the internal message port on the parent side closes prematurely, before the drainMessagePort() call in the onexit handler runs. I don’t understand why this happens – the message port should be closed because the sibling in the child thread closes, but that should only happen after releasing all currently pending messages.
@Trott Do you think you could run this with this extra debugging patch + post failure output again? I’m not sure if it helps, but it could confirm that a) we close the message port with a message still pending and b) help figure out why the message port is being closed in this way to begin with.
diff --git a/src/node_messaging.cc b/src/node_messaging.cc
index 77ed959477f2..37f0080f9c46 100644
--- a/src/node_messaging.cc+++ b/src/node_messaging.cc@@ -516,6 +516,7 @@ void MessagePort::TriggerAsync() {
void MessagePort::Close(v8::Local<v8::Value> close_callback) {
Debug(this, "Closing message port, data set = %d", static_cast<int>(!!data_));
+ DumpBacktrace(stderr);
if (data_) {
// Wrap this call with accessing the mutex, so that TriggerAsync()
@@ -640,7 +641,8 @@ bool MessagePort::IsSiblingClosed() const {
}
void MessagePort::OnClose() {
- Debug(this, "MessagePort::OnClose()");+ Debug(this, "MessagePort::OnClose() with %zd pending messages",+ (ssize_t)(data_ ? data_->incoming_messages_.size() : -1));
if (data_) {
data_->owner_ = nullptr;
data_->Disentangle();
Activity
addaleax commentedon Sep 9, 2018
I have a hard time attempting to reproduce this… do people on @nodejs/platform-windows have more luck on Windows?
bzoz commentedon Sep 13, 2018
Cannot reproduce on Win10
joyeecheung commentedon Sep 19, 2018
Not exactly sure but this seems to be related:
parallel/test-worker-syntax-errorExample
test: mark some tests as flaky
test: mark some tests as flaky
Trott commentedon Oct 24, 2018
https://ci.nodejs.org/job/node-test-commit-linux/22621/nodes=centos7-64-gcc6/console
refack commentedon Nov 19, 2018
AIX
https://ci.nodejs.org/job/node-test-commit-aix/nodes=aix61-ppc64/18988/
https://ci.nodejs.org/computer/test-osuosl-aix61-ppc64_be-2/
addaleax commentedon Feb 3, 2019
Couldn't reproduce this in 10000 runs on either x64 Linux or x64 Windows.
Trott commentedon Feb 3, 2019
ncu-ci walk commitisn't pulling this up. I'm going to close this, but feel free to re-open if there's reason to believe it's still a bug. There's a good chance other fixes that have landed have also fixed this.Trott commentedon Apr 29, 2019
It's back.
https://ci.nodejs.org/job/node-test-commit-linux/27284/nodes=centos7-64-gcc6/console
test-rackspace-centos7-x64-1
addaleax commentedon Apr 29, 2019
@Trott I don’t think this can be fixed without somebody logging into the CI machines and figuring out where one can get a reasonable reproduction rate, and then work on that machine
(Debug logs might also be helpful, esp.
NODE_DEBUG_NATIVE=message,worker)Trott commentedon Apr 29, 2019
Was able to replicate it on test-rackspace-centos7-x64-1 with
./tools/test.py -J --repeat 1000 test/parallel/test-worker-syntax-error-file.jsin/home/iojs/build/workspace/node-test-commit-linux/nodes/centos7-64-gcc6. Had to get through about 200 runs before it failed.Running it prefaced with
NODE_DEBUG_NATIVE=message,workergenerates this output upon failure:addaleax commentedon Apr 29, 2019
@Trott Thanks, that’s definitely helpful.
For some reasons, it seems the internal message port on the parent side closes prematurely, before the
drainMessagePort()call in theonexithandler runs. I don’t understand why this happens – the message port should be closed because the sibling in the child thread closes, but that should only happen after releasing all currently pending messages.@Trott Do you think you could run this with this extra debugging patch + post failure output again? I’m not sure if it helps, but it could confirm that a) we close the message port with a message still pending and b) help figure out why the message port is being closed in this way to begin with.
Trott commentedon Apr 30, 2019
@addaleax Here's the output with your patch:
worker: use special message as MessagePort close command
worker: use special message as MessagePort close command
worker: use special message as MessagePort close command