After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 410461 - Memory leak in long running gnome-terminals
Memory leak in long running gnome-terminals
Status: RESOLVED DUPLICATE of bug 375319
Product: at-spi
Classification: Platform
Component: general
unspecified
Other All
: High major
: ---
Assigned To: Li Yuan
Li Yuan
Depends on:
Blocks:
 
 
Reported: 2007-02-21 17:31 UTC by austinf
Modified: 2007-03-09 03:11 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
valgrind output attempting to demonstrate problem (40.24 KB, text/plain)
2007-02-21 23:33 UTC, austinf
Details

Description austinf 2007-02-21 17:31:43 UTC
Please describe the problem:
I left a few gnome-terminal's open overnight that were ssh'd into another machine and running a program that prints quite a bit. I came back the next morning and my memory usage was at 100%, and the system was swapping like crazy.

Steps to reproduce:
1. Open a few gnome-terminals, and ssh into another machine.
2. Run a program that prints a lot (for testing just cat /dev/urandom)
3. Leave it running for about 8 hours or so


Actual results:
gnome-terminal eats all available memory and keeps going

Expected results:
gnome-terminal should not eat all my memory

Does this happen every time?
As it takes 8 hours to test, I'm not sure, I will try it again tonight and see what happens.

Other information:
this is the gnome-terminal in the fedora rawhide package:
gnome-terminal-2.17.91-3.fc7
Comment 1 Chris Wilson 2007-02-21 19:25:18 UTC
Hmm, I regularly run g-t under valgrind looking for any leak I may have introduced. Other than a few small, one-off, leaks per TerminalScreen which have already been identified and reported to their owners, to my knowledge g-t is very clean.

Can you run your session under valgrind:
G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind \
  --leak-check=full \
  --leak-resolution=med \
  --log-file=g-t.leaks \
  gnome-terminal --disable-factory

And then attach the log file (which will be called g-t.leaks.<pid>).
[You will need *all* the dbgsyms in order for valgrind to correctly pinpoint the leaks.]
Comment 2 austinf 2007-02-21 23:33:48 UTC
Created attachment 83077 [details]
valgrind output attempting to demonstrate problem

I didn't have the chance to run it for very long...I will run tonight all night if that will help.
Comment 3 Mariano Suárez-Alvarez 2007-02-21 23:38:00 UTC
The two huge leaks in that valgrind trace is in atk...
Comment 4 Mariano Suárez-Alvarez 2007-02-21 23:53:47 UTC
Moving to at-spi, maybe they know why this is happening?
Comment 5 austinf 2007-02-22 20:09:05 UTC
I ran the valgrind test overnight and found in the morning that memcheck was using all my available memory, and gnome-terminal itself was using it's normal amount. For some strange reason the log file from valgrind was truncated and didn't provide any useful info.

I'm not too familiar with valgrind, so I'm wondering if this is normal?
Comment 6 Harry Lu 2007-03-08 10:26:27 UTC
austinf, what is the version of at-spi in your machine?

And the last two traces related to /usr/lib/gtk-2.0/modules/libatk-bridge.so doesn't have the function names, so it is hard to find the reason.  We need better valgrind traces.
Comment 7 austinf 2007-03-08 21:24:46 UTC
I'm now running, at-spi-1.17.2-1.fc7, but i'm not sure what i was running when I first saw this problem. I will try to get better traces with more symbols soon.
Comment 8 Harry Lu 2007-03-09 02:34:59 UTC
I think we have found the root cause. Li Yuan will work on a patch, soon.

Thanks!
Comment 9 Li Yuan 2007-03-09 03:10:03 UTC
Yes, there will be leak after the user's at-spi-registryd crashed. This can be fixed by the patch of #375319. I will mark this bug as a duplicate of that bug.
Comment 10 Li Yuan 2007-03-09 03:11:20 UTC

*** This bug has been marked as a duplicate of 375319 ***