From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 20 16:49:59 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6DF1316A41F for ; Mon, 20 Mar 2006 16:49:59 +0000 (UTC) (envelope-from e.schuele@computer.org) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [204.127.192.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1654E43D45 for ; Mon, 20 Mar 2006 16:49:58 +0000 (GMT) (envelope-from e.schuele@computer.org) Received: from [208.206.151.59] (host59.gtisd.com[208.206.151.59]) by comcast.net (rwcrmhc12) with ESMTP id <20060320164957m1200io1u3e>; Mon, 20 Mar 2006 16:49:58 +0000 Message-ID: <441EDD35.3080105@computer.org> Date: Mon, 20 Mar 2006 10:49:57 -0600 From: Eric Schuele User-Agent: Thunderbird 1.5 (X11/20060228) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: repeatedly opening the same .so(s) is slow? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2006 16:49:59 -0000 Hello, Sorry if the subject is misleading, not sure how to label this one. I have a port (gnucash) which takes 3-4 minutes to open on a 2.6GHz machine. It used to take 15-20 seconds till all of the libtool changes. I have no idea if the symptom is related to libtool or not. Others have said it is not... but that's when the problems began, just for reference. FWIW, when I had trouble due to libtool, I simply formatted my machine, reinstalled OS and all ports. So this issue is occurring on a 'clean' machine. But here is what I have found, and it looks odd to me. Using truss, I can see that gnucash/guile is trying to open a dozen or two files, repeatedly. It fails attempting to open it the first few times everytime it tries to access it, because it is traversing the LD_LIBRARY_PATH: open("/lib/libglib-12.la",0x0,0666) ERR#2 'No such file or directory' open("/usr/lib/libglib-12.la",0x0,0666) ERR#2 'No such file or directory' open("/usr/local/lib/libglib-12.la",0x0,0666) ERR#2 'No such file or directory' open("/usr/X11R6/lib/gnucash/libglib-12.la",0x0,0666) ERR#2 'No such file or directory' open("/usr/X11R6/lib/libglib-12.la",0x0,0666) ERR#2 'No such file or directory' open("/usr/X11R6/lib/gnucash/libglib-12.la",0x0,0666) ERR#2 'No such file or directory' open("/usr/local/lib/libglib-12.la",0x0,0666) ERR#2 'No such file or directory' open("/lib/libglib-12.la",0x0,0666) ERR#2 'No such file or directory' open("/usr/lib/libglib-12.la",0x0,0666) ERR#2 'No such file or directory' open("/usr/local/lib/libglib-12.la",0x0,0666) ERR#2 'No such file or directory' open("/usr/X11R6/lib/gnucash/libglib-12.la",0x0,0666) ERR#2 'No such file or directory' open("/usr/X11R6/lib/libglib-12.la",0x0,0666) ERR#2 'No such file or directory' open("/usr/X11R6/lib/gnucash/libglib-12.la",0x0,0666) ERR#2 'No such file or directory' open("/usr/local/lib/libglib-12.la",0x0,0666) ERR#2 'No such file or directory' open("/lib/libglib-12.la",0x0,0666) ERR#2 'No such file or directory' open("/usr/lib/libglib-12.la",0x0,0666) ERR#2 'No such file or directory' open("libglib-12.la",0x0,0666) ERR#2 'No such file or directory' access("/lib/libglib-12.so",4) ERR#2 'No such file or directory' access("/usr/lib/libglib-12.so",4) ERR#2 'No such file or directory' access("/usr/local/lib/libglib-12.so",4) = 0 (0x0) Now I said a dozen or two files repeatedly. It is 12-20 files maybe... but it is attempting to open them *hundreds of thousands of times*! It goes on and on and on... I am assuming this is what is causing the long startup time. So I have been working towards helping it find the right files the first time around. I have manipulated the gnucash environments LD_LIBRARY_PATH a bit and helped some... but it is only a drop in the bucket. I have thought of placing symlinks in the folder(s) where it first looks for any given file, to make sure it finds the file... but this does not seem quite right either. What I'm wondering is.... what is the lists opinion on how to best fix this type of a problem. Is this even the cause of my long startup? I have spoken with one or two of the gnucash devs, they seem to think this is unique to FreeBSD, meaning they have not seen this problem on any other platform. They said it might have to do with how FreeBSD handles how files are opened up many times recursively!? If there is a more appropriate list, please let me know. Thanks in advance. -- Regards, Eric