Crash during process exit when using libGLX_nvidia
まだ誰も着手していません。
評価
調査の方向性
Start with util/Mutex.cpp and trace the eglDestroyContext path through FUNCDEF2, CHECKSYM, and the EGL wrapper mentioned in the issue. Check how TRY() and CATCH_EGL() are used around similar calls, then assess the proposed exception handling against context destruction during global teardown. Done means the Nvidia GLX exit path no longer lets a C++ exception escape into C and abort.
索引モデルが issue の本文から書いたものです。
説明
libGLX_nvidia calls the faker's eglDestroyContext after global destruction has started and crashes when trying to acquire the globalMutex.
Environment
- VirtualGL 3.1.2 (VirtualGL-3.1.2-1.el9.x86_64)
- NVIDIA 580.95.05, RHEL 9.6
- GLX back end (VGL_DISPLAY set to an X display)
Description
__cxa_throw
libvglfaker.so(+0x25e48)
libvglfaker.so(+0xa7005)
libvglfaker.so(+0x87fb5)
libvglfaker.so(eglDestroyContext+0x23e)
libGLX_nvidia.so.0(+0x9f9da)
libGLX_nvidia.so.0(+0x9e564)
libGLX_nvidia.so.0(+0x51eaf) <- from __run_exit_handlers
Catching util::Error at the callsite shows: method=[CriticalSection::lock()] what=[Invalid argument]
Throw is from util/Mutex.cpp:
if((ret = pthread_mutex_lock(&mutex)) != 0 && errorCheck)
throw(Error("CriticalSection::lock()", strerror(ret)));
strerror(EINVAL) is "Invalid argument"
The throw ends up in C which just calls abort.
It looks like _eglDestroyContext is set by FUNCDEF2 which calls CHECKSYM, and it tries to resolve a null symbol by acquiring the globalMutex.
I think just adding the TRY() / CATCH_EGL() here will avoid the exception making it to C to avoid a crash (and large coredump). I'm not sure exactly what the faker needs to be doing here during context destruction though to know if this good enough.
I tried to reproduce this with a smaller application but couldn't get it to crash. The large app that is causing this is proprietary, sadly. Perhaps this has to do with global destruction ordering. Anyways, try/catch is probably an easy win.
- 主要言語
- C++
- スター
- 830
- フォーク
- 116
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
VirtualGL/virtualgl のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
VirtualGL/virtualgl の issue をすべて見る
似ている issue
-
TransformInteract: a circle drag through the centre sets Scale to its minimum, which can't grow backオープンdifficulty:easy prio:low type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
NatronGitHub/openfx-supportext#311 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
CachyOS/packageinstaller#211 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
OpenEmu-Silicon/OpenEmu-Silicon#920 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
documentation project: clr project: hip
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ROCm/rocm-systems#17194 ·
メンテナーはふだん 2 日以内に返信