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,inspector: fix empty MaybeLocal crash #42409

Conversation

RaisinTen
Copy link
Contributor

Return early when the Inspector StringView to V8 String conversion fails
and returns an empty MaybeLocal instead of running the invalid
ToLocalChecked() assertion.

Fixes: #42407
Signed-off-by: Darshan Sen raisinten@gmail.com

Return early when the Inspector StringView to V8 String conversion fails
and returns an empty MaybeLocal instead of running the invalid
ToLocalChecked() assertion.

Fixes: nodejs#42407
Signed-off-by: Darshan Sen <raisinten@gmail.com>
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. inspector Issues and PRs related to the V8 inspector protocol needs-ci PRs that need a full CI run. labels Mar 20, 2022
@nodejs-github-bot

This comment was marked as outdated.

@RaisinTen RaisinTen added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 20, 2022
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

Signed-off-by: Darshan Sen <raisinten@gmail.com>
@RaisinTen
Copy link
Contributor Author

RaisinTen commented Mar 27, 2022

The test was failing due to a timeout on node-test-binary-arm-12+ and node-test-commit-custom-suites-freestyle (test-worker), so I have marked it as slow, PTAL.

@RaisinTen
Copy link
Contributor Author

Maybe skip on the Pi's? I couldn't say for sure though that there isn't an underlying problem being exposed.

@richardlau Done, PTAL. I guess you would need to update #42645 if this one lands first.

@RaisinTen RaisinTen added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 8, 2022
@RaisinTen
Copy link
Contributor Author

RaisinTen commented Apr 8, 2022

@richardlau node-test-commit-freebsd too seems to have failed with the same java.nio.channels.ClosedChannelException exception. Let's see if rerunning CI helps.

EDIT: yea, rerunning helped, landing!

@nodejs-github-bot
Copy link
Collaborator

@RaisinTen RaisinTen added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 9, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 9, 2022
@nodejs-github-bot nodejs-github-bot merged commit be01185 into nodejs:master Apr 9, 2022
@nodejs-github-bot
Copy link
Collaborator

Landed in be01185

@targos
Copy link
Member

targos commented Apr 13, 2022

The problem doesn't seem completely fixed. New test crashes sometimes on freebsd:
https://ci.nodejs.org/job/node-test-commit-freebsd/43628/
https://ci.nodejs.org/job/node-test-commit-freebsd/43633/

xtx1130 pushed a commit to xtx1130/node that referenced this pull request Apr 25, 2022
Return early when the Inspector StringView to V8 String conversion fails
and returns an empty MaybeLocal instead of running the invalid
ToLocalChecked() assertion.

Fixes: nodejs#42407
Signed-off-by: Darshan Sen <raisinten@gmail.com>

PR-URL: nodejs#42409
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Dossar pushed a commit to Dossar/node that referenced this pull request May 26, 2022
Return early when the Inspector StringView to V8 String conversion fails
and returns an empty MaybeLocal instead of running the invalid
ToLocalChecked() assertion.

Fixes: nodejs#42407
Signed-off-by: Darshan Sen <raisinten@gmail.com>

PR-URL: nodejs#42409
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
juanarbol pushed a commit that referenced this pull request May 31, 2022
Return early when the Inspector StringView to V8 String conversion fails
and returns an empty MaybeLocal instead of running the invalid
ToLocalChecked() assertion.

Fixes: #42407
Signed-off-by: Darshan Sen <raisinten@gmail.com>

PR-URL: #42409
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
juanarbol pushed a commit that referenced this pull request May 31, 2022
Return early when the Inspector StringView to V8 String conversion fails
and returns an empty MaybeLocal instead of running the invalid
ToLocalChecked() assertion.

Fixes: #42407
Signed-off-by: Darshan Sen <raisinten@gmail.com>

PR-URL: #42409
Backport--PR-URL: #42967
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
juanarbol pushed a commit that referenced this pull request Jun 1, 2022
Return early when the Inspector StringView to V8 String conversion fails
and returns an empty MaybeLocal instead of running the invalid
ToLocalChecked() assertion.

Fixes: #42407
Signed-off-by: Darshan Sen <raisinten@gmail.com>

PR-URL: #42409
Backport-PR-URL: #42967
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@juanarbol juanarbol mentioned this pull request Jun 1, 2022
BethGriggs pushed a commit that referenced this pull request Jun 1, 2022
Return early when the Inspector StringView to V8 String conversion fails
and returns an empty MaybeLocal instead of running the invalid
ToLocalChecked() assertion.

Fixes: #42407
Signed-off-by: Darshan Sen <raisinten@gmail.com>

PR-URL: #42409
Backport-PR-URL: #42967
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@kirrg001
Copy link

kirrg001 commented Feb 23, 2024

I experience this with Node v18.18.2
Its not visible to me which versions are affected.

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal

@titanism
Copy link

Also experiencing this on Node v18.20.4

@gylove1994
Copy link

v20.15.0 also happend

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++. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. inspector Issues and PRs related to the V8 inspector protocol needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.