firefox launches very slowly with 7.04 (feisty fawn)

Asked by Martin Benson

Hi there

I had a perfectly good working version of Edgy on my Pentium 4 box.

I was offered the option to upgrade to Feisty Fawn (7.04), which I accepted.

Feisty downloaded and installed no problem at all and everything is fine EXCEPT that Firefox now takes about a minute to launch, either from the command line or from the icon. Once an instance of Firefox is launched, another instance will launch perfectly normally - basically, so long as I keep an instance running, I'm fine. But if I launch Firefox when it isn't running, it always takes just about a minute to launch.

No other problems with any other apps that I have found. There was no sign of this problem with the previous version.

I'm not a deep expert on Linux, but I know my way around, but I'm not sure even where to start on this one.

My home directory is mounted using NFS from another machine - this has caused trouble for me in the past - I've had to link some directories locally - but I can't think of any reason why I should have a problem now when I didn't on the previous version.

Any suggestions would be gratefully accepted.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu firefox Edit question
Assignee:
No assignee Edit question
Solved by:
Martin Benson
Solved:
Last query:
Last reply:
Revision history for this message
Cesare Tirabassi (norsetto) said :
#1

Have you tried to launch Firefox in Safe Mode and/or with debug information?
Here are some useful tips you can follow:

https://wiki.ubuntu.com/MozillaTeam/Bugs

Revision history for this message
Martin Benson (martin-zelemo) said :
#2

Thanks for that...

Safe mode makes no difference; there is no output at all when you start it from a terminal.

I have only one profile, which is the default - the only change I have made to a default system is to put a different background on my screen....

The following is the debug information on a startup - it's not very useful, I don't think

GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) run
Starting program: /usr/lib/firefox/firefox-bin -a firefox
[Thread debugging using libthread_db enabled]
[New Thread -1220887712 (LWP 14447)]
[New Thread -1224287344 (LWP 14471)]
[New Thread -1234453616 (LWP 14473)]
[New Thread -1256137840 (LWP 14478)]
[New Thread -1266709616 (LWP 14479)]
[New Thread -1275102320 (LWP 14480)]
[New Thread -1283495024 (LWP 14481)]
[New Thread -1295344752 (LWP 14482)]
[New Thread -1303737456 (LWP 14483)]
[New Thread -1312130160 (LWP 14484)] (all this took a minute or so - then there was a longish pause...then)
[Thread -1303737456 (LWP 14483) exited]
[Thread -1283495024 (LWP 14481) exited]
[Thread -1312130160 (LWP 14484) exited]
[Thread -1256137840 (LWP 14478) exited]
[Thread -1266709616 (LWP 14479) exited]
[Thread -1275102320 (LWP 14480) exited]
[New Thread -1266709616 (LWP 14529)]
[New Thread -1256137840 (LWP 14530)]
[New Thread -1275102320 (LWP 14531)]
[New Thread -1312130160 (LWP 14532)]
[New Thread -1303737456 (LWP 14533)]
[New Thread -1320846448 (LWP 14535)]
[New Thread -1329239152 (LWP 14536)]
[New Thread -1338156144 (LWP 14538)]
** Message: GetValue variable 1 (1)
** Message: GetValue variable 2 (2)
** Message: GetValue variable 1 (1)
** Message: GetValue variable 2 (2)
** Message: GetValue variable 1 (1)
** Message: GetValue variable 2 (2)
** Message: GetValue variable 1 (1)
** Message: GetValue variable 2 (2) (...the above all very fast as the window opened)
[Thread -1295344752 (LWP 14482) exited] (...and this was a normal close)
[Thread -1320846448 (LWP 14535) exited]
[Thread -1329239152 (LWP 14536) exited]
[Thread -1224287344 (LWP 14471) exited]
[Thread -1266709616 (LWP 14529) exited]
[Thread -1338156144 (LWP 14538) exited]
[Thread -1275102320 (LWP 14531) exited]
[Thread -1312130160 (LWP 14532) exited]
[Thread -1256137840 (LWP 14530) exited]
[Thread -1303737456 (LWP 14533) exited]
[Thread -1234453616 (LWP 14473) exited]

Program exited normally.
(gdb) quit

Revision history for this message
Cesare Tirabassi (norsetto) said :
#3

Can you try to launch firefox with the following command:

strace -r firefox -x echo &> /tmp/log

After closing, can you check the file /tmp/log for lines which starts with relatively high numbers (>1,0) and provide here this info?

Revision history for this message
Best Martin Benson (martin-zelemo) said :
#4

SOLVED IT !

Thanks Cesare, but I've got to the bottom of it.

I must have something wrong with my NFS server somewhere. I created a test user without an nfs home, and it worked fine.

So I then removed the .mozilla directory, and replaced it with a link to a directory on a local drive. Restarted Firefox, et voila! Working properly again.

Puzzling, though - I wonder why it fails with Feisty, but not with Edgy?

Oh, well.....

Revision history for this message
David Wilson (mcs6502) said :
#5

We just ran into exactly the same problem this week. We have home directories on a NetApp filer and have had no problems with Debian (stable) clients over the past few years. Ubuntu client with the same home directory takes more than a minute to start. We have narrowed it down to file locking. The following program demonstrates the problem:

$ cat locktest.c
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>

void printlock(struct flock lock)
{
        printf("type=%d, whence=%d, start=%d, len=%d, pid=%d\n",
                lock.l_type, lock.l_whence, lock.l_start, lock.l_len, lock.l_pid);
}

int main(void)
{
        struct flock lock;
        int fd;

        lock.l_type = F_RDLCK;
        lock.l_whence = SEEK_SET;
        lock.l_start = 0;
        lock.l_len = 0;

        if ((fd = open("lockfile", O_RDWR)) < 0)
                perror("open(lockfile)"), exit(1);
        printlock(lock);
        if (fcntl(fd, F_GETLK, &lock) < 0)
                perror("fnctl(F_GETLK)"), exit(2);
        printlock(lock);
        lock.l_type = F_WRLCK;
        if (fcntl(fd, F_SETLK, &lock) < 0)
                perror("fnctl(F_SETLK)"), exit(3);
        printlock(lock);
        if (close(fd) < 0)
                perror("close()");
        exit(0);
}

debian $ touch lockfile; ./locktest
type=0, whence=0, start=0, len=0, pid=-1209199962
type=2, whence=0, start=0, len=0, pid=-1209199962
type=1, whence=0, start=0, len=0, pid=-1209199962

ubuntu $ touch lockfile; ./locktest
type=0, whence=0, start=0, len=0, pid=-1208942604
type=2, whence=0, start=0, len=0, pid=-1208942604
fnctl(F_SETLK): No locks available

ubuntu $ sudo tail /var/log/messages
Jun 15 20:15:48 ubuntu kernel: [12172.914208] statd: server localhost not responding, timed out
Jun 15 20:15:48 ubuntu kernel: [12172.914224] lockd: cannot monitor nfsserver
Jun 15 20:15:48 ubuntu kernel: [12172.914227] lockd: failed to monitor nfsserver

The only difference I can see is that the ubuntu system uses nfs over tcp while the debian system uses nfs over udp.