Created attachment 188351 [details] patch to fix memory leak due to Gtk3 CSS changes The recent upstream changes to support Gtk3 CSS introduce a rampant memory leak because the css_provider is re-created every time through the loop. Attached patch ensures that the css_provider is only created once. I am attaching a FreeBSD port patch as this memory leak is significant and needs an immediate fix. I will also submit a bug report upstream in order to have this problem fixed there, too.
Hi, Thanks for the patch. Just to make sure I understand correctly, the "recent upstream changes" are in the GTK3 sources? Since you are sending this upstream too, could you followup with a link to the upstream bug so it can be tracked? It would allow avoiding to commit patches different from what is accepted upstream. In the while I'll also test it.
I noticed there is already an upstream bug report about this: https://bugzilla.xfce.org/show_bug.cgi?id=13495 No patch attached though, maybe you should followup here.
(In reply to Guido Falsi from comment #1) It's just upstream patch [1], from upcoming release. [1] https://git.xfce.org/panel-plugins/xfce4-wavelan-plugin/commit/?id=d4c76389d63199636c52e8a7a0ce80d5f2fde591
(In reply to Guido Falsi from comment #2) All our patches are already merged by upstream.
(In reply to Olivier Duchateau from comment #4) > (In reply to Guido Falsi from comment #2) > > All our patches are already merged by upstream. Thank you, I did not see that. In general always give pointers to upstream bugs or (even better) commits in ports bug reports, this speeds up things. Looking at the commit the upstream code did get a refactoring, and is doing things differently. Wouldn't be importing the upstream commit unchanged better? That commit applies with minimal changes and should be equivalent to your patch. (my poudriere machine is busy right now, but I'm going to test what I propose shortly, if it works out fine I'll send a revised patch)
Yes, I had not seen the upstream code refactoring when I did my patch earlier. (Sorry, should'a looked, I know!) I am now also testing the upstream version here. Agreed that we should use that if it does work, along with our FreeBSD-specific patch. My initial testing with the upstream version has seen the process' RSS increase in 4k steps by a total of 16k over the first half hour or so, after which it appears to have stopped growing. So we are probably good with that.
Created attachment 188385 [details] patch to fix mem leak in similar way to forthcoming upstream changes This is a revised files/patch-panel-plugin__wavelan.c that fixes the memory leak in a manner consistent with forthcoming upstream changes. It retains our prior FreeBSD-specific changes that were already in the patch, but does not bring in further upstream changes that we don't already have.
A commit references this bug: Author: madpilot Date: Thu Nov 30 20:36:35 UTC 2017 New revision: 455225 URL: https://svnweb.freebsd.org/changeset/ports/455225 Log: - Import upstream patch to fix a memory leak [1] - While here rename and regenerate patches PR: 223937 [1] Submitted by: J.R. Oldroyd <fbsd@opal.com> Obtained from: https://git.xfce.org/panel-plugins/xfce4-wavelan-plugin/commit/?id=d4c76389d63199636c52e8a7a0ce80d5f2fde591 MFH: 2017Q4 Changes: head/sysutils/xfce4-wavelan-plugin/Makefile head/sysutils/xfce4-wavelan-plugin/files/patch-panel-plugin__wavelan.c head/sysutils/xfce4-wavelan-plugin/files/patch-panel-plugin__wi_bsd.c head/sysutils/xfce4-wavelan-plugin/files/patch-panel-plugin_wavelan.c head/sysutils/xfce4-wavelan-plugin/files/patch-panel-plugin_wi__bsd.c
A commit references this bug: Author: madpilot Date: Thu Dec 14 15:01:22 UTC 2017 New revision: 456302 URL: https://svnweb.freebsd.org/changeset/ports/456302 Log: MFH: r455225 - Import upstream patch to fix a memory leak [1] - While here rename and regenerate patches PR: 223937 [1] Submitted by: J.R. Oldroyd <fbsd@opal.com> Obtained from: https://git.xfce.org/panel-plugins/xfce4-wavelan-plugin/commit/?id=d4c76389d63199636c52e8a7a0ce80d5f2fde591 Approved by: ports-secteam (swills) Changes: _U branches/2017Q4/ branches/2017Q4/sysutils/xfce4-wavelan-plugin/Makefile branches/2017Q4/sysutils/xfce4-wavelan-plugin/files/patch-panel-plugin__wavelan.c branches/2017Q4/sysutils/xfce4-wavelan-plugin/files/patch-panel-plugin__wi_bsd.c branches/2017Q4/sysutils/xfce4-wavelan-plugin/files/patch-panel-plugin_wavelan.c branches/2017Q4/sysutils/xfce4-wavelan-plugin/files/patch-panel-plugin_wi__bsd.c
Commited and merged! Thanks.