Closed DirkSchmitt closed 10 months ago
(liferea:19316): GLib-ERROR **: ../../../../glib/gmem.c:100: failed to allocate 703505504 bytes → 670 MB ??
I see Liferea allocating around 98 GB on startup on 64-bit Fedora 27 Linux; this is Liferea 1.12.2 with the default set of Liferea feeds. Its actual memory usage (measured via its RSS) is only a hundred MBytes and change. Much of the allocation appears to be real, in that pmap reports that there is, for example, a 64 GB anon region mapped 'rw---'.
Starting yesterday, Liferea v1.12.2 is allocating 112GB on start. doesn't use all of it, but it's still shocking. Turned out it was the "Media Player" plugin. This is how I fixed it: start liferea with liferea --disable-plugins
. "Tools" menu, "Preferences", "Plugins" tab, clear the checkbox next to "Media Player". Quit liferea, restart as normal.
@mozai Thanks for this important hint on the media player!
Could you guys run Liferea with the GStreamer leak tracing enabled?
GST_TRACERS="leaks" GST_DEBUG="GST_TRACER:7" liferea | grep GST_TRACER
I'd be interested if the GStreamer debugging detects leaks.
quit liferea. restarted with --disable-plugins
, tools :: preferences :: plugins , turn on "media player" and all other plugins are off. close liferea.
Started liferea with GST_TRACERS="leaks" GST_DEBUG="GST_TRACER:7" liferea | grep GST_TRACER
top says:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
12241 moses 20 0 0.112t 98552 65216 S 0.0 1.2 0:04.74 liferea
12252 moses 20 0 98.028g 65788 55712 S 0.0 0.8 0:00.21 WebKitWebProces
the memory allocation is immediate, before liferea finishes the first run of fetching updates of RSS feeds.
"resident" memory use is small, that "virt" of allocated memory is staggering, but maybe it won't be used.
That "WebKitWebProcess" is weird because it only appears while liferea is running, but the parent pid (PPID) is '1', not liferea's '12241'. /usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/WebKitWebProcess
First time I select a news article with embedded video, I see this in the terminal window:
0:00:00.020813941 12252 0x55bf658a8520 DEBUG GST_TRACER gsttracer.c:164:gst_tracer_register:<registry0> update existing feature 0x55bf65b2a190 (latency)
0:00:00.020868154 12252 0x55bf658a8520 DEBUG GST_TRACER gsttracer.c:164:gst_tracer_register:<registry0> update existing feature 0x55bf65b2a250 (log)
0:00:00.020883352 12252 0x55bf658a8520 DEBUG GST_TRACER gsttracer.c:164:gst_tracer_register:<registry0> update existing feature 0x55bf65b2a310 (rusage)
0:00:00.020904721 12252 0x55bf658a8520 DEBUG GST_TRACER gsttracer.c:164:gst_tracer_register:<registry0> update existing feature 0x55bf65b2a3d0 (stats)
0:00:00.020927868 12252 0x55bf658a8520 DEBUG GST_TRACER gsttracer.c:164:gst_tracer_register:<registry0> update existing feature 0x55bf65b2a490 (leaks)
0:00:00.021007432 12252 0x55bf658a8520 TRACE GST_TRACER gsttracerrecord.c:111:gst_tracer_record_build_format: object-alive.class, type-name=(structure)"value\,\ type\=\(type\)gchararray\,\ related-to\=\(GstTracerValueScope\)GST_TRACER_VALUE_SCOPE_PROCESS\;", address=(structure)"value\,\ type\=\(type\)gpointer\,\ related-to\=\(GstTracerValueScope\)GST_TRACER_VALUE_SCOPE_PROCESS\;", description=(structure)"value\,\ type\=\(type\)gchararray\,\ related-to\=\(GstTracerValueScope\)GST_TRACER_VALUE_SCOPE_PROCESS\;", ref-count=(structure)"value\,\ type\=\(type\)guint\,\ related-to\=\(GstTracerValueScope\)GST_TRACER_VALUE_SCOPE_PROCESS\;", trace=(structure)"value\,\ type\=\(type\)gchararray\,\ related-to\=\(GstTracerValueScope\)GST_TRACER_VALUE_SCOPE_PROCESS\;";
0:00:00.021036349 12252 0x55bf658a8520 DEBUG GST_TRACER gsttracerrecord.c:125:gst_tracer_record_build_format: new format string: object-alive, type-name=(string)%s, address=(gpointer)%p, description=(string)%s, ref-count=(uint)%u, trace=(string)%s;
0:00:00.021070834 12252 0x55bf658a8520 TRACE GST_TRACER gsttracerrecord.c:111:gst_tracer_record_build_format: object-refings.class, ts=(structure)"value\,\ type\=\(type\)guint64\,\ related-to\=\(GstTracerValueScope\)GST_TRACER_VALUE_SCOPE_PROCESS\;", type-name=(structure)"value\,\ type\=\(type\)gchararray\,\ related-to\=\(GstTracerValueScope\)GST_TRACER_VALUE_SCOPE_PROCESS\;", address=(structure)"value\,\ type\=\(type\)gpointer\,\ related-to\=\(GstTracerValueScope\)GST_TRACER_VALUE_SCOPE_PROCESS\;", description=(structure)"value\,\ type\=\(type\)gchararray\,\ related-to\=\(GstTracerValueScope\)GST_TRACER_VALUE_SCOPE_PROCESS\;", ref-count=(structure)"value\,\ type\=\(type\)guint\,\ related-to\=\(GstTracerValueScope\)GST_TRACER_VALUE_SCOPE_PROCESS\;", trace=(structure)"value\,\ type\=\(type\)gchararray\,\ related-to\=\(GstTracerValueScope\)GST_TRACER_VALUE_SCOPE_PROCESS\;";
0:00:00.021086226 12252 0x55bf658a8520 DEBUG GST_TRACER gsttracerrecord.c:125:gst_tracer_record_build_format: new format string: object-refings, ts=(guint64)%lu, type-name=(string)%s, address=(gpointer)%p, description=(string)%s, ref-count=(uint)%u, trace=(string)%s;
Also, a "WebKitNetworkProcess" appears, also with staggering memory allocation but not much memory in use, and also owned by PPID 1. /usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/WebKitNetworkProcess
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
12241 moses 20 0 0.112t 104048 70356 S 0.0 1.3 0:09.50 liferea
12252 moses 20 0 98.543g 109228 76916 S 0.3 1.3 0:03.94 WebKitWebProces
12254 moses 20 0 98.103g 43588 29784 S 0.0 0.5 0:00.30 WebKitNetworkPr
There's what looks like a video player embed in the article view area, with a picture of the first frame of video, a play button, and a slider, and a timer. I can move the slider to no other effect. The play button does not react to clicking. Viewing another article that has a video embed does not produce more messages in the terminal.
After the above tests, I disabled Tools :: Preferences :: Plugins :: Media Player , quit liferea, started it again with --disable-plugins
, but it's still allocating hundreds of gigabytes, and the video embeds are still appearing but not working, and GST_DEBUG is still uttering messages to stderr. So the workaround I described in June isn't working today. ... or maybe the Media Player plugin can't be disabled anymore?
@mozai The media player plugin is for media attached as enclosures to the feed, not videos embedded in the html. WebKitGtk renders those. Both use GStreamer.
Liferea seems to have some problems with memory allocation.
With
sysctl -w vm.overcommit_memory=2
I liferea is dies with the following message:Allocation of 366 Megabyte seems also in current times a huge amount.
With
sysctl -w vm.overcommit_memory=0
Memory is enough on the machine (8 Gb RAM + 8 Gb Swap) Ofer 2 Gb RAM and the the whole swap space is unused.
env LC_ALL=C free -m
Software version:
1.12.1-1~ubuntu16.04.1~c42.ppa1