Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Worker plandb calls can fail with SQLITE_BUSY while the run holds its store

オープン
#1,462 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
64/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go, sqlite
領域
backend, databases

調査の方向性

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 の本文から書いたものです。

説明

area:session area:tools bug sev:serious

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 show succeeds while another handle holds a write transaction; done either 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 invalidates for any changed retry wording.
主要言語
Go
スター
115
フォーク
14
平均マージ
9時間 35分
マージ済み PR(30日)
752

環境構築

このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Agent-Field/CodeAF のほかの issue

Agent-Field/CodeAF の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。