Bug 460912 - Memory leak when notifications appear or System Monitor is opened
Summary: Memory leak when notifications appear or System Monitor is opened
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 5.26.1
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-23 23:32 UTC by Jaime Antonio Gonzalez
Modified: 2023-01-08 02:13 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaime Antonio Gonzalez 2022-10-23 23:32:44 UTC
SUMMARY

A memory leak occurs when certain things are done, mainly when notifications arrive, they have visual artifacts (mainly blinking) and memory usage begins to rise.

This happens only when using 3D accelerated drivers (either mesa-amber i915-dri or mesa i915-gallium), using software renderer (llvmpipe) doesn't cause the issue. I need to kill plasmashell to recoup said memory.

Something similar was reported at the Manjaro forum (https://forum.manjaro.org/t/plasma-systemmonitor-broken-in-vm-when-3d-in-vbox-enabled/88990), just to note, I also have the other issues mentioned there: the red background in certain items and keeping the system monitor open for a couple minutes fill up the ram until closed.


STEPS TO REPRODUCE

Trigger a notification or open the System Monitor (best way to see the behavior is to open them from the terminal and use top in a separate tab to see the memory usage)

OBSERVED RESULT

Memory usage goes up quickly, notifications take more time to fill up the RAM, System monitor does it fast.

This is what the terminal outputs when running plasmashell or plasma-systemmonitor from it: (it just spams this a lot)

shader compilation failed: 
"error: Too many fragment shader default uniform block components\nerror: Too many fragment shader uniform components\n"
QOpenGLShader::link: error: Too many fragment shader default uniform block components
error: Too many fragment shader uniform components

QOpenGLShaderProgram::uniformLocation(matrix): shader program is not linked
QOpenGLShaderProgram::uniformLocation(opacity): shader program is not linked
QOpenGLShaderProgram::uniformLocation(innerRadius): shader program is not linked
QOpenGLShaderProgram::uniformLocation(outerRadius): shader program is not linked
QOpenGLShaderProgram::uniformLocation(aspect): shader program is not linked
QOpenGLShaderProgram::uniformLocation(backgroundColor): shader program is not linked
QOpenGLShaderProgram::uniformLocation(colors): shader program is not linked
QOpenGLShaderProgram::uniformLocation(segments): shader program is not linked
QOpenGLShaderProgram::uniformLocation(segmentCount): shader program is not linked
QOpenGLShaderProgram::uniformLocation(smoothEnds): shader program is not linked
QOpenGLShaderProgram::uniformLocation(fromAngle): shader program is not linked
QOpenGLShaderProgram::uniformLocation(toAngle): shader program is not linked
QOpenGLShader::link: error: Too many fragment shader default uniform block components
error: Too many fragment shader uniform components



EXPECTED RESULT

Memory usage should't increase too much.


SOFTWARE/OS VERSIONS

Operating System: KDE neon 5.26
KDE Plasma Version: 5.26.1
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
Kernel Version: 5.19.0-16.4-liquorix-amd64 (64-bit)
Graphics Platform: X11
Processors: 2 × Intel® Core™2 Duo CPU E8400 @ 3.00GHz
Memory: 3.8 GiB of RAM
Graphics Processor: i915

ADDITIONAL INFORMATION

I have a G31 IGP, so don't have access to Crocus or another driver, but as I noted before, llvmpipe doesn't produce this issue.

00:02.0 VGA compatible controller: Intel Corporation 82G33/G31 Express Integrated Graphics Controller (rev 10) (prog-if 00 [VGA controller])
	Subsystem: Intel Corporation 82G33/G31 Express Integrated Graphics Controller
Comment 1 Fushan Wen 2023-01-08 02:13:17 UTC
Unfortunately it's a driver bug and the notification widget can do little on it