New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 88514 link

Starred by 2 users

Issue metadata

Status: Fixed
Last visit > 30 days ago
Closed: Jul 2011
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

  • Only users with EditIssue permission may comment.

Sign in to add a comment

Google Mail Checker extension increases number of requests exponentially

Reported by, Jul 6 2011

Issue description

Chrome Version       : 14.0.803.0 dev-m
Extension            : Google Mail Checker

- What steps will reproduce the problem?
1. Install extension "Google Mail Checker"
2. Block access to GMail by ISA or another proxy server.
3. Leave browser open for night.

- What is the expected result?
Normal memory usage

- What happens instead?
Huge memory usage, brake system at the morning as long as the extension get out of memory and dies by itself.

65.2 KB View Download
65.6 KB View Download
Labels: Feature-Extensions

Comment 2 by, Jul 12 2011

Labels: -Area-Undefined Area-Internals
This sounds like two issues:

1. Bad extensions can leak memory.
2. Google Mail Checker is a bad extension that leaks memory.

Comment 3 by, Jul 12 2011

Labels: Action-FeedbackNeeded
How does ISA block access to Gmail? Can you:
1. Go to the extensions page (chrome://extensions)
2. Enable developer mode (link in the upper right)
3. Click on the background.html link for the Google Mail Checker extension to open the inspector for it
4. Click on the "Network" tab in the inspector
5. Right-click on an "atom" request and choose "Copy Response Headers"
6. Paste that here
Request Headers:
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.814.0 Safari/535.1

Response Headers:
HTTP/1.1 undefined undefined

Comment 5 by, Jul 13 2011

That's odd, it's as if the developer tools can't parse the response at all. Can you:
1. Load in one tab
2. In another tab go to chrome://net-internals/#events
3. Type in "" in the filter box
4. Click on the item with source URL_REQUEST
5. Copy and paste into there the contents of the log tab

Start Time: Thu Jul 14 2011 10:42:05 GMT+0600 (Уральское время (лето))

t=1310618525408 [st= 0] +REQUEST_ALIVE                  [dt=52]
t=1310618525408 [st= 0]     URL_REQUEST_START_JOB       [dt= 0]
                            --> load_flags = 1114241 (ENABLE_LOAD_TIMING | MAIN_FRAME | VALIDATE_CACHE | VERIFY_EV_CERT)
                            --> method = "GET"        
                            --> priority = 0          
                            --> url = ""
t=1310618525408 [st= 0]    +URL_REQUEST_START_JOB       [dt=52]
                            --> load_flags = 1114241 (ENABLE_LOAD_TIMING | MAIN_FRAME | VALIDATE_CACHE | VERIFY_EV_CERT)
                            --> method = "GET"        
                            --> priority = 0          
                            --> url = ""
t=1310618525408 [st= 0]        HTTP_CACHE_GET_BACKEND   [dt= 0]
t=1310618525408 [st= 0]        HTTP_CACHE_OPEN_ENTRY    [dt= 1]
                               --> net_error = -2 (FAILED)
t=1310618525409 [st= 1]        HTTP_CACHE_CREATE_ENTRY  [dt= 0]
t=1310618525409 [st= 1]        HTTP_CACHE_ADD_TO_ENTRY  [dt= 0]
t=1310618525409 [st= 1]        HTTP_STREAM_REQUEST      [dt=51]
t=1310618525460 [st=52]    -URL_REQUEST_START_JOB       
                            --> net_error = -111 (TUNNEL_CONNECTION_FAILED)
t=1310618525460 [st=52] -REQUEST_ALIVE

Start Time: Thu Jul 14 2011 11:46:53 GMT+0600 (Уральское время (лето))

t=1310622413871 [st= 0] +REQUEST_ALIVE                  [dt=39]
t=1310622413871 [st= 0]    +URL_REQUEST_START_JOB       [dt=37]
                            --> load_flags = 65536 (VERIFY_EV_CERT)
                            --> method = "GET"        
                            --> priority = 2          
                            --> url = ""
t=1310622413871 [st= 0]        HTTP_CACHE_GET_BACKEND   [dt= 0]
t=1310622413871 [st= 0]        HTTP_CACHE_OPEN_ENTRY    [dt= 0]
t=1310622413871 [st= 0]        HTTP_CACHE_ADD_TO_ENTRY  [dt=18]
                               --> net_error = -406 (CACHE_RACE)
t=1310622413889 [st=18]        HTTP_CACHE_OPEN_ENTRY    [dt= 0]
                               --> net_error = -2 (FAILED)
t=1310622413889 [st=18]        HTTP_CACHE_CREATE_ENTRY  [dt= 0]
t=1310622413889 [st=18]        HTTP_CACHE_ADD_TO_ENTRY  [dt= 0]
t=1310622413889 [st=18]        HTTP_STREAM_REQUEST      [dt=19]
t=1310622413908 [st=37]    -URL_REQUEST_START_JOB       
                            --> net_error = -111 (TUNNEL_CONNECTION_FAILED)
t=1310622413910 [st=39] -REQUEST_ALIVE

Start Time: Fri Jul 15 2011 19:57:47 GMT+0600 (Уральское время (лето))

t=1310738267220 [st=   0] +REQUEST_ALIVE                  [dt=2003]
t=1310738267220 [st=   0]    +URL_REQUEST_START_JOB       [dt=2003]
                              --> load_flags = 65536 (VERIFY_EV_CERT)
                              --> method = "GET"        
                              --> priority = 2          
                              --> url = ""
t=1310738267220 [st=   0]        HTTP_CACHE_GET_BACKEND   [dt=   0]
t=1310738267220 [st=   0]        HTTP_CACHE_OPEN_ENTRY    [dt=   0]
t=1310738267220 [st=   0]        HTTP_CACHE_ADD_TO_ENTRY  [dt=  29]
                                 --> net_error = -406 (CACHE_RACE)
t=1310738267249 [st=  29]        HTTP_CACHE_OPEN_ENTRY    [dt=  15]
                                 --> net_error = -2 (FAILED)
t=1310738267264 [st=  44]        HTTP_CACHE_CREATE_ENTRY  [dt=1020]
                                 --> net_error = -405 (CACHE_CREATE_FAILURE)
t=1310738268284 [st=1064]        HTTP_STREAM_REQUEST      [dt= 938]
t=1310738269223 [st=2003]    -URL_REQUEST_START_JOB       
                              --> net_error = -3 (ABORTED)
t=1310738269223 [st=2003] -REQUEST_ALIVE  

Comment 9 by, Jul 27 2011

Status: Started
It looks like when the unread count request fails, we would end up scheduling two follow-up requests, since we invoked the error handler in both the onreadystatechange and onerror callbacks. In turn, each of those follow-up requests would schedule two more. Over time, this doubling would lead to a lot more requests happening concurrently, which would manifest itself as increased memory usage.

Mikhail: to confirm this, can you leave the extension running overnight again and in the Network tab for its background page inspector, see how many requests are happening? It should be one every few minutes, if you're seeing several at a time then this is the cause.
126 KB View Download
122 KB View Download
122 KB View Download
123 KB View Download
Thanks for the screenshots. From looking at them, it went from 771 requests at the 7.5 hour mark to 2476 at the 9.2 hour mark, which works out to 0.2 requests per second, whereas the expected rate is closer to 1 request per minute. I believe the double error callback invocation is indeed to blame.
Labels: -Action-FeedbackNeeded Mstone-15
Summary: Google Mail Checker extension increases number of requests exponentially
Project Member

Comment 15 by, Jul 27 2011

The following revision refers to this bug:

r94342 | | Wed Jul 27 12:53:01 PDT 2011

Changed paths:

Prevent Google Mail Checker from scheduling more than one concurrent request.

In the case of failures (simulated by blackholing in /etc/hosts,
getInboxCount was calling onError in both the onreadystatechange and onerror
handlers). Prevent this in two ways: by only invoking the callback once and by
making scheduleRequest cancel any already-scheduled requests.

BUG= 88514 

Review URL:
Status: Fixed
The fix has been released as part of version 3.2 of the extension.
Project Member

Comment 17 by, Oct 13 2012

Labels: Restrict-AddIssueComment-Commit
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.
Project Member

Comment 18 by, Mar 10 2013

Labels: -Area-Internals -Feature-Extensions -Mstone-15 Cr-Platform-Extensions Cr-Internals M-15
Project Member

Comment 19 by, Mar 13 2013

Labels: -Restrict-AddIssueComment-Commit Restrict-AddIssueComment-EditIssue

Sign in to add a comment