Bug 222621

Summary: Memory leak in "gnome-terminal"
Product: [Fedora] Fedora Reporter: Joachim Frieben <jfrieben>
Component: gnome-terminalAssignee: Behdad Esfahbod <behdad>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: gnome-bugs, walovaton
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-03-22 04:44:03 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 150226    
Attachments:
Description Flags
Release of memory and swap space after closing "gnome-terminal"
none
fresh started gnome desktop on Fedora 7 Test 2
none
Same desktop after executing gnome-terminal
none
This is from Ubuntu Edgy Gnome 2.16
none
Demonstration that the problem still exists none

Description Joachim Frieben 2007-01-15 05:45:35 EST
Description of problem:
An instance of "gnome-terminal" with high volume output consumes
more and more memory as time goes by. This becomes apparent as
the system gets slower and starts swapping memory to the disk.
A representative entry in "top" output reads:

  "2690 test 15 0 381m 188m 6924 S 2.0 37.8 65:35.22 gnome-terminal"
                  ^^^^ ^^^^

Version-Release number of selected component (if applicable):
gnome-terminal-2.16.1-1.fc7

How reproducible:
Always.

Steps to Reproduce:
1. Launch "gnome-terminal".
2. Execute a program with high volume output.
  
Actual results:
Over the time, "gnome-terminal" grabs more and more memory up to
the point where the impact on system performance becomes clearly
noticeable.

Expected results:
An instance of "gnome-terminal" should not require more than a
couple of MB instead of a three figure amount.

Additional info:
After closing the terminal window, the allocated memory gets
released as "gnome-system-monitor" indicates, and the system
returns to normal operation.
Comment 1 Joachim Frieben 2007-01-15 05:47:39 EST
Issue probably related or identical to

  https://launchpad.net/ubuntu/+source/gnome-terminal/+bug/67655
Comment 2 Joachim Frieben 2007-01-17 16:05:42 EST
Created attachment 145859 [details]
Release of memory and swap space after closing "gnome-terminal"

As illustrated by the screenshot, a huge amount of memory and of swap
space gets freed after closing "gnome-terminal".
Comment 3 Joachim Frieben 2007-01-29 03:59:09 EST
I am currently again running "FC5" on my system, and it turns out
that "gnome-terminal-2.14.2-1" is totally unaffected by the issue
reported above.
Comment 4 Behdad Esfahbod 2007-02-02 16:38:08 EST
This seems like just heap fragmentation.  Known issue.
Comment 5 Joachim Frieben 2007-02-26 05:36:06 EST
Also unaffected is "gnome-terminal-2.16.0-2.fc6". So, this seems to be
a problem with the current 2.17.x development series.
Comment 6 William Lovaton 2007-03-04 20:11:56 EST
Behdad,

I just installed FC7 Test 2 with all of the updates as of today.  I think
gnome-terminal (2.17.92-1.fc7) consumes a lot of memory just with a fresh start.

In gnome-system-monitor it shows a bigger resident memory that for ex: nautilus
and is among the bigger ones.  I can't confirm the number right now because I am
running yum in a terminal but I will post them here as soon as I get them.

I don't remember gnome-terminal being as big as this, may be this is something
new in Gnome 2.18 series.

Any idea on how to get more information about this, I am using a spare machine
so I can keep it up to date with rawhide to make testing.
Comment 7 William Lovaton 2007-03-04 22:26:57 EST
Created attachment 149235 [details]
fresh started gnome desktop on Fedora 7 Test 2
Comment 8 William Lovaton 2007-03-04 22:29:02 EST
Created attachment 149236 [details]
Same desktop after executing gnome-terminal

It consumes almost the same memory as nautilus.
Comment 9 William Lovaton 2007-03-04 22:31:22 EST
Created attachment 149237 [details]
This is from Ubuntu Edgy Gnome 2.16

gnome-terminal in Ubuntu use less memory.  I don't remember how much memory use
g-t in Fedora Core 6.  I'll have to check tomorrow in my office computer.
Comment 10 Joachim Frieben 2007-03-05 04:39:25 EST
(In reply to comment #6)
I do not see your point. Memory consumption of "gnome-terminal" does not
look excessive in your case. Your screenshot from comment #7 does not
even show a single "gnome-terminal" process running!
Btw, it seems to me that the issue has already been resolved as of
"gnome-terminal-2.17.92-1.fc7". Expect this bug to be closed some time
soon.
Comment 11 Joachim Frieben 2007-03-05 06:55:38 EST
(In reply to comment #10)
After some "stress testing", I have to revoke my statement of comment #10.
"gnome-terminal-2.17.92-1.fc7" still has the same huge memory footprint
when applications with a high output volume to the shell are used.
Comment 12 William Lovaton 2007-03-05 07:59:53 EST
(In reply to comment #10)
> I do not see your point. Memory consumption of "gnome-terminal" does not
> look excessive in your case. Your screenshot from comment #7 does not
> even show a single "gnome-terminal" process running!
> Btw, it seems to me that the issue has already been resolved as of
> "gnome-terminal-2.17.92-1.fc7". Expect this bug to be closed some time
> soon.

Yes, you are right: memory consumption doesn't look that high, I am just
comparing with Ubuntu which is about 4 megs lower (14,8 MB) and right now I am
seeing gnome-terminal from FC6 and it says 13,1 MB of RSS.

May be this is just because of debugging symbols or build parameters during the
testing period so it doesn't seem like a problem.

BTW, I use a lot gnome-terminal and I have not seen the problem you are
reporting, I am going to stress test g-t in Fedora 7 and see what happens.

Cheers.
Comment 13 Joachim Frieben 2007-03-22 04:44:03 EDT
Seems to be gone as of "gnome-terminal-2.18.0-1.fc7".
Comment 14 Ged 2014-11-06 03:45:25 EST
Created attachment 954363 [details]
Demonstration that the problem still exists



The system is running GNOME and is monitored by Nagios.

It is one of a number running similar Linux-based operating systems, software and applications (including Virtual machines on VirtualBox) in a business environment.  It is the only system in the business running GNOME.  Very shortly it won't be running GNOME any more so I won't be able to add further to this thread.

The other systems (running XFCE) don't show this behaviour.