gnome-terminal memory leak

Bug #138607 reported by diquark
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GNOME Terminal
Fix Released
Critical
gnome-control-center
New
Undecided
Unassigned
gnopernicus
New
Undecided
Unassigned
gnome-terminal (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gnome-terminal

When using gnome-terminal over a prolonged period of time (especially with eg. mplayer which outputs a status line via ncurses) the memory usage becomes enormous. hundreds of MB's. The process only releases the memory after the last terminal is closed. Somehow 'caching' the memory of earlier terminals (which in my humble opinion is a memory leak).

Revision history for this message
diquark (diquark) wrote :

affects gnome-terminal 2.18.0 (ubuntu feisty)

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

Can you check this using valgrind (https://wiki.ubuntu.com/Valgrind)?

Changed in gnome-terminal:
status: New → Incomplete
Changed in gnome-terminal:
importance: Undecided → Medium
Revision history for this message
JP Foster (jeepster) wrote :

I have a similar problem too. Here is my attached valgrind output after running for a an hour or so running some compiles so lots of scroll buffer.
Konsole and other terminal emulators don't exhibit this large memory usage, but xfce-terminal does. Does it have shared code with gnome-terminal?

gnome-terminal was using 13% of memory more than firefox or Xorg. I don't know if the valgrind log really tells much. It looks like it is all cleaned up before exit, but I'm no expert with valgrind.

Revision history for this message
JP Foster (jeepster) wrote :

Here is a valgrind log of a gnome-terminal that has run overnight. It seems to show more. Hope that helps, if there are any other test you want me to run I'm only too happy to oblige.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Do you have the accessibility options activated? Do you also have the bug without those? Do you have an easy way to trigger the bug?

Changed in gnome-terminal:
assignee: nobody → desktop-bugs
importance: Medium → Low
Revision history for this message
Gerard Lledo (glledo) wrote :

I was having the same symptons/bug. Disabling the accessibility options solved it. I can valgrind it overnight if it's necessary.

Revision history for this message
JP Foster (jeepster) wrote :

Turning off accessibilty options fixed it for me

Revision history for this message
Aryeh Gregor (simetrical+launchpad) wrote :

1) Which accessibility options might these be? I'd be happy to disable them, but I can't find them.

2) Is this bug still supposed to be Incomplete? The requested information was attached.

I've experienced this bug. I just realized gnome-terminal was using >500 MB of resident memory, and probably had been for days; Reset and Clear on all tabs did nothing, so I restarted it. This is on Gutsy. dpkg -l gives version gnome-terminal 2.18.2-0ubuntu.

Revision history for this message
JP Foster (jeepster) wrote : Re: [Bug 138607] Re: gnome-terminal memory leak

On Wed, 2008-02-27 at 02:13 +0000, Simetrical wrote:
> 1) Which accessibility options might these be? I'd be happy to disable
> them, but I can't find them.
>
> 2) Is this bug still supposed to be Incomplete? The requested
> information was attached.
>
> I've experienced this bug. I just realized gnome-terminal was using
> >500 MB of resident memory, and probably had been for days; Reset and
> Clear on all tabs did nothing, so I restarted it. This is on Gutsy.
> dpkg -l gives version gnome-terminal 2.18.2-0ubuntu.
>
from the applications toolbar (on hardy should be more or less the same
elsewhere)
Main->System->preferences->universal access->Assistive Technology.
Uncheck "enable assistive technologies".

Basically turns off the screen reader hooks, which is fine as long as
you don't have visual problems.

Revision history for this message
Aryeh Gregor (simetrical+launchpad) wrote :

That option was already off for me. I don't know if this is precisely the same issue, but I have observed that it seems to use an inordinate amount of memory. I previously had a maximum scrollback size of 100000 lines, which works out to 62 MB per tab, but my memory usage went a lot over that after prolonged use with about four tabs open at any given time, and didn't drop when I closed the tabs.

Revision history for this message
JP Foster (jeepster) wrote :

On Wed, 2008-02-27 at 17:10 +0000, Simetrical wrote:
> That option was already off for me. I don't know if this is precisely
> the same issue, but I have observed that it seems to use an inordinate
> amount of memory. I previously had a maximum scrollback size of 100000
> lines, which works out to 62 MB per tab, but my memory usage went a lot
> over that after prolonged use with about four tabs open at any given
> time, and didn't drop when I closed the tabs.

I have similar setup. it ate up all the memory, unchecking the assistive
tech seemed to fix it. I'll try turning it back on and see if the
problem is still there. It could be fixed and your problem is totally
unrelated.

Revision history for this message
Aryeh Gregor (simetrical+launchpad) wrote :
Changed in gnome-terminal:
status: Unknown → Fix Released
Revision history for this message
Pedro Villavicencio (pedro) wrote :

May someone having the issue forward this upstream to bugzilla.gnome.org? thanks.

Revision history for this message
Aryeh Gregor (simetrical+launchpad) wrote :

Well, there already seem to be lots of bugs upstream, per my previous comments. Some of them suggest it should have been fixed some time ago, so maybe a fix got into Intrepid?

Revision history for this message
Pedro Villavicencio (pedro) wrote :

marking it as fixed, feel free to reopen if you encounter the same issue with jaunty.

Changed in gnome-terminal:
status: Incomplete → Fix Released
Changed in gnome-terminal:
importance: Unknown → Critical
Revision history for this message
Unkraut (unkraut2) wrote :

I just encountered the same issue in ubuntu 12.10. I had the terminal running for a week or so. Now it consumes 660 MB, tendency rising. Closing single tabs is futile, memory footprint still rises. Please reopen.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.