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

src: remove invalid ToLocalChecked in EmitBeforeExit #35484

Closed
wants to merge 1 commit into from

Conversation

addaleax
Copy link
Member

@addaleax addaleax commented Oct 3, 2020

This call can fail, we should not use .ToLocalChecked() here.

In the long run, we should use variants of EmitExit() and
EmitBeforeExit() that avoid this problem by properly propagating
empty MaybeLocals.

Example failure (from https://ci.nodejs.org/job/node-test-pull-request/33348/):

21:07:17 not ok 2564 parallel/test-worker-terminate-source-map
21:07:17   ---
21:07:17   duration_ms: 0.385
21:07:17   severity: crashed
21:07:17   exitcode: -6
21:07:17   stack: |-
21:07:17     FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
21:07:17      1: 0x1012f04a5 node::Abort() (.cold.1) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
21:07:17      2: 0x1000b52d9 node::Abort() [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
21:07:17      3: 0x1000b543f node::OnFatalError(char const*, char const*) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
21:07:17      4: 0x1001ffd70 v8::V8::ToLocalEmpty() [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
21:07:17      5: 0x1000079b8 node::EmitBeforeExit(node::Environment*) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
21:07:17      6: 0x100156fea node::worker::Worker::Run() [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
21:07:17      7: 0x10015a4d2 node::worker::Worker::StartThread(v8::FunctionCallbackInfo<v8::Value> const&)::$_3::__invoke(void*) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
21:07:17      8: 0x7fff72fe7109 _pthread_start [/usr/lib/system/libsystem_pthread.dylib]
21:07:17      9: 0x7fff72fe2b8b thread_start [/usr/lib/system/libsystem_pthread.dylib]
21:07:17   ...
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

This call can fail, we should not use `.ToLocalChecked()` here.

In the long run, we should use variants of `EmitExit()` and
`EmitBeforeExit()` that avoid this problem by properly propagating
empty `MaybeLocal`s.

Example failure:

    21:07:17 not ok 2564 parallel/test-worker-terminate-source-map
    21:07:17   ---
    21:07:17   duration_ms: 0.385
    21:07:17   severity: crashed
    21:07:17   exitcode: -6
    21:07:17   stack: |-
    21:07:17     FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
    21:07:17      1: 0x1012f04a5 node::Abort() (.cold.1) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      2: 0x1000b52d9 node::Abort() [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      3: 0x1000b543f node::OnFatalError(char const*, char const*) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      4: 0x1001ffd70 v8::V8::ToLocalEmpty() [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      5: 0x1000079b8 node::EmitBeforeExit(node::Environment*) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      6: 0x100156fea node::worker::Worker::Run() [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      7: 0x10015a4d2 node::worker::Worker::StartThread(v8::FunctionCallbackInfo<v8::Value> const&)::$_3::__invoke(void*) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      8: 0x7fff72fe7109 _pthread_start [/usr/lib/system/libsystem_pthread.dylib]
    21:07:17      9: 0x7fff72fe2b8b thread_start [/usr/lib/system/libsystem_pthread.dylib]
    21:07:17   ...
@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Oct 3, 2020
@addaleax addaleax added flaky-test Issues and PRs related to the tests with unstable failures on the CI. fast-track PRs that do not need to wait for 48 hours to land. labels Oct 3, 2020
@addaleax
Copy link
Member Author

addaleax commented Oct 3, 2020

Feel free to 👍 this comment to approve fast-tracking

@addaleax addaleax added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 3, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 3, 2020
@nodejs-github-bot
Copy link
Collaborator

@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Oct 3, 2020
@addaleax
Copy link
Member Author

addaleax commented Oct 3, 2020

Landed in f83f683

addaleax added a commit that referenced this pull request Oct 3, 2020
This call can fail, we should not use `.ToLocalChecked()` here.

In the long run, we should use variants of `EmitExit()` and
`EmitBeforeExit()` that avoid this problem by properly propagating
empty `MaybeLocal`s.

Example failure:

    21:07:17 not ok 2564 parallel/test-worker-terminate-source-map
    21:07:17   ---
    21:07:17   duration_ms: 0.385
    21:07:17   severity: crashed
    21:07:17   exitcode: -6
    21:07:17   stack: |-
    21:07:17     FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
    21:07:17      1: 0x1012f04a5 node::Abort() (.cold.1) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      2: 0x1000b52d9 node::Abort() [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      3: 0x1000b543f node::OnFatalError(char const*, char const*) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      4: 0x1001ffd70 v8::V8::ToLocalEmpty() [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      5: 0x1000079b8 node::EmitBeforeExit(node::Environment*) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      6: 0x100156fea node::worker::Worker::Run() [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      7: 0x10015a4d2 node::worker::Worker::StartThread(v8::FunctionCallbackInfo<v8::Value> const&)::$_3::__invoke(void*) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      8: 0x7fff72fe7109 _pthread_start [/usr/lib/system/libsystem_pthread.dylib]
    21:07:17      9: 0x7fff72fe2b8b thread_start [/usr/lib/system/libsystem_pthread.dylib]
    21:07:17   ...

PR-URL: #35484
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
@addaleax addaleax closed this Oct 3, 2020
@addaleax addaleax deleted the maybe-emit-before-exit branch October 3, 2020 20:51
danielleadams pushed a commit that referenced this pull request Oct 6, 2020
This call can fail, we should not use `.ToLocalChecked()` here.

In the long run, we should use variants of `EmitExit()` and
`EmitBeforeExit()` that avoid this problem by properly propagating
empty `MaybeLocal`s.

Example failure:

    21:07:17 not ok 2564 parallel/test-worker-terminate-source-map
    21:07:17   ---
    21:07:17   duration_ms: 0.385
    21:07:17   severity: crashed
    21:07:17   exitcode: -6
    21:07:17   stack: |-
    21:07:17     FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
    21:07:17      1: 0x1012f04a5 node::Abort() (.cold.1) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      2: 0x1000b52d9 node::Abort() [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      3: 0x1000b543f node::OnFatalError(char const*, char const*) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      4: 0x1001ffd70 v8::V8::ToLocalEmpty() [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      5: 0x1000079b8 node::EmitBeforeExit(node::Environment*) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      6: 0x100156fea node::worker::Worker::Run() [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      7: 0x10015a4d2 node::worker::Worker::StartThread(v8::FunctionCallbackInfo<v8::Value> const&)::$_3::__invoke(void*) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      8: 0x7fff72fe7109 _pthread_start [/usr/lib/system/libsystem_pthread.dylib]
    21:07:17      9: 0x7fff72fe2b8b thread_start [/usr/lib/system/libsystem_pthread.dylib]
    21:07:17   ...

PR-URL: #35484
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
@danielleadams danielleadams mentioned this pull request Oct 6, 2020
MylesBorins pushed a commit that referenced this pull request Nov 3, 2020
This call can fail, we should not use `.ToLocalChecked()` here.

In the long run, we should use variants of `EmitExit()` and
`EmitBeforeExit()` that avoid this problem by properly propagating
empty `MaybeLocal`s.

Example failure:

    21:07:17 not ok 2564 parallel/test-worker-terminate-source-map
    21:07:17   ---
    21:07:17   duration_ms: 0.385
    21:07:17   severity: crashed
    21:07:17   exitcode: -6
    21:07:17   stack: |-
    21:07:17     FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
    21:07:17      1: 0x1012f04a5 node::Abort() (.cold.1) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      2: 0x1000b52d9 node::Abort() [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      3: 0x1000b543f node::OnFatalError(char const*, char const*) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      4: 0x1001ffd70 v8::V8::ToLocalEmpty() [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      5: 0x1000079b8 node::EmitBeforeExit(node::Environment*) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      6: 0x100156fea node::worker::Worker::Run() [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      7: 0x10015a4d2 node::worker::Worker::StartThread(v8::FunctionCallbackInfo<v8::Value> const&)::$_3::__invoke(void*) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      8: 0x7fff72fe7109 _pthread_start [/usr/lib/system/libsystem_pthread.dylib]
    21:07:17      9: 0x7fff72fe2b8b thread_start [/usr/lib/system/libsystem_pthread.dylib]
    21:07:17   ...

PR-URL: #35484
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
@MylesBorins MylesBorins mentioned this pull request Nov 3, 2020
MylesBorins pushed a commit that referenced this pull request Nov 16, 2020
This call can fail, we should not use `.ToLocalChecked()` here.

In the long run, we should use variants of `EmitExit()` and
`EmitBeforeExit()` that avoid this problem by properly propagating
empty `MaybeLocal`s.

Example failure:

    21:07:17 not ok 2564 parallel/test-worker-terminate-source-map
    21:07:17   ---
    21:07:17   duration_ms: 0.385
    21:07:17   severity: crashed
    21:07:17   exitcode: -6
    21:07:17   stack: |-
    21:07:17     FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
    21:07:17      1: 0x1012f04a5 node::Abort() (.cold.1) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      2: 0x1000b52d9 node::Abort() [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      3: 0x1000b543f node::OnFatalError(char const*, char const*) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      4: 0x1001ffd70 v8::V8::ToLocalEmpty() [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      5: 0x1000079b8 node::EmitBeforeExit(node::Environment*) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      6: 0x100156fea node::worker::Worker::Run() [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      7: 0x10015a4d2 node::worker::Worker::StartThread(v8::FunctionCallbackInfo<v8::Value> const&)::$_3::__invoke(void*) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      8: 0x7fff72fe7109 _pthread_start [/usr/lib/system/libsystem_pthread.dylib]
    21:07:17      9: 0x7fff72fe2b8b thread_start [/usr/lib/system/libsystem_pthread.dylib]
    21:07:17   ...

PR-URL: #35484
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
joesepi pushed a commit to joesepi/node that referenced this pull request Jan 8, 2021
This call can fail, we should not use `.ToLocalChecked()` here.

In the long run, we should use variants of `EmitExit()` and
`EmitBeforeExit()` that avoid this problem by properly propagating
empty `MaybeLocal`s.

Example failure:

    21:07:17 not ok 2564 parallel/test-worker-terminate-source-map
    21:07:17   ---
    21:07:17   duration_ms: 0.385
    21:07:17   severity: crashed
    21:07:17   exitcode: -6
    21:07:17   stack: |-
    21:07:17     FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
    21:07:17      1: 0x1012f04a5 node::Abort() (.cold.1) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      2: 0x1000b52d9 node::Abort() [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      3: 0x1000b543f node::OnFatalError(char const*, char const*) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      4: 0x1001ffd70 v8::V8::ToLocalEmpty() [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      5: 0x1000079b8 node::EmitBeforeExit(node::Environment*) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      6: 0x100156fea node::worker::Worker::Run() [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      7: 0x10015a4d2 node::worker::Worker::StartThread(v8::FunctionCallbackInfo<v8::Value> const&)::$_3::__invoke(void*) [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/out/Release/node]
    21:07:17      8: 0x7fff72fe7109 _pthread_start [/usr/lib/system/libsystem_pthread.dylib]
    21:07:17      9: 0x7fff72fe2b8b thread_start [/usr/lib/system/libsystem_pthread.dylib]
    21:07:17   ...

PR-URL: nodejs#35484
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. fast-track PRs that do not need to wait for 48 hours to land. flaky-test Issues and PRs related to the tests with unstable failures on the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants