cuda.core: a fast-path VMM grow leaves its extension unfreeable
まだ誰も着手していません。
- 主要言語
- Cython
- スター
- 3.4k
- フォーク
- 329
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 116
説明
Summary
_grow_allocation_fast_path maps a new chunk into a second, adjacent VA reservation and updates buf._size in place. The Buffer's deleter captured the original size when the buffer was created, so close() calls deallocate(ptr, original_size) and frees only the first reservation. The extension's reservation, mapping, and physical memory leak with no warning.
No deallocate(ptr, size) call can fix this: cuMemAddressFree frees a reservation only when ptr and size match exactly one reservation, so a range that spans two reservations cannot be freed in one call. The buffer needs to own each reservation and mapping it consists of.
Status
Today the fast path is unreachable (#2388 defect 2). #2237 and #2407 make it live and would expose this leak, so they should wait for this fix. The existing fast-path test mocks the driver and cannot catch it.
Refs: #2388, #2237, #2407, #2882.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
_grow_allocation_fast_path から始めて、Buffer、close()、deallocate(ptr, size) が予約、マッピング、物理メモリをどのように管理しているかを追跡してください。既存の fast-path テストを確認し、close 後も拡張予約が割り当てられたままになっていることを検出するカバレッジを追加してください。完了条件は、Buffer が所有するすべての予約とマッピングが解放されることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- hpc
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100