Bug 1717000
Summary: | possible memory leak in Gnome - continues [rhel-7.9.z] | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Ray Strode [halfline] <rstrode> | ||||
Component: | mutter | Assignee: | Jonas Ådahl <jadahl> | ||||
Status: | CLOSED ERRATA | QA Contact: | Desktop QE <desktop-qa-list> | ||||
Severity: | urgent | Docs Contact: | |||||
Priority: | urgent | ||||||
Version: | 7.5 | CC: | autobot-eus-copy, desktop-qa-list, dkochuka, fmuellner, jadahl, jkoten, jraising, jreznik, jwright, mboisver, mcatanza, mcrha, modehnal, ofalk, pbhoot, rstrode, sfroemer, tpelka, tpopela, xili, yferszt, yuokada, yzheng | ||||
Target Milestone: | rc | Keywords: | ZStream | ||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | mutter-3.28.3-28.el7 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | 1669048 | ||||||
: | 1719819 1881217 1881995 1882009 1882574 1882821 1887862 1888682 1899660 (view as bug list) | Environment: | |||||
Last Closed: | 2020-11-10 13:17:07 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | 1546302, 1669048, 1753122, 1753123, 1887862 | ||||||
Bug Blocks: | 1719819, 1881995, 1882009, 1882574, 1882821, 1887741, 1888675, 1888676, 1888678, 1888682 | ||||||
Attachments: |
|
Comment 35
Ray Strode [halfline]
2019-07-17 19:42:52 UTC
Running gnome-shell-3.28.5-16 and mutter-3.28.5-15 under valgrind, the most leaking part being reported here: ==1243== 161,226 (80 direct, 161,146 indirect) bytes in 2 blocks are definitely lost in loss record 46,238 of 46,271 ==1243== at 0x100C29F73: malloc (vg_replace_malloc.c:309) ==1243== by 0x1018C768D: g_malloc (gmem.c:99) ==1243== by 0x1018DEC8D: g_slice_alloc (gslice.c:1025) ==1243== by 0x1018FD56D: g_variant_alloc (gvariant-core.c:476) ==1243== by 0x1018FD56D: g_variant_new_from_children (gvariant-core.c:565) ==1243== by 0x1018FA188: g_variant_builder_end (gvariant.c:3703) ==1243== by 0x10134C403: parse_value_from_blob (gdbusmessage.c:1823) ==1243== by 0x10134E372: g_dbus_message_new_from_blob (gdbusmessage.c:2148) ==1243== by 0x1013589CA: _g_dbus_worker_do_read_cb (gdbusprivate.c:744) ==1243== by 0x1013140E3: g_task_return_now (gtask.c:1148) ==1243== by 0x101314118: complete_in_idle_cb (gtask.c:1162) ==1243== by 0x1018BEC76: g_idle_dispatch (gmain.c:5533) ==1243== by 0x1018C2048: g_main_dispatch (gmain.c:3175) ==1243== by 0x1018C2048: g_main_context_dispatch (gmain.c:3828) ==1243== by 0x1018C23A7: g_main_context_iterate.isra.19 (gmain.c:3901) ==1243== by 0x1018C2679: g_main_loop_run (gmain.c:4097) ==1243== by 0x1013569A5: gdbus_shared_thread_func (gdbusprivate.c:275) ==1243== by 0x1018E94EF: g_thread_proxy (gthread.c:784) ==1243== by 0x1036D0EA4: start_thread (in /usr/lib64/libpthread-2.17.so) ==1243== by 0x1039E38DC: clone (in /usr/lib64/libc-2.17.so) There are some other from libmozjs, libgjs and clutter, but not that significant as this one. (In reply to Milan Crha from comment #47) > ==1243== 161,226 (80 direct, 161,146 indirect) bytes in 2 blocks are > definitely lost in loss record 46,238 of 46,271 Maybe these are not real leaks, at least those not piling up in time. I added some debugging prints and most of the messages being leaked come as signals from ca.desrt.dconf.Writer interface, I see around 137 of those on gnome-shell exit, but it can be just a coincidence, because a minute earlier there had been no such leaking GDBusMessage, thus it can be that the logout initiates a DConf write, which is not finished. The change for atk from bug #1457206 is wrong, at least for gnome-shell (or possibly for anything but Evolution), it causes leaks of the AtkObject-s, even though it fixes the issue for Evolution. That makes the problem in Evolution, not in atk. My fault. I do not know whether there are other memory leaks in gnome-shell/mutter. Created attachment 1616709 [details] debugging patch for glib2 This is a debugging glib2 patch, which claims what glib's GObject-s had been created and which are still alive in gnome-shell. It dumps this information to /var/tmp/gobjs-PID-YYYYMMDD-HHmmSS.log files once per minute, together with memory statistic for that project. It creates also one "-atexit" file when the gnome-shell is closing. It's similar to glib's GObject instance tracking, though not exactly the same. Maybe it'll help someone more knowledgeable of the gnome-shell internals to identify the culprit. Trying with de-patched atk (bug #1753123), I see some objects peek when holding Super+A for a minute or more, but these are freed after a minute or such, probably with some garbage collector or something like that. The Rss memory doesn't go down after this, but it was left at ~750MB once it reached this value. I know kernel is bad in releasing a lot of small freed blocks of memory, thus maybe it is the reason why the Rss doesn't go down. It seems to be reused at least. The bug #1693156 comment #22 contains a test program which reproduces the kernel thing mentioned at the end of the previous comment. This appears to be similar to the RHEL8 bug (https://bugzilla.redhat.com/show_bug.cgi?id=1719819) "Gnome garbage collection leak [rhel-8]". That was fixed with updates to gnome-shell and mutter packages. (https://access.redhat.com/errata/RHSA-2020:1766) Is a similar solution in the works, for RHEL 7? Investigation of this issue for Red Hat Enterprise Linux 7 is on-going. Some of the performance work performed in Red Hat Enteprise Linux 8 is applicable. I have been testing and monitoring the test packages that Ray made and I am happy to report positive results. Monitoring system memory shows gnome-shell memory usage does not increase over time and some "non-normal" usage doesn't trigger anything unsavory either. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (GNOME bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:5048 |