nodejs / node-v8

Experimental Node.js mirror on V8 lkgr :sparkles::turtle::rocket::sparkles:
422 stars 72 forks source link

Test fails very early on linuxONE and AIX (and plinux) #25

Closed refack closed 6 years ago

refack commented 6 years ago

I was testing CI's compatibility with this branch (good news, debug build on Linux passes all tests), but it seems like node can't bootstap on linuxONE and AIX:

SyntaxError: Invalid or unexpected token at runInThisContext (bootstrap_node.js:505:20) at NativeModule.compile (bootstrap_node.js:607:18) at Function.NativeModule.require (bootstrap_node.js:547:18) at startup (bootstrap_node.js:14:39) at bootstrap_node.js:627:3

* https://ci.nodejs.org/job/node-test-commit-linuxone/10511/nodes=rhel72-s390x/console

events.js:1

SyntaxError: Invalid or unexpected token at runInThisContext (bootstrap_node.js:505:20) at NativeModule.compile (bootstrap_node.js:607:18) at Function.NativeModule.require (bootstrap_node.js:547:18) at startup (bootstrap_node.js:14:39) at bootstrap_node.js:627:3

and fails at on of test on plinux:
* https://ci.nodejs.org/job/node-test-commit-plinux/13328/nodes=ppcle-ubuntu1404/console

not ok 81 parallel/test-async-wrap-pop-id-during-load not ok 995 parallel/test-inspect-async-hook-setup-at-inspect not ok 1035 parallel/test-module-main-extension-lookup not ok 1036 parallel/test-module-main-fail not ok 1037 parallel/test-module-main-preserve-symlinks-fail not ok 1226 parallel/test-readline not ok 1228 parallel/test-readline-emit-keypress-events not ok 1229 parallel/test-readline-interface not ok 1230 parallel/test-readline-keys not ok 1231 parallel/test-readline-position not ok 1232 parallel/test-readline-reopen not ok 1233 parallel/test-readline-set-raw-mode not ok 1234 parallel/test-readline-undefined-columns not ok 1258 parallel/test-repl not ok 1262 parallel/test-repl-definecommand not ok 1265 parallel/test-repl-editor not ok 1267 parallel/test-repl-end-emits-exit not ok 1268 parallel/test-repl-envvars not ok 1270 parallel/test-repl-eval-scope not ok 1273 parallel/test-repl-history-perm not ok 1274 parallel/test-repl-load-multiline not ok 1279 parallel/test-repl-options not ok 1280 parallel/test-repl-persistent-history not ok 1296 parallel/test-repl-tab-complete not ok 1299 parallel/test-repl-top-level-await not ok 1633 parallel/test-util-callbackify not ok 1645 parallel/test-util-promisify not ok 1719 parallel/test-whatwg-url-searchparams-constructor not ok 1757 parallel/test-zlib-empty-buffer not ok 1763 parallel/test-zlib-flush-multiple-scheduled not ok 1844 addons/hello-world-esm/test not ok 1990 sequential/test-inspector not ok 1992 sequential/test-inspector-async-hook-setup-at-inspect-brk not ok 1993 sequential/test-inspector-async-hook-setup-at-signal not ok 1994 sequential/test-inspector-async-stack-traces-promise-then not ok 1995 sequential/test-inspector-async-stack-traces-set-interval not ok 1996 sequential/test-inspector-bindings not ok 1997 sequential/test-inspector-break-e not ok 1998 sequential/test-inspector-break-when-eval not ok 1999 sequential/test-inspector-contexts not ok 2000 sequential/test-inspector-debug-brk-flag not ok 2001 sequential/test-inspector-debug-end not ok 2002 sequential/test-inspector-enabled not ok 2003 sequential/test-inspector-exception not ok 2005 sequential/test-inspector-ip-detection not ok 2007 sequential/test-inspector-not-blocked-on-idle not ok 2009 sequential/test-inspector-overwrite-config not ok 2010 sequential/test-inspector-port-cluster not ok 2013 sequential/test-inspector-scriptparsed-context not ok 2014 sequential/test-inspector-stop-profile-after-done not ok 2028 sequential/test-readline-interface not ok 2044 es-module/test-esm-basic-imports not ok 2045 es-module/test-esm-double-encoding not ok 2047 es-module/test-esm-encoded-path not ok 2048 es-module/test-esm-encoded-path-native not ok 2049 es-module/test-esm-example-loader not ok 2050 es-module/test-esm-forbidden-globals not ok 2051 es-module/test-esm-json not ok 2052 es-module/test-esm-loader-dependency not ok 2053 es-module/test-esm-loader-modulemap not ok 2055 es-module/test-esm-named-exports not ok 2056 es-module/test-esm-namespace not ok 2057 es-module/test-esm-ok not ok 2058 es-module/test-esm-preserve-symlinks not ok 2059 es-module/test-esm-preserve-symlinks-not-found not ok 2060 es-module/test-esm-preserve-symlinks-not-found-plain not ok 2061 es-module/test-esm-require-cache not ok 2062 es-module/test-esm-resolve-hook not ok 2063 es-module/test-esm-shebang not ok 2064 es-module/test-esm-snapshot not ok 2065 es-module/test-esm-symlink

