Summary
On a PGLite brain, gbrain get <slug> and gbrain query <question> print their output correctly and promptly, then the process spins at ~95-98% CPU and never exits. It has to be killed (Ctrl-C / SIGKILL). Other commands exit cleanly.
Environment
- gbrain 0.37.2.0 (installed via
bun install -g github:garrytan/gbrain, commit 9a4ae09)
- Engine: PGLite
- macOS (Darwin 25.3.0), bun 1.3.12, node 20.20
Repro
- PGLite brain with content (here: 25 pages, 26 embedded chunks).
gbrain get <any-slug> → prints the page body, then hangs.
gbrain query "<any question>" → prints ranked results (with scores), then hangs.
Observed two separate runs:
gbrain get <slug> — printed the page, then sat at 93.3% CPU for 2+ minutes until SIGKILL.
gbrain query "<q>" — printed ranked results, then sat at 98.0% CPU for 74s+ until SIGKILL.
In both cases the actual output is produced quickly; the spin happens after output, which looks like a post-completion / shutdown loop that never releases.
Not affected
gbrain doctor, stats, extract, list, embed --stale, config set, apply-migrations all run and exit cleanly on the same brain.
Possibly related
#1065 (embed hang on PGLite) — but distinct: that one reportedly never sent requests; here the command completes its output and then spins.
Impact
The two primary read commands are unusable in scripts (must SIGKILL, non-zero exit) and require a manual Ctrl-C after results appear in interactive use.
Summary
On a PGLite brain,
gbrain get <slug>andgbrain query <question>print their output correctly and promptly, then the process spins at ~95-98% CPU and never exits. It has to be killed (Ctrl-C / SIGKILL). Other commands exit cleanly.Environment
bun install -g github:garrytan/gbrain, commit9a4ae09)Repro
gbrain get <any-slug>→ prints the page body, then hangs.gbrain query "<any question>"→ prints ranked results (with scores), then hangs.Observed two separate runs:
gbrain get <slug>— printed the page, then sat at 93.3% CPU for 2+ minutes until SIGKILL.gbrain query "<q>"— printed ranked results, then sat at 98.0% CPU for 74s+ until SIGKILL.In both cases the actual output is produced quickly; the spin happens after output, which looks like a post-completion / shutdown loop that never releases.
Not affected
gbrain doctor,stats,extract,list,embed --stale,config set,apply-migrationsall run and exit cleanly on the same brain.Possibly related
#1065 (embed hang on PGLite) — but distinct: that one reportedly never sent requests; here the command completes its output and then spins.
Impact
The two primary read commands are unusable in scripts (must SIGKILL, non-zero exit) and require a manual Ctrl-C after results appear in interactive use.