Bug#222073: gnome-system-monitor: memory map fakes unknown allocations, which is very misleading

Peter Gervai Peter Gervai <grin@tolna.net>, 222073@bugs.debian.org
Fri, 22 Oct 2004 15:27:31 +0200


On Fri, Oct 22, 2004 at 01:08:56PM +0200, Sebastien Bacher wrote:
> Le mardi 25 novembre 2003 ? 14:59 +0100, Peter Gervai a écrit :
> 
> > The memory map of a process shows the allocations for the process, the amount
> > and status of the allocation and the inode/file/library to which the
> > allocation is associated.
> > 
> > In the case of inode #0 (unspecified owner) the memory map window lists a
> > random(?) owner for the allocation instead of empty or unknown, which is
> > very misleading if someone doesn't check pmap or /proc/PID/maps and try to
> > report allocation bugs based on the result.
> 
> Hi,
> 
> Do you still have the problem ? I've forwarded it upstream some time ago
> and just get a reply asking for details. What do you call "random
> owner" ? Where do you read the owner ?

As far as I can see yes, the problem still exists.

Find any program with LONG memory map list (browsers tend to be a good
target), and check g-s-m -> process memory map as well as /proc/<PID>/maps

You'll notice lots of lines in maps which does not have an "owner" library
or program (I never dug into shared memory allocations so excuse my possible
bad terminology), and if you check g-s-m's map you'll see that they seem to
have one. It seems that g-s-m "fakes" it when that field is empty, probably
because someone forgot to clean up a variable.

It's bad when someone try to report memory leaks, and belives what g-s-m
shows, blames it on a library or a font, and later turns out that it was
incorrect.

If that's not clear enough I'll make some screenshots for you, just ask.

Thanks,
Peter