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

WIP async stack traces ... #2709

Closed
wants to merge 2 commits into from
Closed

WIP async stack traces ... #2709

wants to merge 2 commits into from

Conversation

ry
Copy link
Member

@ry ry commented Aug 1, 2019

cc @Nayeem-Rahman

> ./tools/build.py libdeno_test && ./target/debug/libdeno_test --gtest_filter=LibDenoTest.AsyncException
ninja: Entering directory `/Users/rld/src/deno/target/debug'
[2/2] LINK ./libdeno_test
Note: Google Test filter = LibDenoTest.AsyncException
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from LibDenoTest
[ RUN      ] LibDenoTest.AsyncException
Error
    at /Users/rld/src/deno/core/libdeno/libdeno_test.js:260:21
    at async /Users/rld/src/deno/core/libdeno/libdeno_test.js:259:5
deno_last_exception (null)
deno_last_exception {"message":"Uncaught Error","sourceLine":"","lineNumber":0,"startPosition":-1,"endPosition":-1,"errorLevel":8,"startColumn":-1,"endColumn":-1,"isSharedCrossOrigin":true,"isOpaque":false,"frames":[{"line":260,"column":21,"scriptName":"/Users/rld/src/deno/core/libdeno/libdeno_test.js","isEval":false,"isConstructor":false,"isWasm":false}]}
[       OK ] LibDenoTest.AsyncException (80 ms)
[----------] 1 test from LibDenoTest (80 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (80 ms total)
[  PASSED  ] 1 test.

Other places to look

@@ -120,8 +120,8 @@ void deno_init() {
// remove this to make it work asynchronously too. But that requires getting
// PumpMessageLoop and RunMicrotasks setup correctly.
// See https://github.com/denoland/deno/issues/2544
const char* argv[2] = {"", "--no-wasm-async-compilation"};
int argc = 2;
const char* argv[3] = {"", "--no-wasm-async-compilation", "--async-stack-traces"};
Copy link
Collaborator

@nayeemrmn nayeemrmn Aug 1, 2019

Choose a reason for hiding this comment

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

I think --async-stack-traces is on by default. All it's specified to do is enrich error.stack: https://v8.dev/docs/stack-trace-api#async-stack-traces (says it's off by default but that's changed I guess).

Copy link
Member Author

Choose a reason for hiding this comment

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

It doesn’t seem to have an effect - I was just trying it

Copy link
Contributor

Choose a reason for hiding this comment

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

I think they have to be collected via other APIs 😢 see: nodejs/node#11865 (comment)

@ry ry changed the title WIP Add test for #2703 ... WIP async stack traces ... Aug 2, 2019
@ry
Copy link
Member Author

ry commented Sep 10, 2019

stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants