From 4f9d2b579a600b4fd32f2a92b83378d488a82bff Mon Sep 17 00:00:00 2001 From: Khang Nguyen Date: Fri, 22 Dec 2017 15:44:41 +0700 Subject: rcar-gen3: dbus: WORKAROUND to fix memory leak issue In Yocto v3.4.0, memory leak occurs when restarting Weston: | root@salvator-x:~# cat /proc/meminfo | grep Cma | CmaTotal: 671744 kB | CmaFree: 629788 kB | root@salvator-x:~# | root@salvator-x:~# systemctl restart weston | root@salvator-x:~# | root@salvator-x:~# cat /proc/meminfo | grep Cma | CmaTotal: 671744 kB | CmaFree: 599404 kB It will make Weston crash because out of memory if restarting many times. This patch is a WORKAROUND to avoid the issue, it restarts dbus depend on Weston and memory will be released properly. Signed-off-by: Thao Nguyen Signed-off-by: Khang Nguyen Signed-off-by: Takamitsu Honda --- meta-rcar-gen3/recipes-core/dbus/dbus_1.10.20.bbappend | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 meta-rcar-gen3/recipes-core/dbus/dbus_1.10.20.bbappend diff --git a/meta-rcar-gen3/recipes-core/dbus/dbus_1.10.20.bbappend b/meta-rcar-gen3/recipes-core/dbus/dbus_1.10.20.bbappend new file mode 100644 index 0000000..66183b1 --- /dev/null +++ b/meta-rcar-gen3/recipes-core/dbus/dbus_1.10.20.bbappend @@ -0,0 +1,12 @@ +# WORKAROUND for memory leak issue when restart weston + +# Make sure the WORKAROUND only effect with GFX and MMP config +ENABLE_FIX = "${@'1' if 'gsx' in '${MACHINE_FEATURES}' else '0'}" + +# Modify dbus.service to make dbus restarts depend on weston +do_install_prepend() { + if [ "X${ENABLE_FIX}" = "X1" ]; then + sed -e "/Requires=dbus.socket/a PartOf=weston.service" \ + -i ${B}/bus/dbus.service + fi +} -- cgit 1.2.3-korg