Debugger crashes with assertion failure while using Chrome DevTools and remote debug
未关闭
还没有人认领这个 Issue。
async_hooks
inspector
- 主要语言
- JavaScript
- 星标
- 122k
- 派生
- 37.4k
- 平均合并
- 4 天 3 小时
- 30 天内合并 PR
- 272
描述
- Version:
8.9.1 LTS - Platform:
macOS 10.13.1 (17B48) (Darwin Kernel Version 17.2.0)
Webstorm 2017.2.5
Chrome: 62.0.3202.94
No crash using Webstorm 2017.1.4
While using the Chrome DevTools and node --inspect, the node process crashes right after Chrome auto-detected the debug session as a network target.
/usr/local/bin/node[28426]: ../src/node.cc:1449:void node::InternalCallbackScope::Close(): Assertion `(env_->trigger_async_id()) == (0)' failed.
1: node::Abort() [/usr/local/bin/node]
2: node::(anonymous namespace)::DomainEnter(node::Environment*, v8::Local<v8::Object>) [/usr/local/bin/node]
3: node::InternalCallbackScope::Close() [/usr/local/bin/node]
4: node::InternalCallbackScope::~InternalCallbackScope() [/usr/local/bin/node]
5: node::RunForegroundTask(v8::Task*) [/usr/local/bin/node]
6: node::NodePlatform::FlushForegroundTasksInternal() [/usr/local/bin/node]
7: node::inspector::NodeInspectorClient::runMessageLoopOnPause(int) [/usr/local/bin/node]
8: v8_inspector::V8Debugger::handleProgramBreak(v8::Local<v8::Context>, v8::Local<v8::Value>, std::__1::vector<int, std::__1::allocator<int> > const&, bool, bool) [/usr/local/bin/node]
9: v8::internal::Debug::OnDebugBreak(v8::internal::Handle<v8::internal::FixedArray>) [/usr/local/bin/node]
10: v8::internal::Debug::Break(v8::internal::JavaScriptFrame*) [/usr/local/bin/node]
11: v8::internal::Runtime_DebugBreakOnBytecode(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node]
12: 0x2fb5b0f842fd
13: 0x2fb5b108876c
14: 0x2fb5b103d1e0
Reproduce:
- Clone Demo Project: https://github.com/Microsoft/TypeScript-Node-Starter/
- Install mongodb via homebrew
- Start mongodb via
mongod --config /usr/local/etc/mongod.conf - Open demo project in Webstorm,
npm run buildand configure a run configuration by addingNode.jsRun Configuration and changeJavaScript filetodist/server.js - Set breakpoint in
src/controllers/user.tsLine 30 - Start debugger with the Bug icon, right next to the run icon in Webstorm
- Open client site in Chrome
http://localhost:3000 - Use the client site to trigger breakpoint (logged in as user)
- Resume by clicking
Step Out - Use the client site to trigger breakpoint again (logged in as user)
- Chrome: Right-click, Inspect
- Debugger crashes as shown
For me, this crash is only reproducible on one of three Mac systems with identical software versions.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,按照 issue 中的 TypeScript-Node-Starter 步骤,使用 Node 8.9.1、WebStorm 和 Chrome DevTools 重现崩溃。阅读 src/node.cc 中 InternalCallbackScope::Close 处的 assertion,并跟踪 NodeInspectorClient::runMessageLoopOnPause 的堆栈路径。当远程调试和 Chrome DevTools 不再导致 Node 进程崩溃时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, node.js
- 领域
- backend, devtools
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 冷清
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100