From owner-freebsd-stable@FreeBSD.ORG Thu Apr 17 13:27:48 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2601237B404 for ; Thu, 17 Apr 2003 13:27:48 -0700 (PDT) Received: from ybbsmtp04.mail.yahoo.co.jp (ybbsmtp04.mail.yahoo.co.jp [210.81.151.172]) by mx1.FreeBSD.org (Postfix) with SMTP id A104843FBD for ; Thu, 17 Apr 2003 13:27:46 -0700 (PDT) (envelope-from ayakokiko@ybb.ne.jp) Received: from yahoobb219011234011.bbtec.net (HELO gorgon.near.this) (219.11.234.11) by ybbsmtp04.mail.yahoo.co.jp with SMTP; 17 Apr 2003 20:27:45 -0000 X-Apparently-From: Received: from ghost.near.this (ghost.near.this [10.0.3.9]) by gorgon.near.this (Postfix) with ESMTP id 15AF87F24 for ; Fri, 18 Apr 2003 05:27:40 +0900 (JST) Received: by ghost.near.this (Postfix, from userid 100) id 029F9DA; Fri, 18 Apr 2003 05:27:38 +0900 (JST) From: BugsGrief@bugsgrief.net To: FreeBSD-STABLE@FreeBSD.ORG Message-Id: <20030417.202738.36fbf3aaf09226c2.10.0.3.9@bugsgrief.net> Date: Fri, 18 Apr 2003 05:27:38 +0900 (JST) Subject: fontconfig-2.1.93 considered more harmful X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2003 20:27:48 -0000 There is an ongoing thread "fontconfig-2.1.92 considered harmful" on -CURRENT. Because I have not moved to -CURRENT, I post this to -STABLE. Since I upgraded to fontconfig-2.1.93 (on Apr 14) a lot of ports start to complain a lot of "Cannot fork: Resource temporarily unavailable" errors. What resource ? I inserted top into my ports build script to notice that a lot of processes were running. Interactive top shows all these are make ! + top -bu -d2 -s1 0 + sed -e /^ .*/d -e /^[ ]*$/d + sed 1,4d last pid: 29052; load averages: 3.40, 2.75, 1.56 up 42+16:35:08 07:45:52 1005 processes:3 running, 999 sleeping, 3 zombie CPU states: 0.0% user, 29.6% nice, 63.5% system, 0.4% interrupt, 6.4% idle Mem: 34M Active, 13M Inact, 65M Wired, 5116K Cache, 22M Buf, 6340K Free Swap: 1152M Total, 300M Used, 852M Free, 26% Inuse After a little poking around bsd.port.mk, I found make package-depends (also make all-depends-list) stably reproduce the problem on failing ports. Turned out the port I tested is suffering from dependency loop that cause repeated make calls. But why so many ports fail ? Are they all harmed by similar loops ? So I tried to lookup ports dependency tree(s). Voila ! Found a few circular dependencies. Since I'm not using ports-all, and also the tool I relied on (tsort) is not the tool to primarily detect cycles (it detects cycles only as its byproduct), this list is not exhaustive. Most of the cycles I found so far contain XFree86-4-libraries -> fontconfig dependency. Other circles are small : gtkhtml (it depends on itself) and gtkhtml -> gnomecore. Also, note that {XFree86-4-libraries} and {fontconfig} are the only minimal cutsets that resolve all the circles excepts for these small circles (these loops are resolved by a little weird mechanism). For brevity only the longest circles are shown. A lot of subcircles exist. 1. Small circles that don't include XFree86-4-libraries -> fontconfig. gtkhtml -> gnomecore 2. fontconfig LIB_DEPENS on gtk12, gtkhtml, imlib and they in turn reference XFree86-4-libraries. All cycles include XFree86-4-libraries -> fontconfig sequence at the top (or tail) of the sequences. gtkhtml -> gtk12 -> gtkhtml -> gnomecore -> gnomelibs -> scrollkeeper -> gnomehier -> imlib -> libungif -> imlib -> gtk12 -> 3. fontconfig directly or indirectly RUN_DEPENDS on gnomecontrolcenter which in turn depends back to XFree86-4-libraries. All cycles include XFree86-4-libraries -> fontconfig -> gtkhtml -> gnomecore -> gnomecontrolcenter sequence at the top (or tail) of the sequences. Note this pre(post)amble itself contains shortcuts that bypass gtkhtml, gnomecore, or both. gconf -> gtk12 -> gconf -> oaf -> gnomehier -> gconf -> oaf -> gtk12 -> gdk-pixbuf -> gtk12 -> gnomecanvas -> gdk-pixbuf -> gtk12 -> gnomecanvas -> gnomelibs -> scrollkeeper -> gnomehier -> gnomevfs -> gconf -> oaf -> gnomehier -> gnomevfs -> gconf -> oaf -> gtk12 -> gnomevfs -> gnomemime -> gnomehier -> libcapplet -> gtk12 -> Any port that depends on any of ports in the list gets into make loop at closure calculations. Finally, let's compare fontconfig's dependencies between 2.1.92 and 2.1.93. % grep pkgdep /var/db/pkg/fontconfig-2.1.92/+CONTENTS @pkgdep pkgconfig-0.15.0 @pkgdep freetype2-2.1.3_1 @pkgdep expat-1.95.6_1 % grep pkgdep /var/db/pkg/fontconfig-2.1.93/+CONTENTS @pkgdep pkgconfig-0.15.0 @pkgdep libiconv-1.8_2 @pkgdep libgnugetopt-1.2 @pkgdep libaudiofile-0.2.3 @pkgdep imlib-1.9.14_1 @pkgdep imake-4.3.0 @pkgdep gnomelibs-1.4.2_1 @pkgdep expat-1.95.6_1 @pkgdep gtkhtml-1.1.8 @pkgdep gnomecore-1.4.2 @pkgdep gnomecontrolcenter-1.4.0.5_1 @pkgdep glib-1.2.10_8 @pkgdep gtk-1.2.10_9 @pkgdep freetype2-2.1.4 @pkgdep gettext-0.11.5_1 @pkgdep fontconfig-2.1.92 @pkgdep esound-0.2.29 @pkgdep XFree86-libraries-4.3.0_1 The fontconfig started to depend on gtkhtml, imlib, gnomecore, and gnomecontrolcenter on 2.1.93. (Funny, it even depends on XFree86-4-libraries which depends on fontconfig.) As shown, all the circles that relate to fontconfig are introduced on 2.1.93. Again note that {fontconfig} is one of the minimal cutsets. Now complaints are understood. 2.1.93 is, at least for me, more harmful than the previous. horio shoichi