gnucash VERY slow startup

Chris Shenton chris at Shenton.Org
Mon Apr 12 15:42:18 EDT 2004


[Dang, I meant to send only to Dewey before bothering the list -- sorry.]
[CC'ing freebsd-ports here, now that I have some details]

Chris> I'm running on a 1.8GHz Dell with 5.2-CURRENT and it takes more
Chris> like 10-20 minutes to start.  A truss seems to show *lots* of
Chris> failed access() and open() for various libraries.

Derek Atkins <warlord at MIT.EDU> writes:

> I think this is a FreeBSD (or *BSD) problem, as it's specific to that
> platform.

And it used to run fine on FreeBSD, but I can't remember at what
version, probably 4.x-STABLE.  I'm now running 5.2-CURRENT.  If other
CURRENT users have no problems then it's something hosed with my
various libraries and such.  If everyone else running CURRENT has the
same problem then it would appear an odd interaction between GnuCash
and FreeBSD.

So if anyone's running on CURRENT without startup delays, please let
me know. :-)

I'm using GnuCash-1.8.8, as up to date with all dependencies as I can
get with "portupgrade -R gnucash\*".


> I don't know if truss will necessarily help, unless you're sitting
> there watching in real time to see WTF it's doing for so long?  

I was; it spews tons of access() and open() to various libraries in a
variety of locations, most of which failed, until it found the real
location.  It seems to repeat this look, fail, find for the same
libraries over and over.  I've tried to provide details -- which
libraries, what paths, how many times called -- below.


> It could be a bug in the runtime linker, or libtool, or ltdl, or
> even guile.

When it's starting, Guile's using all the CPU -- for a long time.
This is when I've been watching truss.

Eventually, the splash screen comes up , but then is delayed again:
the screen tells me its "Loading modules..." (various) but it appears
to be experiencing the same problems which caused the pre-splash delay
since each module seems to take minutes to load.


> But I find it strange that it works just fine on Linux, Solaris, and MacOSX 

I'm not saying it's a GnuCash issue, just trying to solve a problem.
Perhaps it's something in FreeBSD-5.x-CURRENT library support because
it used to work fine, months back.  Just looking for clues to help
narrow the search. Any suggestions at how to further diagnose would be
appreciated.



Below, I've run "truss -o gnucash.truss gnucash" for a few minutes.
"top" shows guile eating all the cpu which truss isn't, and it's in
state "stopev" which I don't recognize; maybe it's an artifact of
truss.   The CPU consumption is definitely repeatable
without truss, as here:

  PID USERNAME PRI NICE   SIZE    RES STATE    TIME   WCPU    CPU COMMAND
 5688 chris    139    0 22024K 11836K RUN      0:45 93.75% 93.75% guile


I let it run a few minutes under truss then do some sort and uniq on
the output to generate a list of the number of times various calls are
made like:

  chris at PECTOPAH<113> cat gnucash.truss | sort | uniq -c | sort -g -r > gnucash.truss.uniq-count

The following are just most-frequently invoked calls, and it seems like
thousands of failed calls to open the same nonexistent library can't be
good, can't be the way things should work. Again, this is just waiting
a couple minutes for it to start, and it hasn't even gotten close to
showing the splash screen.

27695 open("/usr/X11R6/lib/gnucash/libm.la",0x0,0666)	 ERR#2 'No such file or directory'
27695 access("/usr/X11R6/lib/gnucash/libm.so",4)	 ERR#2 'No such file or directory'
16375 open("/usr/X11R6/lib/gnucash/libpopt.la",0x0,0666) ERR#2 'No such file or directory'
16375 open("/usr/X11R6/lib/gnucash/libintl.la",0x0,0666) ERR#2 'No such file or directory'
13584 open("/usr/X11R6/lib/gnucash/libcrypt.la",0x0,0666) ERR#2 'No such file or directory'
13584 access("/usr/X11R6/lib/gnucash/libcrypt.so",4)	 ERR#2 'No such file or directory'
12028 open("/usr/X11R6/lib/gnucash/libglib12.la",0x0,0666) ERR#2 'No such file or directory'
12014 open("/usr/local/lib/libm.la",0x0,0666)		 ERR#2 'No such file or directory'
12014 open("/usr/X11R6/lib/libm.la",0x0,0666)		 ERR#2 'No such file or directory'
12014 access("/usr/local/lib/libm.so",4)		 ERR#2 'No such file or directory'
12014 access("/usr/X11R6/lib/libm.so",4)		 ERR#2 'No such file or directory'
9726 open("/usr/X11R6/lib/gnucash/libgwrap-wct.la",0x0,0666) ERR#2 'No such file or directory'
9726 open("/usr/X11R6/lib/gnucash/libgwrap-glib.la",0x0,0666) ERR#2 'No such file or directory'
8131 sigprocmask(0x3,0x28066fd0,0x0)			 = 0 (0x0)
7104 open("/usr/local/lib/libpopt.la",0x0,0666)	 ERR#2 'No such file or directory'
7104 open("/usr/local/lib/libintl.la",0x0,0666)	 ERR#2 'No such file or directory'
7104 open("/usr/X11R6/lib/libpopt.la",0x0,0666)	 ERR#2 'No such file or directory'
7104 open("/usr/X11R6/lib/libintl.la",0x0,0666)	 ERR#2 'No such file or directory'
7104 access("/usr/X11R6/lib/gnucash/libpopt.so",4)	 ERR#2 'No such file or directory'
7104 access("/usr/X11R6/lib/gnucash/libintl.so",4)	 ERR#2 'No such file or directory'
7008 close(5)					 = 0 (0x0)
6007 open("libm.la",0x0,0666)			 ERR#2 'No such file or directory'
6007 open("/usr/lib/libm.la",0x0,0666)		 ERR#2 'No such file or directory'
6007 open("/lib/libm.la",0x0,0666)			 ERR#2 'No such file or directory'
6007 access("/usr/lib/libm.so",4)			 = 0 (0x0)

[zillions of lines removed]


More information about the gnucash-user mailing list