Skip to content

Add memory-headroom breadcrumbs across the ingest/stems pipeline - #84

Merged
sanylax0 merged 1 commit into
mainfrom
claude/repo-review-improvements-yvk3t7-mem-breadcrumbs
Jul 18, 2026
Merged

sanylax0 merged 1 commit into
mainfrom
claude/repo-review-improvements-yvk3t7-mem-breadcrumbs

Conversation

@sanylax2

Copy link
Copy Markdown
Collaborator

What

The device still jetsams (~50 s after launch, mid-playback) and — importantly — the console shows no stems log lines at all, so it's not certain the separator is even the eater. Rather than tuning blind, this adds jetsam-debugging breadcrumbs.

How

New MemoryFootprint.breadcrumb(_:) logs os_proc_available_memory (the process's remaining allowance before the OS kills it, category mem) at:

  • analysis begin/end (backfillTrackDetails re-analysis path)
  • stem separation task begin, model ensured, ORT session load begin/ready
  • every 10th inference window, and separation done

What to do with it

Run once until the kill, then filter the console for mem[. The last breadcrumbs before death name the stage and show the headroom slope:

  • headroom collapsing across window N lines → inference intermediates (next lever: shorter windows / model-side fix)
  • collapse at ort session load → model load (next lever: .ort format conversion)
  • collapse during analysis lines → the analyzer, not the separator
  • no mem[ lines at all before death → the eater is outside ingest entirely (playback/UI), which redirects the investigation

Please paste the tail of the mem[ lines from a run that gets killed.

🤖 Generated with Claude Code

https://claude.ai/code/session_013TJoWkqg8bzkGdzxWhWjWP


Generated by Claude Code

The device still jetsams with no stems log lines in the console, so
stop guessing which stage eats the budget: log os_proc_available_memory
headroom at analysis begin/end, separation task start, model ensure,
ORT session load, every 10th inference window, and separation end. One
run's console output now names the eater and its size.
@sanylax0
sanylax0 merged commit b2645bd into main Jul 18, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants