Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.8, 5.9.1, 5.9.6, 5.10.1, 5.11.1
-
None
-
Linux, nvidia graphic card and nvidia driver, any window manager with an enabled compositor, Xorg.
Description
If a parent of a window container containing a QOpenGLWindow is null parented before deletion, Xorg will leaks on VRAM in certain situations.
The situation in questions :
Linux, any distribution, any window manager with a compositor*,* Xorg, nivida driver
If compositor is deactivated, no leaks appears. with other driver the leak does not appears, Wayland was not tested
How to reproduce :
- Download attached example
- Close all window except a single terminal
- configure QOpenGLWindowBug with cmake
- build it
- run nvidia-smi
- (run QOpenGLWindowBug, maximize window, close) * 8
- run nvidia-smi, no leaks
- (run QOpenGLWindowBug, maximize window, click on PushButton, close) * 8
- run nvidia-smi, Xorg as leaked ~30Mb of VRAM
Here are my results (second part only):
$ nvidia-smi +-----------------------------------------------------------------------------+ | NVIDIA-SMI 390.48 Driver Version: 390.48 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce GTX 105... Off | 00000000:01:00.0 Off | N/A | | N/A 46C P8 4W / N/A | 50MiB / 4040MiB | 0% Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 29628 G /usr/lib/xorg-server/Xorg 47MiB | +-----------------------------------------------------------------------------+ $ ./QOpenGLWindowBug ... *8 $ nvidia-smi +-----------------------------------------------------------------------------+ | NVIDIA-SMI 390.48 Driver Version: 390.48 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce GTX 105... Off | 00000000:01:00.0 Off | N/A | | N/A 46C P8 4W / N/A | 80MiB / 4040MiB | 0% Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 29628 G /usr/lib/xorg-server/Xorg 77MiB | +-----------------------------------------------------------------------------+
The VRAM never gets released unless Xorg is killed or closed. It will builds up until it reachs 96% of the VRAM and then starts to "evict" into RAM until RAM is full, and then OpenGL fails.