Bug 222621 - Memory leak in "gnome-terminal"
Summary: Memory leak in "gnome-terminal"
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-terminal
Version: rawhide
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Behdad Esfahbod
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC7Blocker
TreeView+ depends on / blocked
 
Reported: 2007-01-15 10:45 UTC by Joachim Frieben
Modified: 2014-11-06 08:45 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-03-22 08:44:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Release of memory and swap space after closing "gnome-terminal" (58.16 KB, image/png)
2007-01-17 21:05 UTC, Joachim Frieben
no flags Details
fresh started gnome desktop on Fedora 7 Test 2 (74.85 KB, image/png)
2007-03-05 03:26 UTC, William Lovaton
no flags Details
Same desktop after executing gnome-terminal (75.25 KB, image/png)
2007-03-05 03:29 UTC, William Lovaton
no flags Details
This is from Ubuntu Edgy Gnome 2.16 (59.67 KB, image/png)
2007-03-05 03:31 UTC, William Lovaton
no flags Details
Demonstration that the problem still exists (79.71 KB, image/gif)
2014-11-06 08:45 UTC, Ged
no flags Details

Description Joachim Frieben 2007-01-15 10:45:35 UTC
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 10:47:39 UTC
Issue probably related or identical to

  https://launchpad.net/ubuntu/+source/gnome-terminal/+bug/67655

Comment 2 Joachim Frieben 2007-01-17 21:05:42 UTC
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 08:59:09 UTC
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 21:38:08 UTC
This seems like just heap fragmentation.  Known issue.

Comment 5 Joachim Frieben 2007-02-26 10:36:06 UTC
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-05 01:11:56 UTC
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-05 03:26:57 UTC
Created attachment 149235 [details]
fresh started gnome desktop on Fedora 7 Test 2

Comment 8 William Lovaton 2007-03-05 03:29:02 UTC
Created attachment 149236 [details]
Same desktop after executing gnome-terminal

It consumes almost the same memory as nautilus.

Comment 9 William Lovaton 2007-03-05 03:31:22 UTC
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 09:39:25 UTC
(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 11:55:38 UTC
(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 12:59:53 UTC
(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 08:44:03 UTC
Seems to be gone as of "gnome-terminal-2.18.0-1.fc7".

Comment 14 Ged 2014-11-06 08:45:25 UTC
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.


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