Shared Memory Leak With Qt OpenGL Applications
Steps to reproduce:
- In the root shell, count the number of shared segments: ipcs -a | wc -l
- Run one of Qt's OpenGL examples (Qt Version 5.15.8). e.g. https://code.qt.io/cgit/qt/qtbase.git/tree/examples/opengl/qopenglwindow?h=5.15
- Close Qt example application launched in previous step.
- Count the number of shared segments again: ipcs -a | wc -l
- Optional: Repeat steps 2-4 a couple of times
Expected: The number of shared segments does not increase. Actual: The number of shared segments pile up indicating a memory leak.
Observed with Qt version 5.15.8.
This is a regression oberserved with mesa version 23.1.0. Note that this issue reproduces with the latest mesa version 23.1.4 as well. I did not oberve this issue with mesa version 23.0.4.
I am building mesa in the following way:
- meson -Dglx=xlib -Dgallium-drivers=swrast -Dplatforms=x11 -Ddri3=disabled -Dvulkan-drivers="" -Dbuildtype=release -Dshared-glapi=disabled -Dshared-llvm=enabled -Dlibunwind=disabled -Dllvm=enabled ..
- sudo ninja install
System:
Host: iridium Kernel: 5.14.0-284.11.1.el9_2.x86_64 arch: x86_64 bits: 64
compiler: gcc v: 2.35.2-37.el9 Desktop: GNOME v: 40.10 tk: GTK v: 3.24.31
wm: gnome-shell dm: GDM Distro: Red Hat Enterprise Linux release 9.2
(Plow)
CPU:
Info: 2x 10-core model: Intel Xeon E5-2630 v4 bits: 64 type: MT MCP SMP
arch: Broadwell rev: 1 cache: L1: 2x 640 KiB (1.2 MiB)
L2: 2x 2.5 MiB (5 MiB) L3: 2x 25 MiB (50 MiB)
Speed (MHz): avg: 1979 high: 3095 min/max: 1200/3100 cores: 1: 3095
2: 1885 3: 2096 4: 1199 5: 1199 6: 1198 7: 1199 8: 1198 9: 1897 10: 2905
11: 3094 12: 2987 13: 2046 14: 3003 15: 1844 16: 1220 17: 2773 18: 2144
19: 1669 20: 1702 21: 1197 22: 1834 23: 1917 24: 1198 25: 2092 26: 1198
27: 1197 28: 1198 29: 1305 30: 2298 31: 3091 32: 3088 33: 2996 34: 2116
35: 1857 36: 1603 37: 3091 38: 2171 39: 2106 40: 1281 bogomips: 175595
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
Device-1: NVIDIA GP106GL [Quadro P2000] driver: nvidia v: 525.116.04
arch: Pascal pcie: speed: 2.5 GT/s lanes: 16 bus-ID: 02:00.0
chip-ID: 10de:1c30
Display: x11 server: X.Org v: 1.20.11 with: Xwayland v: 21.1.3
compositor: gnome-shell driver: X: loaded: nvidia
unloaded: fbdev,modesetting alternate: nouveau,nv,vesa gpu: nvidia
display-ID: :1 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 96
Monitor-1: VNC-0 res: 1920x1080 size: N/A
API: OpenGL v: 4.6.0 NVIDIA 525.116.04 renderer: Quadro P2000/PCIe/SSE2
direct-render: Yes
Edited by Julian Hagemeister