Bug 73156 - gnome-terminal leaks memory
gnome-terminal leaks memory
Status: CLOSED DUPLICATE of bug 76219
Product: Red Hat Linux
Classification: Retired
Component: vte (Show other bugs)
8.0
i386 Linux
high Severity high
: ---
: ---
Assigned To: Nalin Dahyabhai
:
: 75498 (view as bug list)
Depends On:
Blocks: 67217 79578
  Show dependency treegraph
 
Reported: 2002-08-31 07:46 EDT by Felipe Alfaro Solana
Modified: 2008-05-01 11:38 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 13:49:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Felipe Alfaro Solana 2002-08-31 07:46:46 EDT
Description of Problem:
Just after installing RedHat Null, I made little user interface customizatioms,
but noticed that "gnome-terminal" is leaking memory continuously. To check on
this, I launched a "gnome-terminal" window, then ran "top" and chose to sort
listing by memory usage by pressing M. I left "top" running alone on the system
and could see that the percentage of memory being used by "gnome-terminal" was
increasing at a slow, but constant rate, without doing nothing, except showing
the output from the "top" command.

Also, using "gnome-terminal" for simple things like doing an "ls", etc. can make
"gnome-terminal" to consume up to 100MB of RAM. I thought this was caused by
using a transparent background, but using a solid background produces the same
effect. Then, I thought it could be caused by the scrollback buffer, but it has
been configured for a maximum of 318KB.

I think the problem is related to window updates on "gnome-terminal": if I leave
the "gnome-terminal" window completely idle, with no processes generating
output, "gnome-terminal" does not leak memory. However, doing a simple "ls"
several times, increases the memory usage of "gnome-terminal" several kilobytes up.


Version-Release number of selected component (if applicable):
gnome-terminal-2.0.1-2 and gnome-terminal-2.0.1-3 (from RawHide)

How Reproducible:
Alwyas

Steps to Reproduce:
1. Launch a *single* "gnome-terminal" (we don't want other terminals from
interfering)
2. Run "top" inside it
3. Press M to force sort by memory usage
4. Press S 1 to refresh every second
5. On my machine, the %MEM column for my 80x24 "gnome-terminal" process
increases at 0.1% every two seconds. By substracting the SIZE column between
snapshots of "top" (every 1 second), it seems "gnome-terminal" is steadiliy
leaking 244 KBytes per second. That's too much memory for a single "top" process
running on a terminal.

Actual Results:
On my machine, "gnome-terminal" leaks memory steadily at 0.1% rate every two
seconds. This is on a P4-2GHz with 521MB of RAM.

Expected Results:
I expect "gnome-terminal" to not consume 244KB of memory per second when running
a simple "top" command that is refreshing its output every 1 second. Also, after
running "gnome-terminal" for 5 seconds of real CPU usage (two minutes of real
time), its size has grown up to a RSS (resident size) of 66M. That's a lot of
memory for a terminal, don't you think?

Additional Information:
Should I bug this to bugzilla.gnome.org too?
Comment 1 Havoc Pennington 2002-08-31 11:20:22 EDT
Should be fixed in newer vte e.g. 0.8.14
Comment 2 Havoc Pennington 2002-09-03 11:39:45 EDT
(be sure to reopen this if not fixed)
Comment 3 Ben Levenson 2002-09-03 12:18:44 EDT
I don't see this in vte-0.8.15-1.
CLOSING -> RAWHIDE
Comment 4 Felipe Alfaro Solana 2002-09-11 16:22:45 EDT
Well, it's not completely fixed... I have tested this with vte-0.8.19-1 and have
found it only occurs when running the entire desktop on a Xvnc session:

If I run X-Window locally (for example, by entering run level 5, and accessing
my session from gdm while using a standard X server), gnome-terminal does not
leak memory, although it stays stable at a whopping 11MB of memory (a lot of
memory for a terminal).

But, if I configure the Xvnc server by modifying "/etc/sysconfig/vncserver" and
adding the following line:

VNCSERVERS="1:root"

then invoke "/etc/init.d/vncserver start" and next use "vncviewer" from my
laptop, when I see the remote desktop and launch "gnome-terminal", it *does*
leak memory as described in the bug report.
Comment 5 tom georgoulias 2002-09-11 21:54:44 EDT
I'm still seeing a leak myself (vte-0.8.19-1, built from SRPM). If I start
xcdroast from a gnome-terminal and create a CD, almost all of my memory is used
up in the process.

[root@gemini root]# xcdroast &
[1] 619
[root@gemini root]#
** WARNING **: The X-CD-Roast wrapper seems not to have the correct
         permissions set

** WARNING **: So do as root something like that:
         chown root:cdwrite /usr/lib/xcdroast-0.98/bin/xcdrwrap;
         chmod 2755 /usr/lib/xcdroast-0.98/bin/xcdrwrap


** WARNING **: For more information read
        /usr/share/doc/xcdroast-0.98a9/README.nonroot

*** NOTE ***:
        ---------------------------------------------------------------
        This permission warning and the following set-uid bit warnings
        can be safely ignored, if you want to run X-CD-Roast as root only.
        ---------------------------------------------------------------

[1]+  Done                    xcdroast
[root@gemini root]# free
             total       used       free     shared    buffers     cached
Mem:       1031032     837548     193484          0      20160     739176
-/+ buffers/cache:      78212     952820
Swap:      1052216          0    1052216
Comment 6 Nalin Dahyabhai 2002-10-17 19:07:07 EDT
*** Bug 75498 has been marked as a duplicate of this bug. ***
Comment 7 Nalin Dahyabhai 2002-10-17 19:07:33 EDT
*** Bug 75498 has been marked as a duplicate of this bug. ***
Comment 8 R.K.Aa. 2002-12-05 19:35:06 EST
there are a whole family of this one out there...

bug 73226: gnome-terminal has serious memory leak (even when idle)
bug 74972: Memory leak in gnome-terminal
bug 75270: Incredibly bad memory leaks in gnome-terminal, causing entir.. []
bug 76219: gnome-terminal memory leak
bug 76410: memory leak causes swap file to max and crashes system

They are all about the same issue. Perhaps they should be made duplicates of
this bug?
Comment 9 Havoc Pennington 2003-01-08 11:02:51 EST
If ftp://people.redhat.com/hp/testing/ fixes the problem it's an Xft bug
and can be closed (consider marking dup of 76219 or vice versa)

dark@c2i, thanks a lot for finding those dups, it really does save us a lot of
time. appreciated.
Comment 10 Need Real Name 2003-02-05 10:11:20 EST
Havoc's Xft-2.0.4 fixed this for me.  A 'top' running on a vncviewer'd
gnome-terminal now behaves as it should, and the memory usage of individual
terms once their scrollback buffers are full seems stable.
Comment 11 Rudi Heitbaum 2003-02-05 16:57:33 EST
We have been running this for a few weeks now, with all functioning correctly
via remote xdm sessions. Thanks
Comment 12 Nalin Dahyabhai 2003-02-07 19:14:35 EST

*** This bug has been marked as a duplicate of 76219 ***
Comment 13 Red Hat Bugzilla 2006-02-21 13:49:33 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

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