bnoordhuis commented 6 years ago

I can't say for sure but I suspect something in the Makefile is doing (the equivalent of) ./node ./node - i.e., node trying to parse its own binary as JS code.

Possible culprit: the run-npm-install command that was added in 289fcb05be0efe5f57c742af7113547a4af94c69.

refack commented 6 years ago

No such luck, checked manually 😞 :

[iojs@test-linuxonecc-rhel72-s390x-2 failing]$ ./node tools/doc/addon-verify.js
events.js:1

SyntaxError: Invalid or unexpected token
    at runInThisContext (bootstrap_node.js:505:20)
    at NativeModule.compile (bootstrap_node.js:607:18)
    at Function.NativeModule.require (bootstrap_node.js:547:18)
    at startup (bootstrap_node.js:14:39)
    at bootstrap_node.js:627:3
[iojs@test-linuxonecc-rhel72-s390x-2 failing]$ ./node test/parallel/test-os.js
events.js:1

SyntaxError: Invalid or unexpected token
    at runInThisContext (bootstrap_node.js:505:20)
    at NativeModule.compile (bootstrap_node.js:607:18)
    at Function.NativeModule.require (bootstrap_node.js:547:18)
    at startup (bootstrap_node.js:14:39)
    at bootstrap_node.js:627:3
[iojs@test-linuxonecc-rhel72-s390x-2 failing]$

For reference with a healthy binary ./node ./node looks like:

[iojs@test-linuxonecc-rhel72-s390x-2 rhel72-s390x]$ ./node ./node
/data/iojs/build/workspace/node-test-npm/node/rhel72-s390x/out/Release/node:1
(function (exports, require, module, __filename, __dirname) { ELF
                                                              ^

SyntaxError: Invalid or unexpected token
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:152:10)
    at Module._compile (module.js:580:28)
    at Object.Module._extensions..js (module.js:627:10)
    at Module.load (module.js:535:32)
    at tryModuleLoad (module.js:478:12)
    at Function.Module._load (module.js:470:3)
    at Function.Module.runMain (module.js:657:10)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:613:3
richardlau commented 6 years ago

My guess would be some sort of encoding issue (AIX and linuxONE are big endian).

refack commented 6 years ago

@richardlau consistent with the failure on the other plinux machine (the BE one): https://ci.nodejs.org/job/node-test-commit-plinux/13328/nodes=ppcbe-ubuntu1404/console

[ -x ./node ] && ./node tools/doc/addon-verify.js || node tools/doc/addon-verify.js
events.js:1

SyntaxError: Invalid or unexpected token
    at runInThisContext (bootstrap_node.js:505:20)
    at NativeModule.compile (bootstrap_node.js:607:18)
    at Function.NativeModule.require (bootstrap_node.js:547:18)
    at startup (bootstrap_node.js:14:39)
    at bootstrap_node.js:627:3
targos commented 6 years ago

What's the last known good build?

refack commented 6 years ago

I don't have a reference, but nodejs/node/master is green 🤷‍♂️

mhdawson commented 6 years ago

@refack "this branch" is the canary branch right ? I think the difference between canary and master should just be the level of V8.

mhdawson commented 6 years ago

A big endian issue does sound like a good guess. @jBarz can you take a look.

mhdawson commented 6 years ago

Being the canary version of V8 it is possible we've just not quite caught up with the ports yet. Either way good to investigate.

targos commented 6 years ago

The least recent build I can find in Jenkins is This build from Nov 17 and already has the failures. Is it possible to go back earlier in time? The job is at https://ci.nodejs.org/view/MyJobs/job/node-test-commit-node-v8/

refack commented 6 years ago

AFAIK we purge the Jenkins store after 7 days, but I found a git ref from a recent PR that is green: 6.4.132 - 12bfc6c043b414f40955ff531d6b7afd4e3bb796 https://ci.nodejs.org/job/node-test-commit-linuxone/10551/nodes=rhel72-s390x/

jBarz commented 6 years ago

We are investigating issues on v8 for big endian platforms. Will update once we fix those issues.

jBarz commented 6 years ago

I think this branch is now fixed on big endian platforms.

targos commented 6 years ago

Thanks.