apache / apache/pulsar-client-node

HandleScope Entering the V8 API without proper locking in place

未关闭
#477 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
164
派生
98
PR 合并指标
30 天内没有已合并 PR

描述

Hello, I am intermittently encountering an issue that appears to originate from the listener callback.

```
FATAL ERROR: HandleScope::HandleScope Entering the V8 API without proper locking in place
----- Native stack trace -----

1: 0xf410aa node::OnFatalError(char const*, char const*) [node]
2: 0x1389184 v8::Utils::ReportApiFailure(char const*, char const*) [node]
3: 0x138ab3e v8::EscapableHandleScopeBase::EscapableHandleScopeBase(v8::Isolate*) [node]
4: 0x103cd2a napi_open_escapable_handle_scope [node]
5: 0x7f794ed6f718 [/app/node_modules/.pnpm/pulsar-client@1.16.0/node_modules/pulsar-client/lib/binding/pulsar.node]
6: 0x7f794ed9346b [/app/node_modules/.pnpm/pulsar-client@1.16.0/node_modules/pulsar-client/lib/binding/pulsar.node]
7: 0x7f794ed7b097 [/app/node_modules/.pnpm/pulsar-client@1.16.0/node_modules/pulsar-client/lib/binding/pulsar.node]
8: 0x1061ab3 [node]
9: 0x210d4c3 [node]
10: 0x2123f6a [node]
11: 0x210e187 uv_run [node]
12: 0xf8c055 node::SpinEventLoopInternal(node::Environment*) [node]
13: 0x1119642 node::NodeMainInstance::Run() [node]
14: 0x1058782 node::Start(int, char**) [node]
15: 0x7f79af7fe24a [/lib/x86_64-linux-gnu/libc.so.6]
16: 0x7f79af7fe305 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
17: 0xf8761e _start [node]
```

I defined the listener callback as follows to handle messages asynchronously:
```
await getPulsarConsumer({
listener: async (message, messageConsumer): Promise => {
// do something
},
}
```

Can I know why this error occurred?

贡献指南

这个仓库没有索引到贡献指南

调研方向

从异步 listener callback 和 stack trace 中引用的 native binding 入手,尤其是 napi_open_escapable_handle_scope。使用所示的 listener 用法重现间歇性故障,并跟踪 callback 进入 pulsar.node。完成的标准是确定锁定问题,并添加经过验证的修复或回归覆盖。

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp, javascript, nodejs
领域
backend, distributed-systems
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。