2

I've noticed that when browser (tested with Firefox and Chrome) has been running for a long time, it stops connecting sites. I found out with task manager that the count of handles for browser process is 90000+. When shutdown the browser handle count starts going down but stops at some point and only reasonable fast way to shutdown browser is to kill the process. Also "System" process has high handle count which goes down when browser is killed.

Since I can see this phenomenon on two different browser, it cannot be bug in browser. Any ideas what causes this and how to get rid of it?

I'm running Windows XP SP3 and Firefox 4.0.1. Anti-virus is F-Secure Client Security 9.01 build 122. No proxy is used and turning of F-Secure firewall seems to have no effect.

Netstat -nb output contains lots of this kind of lines:

TCP 127.0.0.1:3682 127.0.0.1:3681 CLOSE_WAIT 4112
[firefox.exe]

I'm suspecting F-Secure, but I've now idea how it could do this.

wonea
  • 1,877
Harriv
  • 151

3 Answers3

2

I honestly don't believe this is a problem with firefox or chrome directly. I currently have 1220 tabs open in chrome, and 732 in firefox, and it has been this way for over a week without a restart. There can be issues on several different fronts, but tracking down which is the culprit can be very difficult.

A few things to look at:

  • The maximum number of connections your router can handle... (I've seen home-based routers that are limited to 4k active connections, and others well over 250k.) Unfortunately, this limit is not always well-documented by the manufacturer. You might also want to look at what-else is making connections (i.e. is something p2p running in the background?)
  • Are you using a proxy? (a virus might be acting as a proxy too and would cause similar problems) Proxy software can also have these sorts of limitations, and the symptoms would be similar.
  • The sites you are visiting may be a contributing factor. Some sites operate using several techniques that end up with multiple connections to the host to maximize throughput to the website and/or multiple connections to allow 2-way communication to the server. Refreshing or re-connecting to the site, or even messing with javascript (i.e. disabling javascript or using programs like "noscript") can inadvertently cause the website itself to attempt to make additional connections to the server, and the problem can grow exponentially.

Without more information about what is going on... I can only guess.

TheCompWiz
  • 10,912
2

TL;DR: I finally found what cause this bug in Windows 7 (and surely in all other Windows versions). Actually it's about GDI Objects.

When the number of GDI Object reaches 10 000, the bug appears and Chrome crashes few times after. Now, I jut wonder if it's a bug in Chrome or if it's a plugin / extension bug.

To see GDI Objects in Task manager, click in menu "Display" → "select columns..." → check "GDI Object" checkbox.


I experienced this kind of bug with IE (v7 i think, or 6 perhaps) on Windows XP SP3. I experienced it with Chrome too but only with Windows 7 Home Premium.

I do not think anti-virus are a cause of this, because I got this problem on a fresh laptop (bought last month) with an official Windows 7 Home Premium installed on it, and I never installed any anti-virus by now... (even installed and removed!)

How this bug appeared for me:

First, I never had hundreds of tabs opened when this "bug" appeared but each time, the browser was running for a long time (with many tabs opened and closed). It was the same thing with IE.

When I tried to download anything (similar problem opening a new tab), the "save" dialog box did not appear (not enough GUI handles?). The browser seemed to be frozen but when I moved another window on the top of Chrome I could guess the save-dialog-box's frame/borders because there were refresh bugs. So the dialog-box was not displayed but it was "shown" anyway. I eventually pressed escape and the dialog-box closed and browser "unfroze.

Currently my browser, Iron (a Chrome-like browser based on Chromium) has 31 tabs opened, the process that owns the majority of handles has 29203 handles, the second process has 2667 handles, then explorer.exe has 1392 handles, etc. And I have no GUI handle problem.

When I had this problem, Iron had around 7000 handles only, so it does not make sense to think it's a handle problem or any handle leak that browsers could manage badly.

I think it's a problem with Windows.. maybe a handle recycling system, I don't know.

Note: When I had this problem on Windows 7, I ran Task Manager, and it is displayed correctly. On Windows XP (with IE), not on this laptop, Task Manager had the problem too. I could not see any any process because the grid with processes and columns was not displayed! Actually I could not run any program on this computer until I closed IE and released all handles.

On Windows 7 (with Chrome issue), GUI handle ressources seem to be isolated because I could see Task Manager and run any other program without this GUI handle starvation / shortage. The GUI handle problem is confined to Iron.

Since I never had this problem with Iron on Windows XP, this issue could be because of plugins.

slhck
  • 235,242
Astyan
  • 21
  • 1
1

I disabled all "unnecessary" browser plugins, and the problem went away. I'm not sure which one it was.

Harriv
  • 151