RuntimeTools / appmetrics

Node Application Metrics provides a foundational infrastructure for collecting resource and performance monitoring data for Node.js-based applications.
https://developer.ibm.com/open/node-application-metrics/
Apache License 2.0
974 stars 125 forks source link

z/OS: FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal with Node 8 beta #588

Closed matthewpwilson closed 5 years ago

matthewpwilson commented 5 years ago

Using the Node 8.16.0 z/OS beta, I compiled v5.0.0 from source after working around https://github.com/RuntimeTools/omr-agentcore/issues/84 However, running the tests I get the following results. I see the same error if I just try to require('appmetrics')

npm test

> appmetrics@5.0.0 pretest /u/wilson/git/appmetrics
> eslint .

> appmetrics@5.0.0 test /u/wilson/git/appmetrics
> tap --reporter tap --timeout=120 tests/*tests.js tests/probes/http*test.js tests/headless_test.js

TAP version 13
FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
CEE5207E The signal SIGABRT was received.
# Subtest: tests/api_tests.js
    1..0 # no tests found
not ok 1 - tests/api_tests.js # time=1493.038ms
  ---
  timeout: 120000
  file: tests/api_tests.js
  childId: 0
  command: /u/wilson/node/node-v8.16.0-os390-s390x/bin/node
  args:
    - '-r'
    - /u/wilson/git/appmetrics/node_modules/esm/esm.js
    - tests/api_tests.js
  stdio:
    - 0
    - pipe
    - 2
  cwd: /u/wilson/git/appmetrics
  exitCode: null
  signal: SIGABRT
  ...

# Subtest: tests/require_tests.js
FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
CEE5207E The signal SIGABRT was received.
    1..0 # no tests found
not ok 2 - tests/require_tests.js # time=3278.239ms
  ---
  timeout: 120000
  file: tests/require_tests.js
  childId: 1
  command: /u/wilson/node/node-v8.16.0-os390-s390x/bin/node
  args:
    - '-r'
    - /u/wilson/git/appmetrics/node_modules/esm/esm.js
    - tests/require_tests.js
  stdio:
    - 0
    - pipe
    - 2
  cwd: /u/wilson/git/appmetrics
  exitCode: null
  signal: SIGABRT
  ...

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
CEE5207E The signal SIGABRT was received.
# Subtest: tests/probes/http-outbound-probe-test.js
    1..0 # no tests found
not ok 3 - tests/probes/http-outbound-probe-test.js # time=1723.203ms
  ---
  timeout: 120000
  file: tests/probes/http-outbound-probe-test.js
  childId: 2
  command: /u/wilson/node/node-v8.16.0-os390-s390x/bin/node
  args:
    - '-r'
    - /u/wilson/git/appmetrics/node_modules/esm/esm.js
    - tests/probes/http-outbound-probe-test.js
  stdio:
    - 0
    - pipe
    - 2
  cwd: /u/wilson/git/appmetrics
  exitCode: null
  signal: SIGABRT
  ...

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
CEE5207E The signal SIGABRT was received.
# Subtest: tests/probes/http-probe-test.js
    1..0 # no tests found
not ok 4 - tests/probes/http-probe-test.js # time=1604.831ms
  ---
  timeout: 120000
  file: tests/probes/http-probe-test.js
  childId: 3
  command: /u/wilson/node/node-v8.16.0-os390-s390x/bin/node
  args:
    - '-r'
    - /u/wilson/git/appmetrics/node_modules/esm/esm.js
    - tests/probes/http-probe-test.js
  stdio:
    - 0
    - pipe
    - 2
  cwd: /u/wilson/git/appmetrics
  exitCode: null
  signal: SIGABRT
  ...

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
CEE5207E The signal SIGABRT was received.
# Subtest: tests/probes/https-outbound-probe-test.js
    1..0 # no tests found
not ok 5 - tests/probes/https-outbound-probe-test.js # time=1841.894ms
  ---
  timeout: 120000
  file: tests/probes/https-outbound-probe-test.js
  childId: 4
  command: /u/wilson/node/node-v8.16.0-os390-s390x/bin/node
  args:
    - '-r'
    - /u/wilson/git/appmetrics/node_modules/esm/esm.js
    - tests/probes/https-outbound-probe-test.js
  stdio:
    - 0
    - pipe
    - 2
  cwd: /u/wilson/git/appmetrics
  exitCode: null
  signal: SIGABRT
  ...

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
CEE5207E The signal SIGABRT was received.
# Subtest: tests/probes/https-probe-test.js
    1..0 # no tests found
not ok 6 - tests/probes/https-probe-test.js # time=1719.205ms
  ---
  timeout: 120000
  file: tests/probes/https-probe-test.js
  childId: 5
  command: /u/wilson/node/node-v8.16.0-os390-s390x/bin/node
  args:
    - '-r'
    - /u/wilson/git/appmetrics/node_modules/esm/esm.js
    - tests/probes/https-probe-test.js
  stdio:
    - 0
    - pipe
    - 2
  cwd: /u/wilson/git/appmetrics
  exitCode: null
  signal: SIGABRT
  ...

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
CEE5207E The signal SIGABRT was received.
# Subtest: tests/headless_test.js
    1..0 # no tests found
not ok 7 - tests/headless_test.js # time=1850.037ms
  ---
  timeout: 120000
  file: tests/headless_test.js
  childId: 6
  command: /u/wilson/node/node-v8.16.0-os390-s390x/bin/node
  args:
    - '-r'
    - /u/wilson/git/appmetrics/node_modules/esm/esm.js
    - tests/headless_test.js
  stdio:
    - 0
    - pipe
    - 2
  cwd: /u/wilson/git/appmetrics
  exitCode: null
  signal: SIGABRT
  ...

1..7
# failed 7 of 7 tests
gabylb commented 5 years ago

Till the above fix and that for https://github.com/RuntimeTools/omr-agentcore/issues/84 are merged, please try:

git clone https://github.com/ibmruntimes/appmetrics -b zos
cd appmetrics
git clone https://github.com/ibmruntimes/omr-agentcore -b zos

npm install
npm test
matthewpwilson commented 5 years ago

Thanks @gabylb this is working for me with the above branches

gabylb commented 5 years ago

I created PR https://github.com/RuntimeTools/appmetrics/pull/598 but one of the tests (node-v8 on osx) failed: https://travis-ci.org/RuntimeTools/appmetrics/builds/549853836

in what seems an environment issue while TAP was removing some temp file.

@mattcolegate can you please advise how to proceed.

mattcolegate commented 5 years ago

@gabylb Couldn't see a problem in your changes, so re-ran the offending travis build and it passed, so I'm going with Travis Environment Glitch :-)