memory leak + long exit cleanup time in glamor triggered by chrome VaapiVideoDecodeLinuxGL
So when having run chrome for a while (tested 114 and 115), the system memory gets used up. But not by the chrome process itself, it seems to be shared memory or something.
Then when exiting chrome, X seems to hang. I can still SSH into the system. And I can see the chrome process exited just fine, but now X is taking 100% of the CPU. It will eventually end and recover but it takes like 10-20 min depending on how long it has been running.
Attaching a debugger I get the following backtrace :
#0 0x00007f91bbe76b29 in _eglCheckResource () from /usr/lib64/libEGL_mesa.so.0
#1 0x00007f91bbe6ff76 in eglDestroyImageKHR () from /usr/lib64/libEGL_mesa.so.0
#2 0x00007f91c574b1bb in glamor_egl_destroy_pixmap ()
from /usr/lib64/xorg/modules/libglamoregl.so
#3 0x000055add8bfd8c4 in damageDestroyPixmap ()
#4 0x000055add8c29667 in XvDestroyPixmap ()
#5 0x000055add8c1adae in ShmDestroyPixmap ()
#6 0x000055add8bd974d in doFreeResource ()
#7 0x000055add8bda95c in FreeClientResources ()
#8 0x000055add8bb32e9 in CloseDownClient ()
#9 0x000055add8c7fe82 in ospoll_wait ()
#10 0x000055add8c790e3 in WaitForSomething ()
#11 0x000055add8bb3d36 in Dispatch ()
#12 0x000055add8bb7d0c in dix_main ()
#13 0x00007f91c5c4f94a in __libc_start_call_main () from /lib64/libc.so.6
#14 0x00007f91c5c4fa05 in __libc_start_main () from /lib64/libc.so.6
#15 0x000055add8b7bd11 in _start ()
chrome is started with --enable-features=VaapiVideoDecodeLinuxGL,VaapiVideoDecoder,VaapiVideoEncoder
. I am not sure yet if this has an influcence. I just started it now without those flags (and so I don't get VAAPI acceleration), I will see in a couple days if I try to quit chrome if the same thing happen.
I have seen a couple of post of people suggesting they have the same issue, but didn't find any relevant issue here. I'm not even sure if the mesa tracker is the right one.
If there are any other steps I can take to debug/trace the issue, please ask.
OS: Gentoo linux GPU: Intel Corporation Alder Lake-P Integrated Graphics Controller [8086:46a6] (rev 0c) Kernel: 6.2.11 Mesa: 23.1.4 Xorg: 21.1.8 No desktop manager or compositor (just Xorg + awesomewm)
This is a new install on a new machine so not sure if this is a regression or not, I have no other comparison point.