apache / apache/pulsar-client-node

HandleScope Entering the V8 API without proper locking in place

オープン
#477 コメント 0 件 リアクション 0 件 担当者 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 と、スタックトレースで参照されているネイティブ 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 を短くまとめたダイジェスト。