Bug#696317: libgtk-3-0: icon-theme.cache is kept mmaped even tough a new version of caches has been loaded to memory

Pauli suokkos at gmail.com
Wed Dec 19 10:29:03 UTC 2012


Package: libgtk-3-0
Version: 3.4.2-4
Severity: minor

Dear Maintainer,

I was just checking why gnome-shell was eating so much virtual memory in
my system. I noticed that one of reason for VM allocated memory address
was heap, pulseaudio and anonymous mmaps. That means gnome-shell is really
allocating huge amount of memory. 

$ cat /proc/`pidof gnome-shell`/maps | awk '{split($1, a, "-"); print (strtonum("0x" a[2]) - strtonum("0x" a[1])) " " $0}' | sort -n | tail -n 20
8388608 7f9605f90000-7f9606790000 rw-p 00000000 00:00 0 
9105408 7f95c8000000-7f95c88af000 rw-p 00000000 00:00 0 
12582912 7f95dc900000-7f95dd500000 rw-p 00000000 00:00 0 
16777216 7f95cf000000-7f95d0000000 rw-s 158620000 00:05 580                       /dev/dri/card0
18890752 7f95e5d8f000-7f95e6f93000 rw-p 00000000 00:00 0 
20545536 7f9602c68000-7f9604000000 ---p 00000000 00:00 0 
22970368 7f95d9918000-7f95daf00000 r--p 00000000 fe:02 8522190                    /usr/share/icons/hicolor/icon-theme.cache (deleted)
22970368 7f95eea17000-7f95effff000 r--p 00000000 fe:02 8522190                    /usr/share/icons/hicolor/icon-theme.cache (deleted)
22978560 7f95d6543000-7f95d7b2d000 r--p 00000000 fe:02 8540446                    /usr/share/icons/hicolor/icon-theme.cache
22978560 7f95d7b2d000-7f95d9117000 r--p 00000000 fe:02 8540446                    /usr/share/icons/hicolor/icon-theme.cache
29335552 7f95f6406000-7f95f8000000 ---p 00000000 00:00 0 
29421568 7f95d0000000-7f95d1c0f000 rw-p 00000000 00:00 0 
37687296 7f95d1c0f000-7f95d4000000 ---p 00000000 00:00 0 
37773312 7f95f4000000-7f95f6406000 rw-p 00000000 00:00 0 
46563328 7f9600000000-7f9602c68000 rw-p 00000000 00:00 0 
58003456 7f95c88af000-7f95cc000000 ---p 00000000 00:00 0 
67112960 7f95dd7f9000-7f95e17fa000 rw-s 00000000 00:12 33519                      /run/shm/pulse-shm-3521136704
67112960 7f95effff000-7f95f4000000 rw-s 00000000 00:12 14975                      /run/shm/pulse-shm-2985525895
67112960 7f95fbfff000-7f9600000000 rw-s 00000000 00:12 14661                      /run/shm/pulse-shm-1903079898
194056192 012f6000-0cc07000 rw-p 00000000 00:00 0                                  [heap]

But there is also curious entry that icon-theme.cache is mmaped twice
for each version of cache and old cache isn't munmaped after loading the
new cache. But looking into smaps it shows that none of icon-theme.cache
mappings has been accessed recently because bakcing pages is bound to
that address range.

But quickly scanning lsof list for inodes it shows same mmaping issue
happens in all gtk applications but I didn't check if any of them
actually had any pages bound for the cache file.

I have no idea if the icon-theme.cache mappings has been fixed in newer
release of gtk. But I'm still reporting this because it makes top report
inflated VM sizes for gtk applications. If any application manages to
access the old version of cache it could cause extra memory use too.

-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libgtk-3-0 depends on:
ii  libatk1.0-0         2.4.0-2
ii  libc6               2.13-37
ii  libcairo-gobject2   1.12.2-2
ii  libcairo2           1.12.2-2
ii  libcolord1          0.1.21-4
ii  libcomerr2          1.42.5-1
ii  libcups2            1.5.3-2.9
ii  libfontconfig1      2.9.0-7
ii  libfreetype6        2.4.9-1
ii  libgcrypt11         1.5.0-3
ii  libgdk-pixbuf2.0-0  2.26.1-1
ii  libglib2.0-0        2.33.12+really2.32.4-3
ii  libgnutls26         2.12.20-2
ii  libgssapi-krb5-2    1.10.1+dfsg-3
ii  libgtk-3-common     3.4.2-4
ii  libk5crypto3        1.10.1+dfsg-3
ii  libkrb5-3           1.10.1+dfsg-3
ii  libpango1.0-0       1.30.0-1
ii  libx11-6            2:1.5.0-1
ii  libxcomposite1      1:0.4.3-2
ii  libxcursor1         1:1.1.13-1
ii  libxdamage1         1:1.1.3-2
ii  libxext6            2:1.3.1-2
ii  libxfixes3          1:5.0-4
ii  libxi6              2:1.6.1-1
ii  libxinerama1        2:1.1.2-1
ii  libxrandr2          2:1.3.2-2
ii  multiarch-support   2.13-37
ii  shared-mime-info    1.0-1+b1
ii  zlib1g              1:1.2.7.dfsg-13

Versions of packages libgtk-3-0 recommends:
ii  hicolor-icon-theme  0.12-1
ii  libgtk-3-bin        3.4.2-4

Versions of packages libgtk-3-0 suggests:
ii  gvfs             1.12.3-2
ii  librsvg2-common  2.36.1-1

-- no debconf information



More information about the pkg-gnome-maintainers mailing list