Closed Bug 500613 Opened 15 years ago Closed 15 years ago

It takes about 5 minutes for firefox 3.5 rc 3 to start

Categories

(Firefox :: General, defect)

3.5 Branch
x86
Windows Vista
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 501605

People

(Reporter: huber.maxi, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)

When I start ff 3.5 rc3 it takes about 5 minutes, before it pops up. I have a 2 core prozessor and ff is taking 50% of the cpu power. This also occures on warm start. This does not happen with ff 3.0.x
What I have done to solve this problem:
I reinstalled ff.
I created a new profil firefox.exe -P 
I tried save mode
I ran sqlite3.exe places.sqlite "VACUUM;" since this file had about 9 mb. Same with urlclassifier2.sqlite. Both files got smaller
I set in about:config jit.chrome and jit.content to false
I checked about:plugins for anything suspecious

Now I used a the visual studio debugger on the ff prozess:

"firefox.exe": "C:\Program Files\Mozilla Firefox 3.5\firefox.exe" wurde geladen
"firefox.exe": "C:\Windows\System32\ntdll.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\kernel32.dll" wurde geladen
"firefox.exe": "C:\Program Files\Mozilla Firefox 3.5\xul.dll" wurde geladen
"firefox.exe": "C:\Program Files\Mozilla Firefox 3.5\sqlite3.dll" wurde geladen
"firefox.exe": "C:\Program Files\Mozilla Firefox 3.5\mozcrt19.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\msvcrt.dll" wurde geladen
"firefox.exe": "C:\Program Files\Mozilla Firefox 3.5\js3250.dll" wurde geladen
"firefox.exe": "C:\Program Files\Mozilla Firefox 3.5\nspr4.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\advapi32.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\rpcrt4.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\wsock32.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\ws2_32.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\nsi.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\winmm.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\user32.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\gdi32.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\ole32.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\oleaut32.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\oleacc.dll" wurde geladen
"firefox.exe": "C:\Program Files\Mozilla Firefox 3.5\smime3.dll" wurde geladen
"firefox.exe": "C:\Program Files\Mozilla Firefox 3.5\nss3.dll" wurde geladen
"firefox.exe": "C:\Program Files\Mozilla Firefox 3.5\nssutil3.dll" wurde geladen
"firefox.exe": "C:\Program Files\Mozilla Firefox 3.5\plc4.dll" wurde geladen
"firefox.exe": "C:\Program Files\Mozilla Firefox 3.5\plds4.dll" wurde geladen
"firefox.exe": "C:\Program Files\Mozilla Firefox 3.5\ssl3.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\shell32.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\shlwapi.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\version.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\winspool.drv" wurde geladen
"firefox.exe": "C:\Windows\System32\comdlg32.dll" wurde geladen
"firefox.exe": "C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6002.18005_none_5cb72f96088b0de0\comctl32.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\imm32.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\msctf.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\msimg32.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\usp10.dll" wurde geladen
"firefox.exe": "C:\Program Files\Mozilla Firefox 3.5\xpcom.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\lpk.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\uxtheme.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\dwmapi.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\dbghelp.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\setupapi.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\userenv.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\secur32.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\propsys.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\clbcatq.dll" wurde geladen
"firefox.exe": "C:\Program Files\Mozilla Firefox 3.5\components\browserdirprovider.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\mswsock.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\WSHTCPIP.DLL" wurde geladen
"firefox.exe": "C:\Windows\System32\IPHLPAPI.DLL" wurde geladen
"firefox.exe": "C:\Windows\System32\dhcpcsvc.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\dnsapi.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\winnsi.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\dhcpcsvc6.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\nlaapi.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\NapiNSP.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\pnrpnsp.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\winrnr.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\Wldap32.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\psapi.dll" wurde geladen
"firefox.exe": "C:\Program Files\Mozilla Firefox 3.5\components\brwsrcmp.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\shdocvw.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\t2embed.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\WindowsCodecs.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\apphelp.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\EhStorShell.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\EhStorShell.dll" entladen.
"firefox.exe": "C:\Windows\System32\EhStorShell.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\rsaenh.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\mscms.dll" wurde geladen
Der Thread 'Win32 Thread' (0x1700) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0x1550) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0xe44) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0x69c) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0x105c) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0x10d0) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0x17a0) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0x10e4) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0x11c8) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0x1328) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0x14f0) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0x14c0) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0x1418) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0x53c) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0x1090) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0x11b8) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0x140c) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0x1504) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0x14e4) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0xae0) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0xc38) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0x1708) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0x1734) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0x900) hat mit Code 0 (0x0) geendet.
"firefox.exe": "C:\Windows\System32\wship6.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\rasadhlp.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\ntmarta.dll" wurde geladen
"firefox.exe": "C:\Windows\System32\samlib.dll" wurde geladen
"firefox.exe": "C:\Program Files\Mozilla Firefox 3.5\softokn3.dll" wurde geladen
"firefox.exe": "C:\Program Files\Mozilla Firefox 3.5\nssdbm3.dll" wurde geladen
"firefox.exe": "C:\Program Files\Mozilla Firefox 3.5\freebl3.dll" wurde geladen
Der Thread 'Win32 Thread' (0x148c) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0xaf4) hat mit Code 0 (0x0) geendet.
//till there it is fast (~5sec)
//here it takes some minutes
Der Thread 'Win32 Thread' (0x1298) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32 Thread' (0x1628) hat mit Code 0 (0x0) geendet.
// also here
//then it runs fast again:
"firefox.exe": "C:\Program Files\Mozilla Firefox 3.5\nssckbi.dll" wurde geladen
"firefox.exe": "C:\Users\MasterMax\AppData\Roaming\Mozilla\Firefox\Profiles\d2b8hhf2.default\extensions\{FFA36170-80B1-4535-B0E3-A4569E497DD0}\platform\WINNT_x86-msvc\components\mgMouseService.dll" geladen, Die Binärdaten wurden nicht mit Debuginformationen erstellt.
Der Thread 'Win32 Thread' (0xf3c) hat mit Code 0 (0x0) geendet.




