Using: media-libs/fontconfig-2.2.1 dev-libs/expat-1.95.6-r1 When I run programs that link against libfontconfig and libexpat (like gcalctool), they take a long time to start: $time gcalctool #(and I close it as soon as it pops up) real 2m28.774s user 1m10.717s sys 0m0.547s) During this time, processor load (first number in cat /proc/loadavg) goes from ~1.25 to around 3. Affected applications are also sluggish in responding to some commands ( mostly ones that require new windows, but includes selecting constants on gcalctool). Some applications that I have noticed that are affected: gcalctool, gaim, kde apps (all kdegames, kemerge) I snagged the source to gcalctool from /usr/portage/distfiles and manually compiled it, and ran it under gdb (stack trace and compiling command attached). in the stack trace libexpat and libfontconfig appear to be recursively calling each other....excessively I've tried re-emerging both of these libraries, and even tried changing my USE flags in make.conf (currently USE="aalib alsa cdr gpm gtk mmx mozilla ncurses oggvorbis opengl readline sdl slang spell ssl X zlib xv xmms wmf dga"). It also didn't go away after I "emerged world -De" after prelink truncated all my libraries. I've had this problem for a few months, but haven't had time to deal with it. (It's not a big problem if I just keep the programs I need running, and I don't really use that many kde or gnome apps anyway) It's kind of sad though when "gcalctool" takes longer than "ooffice" to start up Reproducible: Always Steps to Reproduce: 1.start gcalctool (or similar app) Actual Results: watch as cpu usage increases ( looks neat on the E-Cpu epplet!) wait remaining 2.5 minutes for application to pop up Expected Results: wait 1-2 seconds for application to pop up $emerge info Portage 2.0.49-r10 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.20-gentoo-r6) ================================================================= System uname: 2.4.20-gentoo-r6 i686 AMD Athlon(tm) Processor Gentoo Base System version 1.4.3.10 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-mcpu=athlon-tbird -march=athlon -O3 -pipe " CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-mcpu=athlon-tbird -march=athlon -O3 -pipe " DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs sandbox buildpkg ccache distcc userpriv usersandbox fixpackages" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 oss apm avi crypt cups encode foomaticdb gif jpeg kde libg++ libwww mad mikmod mpeg nls pdflib png quicktime truetype xml2 gdbm berkdb arts svga tcltk java tcpd perl python esd imlib gnome qt motif aalib alsa cdr gpm -pam gtk mmx mozilla ncurses oggvorbis opengl readline sdl slang spell ssl X zlib xv xmms wmf dga" ________________________________________________________________________________ that use flag looks different than the one in make.conf... in make.conf: USE="aalib alsa cdr gpm gtk mmx mozilla ncurses oggvorbis opengl readline sdl slang spell ssl X zlib xv xmms wmf dga"
Created attachment 19151 [details] stack trace of a program (gcalctool) while it is starting
what versions of both exactly ? does an 'fc-cache -v' as root have any effect? What if you decrease your font settings to only try 1 dir (edit /etc/fonts/fonts.conf <dir> directives to say only the Type1 fonts).
After trying the steps suggested, I gained some insight into the problem. In my /etc/fonts directory I have two conf files: fonts.conf and local.conf. If either of these files is removed or corrupted, the problem disappears. On further investigation, local.conf contained the following line: <include ignore_missing="yes">local.conf</include> I'm not sure where my local.conf file came from but it apparently appeared on July 13, 2003 (but was apparently courteous enough to backup the previous version). From the header it looks like an old fonts.conf file (one of the comments says "/etc/fonts.conf file to configure system font access"), except that it lacks the large "DO NOT EDIT THIS FILE" banner and claims to come from XFree86 instead of fontconfig. There was a file old.local.conf in the /etc/fonts directory, so I just restored that, and the problem was resolved. Thanks for your help, Russ
ok good it got fixed, weird thing your fonts.conf came from xfree. Our xfree shouldnt do that, although maybe some version might have by mistake done it (not that i know of). On the other hand it might have been one specific font making fontconfig go crazy or that was how it looked to me at first sight. If you have the time please see what differs between the two version of your config files (if you still have them), see what changed and which fontdirs and subsequent fonts it affects.