Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

resize! frees its new buffer with free instead of release

オープン 初心者向け
#667 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
julia
領域
backend

調査の方向性

src/array.jl:659-661 の resize! のファイナライザーを読み、src/array.jl:129-131 の配列コンストラクターのファイナライザーおよび src/pool.jl の release と比較してください。関連するファイナライザーまたはメモリ管理のテストを確認してから実行してください。リサイズされたバッファーが release(buf) 経由で解放され、その計上と同期の動作が適用されるようになれば完了です。

索引モデルが issue の本文から書いたものです。

説明

The buffer that resize! allocates is freed by a finalizer that calls free(buf) (src/array.jl:659-661 at 0c02df0), whereas the array constructor's finalizer calls release(buf) (src/array.jl:129-131). That skips everything release does (src/pool.jl):

  • _allocated_bytes is never decremented for resized device and shared buffers, so the proactive-GC thresholds see memory that was freed long ago as still allocated;
  • on the LTS stack, the queues that may still reference the buffer aren't synchronized before freeing, which is the workaround for NEO 25.18 unmapping memory with work in flight (a GPU page fault that bans the context);
  • the free doesn't use ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_BLOCKING_FREE.

So a vector that was resize!d and then becomes garbage while its last kernel is still running can take down the context on LTS. Using release(buf) in that finalizer, like the constructor does, should fix all three.

主要言語
Julia
スター
217
フォーク
37
平均マージ
18時間 12分
マージ済み PR(30日)
26

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

JuliaGPU/oneAPI.jl のほかの issue

JuliaGPU/oneAPI.jl の issue をすべて見る

似ている issue

Julia の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。