Intermittent SQLite transaction error on read operations (cannot start a transaction within a transaction)
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
調査の方向性
Start with the inTransaction() check in src/lib/object_store/DB.cpp and transaction start logic in src/lib/object_store/DBObject.cpp, both linked in the issue. Trace how concurrent reads share the SQLite connection and inspect the related transaction tests. Done means simultaneous read operations no longer fail with “cannot start a transaction within a transaction” and existing transaction behavior remains correct.
索引モデルが issue の本文から書いたものです。
説明
When performing multiple simultaneous read operations (e.g., from different threads) using the SQLite backend, the following error occurs:
SQLITE3: cannot start a transaction within a transaction (1)
Steps to Reproduce
- Open multiple threads or sessions that execute read operations (e.g., enumerate objects, get token info) concurrently against the same token/slot.
- Observe backend logs or error output when these operations overlap in time.
Expected Behavior
Concurrent read operations (which start read-only SQLite transactions) should be able to called from concurrent threads without errors when using a shared database connection in SQLITE_OPEN_FULLMUTEX mode.
Actual Behavior
The backend emits the error:
SQLITE3: cannot start a transaction within a transaction (1)
and one or more read operations fails. Specifically, this happens when reading multiple objects from the same slot/token simultaneously from multiple backend application threads.
Details
Each read operation attempts to start a new read-only transaction (BEGIN) on the same underlying sqlite3* connection. But the two concurrent reads can race: both can pass the DBObject inTransaction() check, then both attempt to start a transaction (Time of Check/Time of Use), but SQLite only allows a single active transaction per connection, causing the second BEGIN to fail.
- 主要言語
- C++
- スター
- 1.1k
- フォーク
- 434
- 平均マージ
- 12日 14時間
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
softhsm/SoftHSMv2 のほかの issue
-
C_DigestKey digests a sensitive EC private key's CKA_VALUE: no check that the object is a secret keyオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 54/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 56/100
softhsm/SoftHSMv2 の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
ROCm/rocm-systems#15475 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
Sendspin/sendspin-cpp#257 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
pocoproject/poco#5664 ·
メンテナーはふだん 2 日以内に返信
-
community:good-first-issue kind:bug kind:test scope:control status:needs-triage vehicle:rover
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
PX4/PX4-Autopilot#29727 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信