-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
inspector: display error when ToggleAsyncHook fails #26859
Conversation
From the CI |
Looks like it's yet another circular dependency issue |
Try to see more traces by setting |
er, this is interesting, setting EDIT: oh, I was being silly, the line number changed. |
4a0d069
to
eeee2ed
Compare
Looks like it's too late to set |
eeee2ed
to
cede98c
Compare
Let's see if moving |
|
Otherwise the exports of `internal/async_hooks` may be undefined when the inspector async hooks are registered. PR-URL: nodejs#26866 Fixes: nodejs#26798 Refs: nodejs#26859 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
fd8dc54
to
1fcb78c
Compare
This patch refactors `AppendExceptionLine` and `PrintSyncTrace` to reuse the error formatting logic and use them to print uncaught error in ``ToggleAsyncHook`
1fcb78c
to
370c231
Compare
cc @nodejs/v8-inspector @nodejs/async_hooks Removed the investigation code and made it a patch that prints more information when (We could probably reuse |
@joyeecheung does this change functionality? |
@joyeecheung does this change functionality? Code looks ok to me. |
@mcollina No, the error only shows up when there is a bug (see the referenced flaky test), and it will crash the process immediately, this just prints more information to stderr before crashing to facilitate debugging. I don’t think tests can be added (the internals affected are not even monkey patchable since it’s done before any user code execution) ToggleAsyncHook is an internal C++ function, not accessible in the user land so I don’t think the message implies it changes functionality? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Otherwise the exports of `internal/async_hooks` may be undefined when the inspector async hooks are registered. PR-URL: nodejs#26866 Fixes: nodejs#26798 Refs: nodejs#26859 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Landed in 61ef9df |
This patch refactors
AppendExceptionLine
andPrintSyncTrace
to reuse the error formatting logic and use them to print
uncaught error in ``ToggleAsyncHook`
Refs: #26798
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes