Bug #51884 reported by Ben Maurer on 2006-07-04
Affects Status Importance Assigned to Milestone
glibc (Ubuntu)

Bug Description

Right now, calling setlocale (which is called by most libgnome using programs via gnome_program_init) causes ~ 70 kb of allocations. The stack traces look like:

==14654== 33,292 bytes in 424 blocks are still reachable in loss record 3,082 of 3,082
==14654== at 0x401D7AA: calloc (vg_replace_malloc.c:279)
==14654== by 0x4ABFA7E: add_module (gconv_conf.c:321)
==14654== by 0x4AC0230: __gconv_read_conf (gconv_conf.c:411)
==14654== by 0x4A5E580: pthread_once (mutex.c:318)
==14654== by 0x4ABF237: __gconv_compare_alias (gconv_db.c:663)
==14654== by 0x4AC78C9: _nl_find_locale (gconv_charset.h:53)
==14654== by 0x4AC70D4: setlocale (setlocale.c:312)
==14654== by 0x429146A: gnome_program_parse_args (in /usr/lib/libgnome-2.so.0.1401.0)
==14654== by 0x4291BC7: (within /usr/lib/libgnome-2.so.0.1401.0)
==14654== by 0x4291ED8: gnome_program_init (in /usr/lib/libgnome-2.so.0.1401.0)
==14654== by 0x80487E4: main (in /home/bmaurer/gmem/gnome)

These allocations could be saved by generating the mmaped gconv-modules.cache file (created by iconvconfig). Other distros (including FC5) do this.

Ben Maurer (bmaurer) wrote :

Another cache that may be missing is /usr/lib/locale/locale-archive. It looks like the lack of this cache is responsible for some more allocations.

Colin Watson (cjwatson) wrote :

gconv-modules.cache is done now. locale-archive would need to be done by belocs-locales-bin; it's not quite such an immediately obvious win as it takes up another couple of megabytes of disk space, although that's not to say it definitely doesn't make sense to do it.

glibc (2.4-1ubuntu7) edgy; urgency=low

  [ Jeff Bailey ]
  * debian/rules: Force -fno-stack-protector to disable automatic
    enablement from Ubuntu's glibc. Glibc itself will
    enable it as necessary.

  * debian/patches/powerpc/procfs-kernelheaders.diff: New file.
  * debian/patches/series: use it.

  * debian/rules.d/build.mk: Use "" instead of '' for creating
    the conffile. (Malone: #54086)

  * debian/sysdeps/i386.mk: Place xen libraries in tls/i686/cmov/nosegneg.
  Create /etc/ld.so.conf.d/xen.conf to enable hwcap searching.
  Don't use direct segment referecing in i386 package. This lets Xen
  work right from install.
  * debian/control.in/opt: Remove conflict between libc6-xen and libc6-i686.
  * debian/control: Regenerate.

  * debian/sysdeps/powerpc.mk: Put include files in
  * debian/debhelper.in/libc-alt-dev.postinst: Symlink from old location to
  * debian/rules.d/debhelper.mk: Generate libc-###-dev.postinst from

  [ Colin Watson ]

  * debian/debhelper.in/libnss-dns-udeb.install,
    debian/debhelper.in/libnss-files-udeb.install: Fix installation of files
    into libnss-*-udeb.

  * debian/debhelper.in/libc.postinst, debian/debhelper.in/libc.prerm: Run
    iconvconfig at configure time to create
    /usr/lib/gconv/gconv-modules.cache; remove this cache in the prerm
    (closes: Malone #51884).

Changed in glibc:
status: Unconfirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers