Observing GPU memory and/or CPU OS memory leaks with `use_persistent_mapping` enabled in `gdrdrv` during multi-process termination
@realarnavgoel がすでに取り組んでいます。
2025年1月10日 から。
評価
この issue はまだ評価されていません。
説明
Impacted platform
All server side products, first observed on Grace-Hopper based system
Impacted gdrcopy versions
2.4.1, 2.4.2, 2.4.3
Impacted gdrcopy configs
gdrdrv driver loaded with module parameter set use_persistent_mapping=1
Scenarios
If gdrcopy persistent mapping mode is enabled,
-
If one process opens a connection to the driver (via
gdr_open), and intents to expliclity share connection (using UNIX Domain socket) with one or more processes to use the underlying connection, then the cleanup of the driver resources (viagdr_close) may be executed by one of the non-owning processes, which would be silently ignored therefore leading to CPU and GPU memory leaks. -
If a parent process A forks one or more child process B (instead of linux
fork+exec), then connections opened by A can be attempted to be closed by B during an ungraceful termination of processes via signals (SIGSEVorSIGKILL), resulting in OS and GPU memory leaks.
By default, if persistent mode is disabled, under both scenarios, GPU resources cleanup is performed through an independent workflow in CUDA driver and hence dropping the request to close this connection is benign.
Irrespective of persistent mode, this bug may lead to small CPU kernel memory leaks.
Signature of the defect
- On coherent platforms, e.g. Grace Hopper systems, GPU memory leaks can lead to unexpected side effects. For example, turning off the
nvidia-persistencedservice may hang, requiring rebooting the machine. - On non-coherent platforms, GPU memory leaks may reduce the functionality or performance of CUDA applications.
Known mitigations
Turn off by setting driver module parameter use_persistent_mapping=0 and reloading the driver.
Fixed gdrcopy version
2.4.4
- 主要言語
- C
- スター
- 1.4k
- フォーク
- 198
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/gdrcopy のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Proposal: honor `TMPDIR` in gdrcopy package build scripts対応中かも @efegokdemir が 53 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
SPIDevice selects an active-high device as soon as it is created対応中かも @mikeysklar が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
adafruit/circuitpython#11869 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
gnif/LookingGlass#1352 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100