Worker plandb calls can fail with SQLITE_BUSY while the run holds its store
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 64/100
調査の方向性
Read internal/plandb/persist.go:213 and internal/plandb/store.go:100, then run the deterministic lock-holding reproduction in internal/plandb. Check the open, show, and done paths, including the existing e2e and unit coverage. Done means read-only show works during a held write transaction, writes have bounded retry or explicit retryable behavior, and the manual and invalidates reflect changed wording.
索引モデルが issue の本文から書いたものです。
説明
Found on santos/dev2 at 008363c98 (#1410). It reaches dev when #1410 merges.
What happened
On 2026-09-24, 16 worker trajectories in 11 of 34 conversations contained error: database is locked (5) (SQLITE_BUSY) from plandb calls, including plandb done. Read calls were among those affected. The store has a separate deferred read handle, but opening a CLI store also opens and initializes its immediate-lock write handle; a writer holding the file past the five-second busy timeout can make that opening fail.
Replication
Deterministic (no model). In internal/plandb, create a plan with Open, then use a second database/sql connection using the repository's modernc.org/sqlite driver and _txlock=immediate to hold a transaction for longer than five seconds. While held, open the same plan as the worker CLI does and run show or done. Today the open or command can return database is locked (5) (SQLITE_BUSY). Release the transaction and repeat as the control.
Field (real models). Run a multi-part /task on deepseek/deepseek-v4-flash with OPENROUTER_API_KEY; allow several minutes and a few cents. Inspect worker-visible plandb responses. The observed rate above came from one hand run, not a guaranteed reproduction rate.
Where
internal/plandb/persist.go:213, openDatabase, uses _txlock=immediate&_pragma=busy_timeout(5000); internal/plandb/store.go:100, Open, opens that handle before the deferred read handle.
The fix
Let read-only CLI operations open without taking a writer's lock. Serialize or retry writes for a bounded, explicit period and report a recoverable contention state without making a worker infer what happened.
Acceptance
- e2e: a worker
plandb showsucceeds while another handle holds a write transaction;doneeither succeeds after release or returns an explicit retryable result. - Unit: the lock-holding fixture covers open, read and write paths.
- Update the plandb manual and
invalidatesfor any changed retry wording.
- 主要言語
- Go
- スター
- 115
- フォーク
- 14
- 平均マージ
- 9時間 35分
- マージ済み PR(30日)
- 752
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Agent-Field/CodeAF のほかの issue
-
area:chat bug sev:papercut
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
Agent-Field/CodeAF#1592 ·
メンテナーはふだん 1 日以内に返信
-
area:headless bug sev:critical
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Agent-Field/CodeAF#1566 ·
メンテナーはふだん 1 日以内に返信
-
area:chat bug sev:critical
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Agent-Field/CodeAF#1548 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:chat feature
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Agent-Field/CodeAF#1510 ·
メンテナーはふだん 1 日以内に返信
-
area:tests bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Agent-Field/CodeAF#1489 ·
メンテナーはふだん 1 日以内に返信
Agent-Field/CodeAF の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
siderolabs/terraform-provider-talos#414 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
JuliaComputing/jh#63 · コメント 1 件 ·
-
area/proxy kind/bug priority/backlog triage/accepted
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
lexfrei/cloudflare-tunnel-gateway-controller#840 ·
メンテナーはふだん 1 日以内に返信
-
Priority: Normal Type: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
cloudflare/cloudflared#1747 ·