gastownhall/beads · error
proxy.ForceStopUnverified: re-read %s: %w
Error message
proxy.ForceStopUnverified: re-read %s: %w
What it means
This error is returned by quarantineForceStopRecord when it re-reads the pidfile record just before quarantining it and the read itself fails. At this point the recorded process has already been stopped (or was already gone), but force-stop cannot confirm the record is unchanged, so it refuses to quarantine. The wrapped cause (%w) carries the underlying read error.
Source
Thrown at internal/storage/dbproxy/proxy/force_stop.go:311
if !lockfile.IsLocked(err) {
return nil, fmt.Errorf("proxy.ForceStopUnverified: acquire %s: %w", lockPath, err)
}
if time.Now().After(deadline) {
return nil, fmt.Errorf("proxy.ForceStopUnverified: timeout acquiring %s after signaling", lockPath)
}
time.Sleep(shutdownConfirmPoll)
}
}
func quarantineForceStopRecord(
rootDir string,
pidName string,
record *pidfile.PidFile,
report *ForceStopReport,
) error {
current, err := pidfile.Read(rootDir, pidName)
if err != nil {
return fmt.Errorf("proxy.ForceStopUnverified: re-read %s: %w", report.RecordPath, err)
}
if current == nil {
return nil
}
if *current != *record {
return fmt.Errorf(
"proxy.ForceStopUnverified: record %s changed after pid %d was stopped; refusing to quarantine the replacement",
report.RecordPath,
record.Pid,
)
}
target, err := quarantineRecord(rootDir, pidName, time.Now())
if err != nil {
return fmt.Errorf("proxy.ForceStopUnverified: quarantine %s: %w", report.RecordPath, err)
}
report.QuarantinedPath = target
return nil
}View on GitHub (pinned to 71377f2769)
Solutions
- Re-run `bd dolt stop --force`; if the record was deleted by a concurrent operation, the next run takes the RecordFound=false path and succeeds
- Fix the underlying read error from the wrapped cause (permissions, filesystem state) on <rootDir>/proxy.pid or proxy-child.pid
- Check whether another bd/dolt process or backup tool is concurrently manipulating the pidfile and serialize your operations
- If the process is confirmed stopped, remove or rename the record manually (proxy.pid to proxy.pid.stale-<unix-timestamp>) to complete recovery
Defensive patterns
Strategy: retry
Validate before calling
// Confirm the pidfile is readable and stable before force-stop:
data, err := os.ReadFile(filepath.Join(rootDir, "proxy.pid"))
if err != nil { /* fix permissions/filesystem first */ } Try / catch
report, err := proxy.ForceStopUnverified(rootDir)
if err != nil && strings.Contains(err.Error(), "re-read") {
// Process was stopped but quarantine failed; retry once — if the record is
// now gone the run succeeds via the RecordFound=false path
report, err = proxy.ForceStopUnverified(rootDir)
} Prevention
- Do not delete or edit proxy.pid / proxy-child.pid manually while bd is running
- Exclude the workspace from concurrent backup/sync tools that touch pidfiles during bd operations
- Ensure stable filesystem permissions on the workspace root for the duration of the command
- If this error recurs, quarantine manually: rename the pidfile to <name>.stale-<unix-timestamp> after confirming the PID is dead
When it happens
Trigger: Call ForceStopUnverified (`bd dolt stop --force`) after the PID has been successfully inspected/signaled; quarantineForceStopRecord's pidfile.Read(rootDir, pidName) returns an error instead of nil (record gone) or a valid record — e.g. the record file became unreadable, was partially deleted, or a filesystem error occurred.
Common situations: Another bd/dolt process deleted or replaced the record between the first read and the re-read; filesystem permission changes mid-operation; disk errors or read-only remount; concurrent `bd dolt stop --force` runs racing to clean the same record.
Related errors
- read backend record %s: %w
- quarantine dead unverifiable backend record: %w
- quarantine orphan backend record: %w
- proxy.ForceStopUnverified: confirm pid %d exit: %w
- proxy.ForceStopUnverified: acquire %s: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/cedfd0524db922b5.
Report an issue: GitHub.