Segfault when two threads create AudioResampler at once (recorder + Google realtime)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
Start by reading livekit/rtc/_ffi_client.py around line 295 and livekit/rtc/audio_resampler.py around line 71, where both thread stacks enter the FFI request during resampler creation. Reproduce with recorder audio enabled so the recorder encode thread and Google realtime input path create resamplers concurrently. Done means concurrent creation no longer causes the reported segfault.
索引モデルが issue の本文から書いたものです。
説明
A realtime agent sometimes crashes with a segfault right as the session starts, when two threads create an rtc.AudioResampler at the same moment. It happened in 3 of 10 local runs for us.
The two threads are Google realtime's input path on the main thread and the session recorder's encode thread:
Current thread (most recent call first):
livekit/rtc/_ffi_client.py, line 295 in request
livekit/rtc/audio_resampler.py, line 71 in __init__
livekit/plugins/google/realtime/realtime_api.py, line 1668 in _resample_audio
livekit/plugins/google/realtime/realtime_api.py, line 792 in push_audio
livekit/agents/voice/agent_activity.py, line 1680 in push_audio
Thread (recorder_io encode thread):
livekit/rtc/_ffi_client.py, line 295 in request
livekit/rtc/audio_resampler.py, line 71 in __init__
livekit/agents/voice/recorder_io/recorder_io.py, line 88 in _resample
livekit/agents/voice/recorder_io/recorder_io.py, line 105 in push
livekit/agents/voice/recorder_io/recorder_io.py, line 299 in _encode_thread
Fatal Python error: Segmentation fault
Versions: livekit 1.1.18, livekit-agents 1.8.2, livekit-plugins-google 1.8.2, Python 3.12.14, macOS arm64.
Starting the session with record={"audio": False} avoids it, since no recorder thread is created. Is livekit_ffi_request meant to be safe when resamplers are created from two threads at once?
- 主要言語
- Python
- スター
- 14.6k
- フォーク
- 3.9k
- 平均マージ
- 2日 17時間
- マージ済み PR(30日)
- 207
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
livekit/agents のほかの issue
-
Assistant markup is stripped from chat history when expressive mode is off対応中かも @ShivamSharma43 が 19 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
livekit/agents#7647 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
docs: openai.LLM vs openai.responses.LLM for HTTP OpenAI-compat hosts再び着手できるかも @AbarnaaSree が 59 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
livekit/agents#7022 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
btclib-org/btclib-wallet#587 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Judgment-Pack/judgment-pack-spec#275 ·
メンテナーはふだん 1 日以内に返信
-
ai-generated
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
documentation good first issue priority: low size: XS
難易度 1/5 1〜3時間 初心者へのやさしさ 92/100
yeongseon/azure-functions-doctor-python#651 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
Changaco/python-libarchive-c#146 ·