Intermittent SQLite transaction error on read operations (cannot start a transaction within a transaction)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C++
- Star
- 1.1k
- Fork
- 434
- Merge trung bình
- 12 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của softhsm/SoftHSMv2
-
C_DigestKey digests a sensitive EC private key's CKA_VALUE: no check that the object is a secret keyĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 54/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 56/100
Tất cả issue của softhsm/SoftHSMv2
Issue tương tự
-
Page request: clang-replĐang mởhelp wanted new command
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
tldr-pages/tldr#25111 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
OpenAssetIO/OpenAssetIO#1527 ·
-
iOS Fabric pointer-handler reset leaves the next lone touch non-primaryCó thể đã có người làm @alleneubank đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
react/react-native#59919 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
ROCm/rocm-systems#15475 ·
Maintainer thường phản hồi trong vòng 2 ngày