Bug#222073: additional info: gnome-system-monitor misallocation of anonymous mappings

mukesh agrawal mukesh agrawal <bugs.debian.org@mukesh.agrawals.org>, 222073@bugs.debian.org
Wed, 08 Dec 2004 16:59:09 -0500


Package: gnome-system-monitor
Version: 2.6.0-5
Followup-For: Bug #222073


I believe I'm seeing the same problem. Let me explain what happens.

The java process allocates a large chunk of anonymous memory. The entry 
for this mapping in /proc/<java-process-pid>/maps is

442e0000-4c360000 rwxp 0000f000 00:00 0

(It's "anonymous" because there is no backing file for it, and it is 
allocated with mmap() using the MAP_ANONYMOUS option.)

Immediately before this anonymous memory mapping in /proc/<pid>/maps is

442d1000-442d4000 r--s 00000000 07:00 2031950    /home/mukesh/bin/.package/j2re1.4.2/lib/ext/dnsns.jar

The problem is that gnome-system-monitor's memory map report, doesn't
report this information properly. To see this, right-click on the 
process listing entry corresponding to the java process, then choose 
'Memory Maps'. 

gnome-system-monitor should report a mapping for dnsns.jar, followed by
the large anonymous mapping. Instead, gnome-system-monitor reports a
mapping for dnsns.jar (from 442d1000-442d4000) followed by another
mapping for dnsns.jar (442e0000-4c360000). This second entry is
incorrect. The second entry should either leave the filename field
empty, or give some other indication that the mapping is anonymous.

The exact addresses will, of course, vary depending on your system. If 
you don't have Java installed, you can probably examine the same 
behavior with any other program that uses mmap to allocate memory. 
Firefox is one easy example. In my case, I pull up its memory map in 
gnome-system-monitor, sort the map list by VM Size, and see that 
gnome-system-monitor reports "/usr/lib/mozilla-firefox/firefox-bin" as 
being mapped into a 140MB region. Examiningg /proc/<firefox-pid>/bin 
shows that most of this actually belong to an anonymous mapping after 
the mapping of "firefox-bin".


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.4-mm2
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages gnome-system-monitor depends on:
ii  libart-2.0-2              2.3.16-6       Library of functions for 2D graphi
ii  libatk1.0-0               1.8.0-3        The ATK accessibility toolkit
ii  libbonobo2-0              2.8.0-3        Bonobo CORBA interfaces library
ii  libbonoboui2-0            2.8.0-2        The Bonobo UI library
ii  libc6                     2.3.2.ds1-17   GNU C Library: Shared libraries an
ii  libgconf2-4               2.8.1-2        GNOME configuration database syste
ii  libglib2.0-0              2.4.7-1        The GLib library of C routines
ii  libgnome2-0               2.8.0-2        The GNOME 2 library - runtime file
ii  libgnomecanvas2-0         2.8.0-1        A powerful object-oriented display
ii  libgnomeui-0              2.8.0-2        The GNOME 2 libraries (User Interf
ii  libgnomevfs2-0            2.8.3-2        The GNOME virtual file-system libr
ii  libgtk2.0-0               2.4.13-1       The GTK+ graphical user interface 
ii  libgtop2-2                2.6.0-4        Libraries for gtop system monitori
ii  libice6                   4.3.0.dfsg.1-8 Inter-Client Exchange library
ii  liborbit2                 1:2.10.2-1.1   libraries for ORBit2 - a CORBA ORB
ii  libpango1.0-0             1.6.0-2        Layout and rendering of internatio
ii  libpopt0                  1.7-5          lib for parsing cmdline parameters
ii  libsm6                    4.3.0.dfsg.1-8 X Window System Session Management
ii  libwnck4                  2.8.1-2        Window Navigator Construction Kit 
ii  libxml2                   2.6.11-5       GNOME XML library
ii  scrollkeeper              0.3.14-9.1     A free electronic cataloging syste
ii  xlibs                     4.3.0.dfsg.1-8 X Window System client libraries m
ii  zlib1g                    1:1.2.2-3      compression library - runtime

-- no debconf information