Problem
Two agent-relay processes were found in state T/Ts (stopped), one having been suspended since Jul 30 and the other since Aug 1:
PID STARTED ELAPSED STAT COMMAND
13214 Thu Jul 30 21:48:37 03-10:55:06 T agent-relay node up
85652 Sat Aug 1 19:22:19 01-13:21:24 Ts agent-relay node up
One was frozen mid-write-transaction, so it held the SQLite write lock permanently. ai-history.db and its WAL were frozen at Aug 2 21:37, and every ai-hist sync failed with database is locked in 0s for days.
Questions
- What suspends these processes? SIGSTOP from a supervisor/watchdog,
Ctrl-Z from an interactive shell, a debugger attach, or macOS App Nap / process throttling?
- Why do two long-lived brokers hold the database open continuously at all, rather than opening for the duration of a write and closing?
- Should the broker hold a write transaction across any operation that can block?
Mitigations regardless of cause
Note the resolution is to resume these processes, not stop them — they are already stopped, and resuming lets the stuck transaction finish and release the lock.
Related: #46, #47
Problem
Two
agent-relayprocesses were found in stateT/Ts(stopped), one having been suspended since Jul 30 and the other since Aug 1:One was frozen mid-write-transaction, so it held the SQLite write lock permanently.
ai-history.dband its WAL were frozen at Aug 2 21:37, and everyai-hist syncfailed withdatabase is lockedin 0s for days.Questions
Ctrl-Zfrom an interactive shell, a debugger attach, or macOS App Nap / process throttling?Mitigations regardless of cause
ai-hist doctornow flags stopped/zombie holders and printskill -CONT <pid>Note the resolution is to resume these processes, not stop them — they are already stopped, and resuming lets the stuck transaction finish and release the lock.
Related: #46, #47