Reproducible: Always

Steps to Reproduce:
1.It always happens, even on warm starts
2.
3.
Actual Results:  
when ff is loaded, it runs fast, smooth and stable
Version: unspecified → 3.5 Branch
Just curious: if you create a new profile, then why did you vacuum places.sqlite and urlclassifier3.sqlite (not urlclassifier2.sqlite) ? They should be empty in new profiles.
So with a new profile it takes 5 minutes on a modern (2 Core processor) computer.
A startup problem bug is Bug 498079. This is a sound bug.
oops, sorry: urlclassifier2.sqlite and I VACUUMED in the default profile, the ones in the new profile were empty
this bug is happening at both profiles;
I uploaded a video so that you can see how the bug is affecting firefox:
http://www.youtube.com/watch?v=e0N0SqXktgI
You can see the task manager with the columns CPU RAM IO-read IO-write IO-other, 
as well as the debug window of visual studio.
Update: I tried disabling all plugins and later also deleting the file pluginreg.dat... ff recreated the file
This didn't help. With all plugins disabled the huge time to start didn't change.
I also installed ff 3.5 rc3 on my old machine. There it behaves normal. 
My guess: it seems to be a problem with vista or a driver of mine? The other software like firewall, anitvir, etc. are similar on both machines... the strange thing is, that ff 3.0 is running great...
Do you know a tool to analyse what ff is doing (or waiting for) during start up?
(In reply to comment #5)
> Do you know a tool to analyse what ff is doing (or waiting for) during start
> up?

You can use a tool like Process Monitor (downloadable from Microsoft) to see
which files are being written :

http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

It will report a lot though, you might want to filter on file operations. Then
try to examine which process does all these file operations. The problem is that this tool reports a massive amount of data (you will be
amazed what's going on behind the scenes).
Also your regression range can bring you a step closer to the possible cause. When was the last good build and when did the problem start?
Archive is here: http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/
The trunk builds are the builds with mozilla-central/ after the date. 
mozilla-1.9.1/ are the branch builds.
When you type about:buildconfig in such a build you see under Source a blue link with the changeset.
Ok, I visited http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/
 and tried the first 3.5 version: http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/3.5rc1-candidates/build1/win32/de/. There I have the save problem. Then I installed this one (latest 3.0): http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/3.0.11-candidates/build2/ . There is is starting fast.

Thus I think that is bug is only affecting ff3.5. 

For debugging I compiled the latest minefield firefox 3.6a1pre. It was the first time I compiled a program like ff. Normally I am working on small applications programmed in C# and I am not used to C++. Thus I am not sure if I have debugged it right,  but I found 2 things, where ff is "hanging" during start:
 if ( (osfh = CreateFile( (LPTSTR)path,
                                 fileaccess,
                                 fileshare,
                                 &SecurityAttributes,
                                 filecreate,
                                 fileattrib,
                                 NULL ))
             == (HANDLE)(-1) )
When I pause the debugging, mostly it stopps here. The method createfile is assembly. I can't debug.


And there is a loop:    
Do{
 MSG msg;
    // Give priority to system messages (in particular keyboard, mouse, timer,
    // and paint messages).
    if (PeekKeyAndIMEMessage(&msg, NULL) ||
        ::PeekMessageW(&msg, NULL, WM_MOUSEFIRST, WM_MOUSELAST, PM_REMOVE) || 
        ::PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE)) {
      gotMessage = PR_TRUE;
      if (msg.message == WM_QUIT) {
        ::PostQuitMessage(msg.wParam);
        Exit();
      } else {
        ::TranslateMessage(&msg);
        ::DispatchMessageW(&msg);
      }
    } else if (mayWait) {
      // Block and wait for any posted application message
      ::WaitMessage();
    }
} while (!gotMessage && mayWait); 


The strange thing is, that the debugger is showing these values:
mayWait	-2081649835	int
gotMessage	318734334	int
but these variables must be boolean?

I will keep on trying to locate this bug. Any further hints?
Note that there is a rather weird bug reported in bug 501605 (now duped to bug 489811). It might help if you clear out the temporary files from Internet Explorer (in Control Panel, Internet Option). Can you check that, please ?
BUG SOLVED!

First I deleted tempory files from IE, but this didn't help. Then I thougt I might run CCleaner.exe to clean my system. And I wondered why I runs very slow cleaning C:\Users\*UserName*\AppData\Local\Temp\. I found out, that for some reason I had empty files starting with Ver0000.tmp to VerFFFF.tmp in there (thus over 65000 files). So I wrote a script to delete them. This took some minutes, but when I start FF 3.5 now, it starts fast.
Bug solved.
Glad to hear that. Very decent of one of your Windows Apps to clutter 65 thouthand files over there.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Resolution: FIXED → DUPLICATE
You need to log in before you can comment on or make changes to this bug.