supertag-cli icon indicating copy to clipboard operation
supertag-cli copied to clipboard

`create` spins at 100% CPU in sqlite3_step indefinitely — even with --dry-run (v2.5.11, large index)

Open ryan-baum opened this issue 4 months ago • 1 comments

supertag create <tag> "name" never returns on my setup — it pegs one core at 100% CPU indefinitely (I've let it run 10+ minutes). --dry-run behaves identically, and stdin being closed makes no difference, so it isn't posting or waiting on input.

What I ruled out before filing:

  • Not the Local API: :8262 is healthy and owned by Tana (lsof clean, /health responds).
  • Not an index lock: tana-index.db-wal is empty, no other process holds the db.
  • Not a hang: a sample of the process shows it actively working — essentially all time inside a single sqlite3_step call (with heavy sqlite3_free/mutex traffic), at 100% CPU the whole time. It looks like one query stepping forever rather than a deadlock.
  • Not version skew: I'm on v2.5.11, which is the latest release.
  • Not specific to one tag: reproduces with different supertags, including simple ones.

What still works fine (fast, seconds): schema show, search, and — via another tool that shells out to supertag — edit and set-field. Only create is affected.

Possibly relevant scale factors: my index is ~809MB; the workspace is large. If create does a schema/field/name resolution query that lacks an index or has a pathological plan at this size, that would fit the profile.

Repro on my machine (macOS arm64):

supertag create note "test" --dry-run   # pegs 100% CPU, never returns
sample $(pgrep -f 'supertag create') 3  # ~all samples in sqlite3_step

Happy to run any diagnostic build or EXPLAIN QUERY PLAN you'd like against my index — and to share the sample output. Thanks for supertag; it's load-bearing for me daily.

ryan-baum avatar Aug 02 '26 19:08 ryan-baum

Confirmed on v2.6.0: create book "…" --dry-run validates and returns right away on the same index (about 1.1M nodes) where 2.5.11 spun at 100% CPU for 10+ minutes. Thanks.

ryan-baum avatar Nov 24 '26 18:11 ryan-baum