top appears to leak memory
Bug #743350 reported by
lindelof
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
procps (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: procps
I always have a top screen open, and after a while the memory usage reported by top for itself grows larger and larger. It is now almost as large as GIMP and larger than Firefox. See attached screenshot.
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: procps 1:3.2.8-9ubuntu3
ProcVersionSign
Uname: Linux 2.6.35-28-generic x86_64
NonfreeKernelMo
Architecture: amd64
Date: Sat Mar 26 23:25:52 2011
ExecutablePath: /usr/bin/top
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
ProcEnviron:
SHELL=/bin/bash
PATH=(custom, user)
LANG=en_US.utf8
SourcePackage: procps
To post a comment you must log in.
I can confirm this. `top` leaks well over 100M in a day for me. The following valgrind run was for just a minute or two:
==730== malloc. c:236) malloc. c:236) function (nsswitch.c:356) r@@GLIBC_ 2.1.2 (getXXbyYY_r.c:253) malloc. c:236) function (nsswitch.c:356) r@@GLIBC_ 2.1.2 (getXXbyYY_r.c:253) malloc. c:236) function (nsswitch.c:356) r@@GLIBC_ 2.1.2 (getXXbyYY_r.c:253) malloc. c:236) function (nsswitch.c:356) r@@GLIBC_ 2.1.2 (getXXbyYY_r.c:253)
==730== HEAP SUMMARY:
==730== in use at exit: 289,823 bytes in 2,860 blocks
==730== total heap usage: 13,186 allocs, 10,326 frees, 1,839,594 bytes allocated
==730==
==730== 6 bytes in 1 blocks are still reachable in loss record 1 of 39
==730== at 0x4025BD3: malloc (vg_replace_
==730== by 0x412146F: strdup (strdup.c:43)
==730== by 0x40920FA: _nc_setupterm (lib_setup.c:701)
==730== by 0x4092482: setupterm (lib_setup.c:816)
==730== by 0x804E959: whack_terminal (top.c:1971)
==730== by 0x8054C50: main (top.c:3396)
==730==
==730== 8 bytes in 1 blocks are indirectly lost in loss record 2 of 39
==730== at 0x4025BD3: malloc (vg_replace_
==730== by 0x418E5DB: __nss_lookup_
==730== by 0x4610ECB: ???
==730== by 0x4611B6C: ???
==730== by 0x414541C: getpwuid_
==730== by 0x4144D4E: getpwuid (getXXbyYY.c:117)
==730== by 0x404738C: user_from_uid (pwcache.c:42)
==730== by 0x4048959: simple_readproc (readproc.c:600)
==730== by 0x4049483: readproc (readproc.c:838)
==730== by 0x804C5EA: procs_refresh (top.c:1167)
==730== by 0x80511BE: summary_show (top.c:2998)
==730== by 0x8054A1A: frame_make (top.c:3351)
==730==
==730== 8 bytes in 1 blocks are indirectly lost in loss record 3 of 39
==730== at 0x4025BD3: malloc (vg_replace_
==730== by 0x418E5DB: __nss_lookup_
==730== by 0x4610EE9: ???
==730== by 0x4611B6C: ???
==730== by 0x414541C: getpwuid_
==730== by 0x4144D4E: getpwuid (getXXbyYY.c:117)
==730== by 0x404738C: user_from_uid (pwcache.c:42)
==730== by 0x4048959: simple_readproc (readproc.c:600)
==730== by 0x4049483: readproc (readproc.c:838)
==730== by 0x804C5EA: procs_refresh (top.c:1167)
==730== by 0x80511BE: summary_show (top.c:2998)
==730== by 0x8054A1A: frame_make (top.c:3351)
==730==
==730== 8 bytes in 1 blocks are indirectly lost in loss record 4 of 39
==730== at 0x4025BD3: malloc (vg_replace_
==730== by 0x418E5DB: __nss_lookup_
==730== by 0x4610F07: ???
==730== by 0x4611B6C: ???
==730== by 0x414541C: getpwuid_
==730== by 0x4144D4E: getpwuid (getXXbyYY.c:117)
==730== by 0x404738C: user_from_uid (pwcache.c:42)
==730== by 0x4048959: simple_readproc (readproc.c:600)
==730== by 0x4049483: readproc (readproc.c:838)
==730== by 0x804C5EA: procs_refresh (top.c:1167)
==730== by 0x80511BE: summary_show (top.c:2998)
==730== by 0x8054A1A: frame_make (top.c:3351)
==730==
==730== 8 bytes in 1 blocks are indirectly lost in loss record 5 of 39
==730== at 0x4025BD3: malloc (vg_replace_
==730== by 0x418E5DB: __nss_lookup_
==730== by 0x4610F25: ???
==730== by 0x4611B6C: ???
==730== by 0x414541C: getpwuid_
==730== by 0x4144D4E: getpwuid (getXXbyYY.c:117)
==730== by 0x404738C: user_from_uid (pwcac...