Skip to content

src,node-api: fatal errors should not assume a current isolate may exist - #38624

Closed
legendecas wants to merge 1 commit into
nodejs:masterfrom
legendecas:node-api/fatal-error
Closed

legendecas wants to merge 1 commit into
nodejs:masterfrom
legendecas:node-api/fatal-error

Conversation

@legendecas

@legendecas legendecas commented May 10, 2021

Copy link
Copy Markdown
Member

Fixes a segment fault on Environment::GetCurrent(isolate) on fatal error.

napi_fatal_error and node watchdog triggers fatal error but rather
running on a thread that holds no current isolate.

@github-actions github-actions Bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels May 10, 2021
@legendecas legendecas added the node-api Issues and PRs related to Node-API. label May 10, 2021
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@legendecas legendecas added report Issues and PRs related to Node.js diagnostic reports. and removed report Issues and PRs related to Node.js diagnostic reports. labels May 11, 2021
@nodejs-github-bot

This comment has been minimized.

@legendecas
legendecas force-pushed the node-api/fatal-error branch from 68f4651 to 0b3883d Compare May 11, 2021 17:32
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

nodejs-github-bot commented May 12, 2021

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/38033/

  • Linux Containered:
    • parallel/test-domain-error-types

@jasnell

jasnell commented May 12, 2021

Copy link
Copy Markdown
Member

The CI failure appears to be relevant to this change (that is, it's not just a flaky failure)

@legendecas

Copy link
Copy Markdown
Member Author

@jasnell which one do you refer to? I checked out https://ci.nodejs.org/job/node-test-pull-request/38033/ and found out the failing case is "parallel/test-domain-error-types" which doesn't seem to be related to this change.

@nodejs-github-bot

nodejs-github-bot commented May 12, 2021

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/38036/

  • Linux One:
    • pummel/test-crypto-timing-safe-equal-benchmarks

@nodejs-github-bot

nodejs-github-bot commented May 13, 2021

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/38054/

  • Windows:
    • sequential/test-worker-prof
  • Linux One:
    • pummel/test-crypto-timing-safe-equal-benchmarks
    • sequential/test-net-connect-econnrefused

@nodejs-github-bot

nodejs-github-bot commented May 13, 2021

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/38060/

  • Linux One:
    • pummel/test-crypto-timing-safe-equal-benchmarks

@legendecas

Copy link
Copy Markdown
Member Author

The linux one case is also failing on PRs like: #38665 (comment)

Comment thread src/node_errors.cc Outdated

@mhdawson mhdawson May 14, 2021

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ABORT();
fflush(stderr);
ABORT();

ghost left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once my suggestion is incorporated.

@nodejs-github-bot

ghost commented May 16, 2021

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/38126/

Linux One:

  • pummel/test-crypto-timing-safe-equal-benchmarks

napi_fatal_error and node watchdog trigger fatal error but rather
running on a thread that hold no current isolate.
@legendecas
legendecas force-pushed the node-api/fatal-error branch from fc0390c to 57d024a Compare May 16, 2021 09:15
@nodejs-github-bot

ghost commented May 16, 2021

Copy link
Copy Markdown
Collaborator

@legendecas

ghost commented May 18, 2021

Copy link
Copy Markdown
Member Author

Landed in f536cc2

@legendecas legendecas closed this May 18, 2021
@legendecas
legendecas deleted the node-api/fatal-error branch May 18, 2021 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. node-api Issues and PRs related to Node-API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants