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

V8 Crash in WriteNodeReport #250

Closed
targos opened this issue Jun 12, 2023 · 2 comments · Fixed by nodejs/node#48495
Closed

V8 Crash in WriteNodeReport #250

targos opened this issue Jun 12, 2023 · 2 comments · Fixed by nodejs/node#48495

Comments

@targos
Copy link
Member

targos commented Jun 12, 2023

Reproduced with https://github.com/nodejs/node/commits/canary-base

Last good run: https://github.com/nodejs/node-v8/actions/runs/5219808702
First failed run: https://github.com/nodejs/node-v8/actions/runs/5228829885
V8 diff: v8/v8@11.6.105...11.6.112

/cc @legendecas ?

$ out/Debug/node /Users/mzasso/git/nodejs/canary/test/addons/report-api/test.js

Writing Node.js report to file: report.20230612.092210.81196.0.001.json
Node.js report completed

Writing Node.js report to file: report.20230612.092210.81196.0.002.json
Node.js report completed

Writing Node.js report to file: report.20230612.092210.81196.0.003.json
Node.js report completed

Writing Node.js report to file: report.20230612.092210.81196.0.004.json
Node.js report completed

Writing Node.js report to file: report.20230612.092210.81196.0.005.json

#
# Fatal error in ../../deps/v8/src/execution/isolate-inl.h, line 50
# Debug check failed: !context().is_null().
#
#
#
#FailureMessage Object: 0x16cfbb688
 1: 0x102f56df8 node::DumpBacktrace(__sFILE*) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
 2: 0x103162b10 node::NodePlatform::GetStackTracePrinter()::$_3::operator()() const [/Users/mzasso/git/nodejs/canary/out/Debug/node]
 3: 0x103162ad0 node::NodePlatform::GetStackTracePrinter()::$_3::__invoke() [/Users/mzasso/git/nodejs/canary/out/Debug/node]
 4: 0x104dc4f04 V8_Fatal(char const*, int, char const*, ...) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
 5: 0x104dc4aa0 std::__1::enable_if<!std::is_function<std::__1::remove_pointer<char>::type>::value && !std::is_enum<char>::value && has_output_operator<char, v8::base::CheckMessageStream>::value, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>::type v8::base::PrintCheckOperand<char>(char) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
 6: 0x1036b3d34 v8::internal::ApiCallbackExitFrame::GetFunction() const [/Users/mzasso/git/nodejs/canary/out/Debug/node]
 7: 0x1036b4264 v8::internal::ApiCallbackExitFrame::Summarize(std::__1::vector<v8::internal::FrameSummary, std::__1::allocator<v8::internal::FrameSummary>>*) const [/Users/mzasso/git/nodejs/canary/out/Debug/node]
 8: 0x1036cc4d4 v8::internal::Isolate::CaptureDetailedStackTrace(int, v8::StackTrace::StackTraceOptions) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
 9: 0x1033ec390 v8::StackTrace::CurrentStackTrace(v8::Isolate*, int, v8::StackTrace::StackTraceOptions) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
10: 0x10318d80c node::report::PrintJavaScriptStack(node::JSONWriter*, v8::Isolate*, char const*) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
11: 0x1031886e8 node::report::PrintJavaScriptErrorStack(node::JSONWriter*, v8::Isolate*, v8::Local<v8::Value>, char const*) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
12: 0x103187280 node::report::WriteNodeReport(v8::Isolate*, node::Environment*, char const*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_ostream<char, std::__1::char_traits<char>>&, v8::Local<v8::Value>, bool) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
13: 0x103186c08 node::TriggerNodeReport(v8::Isolate*, node::Environment*, char const*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, v8::Local<v8::Value>) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
14: 0x1031876b8 node::TriggerNodeReport(v8::Isolate*, char const*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, v8::Local<v8::Value>) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
15: 0x10b6eb108 TriggerReportNoContext(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/mzasso/git/nodejs/canary/test/addons/report-api/build/Debug/binding.node]
16: 0x1042e0e94 Builtins_CallApiCallbackGeneric [/Users/mzasso/git/nodejs/canary/out/Debug/node]
17: 0x1042df384 Builtins_InterpreterEntryTrampoline [/Users/mzasso/git/nodejs/canary/out/Debug/node]
18: 0x1042df384 Builtins_InterpreterEntryTrampoline [/Users/mzasso/git/nodejs/canary/out/Debug/node]
19: 0x1042df384 Builtins_InterpreterEntryTrampoline [/Users/mzasso/git/nodejs/canary/out/Debug/node]
20: 0x1042df384 Builtins_InterpreterEntryTrampoline [/Users/mzasso/git/nodejs/canary/out/Debug/node]
21: 0x1042df384 Builtins_InterpreterEntryTrampoline [/Users/mzasso/git/nodejs/canary/out/Debug/node]
22: 0x1042df384 Builtins_InterpreterEntryTrampoline [/Users/mzasso/git/nodejs/canary/out/Debug/node]
23: 0x1042df384 Builtins_InterpreterEntryTrampoline [/Users/mzasso/git/nodejs/canary/out/Debug/node]
24: 0x1042df384 Builtins_InterpreterEntryTrampoline [/Users/mzasso/git/nodejs/canary/out/Debug/node]
25: 0x1042dcd6c Builtins_JSEntryTrampoline [/Users/mzasso/git/nodejs/canary/out/Debug/node]
26: 0x1042dca54 Builtins_JSEntry [/Users/mzasso/git/nodejs/canary/out/Debug/node]
27: 0x1036ad1e0 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
28: 0x1036ac434 v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
29: 0x103406a1c v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
30: 0x10303da34 node::builtins::BuiltinLoader::CompileAndCall(v8::Local<v8::Context>, char const*, int, v8::Local<v8::Value>*, node::Realm*) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
31: 0x10303d8b8 node::builtins::BuiltinLoader::CompileAndCall(v8::Local<v8::Context>, char const*, node::Realm*) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
32: 0x103183258 node::Realm::ExecuteBootstrapper(char const*) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
33: 0x102ffc934 node::StartExecution(node::Environment*, char const*) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
34: 0x102ffc73c node::StartExecution(node::Environment*, std::__1::function<v8::MaybeLocal<v8::Value> (node::StartExecutionCallbackInfo const&)>) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
35: 0x102eb4218 node::LoadEnvironment(node::Environment*, std::__1::function<v8::MaybeLocal<v8::Value> (node::StartExecutionCallbackInfo const&)>) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
36: 0x1030f7838 node::NodeMainInstance::Run(node::ExitCode*, node::Environment*) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
37: 0x1030f7494 node::NodeMainInstance::Run() [/Users/mzasso/git/nodejs/canary/out/Debug/node]
38: 0x102ffe93c node::LoadSnapshotDataAndRun(node::SnapshotData const**, node::InitializationResultImpl const*) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
39: 0x102ffecfc node::StartInternal(int, char**) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
40: 0x102ffe9f0 node::Start(int, char**) [/Users/mzasso/git/nodejs/canary/out/Debug/node]
41: 0x10487e580 main [/Users/mzasso/git/nodejs/canary/out/Debug/node]
42: 0x1aa003f28 start [/usr/lib/dyld]
[1]    81196 trace trap  out/Debug/node /Users/mzasso/git/nodejs/canary/test/addons/report-api/test.js
@legendecas
Copy link
Member

@legendecas
Copy link
Member

legendecas commented Jun 19, 2023

Avoid collecting stack traces when no context is entered: nodejs/node#48495.

nodejs-github-bot pushed a commit to nodejs/node that referenced this issue Jun 21, 2023
There are no guarantees that the JS stack can be generated when no
context is entered.

PR-URL: #48495
Fixes: nodejs/node-v8#250
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/4582948
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
RafaelGSS pushed a commit to nodejs/node that referenced this issue Jul 3, 2023
There are no guarantees that the JS stack can be generated when no
context is entered.

PR-URL: #48495
Fixes: nodejs/node-v8#250
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/4582948
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Ceres6 pushed a commit to Ceres6/node that referenced this issue Aug 14, 2023
There are no guarantees that the JS stack can be generated when no
context is entered.

PR-URL: nodejs#48495
Fixes: nodejs/node-v8#250
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/4582948
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Ceres6 pushed a commit to Ceres6/node that referenced this issue Aug 14, 2023
There are no guarantees that the JS stack can be generated when no
context is entered.

PR-URL: nodejs#48495
Fixes: nodejs/node-v8#250
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/4582948
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
ruyadorno pushed a commit to nodejs/node that referenced this issue Sep 10, 2023
There are no guarantees that the JS stack can be generated when no
context is entered.

PR-URL: #48495
Fixes: nodejs/node-v8#250
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/4582948
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
ruyadorno pushed a commit to nodejs/node that referenced this issue Sep 13, 2023
There are no guarantees that the JS stack can be generated when no
context is entered.

PR-URL: #48495
Fixes: nodejs/node-v8#250
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/4582948
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
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 a pull request may close this issue.

2 participants