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

benchmark test is failing with "Error: Cannot find module './build/Release/addon'" #47837

Closed
ArchanaWind opened this issue May 3, 2023 · 3 comments
Labels
benchmark Issues and PRs related to the benchmark subsystem. test Issues and PRs related to the tests.

Comments

@ArchanaWind
Copy link

ArchanaWind commented May 3, 2023

Version

v18.14.2

Platform

Linux 5.15.0-58-generic #64-Ubuntu SMP Thu Jan 5 11:43:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

$ cd node
$ /usr/bin/python3 tools/test.py  --mode=release benchmark

How often does it reproduce? Is there a required condition?

Always

What is the expected behavior? Why is that the expected behavior?

All benchmark test should get pass

What do you see instead?

$ /usr/bin/python3 tools/test.py  --mode=release benchmark
=== release test-benchmark-napi ===
Path: benchmark/test-benchmark-napi
node/benchmark/napi/function_args/index.js: V8 Binding failed to load
misc/function_call.js Binding failed to load
node:internal/modules/cjs/loader:1078
  throw err;
  ^

Error: Cannot find module './build/Release/addon'
Require stack:
- node/benchmark/napi/ref/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (node/benchmark/napi/ref/index.js:3:15)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ 'node/benchmark/napi/ref/index.js' ]
}

Node.js v18.14.2
node:assert:124
  throw new AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:

1 !== 0

    at ChildProcess.<anonymous> (/node/test/common/benchmark.js:28:12)
    at ChildProcess.emit (node:events:513:28)
    at ChildProcess._handle.onexit (node:internal/child_process:291:12) {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: 1,
  expected: 0,
  operator: 'strictEqual'
}

Node.js v18.14.2
Command: out/Release/node  node/test/benchmark/test-benchmark-napi.js


[02:48|% 100|+  35|-   1]: Done

Failed tests:
out/Release/node node/test/benchmark/test-benchmark-napi.js

Additional information

No response

@legendecas
Copy link
Member

Please run make bench-addons-build first to build benchmark addons.

@legendecas legendecas added benchmark Issues and PRs related to the benchmark subsystem. test Issues and PRs related to the tests. labels May 3, 2023
@ArchanaWind
Copy link
Author

ArchanaWind commented May 3, 2023

Thank you very much for quick response

After make bench-addons-build, executed benchmark tests successfully with /usr/bin/python3 tools/test.py --mode=release benchmark

I have run
/usr/bin/python3 tools/test.py --mode=release parallel after make all but below list of test cases are failing

Failed tests:
out/Release/node node/test/parallel/test-net-socket-connect-without-cb.js
out/Release/node --expose-internals /node/test/parallel/test-tcp-wrap-listen.js
out/Release/node --no-warnings node/test/parallel/test-tls-dhe.js
$ /usr/bin/python3 tools/test.py  --mode=release parallel
=== release test-net-socket-connect-without-cb ===
Path: parallel/test-net-socket-connect-without-cb
node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: getaddrinfo ENOTFOUND localhost
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
Emitted 'error' event on Socket instance at:
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'localhost'
}

Node.js v18.14.2
Command: out/Release/node node/test/parallel/test-net-socket-connect-without-cb.js


=== release test-tcp-wrap-listen ===
Path: parallel/test-tcp-wrap-listen
(node:1270742) internal/test/binding: These APIs are for internal testing only. Do not use them.
(Use `node --trace-warnings ...` to show where the warning was created)
node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: getaddrinfo ENOTFOUND localhost
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
Emitted 'error' event on Socket instance at:
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'localhost'
}

Node.js v18.14.2
Command: out/Release/node --expose-internals node/test/parallel/test-tcp-wrap-listen.js


=== release test-tls-dhe ===
Path: parallel/test-tls-dhe
Command: out/Release/node --no-warnings node/test/parallel/test-tls-dhe.js
--- TIMEOUT ---


[02:10|% 100|+ 3098|-   3]: Done

Failed tests:
out/Release/node node/test/parallel/test-net-socket-connect-without-cb.js
out/Release/node --expose-internals node/test/parallel/test-tcp-wrap-listen.js
out/Release/node --no-warnings node/test/parallel/test-tls-dhe.js

Could you please help on this

@bnoordhuis
Copy link
Member

getaddrinfo ENOTFOUND localhost is an issue local to your environment. It means your DNS server returns NXDOMAIN for "localhost".

@bnoordhuis bnoordhuis closed this as not planned Won't fix, can't repro, duplicate, stale May 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
benchmark Issues and PRs related to the benchmark subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

No branches or pull requests

3 participants