inspector: display error when ToggleAsyncHook fails#26859
inspector: display error when ToggleAsyncHook fails#26859joyeecheung wants to merge 1 commit intonodejs:masterfrom
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 <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
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? |
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 <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
Otherwise the exports of `internal/async_hooks` may be undefined when the inspector async hooks are registered. PR-URL: #26866 Fixes: #26798 Refs: #26859 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
|
Landed in 61ef9df |
This patch refactors `AppendExceptionLine` and `PrintSyncTrace` to reuse the error formatting logic and use them to print uncaught error in ``ToggleAsyncHook` PR-URL: #26859 Refs: #26798 Reviewed-By: Matteo Collina <[email protected]>
This patch refactors `AppendExceptionLine` and `PrintSyncTrace` to reuse the error formatting logic and use them to print uncaught error in ``ToggleAsyncHook` PR-URL: #26859 Refs: #26798 Reviewed-By: Matteo Collina <[email protected]> Signed-off-by: Beth Griggs <[email protected]>
This patch refactors
AppendExceptionLineandPrintSyncTraceto 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