Assessment of current approach: ✅ Stability achieved (no SIGSEGV) ❌ Symptoms proliferating ([TLS_SLL_NEXT_INVALID], [FREELIST_INVALID], etc.) ❌ Root causes remain untouched (multiple defensive layers accumulating) Warning Signs: - [TLS_SLL_NEXT_INVALID]: Freelist corruption happening frequently - refcount > 0 deferred releases: Memory accumulating - [NORMALIZE_USERPTR]: Pointer conversion bugs widespread Three Root Cause Hypotheses: A. Freelist next corruption (slab_idx calculation? bounds?) B. Pointer conversion inconsistency (user vs base mixing) C. SuperSlab reuse leaving garbage (lifecycle issue) Recommended Investigation Path: 1. Audit slab_index_for() calculation (potential off-by-one) 2. Add persistent prev/next validation to detect freelist corruption 3. Limit class 1 with forced base conversion (isolate userptr source) Key Insight: Current approach: Hide symptoms with layers of guards Better approach: Find and fix root cause (1-3 line fix expected) Risk Assessment: - Current: Stability OK, but memory safety uncertain - Long-term: Memory leak + efficiency degradation likely - Urgency: Move to root cause investigation NOW Timeline for root cause fix: - Task 1: slab_index_for audit (1-2h) - Task 2: freelist detection (1-2h) - Task 3: pointer audit (1h) - Final fix: (1-3 lines) Philosophy: Don't suppress symptoms forever. Find the disease. 🤖 Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Docs Overview
このフォルダは hakmem の設計・計測・運用メモを体系化して管理する場所です。
- INDEX.md: 目次(各ドキュメントへのリンク)
- benchmarks/: ベンチマーク手順とスイープ結果の保存先
- specs/: 現在の仕様(SACS‑3/HW/ENV)を集約
- roadmap/: これからの実装計画・優先度・タスク
運用ルール(提案)
- 1つの変更/計測のまとまりにつき1ファイル(or 1フォルダ)
- 再現コマンド・環境変数・ハード構成は必ず記載
- 大きな連続出力はファイルへ保存し、本文からは抜粋/要約を記載