Worker plandb calls can fail with SQLITE_BUSY while the run holds its store
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 64/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Go
- Stelle
- 115
- Fork
- 14
- Merge medio
- 9h 44m
- PR unite (30g)
- 775
Preparare l'ambiente
Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Agent-Field/CodeAF
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Agent-Field/CodeAF#1679 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
Agent-Field/CodeAF#1678 ·
I maintainer di solito rispondono entro 1 giorno
-
area:chat bug sev:papercut
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
Agent-Field/CodeAF#1592 ·
I maintainer di solito rispondono entro 1 giorno
-
codeaf do "" runs a paid job with an empty briefForse già presa @santoshkumarradha l’ha presa 2 giorni fa. Apertaarea:headless bug sev:critical
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Agent-Field/CodeAF#1566 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
area:chat feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Agent-Field/CodeAF#1510 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Agent-Field/CodeAF
Issue simili
-
agent-butler-finding chore
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
jordansmall/spindrift#4146 ·
I maintainer di solito rispondono entro 1 giorno
-
security
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
IBM/ibmcloud-volume-file-vpc#119 ·
-
security
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
IBM/networking-go-sdk#339 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
kubernetes-sigs/mcp-lifecycle-operator#439 ·
I maintainer di solito rispondono entro 1 giorno
-
area: global bug dx priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno