[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg
Subject: Fwd: Xorg VRAM leak because of Qt/OpenGL Application
From: Mathieu Westphal <mathieu.westphal () kitware ! com>
Date: 2018-07-03 2:46:19
Message-ID: CAC2t4UT6L4fecLxCr+UYi12v7dt+ppQd8qXp6oh_bTG-LE74hw () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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.
If I keep doing the same thing over and over, the VRAM will get completelly
full and Xorg starts leaking in RAM
Once the RAM is full, OpenGL starts to fails completelly.
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
[Attachment #5 (text/html)]
<div dir="ltr"><div class="gmail_quote"><div dir="ltr">Hello \
list,<div><br></div><div>I am working on a complex Qt/OpenGL \
Application.</div><div>Xorg starts leaking in VRAM when i'm using the application \
and never release the memory, until I restart X of \
course.</div><div><br></div><div><div><font face="monospace, monospace">$ \
nvidia-smi</font></div><div><font face="monospace, \
monospace">+-----------------------------<wbr>------------------------------<wbr>------------------+</font></div><div><font \
face="monospace, monospace">| NVIDIA-SMI 390.48 Driver \
Version: 390.48 |</font></div><div><font \
face="monospace, monospace">|-----------------------------<wbr>--+----------------------+----<wbr>------------------+</font></div><div><font \
face="monospace, monospace">| GPU Name Persistence-M| Bus-Id \
Disp.A | Volatile Uncorr. ECC |</font></div><div><font face="monospace, monospace">| \
Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. \
|</font></div><div><font face="monospace, \
monospace">|=============================<wbr>==+======================+====<wbr>==================|</font></div><div><font \
face="monospace, monospace">| 0 GeForce GTX 105... Off | 00000000:01:00.0 \
Off | N/A |</font></div><div><font face="monospace, \
monospace">| N/A 46C P8 4W / N/A | 50MiB / 4040MiB | \
0% Default |</font></div><div><font face="monospace, \
monospace">+-----------------------------<wbr>--+----------------------+----<wbr>------------------+</font></div><div><font \
face="monospace, monospace"> \
</font></div><div><font face="monospace, \
monospace">+-----------------------------<wbr>------------------------------<wbr>------------------+</font></div><div><font \
face="monospace, monospace">| Processes: \
GPU Memory |</font></div><div><font face="monospace, monospace">| GPU PID \
Type Process name Usage \
|</font></div><div><font face="monospace, \
monospace">|=============================<wbr>==============================<wbr>==================|</font></div><div><font \
face="monospace, monospace">| 0 29628 G \
/usr/lib/xorg-server/Xorg 47MiB \
|</font></div><div><font face="monospace, \
monospace">+-----------------------------<wbr>------------------------------<wbr>------------------+</font></div><div>$ \
./myOpenGLQtBasedApp ... doing graphic stuff then exiting</div><div><div \
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font \
face="monospace, monospace">$ nvidia-smi</font></div><div \
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font \
face="monospace, monospace">+-----------------------------<wbr>------------------------------<wbr>------------------+</font></div><div \
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font \
face="monospace, monospace">| NVIDIA-SMI 390.48 Driver \
Version: 390.48 |</font></div><div \
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font \
face="monospace, monospace">|-----------------------------<wbr>--+----------------------+----<wbr>------------------+</font></div><div \
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font \
face="monospace, monospace">| GPU Name Persistence-M| Bus-Id \
Disp.A | Volatile Uncorr. ECC |</font></div><div \
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font \
face="monospace, monospace">| Fan Temp Perf Pwr:Usage/Cap| \
Memory-Usage | GPU-Util Compute M. |</font></div><div \
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font \
face="monospace, monospace">|=============================<wbr>==+======================+====<wbr>==================|</font></div><div \
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font \
face="monospace, monospace">| 0 GeForce GTX 105... Off | 00000000:01:00.0 \
Off | N/A |</font></div><div \
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font \
face="monospace, monospace">| N/A 46C P8 4W / N/A | 110MiB / \
4040MiB | 0% Default |</font></div><div \
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font \
face="monospace, monospace">+-----------------------------<wbr>--+----------------------+----<wbr>------------------+</font></div><div \
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font \
face="monospace, monospace"> \
</font></div><div style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font \
face="monospace, monospace">+-----------------------------<wbr>------------------------------<wbr>------------------+</font></div><div \
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font \
face="monospace, monospace">| Processes: \
GPU Memory |</font></div><div \
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font \
face="monospace, monospace">| GPU PID Type Process name \
Usage |</font></div><div \
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font \
face="monospace, monospace">|=============================<wbr>==============================<wbr>==================|</font></div><div \
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font \
face="monospace, monospace">| 0 29628 G \
/usr/lib/xorg-server/Xorg 107MiB |</font></div><div \
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font \
face="monospace, monospace">+-----------------------------<wbr>------------------------------<wbr>------------------+</font></div><div><br></div><div>The \
version of Xorg does not matter, tested a few.</div><div>The version of the driver \
does not matter, as long as it's nvidia, tested 340, 384, 390</div><div>The linux \
distribution does not matter, tested Ubuntu 16.04, 18.04, fedora</div><div>The de \
does not matter, tested Unity, Gnome-shell, Xfce, Lxde + Compton, Openbox + \
compton</div><div>The compositor used does not matter, <b>but the leak disappear \
without a composito</b>r.</div><div>If I keep doing the same thing over and over, the \
VRAM will get completelly full and Xorg starts leaking in RAM</div><div>Once the RAM \
is full, OpenGL starts to fails completelly.</div><div>I did not test \
Wayland.</div><div><br></div>Do you know what could cause this behavior ? \
</div><div>Could this be a Xorg bug ?</div><div>If not, what could, in our code \
create this behavior ?</div><div><br></div><div>Best regards,<br \
class="m_-1356468962654860025gmail-Apple-interchange-newline"><br></div><div><div \
class="m_-1356468962654860025gmail_signature"><div dir="ltr">Mathieu \
Westphal<br></div></div></div> </div></div>
</div><br></div>
[Attachment #6 (text/plain)]
_______________________________________________
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic