Memory Leak via /proc
Track a memory leak in production using only /proc — no profiler available.
A advanced Linux challenge worth 20 points. Solve it hands-on in a real Linux environment in your browser - no local setup, no fake shells.
The Challenge
A Python worker RSS grows 50 MB per hour. No profiler is installed. You must identify the leak rate and which memory region is growing.
Your tasks:
- Find the worker PID: pgrep -f python-worker
- Record baseline RSS: cat /proc/<PID>/status | grep VmRSS
- Inspect memory map: pmap -x <PID> | tail -3
- Check anonymous vs file-backed: cat /proc/<PID>/smaps_rollup | grep -E "^(Rss|Anonymous)"
- Wait 60 seconds, record values again
- Write to /tmp/leak_report.txt: PID, baseline RSS, current RSS, which smaps category grew
- Run check to validate