[GSD-13828] zeInit segfaults when ZE_AFFINITY_MASK selects no existing device (26.27.39122.11)
まだ誰も着手していません。
評価
調査の方向性
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 はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
intel/compute-runtime のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
intel/compute-runtime#943 ·
-
OS: Windows Type: Bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
intel/compute-runtime#1034 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
intel/compute-runtime#1033 ·
-
OS: Windows Type: Bug
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
intel/compute-runtime#1032 ·
-
Component: IGC Type: Regression
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
intel/compute-runtime#1031 · コメント 3 件 ·
intel/compute-runtime の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
macOS: a double-click on a notarized altairsim is refused, and the docs give only the offline case対応中かも @anhaoXie が今日担当しました。 オープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
mutationpp/Mutationpp#337 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
bulletphysics/bullet3#4819 ·
-
[YSQL] Local-node initdb reads postgres.bki, but YB clusters bootstrap only from yb_postgres.bkiオープンarea/ysql kind/enhancement priority/low status/awaiting-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
yugabyte/yugabyte-db#35763 ·
メンテナーはふだん 1 日以内に返信