Closed Bug 736672 Opened 13 years ago Closed 10 years ago

firefox make too many uselees connections.

Categories

(Firefox :: Untriaged, defect)

11 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: lyricconch, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows; Windows NT 5.1; rv:11.0) Gecko/20100101 Firefox/11.0 Build ID: 20120310173008 Actual results: about 7-8 socket connection were created in one http request. but most of them turn to TIME_WAIT quickly(close by firefox). here is a "netstat -ano" while reloading https://encryped.google.com/ TCP 120.33.65.96:2170 74.125.128.17:443 ESTABLISHED 24104 TCP 120.33.65.96:2181 74.125.128.18:443 TIME_WAIT 0 TCP 120.33.65.96:2183 203.208.45.211:443 TIME_WAIT 0 TCP 120.33.65.96:2184 203.208.45.211:443 TIME_WAIT 0 TCP 120.33.65.96:2185 203.208.45.211:443 TIME_WAIT 0 TCP 120.33.65.96:2186 203.208.45.211:443 TIME_WAIT 0 TCP 120.33.65.96:2187 203.208.45.211:443 TIME_WAIT 0 TCP 120.33.65.96:2188 203.208.45.211:443 TIME_WAIT 0 TCP 120.33.65.96:2213 203.208.45.211:443 TIME_WAIT 0 TCP 120.33.65.96:2214 203.208.45.211:443 TIME_WAIT 0 TCP 120.33.65.96:2215 203.208.45.211:443 TIME_WAIT 0 TCP 120.33.65.96:2216 203.208.45.211:443 TIME_WAIT 0 TCP 120.33.65.96:2217 203.208.45.211:443 TIME_WAIT 0 TCP 120.33.65.96:2218 203.208.45.211:443 TIME_WAIT 0 TCP 120.33.65.96:2219 203.208.45.211:443 TIME_WAIT 0 TCP 120.33.65.96:2220 74.125.128.120:443 ESTABLISHED 24104 TCP 120.33.65.96:2221 74.125.128.132:443 ESTABLISHED 24104 TCP 120.33.65.96:2222 203.208.45.211:443 TIME_WAIT 0 TCP 120.33.65.96:2223 203.208.45.211:443 TIME_WAIT 0 TCP 120.33.65.96:2224 203.208.45.211:443 TIME_WAIT 0 TCP 120.33.65.96:2225 203.208.45.211:443 TIME_WAIT 0 TCP 120.33.65.96:2226 74.125.128.106:443 ESTABLISHED 24104 TCP 120.33.65.96:2227 203.208.45.211:443 SYN_SENT 24104 TCP 120.33.65.96:2228 203.208.45.211:443 SYN_SENT 24104 TCP 127.0.0.1:1221 127.0.0.1:1222 ESTABLISHED 24104 TCP 127.0.0.1:1222 127.0.0.1:1221 ESTABLISHED 24104 by using a local proxy for test, i found that firefox just do nothing before it shutdown the connection, it just connect then shutdown immediately. why? 127.0.0.1:2617 - - [08:18:56] CONNECT plus.google.com:443 HTTP/1.1 200 - 127.0.0.1:2618 - - [08:18:56] CONNECT plus.google.com:443 HTTP/1.1 200 - 127.0.0.1:2619 - - [08:18:56] CONNECT plus.google.com:443 HTTP/1.1 200 - 127.0.0.1:2620 - - [08:18:56] CONNECT plus.google.com:443 HTTP/1.1 200 - 127.0.0.1:2621 - - [08:18:56] CONNECT plus.google.com:443 HTTP/1.1 200 - 127.0.0.1:2622 - - [08:18:56] CONNECT plus.google.com:443 HTTP/1.1 200 - 127.0.0.1:2623 - - [08:18:57] CONNECT plus.google.com:443 HTTP/1.1 200 - 127.0.0.1:2624 - - [08:18:57] CONNECT plus.google.com:443 HTTP/1.1 200 - 127.0.0.1:2625 - - [08:18:57] CONNECT plus.google.com:443 HTTP/1.1 200 - 127.0.0.1:2626 - - [08:18:57] CONNECT plus.google.com:443 HTTP/1.1 200 - 127.0.0.1:2627 - - [08:19:19] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2628 - - [08:19:19] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2629 - - [08:19:19] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2630 - - [08:19:19] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2629 - - [08:19:23] GET https://api.twitter.com:443/1/direct_messages json?count=200&include_entities=true&since_id=529640744 HTTP/1.0 200 - 127.0.0.1:2627 - - [08:19:23] GET https://api.twitter.com:443/1/statuses/home_t meline.json?count=200&include_entities=true&since_id=180807459579887616 HTTP/1. 200 - 127.0.0.1:2630 - - [08:19:23] GET https://api.twitter.com:443/1/direct_messages sent.json?count=200&include_entities=true&since_id=529409170 HTTP/1.0 200 - 127.0.0.1:2628 - - [08:19:23] GET https://api.twitter.com:443/1/statuses/mentio s.json?count=200&include_entities=true&since_id=91435916043747328 HTTP/1.0 200 127.0.0.1:2661 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2662 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2663 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2664 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2665 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2666 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2667 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2668 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2669 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2670 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2671 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2672 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2673 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2674 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2675 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2676 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2677 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2678 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2679 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2680 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2681 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2682 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2683 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2684 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2685 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2686 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2687 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2688 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2689 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2690 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2691 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2692 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2693 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2694 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2695 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2696 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2697 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2698 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2699 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - 127.0.0.1:2700 - - [08:20:00] CONNECT api.twitter.com:443 HTTP/1.1 200 - connection were made(i have response 200 to firefox, using a fake CA cert for ssl test), ssl handshake also succeed, but no more further data received, firefox close the connection quickly and make another connection and close and make ... not only the "CONNECT", in other case, socket were closed before http request sent, so it just nothing to log but the issue still be there.
It might be the SYN retries from bug 623948, if you have a slow connection to google.com. Does it help if you set network.http.connection-retry-timeout to 0 ? It might also be the "happy eyeballs" algorithm from bug 684893, if you have a broken ipv6 connection. Does it help if you set network.http.fast-fallback-to-IPv4 to false ?
network.http. branch is not modified. network.http.connection-retry-timeout = 250 network.http.fast-fallback-to-IPv4 = True i have try connection-retry-timeout = 0 and fast-fallback-to-IPv4 = False, after restart firefox, this still happen. i have notice that this is happen only in some https request. (using a local proxy) as below, the "bad socket"s only send the "CONNECT" but no further data send. this is the log when i reload "https://encrypted.google.com/" log is print at connection release(sock.recv(BUFSIZE) => ""). CRITICAL: [02:39:38] port: 1954, req: [('CONNECT', 'encrypted.google.com:443'), ('GET', '/')] -----------------------good---- CRITICAL: [02:39:40] port: 1969, req: [('CONNECT', 'encrypted.google.com:443')] --------bad------- CRITICAL: [02:39:40] port: 1970, req: [('CONNECT', 'encrypted.google.com:443')] CRITICAL: [02:39:40] port: 1959, req: [('CONNECT', 'www.google.com:443'), ('GET' , '/logos/2012/stpatricksday11-sr.png')] CRITICAL: [02:39:41] port: 1960, req: [('CONNECT', 'encrypted.google.com:443'), ('GET', '/logos/2012/stpatricksday11-hp.jpg')] ---good--- CRITICAL: [02:39:42] port: 1971, req: [('CONNECT', 'encrypted.google.com:443'), ('GET', '/extern_js/f/CgJlbhICdXMrMEU4ACwrMFo4ACwrMA44ACwrMBc4ACwrMDw4ACwrMFE4AC wrMFk4ACwrMAo4AJoCAmNjLCswmAE4ACwrMBY4ACwrMBk4ACwrMCs4ACwrMEE4ACwrME04ACwrME44AC wrMFM4ACwrMFQ4ACwrMGk4ACwrMG44ACwrMJABOAAsKzCSATgALCswlwE4ACwrMKMBOAAsKzCnATgALC swqgE4ACwrMKwBOAAsKzC2ATgALCsw0QE4ACwrMNUBOAAsKzDYATgALCsw2QE4ACwrMNsBOAAsKzB0OA AsKzC6ATgALCswHTgALCswXDgALCswbzgALCswGDgALCswJjgALIACaZACbA/BNDDZsMjjwY.js')] CRITICAL: [02:39:44] port: 1976, req: [('CONNECT', 'encrypted.google.com:443'), ('GET', '/extern_chrome/4370e40f02568ad5.js')] CRITICAL: [02:39:45] port: 1977, req: [('CONNECT', 'encrypted.google.com:443'), ('GET', '/ig/cp/get?hl=en&gl=us&authuser=0&bundleJs=0')] CRITICAL: [02:39:45] port: 1986, req: [('CONNECT', 'encrypted.google.com:443'), ('GET', '/csi?v=3&s=webhp&action=&e=31215,31701,34635,35397,36683,36888,36934,37 059,37102,37153,37473,37568,37585,37645&ei=bttkT474MsjZtgeNvcHVBw&imc=6&imn=6&im p=2&rt=xjsls.160,prt.216,xjses.3804,xjsee.4206,xjs.4512,ol.5751,iml.2363,wsrt.25 35,cst.61,dnst.0,rqst.960,rspt.988')] ----also good----- CRITICAL: [02:39:50] port: 1991, req: [('CONNECT', 'plus.google.com:443')] ---- now the issue happen --- CRITICAL: [02:39:50] port: 1992, req: [('CONNECT', 'plus.google.com:443')] ---- ??? --- CRITICAL: [02:39:50] port: 1993, req: [('CONNECT', 'plus.google.com:443')] CRITICAL: [02:39:50] port: 1994, req: [('CONNECT', 'plus.google.com:443')] CRITICAL: [02:39:50] port: 1995, req: [('CONNECT', 'plus.google.com:443')] CRITICAL: [02:39:50] port: 1996, req: [('CONNECT', 'plus.google.com:443')] CRITICAL: [02:39:50] port: 1997, req: [('CONNECT', 'plus.google.com:443')] CRITICAL: [02:39:50] port: 1998, req: [('CONNECT', 'plus.google.com:443')] CRITICAL: [02:39:50] port: 1999, req: [('CONNECT', 'plus.google.com:443')] ---- these connections just close quickly ---- CRITICAL: [02:39:51] port: 2000, req: [('CONNECT', 'plus.google.com:443'), ('GET ', '/u/0/_/notifications/frame?sourceid=1&hl=en&origin=https%3A%2F%2Fencrypted.g oogle.com&jsh=r%3Bgc%2F53c9f733')] ---- finally this one send the request ---
Hello, I just tried to reproduce this on my win7 system, but I can't see so many connections when i reload this page. can you maybe give us more details on how you made this status information in 2012 or if this is no more valid? thank you for all your help to make firefox better and sorry for this long time without progress.
Flags: needinfo?(lyricconch)
Closed, because of missing feedback please feel free to reopen this bug-report if you have additonal information on it.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Flags: needinfo?(lyricconch)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.