GNOME Bugzilla – Bug 620196
gnome-terminal scrollback leak
Last modified: 2010-06-03 19:11:21 UTC
this is a foward of bug https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/243596 since it happens to me too please ask if you need more information
open system monitor open a gnome-terminal, Edit the current profile's scrollback lines to the maximum value allowed. - 100000 lines. type this in the terminal... ls / -R Notice the memory gnome-terminal, Once this is finished, open a new tab, and close the tab you ran "ls / -R" in Notice the memory gnome-terminal uses does NOT go down. run "ls / -R" again and see the memory goes up again. I have had the memory level of gnome terminal go up to 1.7gig.
100000 is not the maximum; it was the maximum in an old gnome-terminal version. Please try 2.30.x.
With latest stable g-t, the process size does not grow *at all* when you do "ls -R /".
What was the original "leaks CancelOk" thing about? Read the downstream bug, indeed it's only happening with old g-t.
NO. Read the downstream bug (In reply to comment #4) > What was the original "leaks CancelOk" thing about? > > Read the downstream bug, indeed it's only happening with old g-t. It happens with g-t 2.30.1 and I setted the scroll to illimited (CancelOk were a bad copy from lp)
Take the time to explain what happens with 2.30.1 please then.
amd64 architecture. Installed gnome-terminal 2.30.1 from maverick repository in the profile check "unlimited" scrolling (the same is with scrolling = 2147483647) type ls / -R I have before 1.4 gib of ram used (37.1%) memory increase to 1.7Gib (44.8%) close the terminal memory is _STILL_ 1.7 Gib
You have your /tmp mounted as tmpfs, don't you?
nope /dev/sda1 on / type ext4 (rw,errors=remount-ro) proc on /proc type proc (rw) none on /sys type sysfs (rw,noexec,nosuid,nodev) none on /sys/fs/fuse/connections type fusectl (rw) none on /sys/kernel/debug type debugfs (rw) none on /sys/kernel/security type securityfs (rw) none on /dev type devtmpfs (rw,mode=0755) none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620) none on /dev/shm type tmpfs (rw,nosuid,nodev) none on /var/run type tmpfs (rw,nosuid,mode=0755) none on /var/lock type tmpfs (rw,noexec,nosuid,nodev) none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) /dev/sda2 on /home type ext4 (rw) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev) gvfs-fuse-daemon on /home/locutus/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=locutus)
What memory are you measuring, btw? I rather doubt that gnome-terminal uses 1.4 GB of memory right after you started it...
I suspect you are counting kernel's disk caches as "memory usage" also...
1.4 is the global memory used, the 300mb increase is of gnome-terminal. I show the kernel cache also, how can I show only the memory usage?
That's expected, and not a bug. Please don't reopen.
I want only ask you a little question, to be sure of this, how can I only check the memory usage?
You still haven't told us how you are checking memory usage... If you are using top, subtract buffers and cached.
from top 3616 locutus 20 0 315m 18m 12m S 3 0.5 0: 03.77 gnome-terminal Mem: 3893752k total, 3741244k used, 152508k free, 313116k buffers Swap: 1044188k total, 0k used, 1044188k free, 1609224k cached total mem - cached = 2132020 after the command 3616 locutus 20 0 317m 20m 12m S 3 0.5 0:20.31 gnome-terminal Mem: 3893752k total, 3810728k used, 83024k free, 501160k buffers Swap: 1044188k total, 172k used, 1044016k free, 1306608k cached total mem - cached = 2587144 after gnome-terminal were closed Mem: 3893752k total, 3776428k used, 117324k free, 501292k buffers Swap: 1044188k total, 172k used, 1044016k free, 1280568k cached total mem - cached = 2495860 so there seems to be a little memory leak
without buffers 1818904 2085984 1994568
Feel free to run valgrind to find it.
Created attachment 162681 [details] output of G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind -v --tool=memcheck --leak-check=full --num-callers=40 --log-file=valgrind.log gnome-terminal This is the output from valgrind
Just the usual pango/freetype/gtype things, no unexpected nor any huge mem leaks in this valgrind run: ==21859== definitely lost: 8,453 bytes in 24 blocks ==21859== indirectly lost: 24,812 bytes in 804 blocks ==21859== possibly lost: 38,202 bytes in 569 blocks
So, this seems to be only a cache problem (the cache amount is added to the total amount of free ram), Marking as obsolete. Thanks to everybody for your time
Just stop playing with the bug status please.