andrassama/dsh-omp-advisor/memory-leak-profiling

Claude Code and agent skill by andrassama/dsh-omp-advisor

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Equips the advisor to evaluate profiling evidence and suspect unbounded growth in heaps, caches, and task/connection pools across Rust and Go services.

Install

npx vskill@latest install andrassama/dsh-omp-advisor/memory-leak-profiling

SKILL.md

The same SKILL.md was published earlier as andrassama/dsh-omp-advisor/memory-leak-profiling.

Memory Leak Profiling

Covers the tooling and interpretation needed to diagnose RSS growth: heap profilers, allocation tracing, and the classic leak shapes (unbounded caches, leaked async tasks, Arc reference cycles, stuck goroutines). A reviewer should demand profile evidence, not guesses, before accepting any "fix".

Watch for

  • A fix submitted with no before/after profile — require the heaptrack / jeprof / pprof artifact that proves the leak and the fix.
  • Profiling inuse_space when the symptom is GC churn, or alloc_space when the symptom is growth — use inuse_space for true growth, alloc_space for allocation rate.
  • Rust suspects that ignore Arc/Rc reference cycles (especially with RefCell/Mutex interiors), which are never freed.
  • Unbounded maps acting as caches (HashMap with no TTL or eviction) — the most common service "leak".
  • Leaked tokio tasks: spawned futures holding channel receivers that never complete.
  • Go: goroutine profile count climbing in lockstep with the heap — the leak is stuck goroutines, not objects.
  • Comparing RSS across allocators (glibc vs jemalloc) without controlling for arena retention and fragmentation.
  • Running Valgrind/DHAT on production-scale loads (100× slowdown) instead of sampled profiling on realistic traffic.

Best practices

  • Rust: heaptrack ./bin for full allocation traces; MALLOC_CONF=prof:true,lg_prof_sample:19 plus jeprof for jemalloc-backed services; DHAT for bounded test runs.
  • Go: curl localhost:6060/debug/pprof/heap > h.out && go tool pprof -inuse_space h.out; diff snapshots minutes apart with pprof -base.
  • Establish a baseline: RSS at steady state, then its slope under constant load — flat is healthy, monotonic climb is a leak.
  • Cap every long-lived cache: lru / mini-moka with max entries and TTL, metriced hit/evict counts.
  • For Rust async, track live task counts and use tokio-console to find tasks that never complete.
  • Break cycles with Weak references or explicit Option::take() slots in owner structs.
  • Automate: CI soak test that fails when RSS grows beyond a threshold over N minutes at constant load.

Quick checklist

  • [ ] Profile artifact (heaptrack/jeprof/pprof) attached to the change
  • [ ] inuse vs alloc space matches the symptom
  • [ ] Every long-lived map has eviction or a size cap
  • [ ] Arc/Weak audit done where shared ownership exists
  • [ ] Async task count observable and bounded
  • [ ] RSS baseline and slope measured under constant load
  • [ ] Allocator/arena retention ruled out before blaming code
  • [ ] Soak test with a memory assertion exists in CI

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
3
7-day trend score
12

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/andrassama/dsh-omp-advisor/memory-leak-profiling/badge)](https://verified-skill.com/skills/andrassama/dsh-omp-advisor/memory-leak-profiling)

Something wrong with this skill or its page? Tell us.