Memory leak in mesa 22.0.0 in _mesa_glsl_link_shader
System information
- OS: Gentoo
- GPU: VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09)
- Kernel version: Linux 5.16.13
- Mesa version: OpenGL version string: 4.6 (Compatibility Profile) Mesa 22.0.0
- Xserver version (if applicable): X.Org X Server 1.21.1.3
- Desktop manager and compositor: dwm (custom) + picom (9.1)
Describe the issue
Running an mpv (0.34.0) to play a video results in slow creep up of X org memory that never goes down. After a few days I have to restart my X org to free up the memory.
I ran X org augmented with google perftools heap profiler and got the result that you can see in attached reports.
One of reports have shader cache enabled and that results in (relatively) fast leak. With shader cache disabled it leaks much slower and because of that I did not have patience to collect more data, but leak is still evident there.
Regression
Leak does not occur with mesa 21.3.7