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

[GSD-13828] zeInit segfaults when ZE_AFFINITY_MASK selects no existing device (26.27.39122.11)

オープン
#1,030 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
4/5
見積もり時間
1〜2日
初心者へのやさしさ
54/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
cpp
領域
backend

調査の方向性

Start by reading the issue’s linked code in shared/source/execution_environment/execution_environment.cpp and level_zero/core/source/driver/driver.cpp, along with the referenced unit test in shared/test/unit_test/execution_environment/execution_environment_tests.cpp. Reproduce with ZE_AFFINITY_MASK=99 and the supplied zeInit program. Done means initialization returns without a segfault when the mask selects no existing device, with a regression test covering that case.

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

説明

zeInit segfaults inside the GPU driver when ZE_AFFINITY_MASK names only a device index that does not exist, instead of returning with no devices. chipStar tracking issue: https://github.com/CHIP-SPV/chipStar/issues/2038

GPU hardware: Intel Arc B570 (Battlemage, PCI 8086:e20c) plus the host's integrated GPU.

Driver version: compute-runtime 26.27.39122.11 (libze_intel_gpu.so.1.15.39122), IGC 2.38.2, gmmlib 22.10.0, Level Zero loader 1.28.2. Installed from the release .deb packages of https://github.com/intel/compute-runtime/releases/tag/26.27.39122.11.

Linux distribution: Ubuntu 24.04.2 LTS, kernel 6.17.0-14-generic, xe driver, boot parameters ro quiet splash.

Actual behavior: SIGSEGV (exit 139) inside libze_intel_gpu.so.1 during zeInit:

#0  ?? () from /lib/x86_64-linux-gnu/libze_intel_gpu.so.1
#1  ?? () from /lib/x86_64-linux-gnu/libze_intel_gpu.so.1
#2  ?? () from /lib/x86_64-linux-gnu/libze_intel_gpu.so.1
#3  __pthread_once_slow () at ./nptl/pthread_once.c:116
#4  ?? () from /lib/x86_64-linux-gnu/libze_intel_gpu.so.1
#5  std::call_once<zeInit::{lambda()#1}> ... from /usr/local/lib/libze_loader.so.1
#7  zeInit () from /usr/local/lib/libze_loader.so.1

Expected behavior: zeInit returns (successfully with zero devices, or with an error such as ZE_RESULT_ERROR_UNINITIALIZED) and the application can report that no device is available. compute-runtime ignores an out of range mask entry (https://github.com/intel/compute-runtime/blob/26.27.39122.11/shared/source/execution_environment/execution_environment.cpp#L236), its unit test expects an empty device mapping for such a mask (https://github.com/intel/compute-runtime/blob/26.27.39122.11/shared/test/unit_test/execution_environment/execution_environment_tests.cpp#L650), and driver initialization has a no device error path (https://github.com/intel/compute-runtime/blob/26.27.39122.11/level_zero/core/source/driver/driver.cpp#L25).

Reproduction rate: every run.

Steps to reproduce:

// zeinit.c: gcc zeinit.c -lze_loader -o zeinit
#include <level_zero/ze_api.h>
#include <stdio.h>
int main(void) {
  ze_result_t r = zeInit(0);
  printf("zeInit -> 0x%x\n", r);
  uint32_t n = 0;
  if (r == ZE_RESULT_SUCCESS) { r = zeDriverGet(&n, NULL); printf("zeDriverGet -> 0x%x drivers=%u\n", r, n); }
  return 0;
}
$ ./zeinit
zeInit -> 0x0
zeDriverGet -> 0x0 drivers=2
$ ZE_AFFINITY_MASK=0 ./zeinit
zeInit -> 0x0
zeDriverGet -> 0x0 drivers=1
$ ZE_AFFINITY_MASK=99 ./zeinit
Segmentation fault (core dumped)

Is this a regression: not known.

This issue was generated using AI

主要言語
C++
スター
1.5k
フォーク
304
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

intel/compute-runtime のほかの issue

intel/compute-runtime の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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