RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1027192 - Extensive memory usage after changing RandR configuration - gdm memory leak
Summary: Extensive memory usage after changing RandR configuration - gdm memory leak
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gnome-shell
Version: 7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Florian Müllner
QA Contact: Desktop QE
URL:
Whiteboard:
: 1059343 1067456 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-06 11:07 UTC by Michal Domonkos
Modified: 2015-01-06 14:05 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 10:20:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Xorg.0.log (112.56 KB, text/plain)
2013-11-06 11:07 UTC, Michal Domonkos
no flags Details

Description Michal Domonkos 2013-11-06 11:07:02 UTC
Created attachment 820290 [details]
Xorg.0.log

Description of problem:
There's a massive slowdown in the overall desktop rendering performance after changing the screen resolution from the native one to a lower one and back.  It can be noticed when switching between the Activities Overview and the desktop back and forth.  Especially the zoom-out animation when entering the Overview becomes very jerky and I get only about 2 or 3 frames instead of a smooth transition.  This becomes worse after several Overview -> desktop -> Overview cycles until the desktop eventually freezes completely.

I didn't observe any errors in the logs.

The issue is not GPU specific; affects Intel, NVIDIA and AMD, so I assume the bug is somewhere between the Xorg and gnome-shell.  Please reassign to the proper component if needed.

Version-Release number of selected component (if applicable):
gnome-shell-3.8.4-10.el7.x86_64
mutter-3.8.4-2.el7.x86_64
xorg-x11-server-Xorg-1.14.2-11.el7.x86_64
mesa-libGL-9.2-3.20131023.el7.x86_64
kernel-3.10.0-41.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. Open a bunch of windows 
2. Assuming you're running on the native resolution, lower it and revert back to the native one right away
3. Go to the Activities Overview and back to the desktop and repeat

Actual results:
After a few cycles the animations become jerky and eventually your desktop locks up.

Expected results:
Performance shouldn't be affected by changing the display resolution.

Comment 1 Michal Domonkos 2013-11-11 17:23:44 UTC
Also happens after setting orientation of the screen with xrandr.  However, after the freeze occurred I performed "telinit 3" in a VT and got the following messages:

[ 2308.858653] nouveau E[  PGRAPH][0000:08:00.0] TRAP DISPATCH_QUERY
[ 2308.859639] nouveau E[  PGRAPH][0000:08:00.0] no stuck command?
[ 2308.859639] nouveau E[     PFB][0000:08:00.0] trapped write at 0x0020276000 on channel 0x0001fab8 [Xorg[4829]] PGRAPH/DISPATCH/QUERY reason: PAGE_NOT_PRESENT

Comment 2 Michal Domonkos 2013-11-11 17:42:21 UTC
And same goes for panning with xrandr.

Comment 3 Michal Domonkos 2013-11-11 18:30:51 UTC
This is a backtrace of an Xorg process at the time it's hung up:

#0  0x000000374d8ed8d3 in __select_nocancel () at ../sysdeps/unix/syscall-template.S:81
#1  0x000000000046711c in WaitForSomething (pClientsReady=pClientsReady@entry=0x2aa5ba0) at WaitFor.c:221
#2  0x0000000000436feb in Dispatch () at dispatch.c:362
#3  0x000000000043b10a in dix_main (argc=12, argv=0x7fff2aea5768, envp=<optimized out>) at main.c:294
#4  0x000000374d821af5 in __libc_start_main (main=0x426620 <main>, argc=12, ubp_av=0x7fff2aea5768, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff2aea5758)
    at libc-start.c:274
#5  0x0000000000426651 in _start ()

Comment 4 Michal Domonkos 2013-11-11 18:53:02 UTC
Just got the same issue after playing OpenArena for a little bit and then exiting from it.

Comment 5 Michal Domonkos 2013-11-19 18:20:32 UTC
OK, as it turns out the performance degradation (and the freeze that might follow) is probably caused by a memory leak in gnome-shell.  After a resolution change, when I trigger the Overview a few times the gnome-shell's memory consumption will start to grow rapidly, resulting in above 60% of total RAM.  Since the machine I'm testing on is only equipped with 2 gigs of RAM it will eventually end up swapping, slowing down the whole system.

Comment 6 Michal Domonkos 2013-11-19 18:42:20 UTC
Also happens when (dis)connecting monitors.

Comment 7 Michal Domonkos 2014-01-10 12:21:10 UTC
Another way to trigger this bug on a laptop with an external monitor attached to it:

1. Perform a clean install
2. Log in your gnome account
3. Session starts with the laptop screen being the primary by default and the external monitor being the secondary display, so swap them to make the external monitor primary with e.g. the Super-P key combo

After this happens, there's a simple way to see the memory leak:
1. Launch "top -o %MEM"
2. Go to the Activities Overview and back to the desktop
3. Check the gnome-shell memory usage in top
4. Repeat steps 2-3 a few times

You'll notice in step 3 each time that the memory usage has increased and never decreases again.

Comment 10 Vladimir Benes 2014-03-13 10:48:02 UTC
triggering GC via alt+f2 -> lg -> memory solves this problem but the memory is not going down automatically.

Comment 11 Michal Domonkos 2014-03-13 11:24:10 UTC
When the freeze occurs it's sufficient for me to kill gnome-shell to force it to restart (without actually losing the current gnome session).

Comment 12 Matthias Clasen 2014-03-13 12:02:55 UTC
whats the needed info here ? there's no question in comment 10

Comment 13 Debarshi Ray 2014-03-13 12:57:29 UTC
(In reply to Vladimir Benes from comment #10)
> triggering GC via alt+f2 -> lg -> memory solves this problem but the memory
> is not going down automatically.

That sounds like the fundamental problem of all gjs code where the garbage collector does not kick in soon enough because it does not track memory allocated by GObject/C code.

If you have a JS object that contains big a GObject/C object (eg., a pixbuf), then the garbage collector does not know about the pixbuf. When the last reference to the JS object is dropped the GC does not account for the memory held by the GObject/C object, only the little bit held by the JS wrapper around it. This delays the garbage collection run.

Not sure if this such a big problem, unless we are still seeing significant user visible performance degradation.

Comment 14 Vladimir Benes 2014-03-13 13:01:39 UTC
I restarted g-s some hours ago:

it ate: 100 MBs
after several resolution changes and some more usage (3 hours):
it eats 500MB and even GC trigger cannot push it down to those 100MBs so it definitely leaks somewhere and that mem cannot be freed by gc either.

Comment 15 Matthias Clasen 2014-03-17 14:00:24 UTC
I've been discussing the possibility of scheduling a full gc after background changes with Florian. Florian, do you have a patch / test build ?

Comment 16 Florian Müllner 2014-03-19 16:46:20 UTC
I've just pushed gnome-shell-3.8.4-31.el7 which contains the gc patch mentioned by Matthias, and some improvements to the handling of animated backgrounds which leaked on resolution changes.

Comment 17 Matthias Clasen 2014-03-19 17:55:28 UTC
*** Bug 1067456 has been marked as a duplicate of this bug. ***

Comment 18 Vladimir Benes 2014-03-21 12:04:17 UTC
I'm quite sure this is working well. There are other issues in gnome shell but either resolution change or background don't leak memory.

Comment 19 Michal Domonkos 2014-03-27 11:57:18 UTC
Just to confirm Vlad's comment, I too don't see the originally reported issues triggered by a resolution/multihead change, so this has really been fixed.

Comment 20 Florian Müllner 2014-04-03 15:43:14 UTC
*** Bug 1059343 has been marked as a duplicate of this bug. ***

Comment 21 Ludek Smid 2014-06-13 10:20:00 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


Note You need to log in before you can comment on or make changes to this bug.