Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as opaque submodule gitlinks on GitHub) into fully-tracked first-party content. AITM now merges its 7 vendored repos as first-party engines: - memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts - git: vendored C git (bundled binary) + gitnexus (in-process code intelligence) - agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess) Includes the full session's product build: Gitgram web/mobile/backend features, AITM website/CLI/MCP, the unified memory layer, engine build tooling (scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md), and extensive test suites. Build artifacts, node_modules, external/, and gemini-cli are gitignored. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4.3 KiB
Dolt Server Hang Incident Report
Date: 2026-02-23 Dolt Version: 1.82.2 (now upgraded to 1.82.4) Platform: macOS Darwin 25.3.0, arm64 Reporter: Steve Yegge (multi-agent workspace / beads project)
Summary
A shared Dolt SQL server (PID 13360, port 3307) became completely unresponsive under concurrent load from ~20 AI coding agents. All queries timed out, causing a cascade failure that bricked the entire multi-agent workspace. Required force-killing the Dolt server and all ~15 stuck bd/gt processes to recover.
Environment
The workspace is a multi-agent environment where ~20 Claude Code agents run
concurrently, each issuing bd (beads CLI) commands that connect to a shared
Dolt SQL server.
Server Configuration (config.yaml)
behavior:
autocommit: false
listener:
host: 127.0.0.1
port: 3307
# max_connections, back_log, max_connections_timeout_millis all at defaults
Databases
The shared server hosts ~15 databases (beads, hq, plus project-specific and test databases from automated test runs).
Client Connection Pattern (pre-fix)
Each bd command is a separate Go process using go-sql-driver/mysql. The
transaction pattern was:
sqlTx, err := db.BeginTx(ctx, nil)
// ... INSERT/UPDATE operations ...
sqlTx.ExecContext(ctx, "CALL DOLT_COMMIT('-Am', ?, '--author', ?)", msg, author)
sqlTx.Commit() // ← REDUNDANT: DOLT_COMMIT already ends the transaction
Per Tim Sehn's guidance (2026-02-22), DOLT_COMMIT() implicitly commits the SQL
transaction, making the explicit tx.Commit() redundant and adding "raciness."
Client Pool Settings
db.SetMaxOpenConns(10)
db.SetMaxIdleConns(5)
db.SetConnMaxLifetime(5 * time.Minute)
No query-level timeouts — root context has no deadline.
Timeline
- ~20 agents simultaneously issue
bdcommands (create, update, list, close) - Each command opens a connection to port 3307, does work, calls DOLT_COMMIT
- Dolt server becomes completely unresponsive — all queries hang
- ~15 bd/gt processes pile up waiting for responses
- Manual intervention required: force-kill Dolt server (PID 13360) + all stuck processes
- GT daemon auto-restarts fresh Dolt server → town recovers
What We've Changed
- Removed redundant
tx.Commit()afterDOLT_COMMIT— per Tim's guidance - Upgraded Dolt from 1.82.2 → 1.82.4
- Built a repro script (
scripts/repro-dolt-hang/main.go) — could not reproduce the hang with 50 concurrent workers doing 1000 ops against a single database
Reproduction Attempts
The repro fires N goroutines each doing BEGIN → INSERT → DOLT_COMMIT in a loop with a watchdog monitoring server responsiveness. Tested up to 50 workers / 1000 ops with both old (with tx.Commit) and new (without) patterns on Dolt 1.82.4:
[old] 1000/1000 success (100.0%), max latency 312ms, 0 unresponsive events
[new] 1000/1000 success (100.0%), max latency 321ms, 0 unresponsive events
The simple repro doesn't trigger the hang. Suspected additional factors in production:
- Multiple databases (~15) on one server
- Idle-monitor process checking/restarting server concurrently
- Separate OS processes (not goroutines) — each with its own connection pool
autocommit: falsein server config- The redundant
tx.Commit()afterDOLT_COMMITadding raciness
Questions for Dolt Team
-
Is this the bug Tim mentioned fixing? ("We fixed the bug you ran into" — email 2026-02-21). The 1.82.3 and 1.82.4 changelogs don't show a concurrency fix. Was the fix in an earlier release, or is the "fix" the guidance to drop the explicit
tx.Commit()afterDOLT_COMMIT? -
Can the redundant
tx.Commit()afterDOLT_COMMITcause a server hang? Tim said it "adds raciness" — could that raciness escalate to full server unresponsiveness under high concurrent load? -
Should we configure
max_connections/back_log/max_connections_timeout_millisexplicitly? Currently all at defaults. With 20 agents creating separate connection pools (MaxOpenConns=10 each), we could hit 200 connections. -
Multiple databases on one server — is there any known issue with lock contention across databases on the same Dolt server? We have ~15 databases including leftover test databases.
Run the Repro
cd beads/
go run ./scripts/repro-dolt-hang 50 20 both