Xorg VRAM leak because of Qt/OpenGL Application

Mathieu Westphal mathieu.westphal at kitware.com
Mon Jul 2 02:11:04 UTC 2018


Hello list,

I am working on a complex Qt/OpenGL Application.
Xorg starts leaking in VRAM when i'm using the application and never
release the memory, until I restart X of course.

$ 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 |
+-----------------------------------------------------------------------------+
$ ./myOpenGLQtBasedApp ... doing graphic stuff then exiting
$ 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 |    110MiB /  4040MiB |      0%
Default |
+-------------------------------+----------------------+----------------------+


+-----------------------------------------------------------------------------+
| Processes:                                                       GPU
Memory |
|  GPU       PID   Type   Process name                             Usage
  |
|=============================================================================|
|    0     29628      G   /usr/lib/xorg-server/Xorg
107MiB |
+-----------------------------------------------------------------------------+

The version of Xorg does not matter, tested a few.
The version of the driver does not matter, as long as it's nvidia, tested
340, 384, 390
The linux distribution does not matter, tested Ubuntu 16.04, 18.04, fedora
The de does not matter, tested Unity, Gnome-shell, Xfce, Lxde + Compton,
Openbox + compton
The compositor used does not matter, *but the leak disappear without a
composito*r.
I did not test Wayland.

Do you know what could cause this behavior ?
Could this be a Xorg bug ?
If not, what could, in our code create this behavior ?

Best regards,

Mathieu Westphal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg/attachments/20180702/63d23af1/attachment.html>


More information about the xorg mailing list