nsSocketTransportService::Poll wakes up every second during spdy idle

RESOLVED FIXED in mozilla29

Status

()

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: rvitillo, Assigned: mcmanus)

Tracking

Trunk
mozilla29
x86
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Steps to reproduce:

1) start Nightly (clean profile) with NSPR_LOG_MODULES=nsSocketTransport:5
2) notice that there is no periodic activity being logged
2) visit www.google.com and wait for the page to fully load; the periodic activity of nsSocketTransportService::Poll is being logged every second
3) visit about:blank; the periodic activity continues for about 2-3 mins even though we are just idling

Note that the browser needs to be in foreground.
(Assignee)

Updated

5 years ago
Assignee: nobody → mcmanus
Status: NEW → ASSIGNED
(Assignee)

Comment 2

5 years ago
roberto - there are some builds over here:
https://tbpl.mozilla.org/?tree=Try&rev=327cdfc56f14

can you try one out and see if it improves the situation for you?
Flags: needinfo?(rvitillo)
Blocks: 965392
Great job! The patch reduces significantly also the number of wakeups when idling on Google (see Bug 965392).
No longer blocks: 965392
Flags: needinfo?(rvitillo)
Did you mean to remove the blocking flag? (bug 965392 could probably be RESOLVED DUPLICATE of this bug though, unless there's more to do once this goes in)
Blocks: 965392

Comment 5

5 years ago
Comment on attachment 8368341 [details] [diff] [review]
control SocketTransportService::Poll tick during spdy idle

Review of attachment 8368341 [details] [diff] [review]:
-----------------------------------------------------------------

::: netwerk/protocol/http/nsHttpConnectionMgr.cpp
@@ +2439,5 @@
>      // The timer tick should be enabled if it is not already pending.
>      // Upon running the tick will rearm itself if there are active
>      // connections available.
>  
> +    if (mTimeoutTick && mTimeoutTickArmed){

nit: space between ) and {

@@ +2470,5 @@
>      MOZ_ASSERT(mTimeoutTick, "no readtimeout tick");
>  
>      LOG(("nsHttpConnectionMgr::TimeoutTick active=%d\n",
>           mNumActiveConns));
> +    mTimeoutTickNext = 3600;

It would be nice to have this as not a magic number (or at least a commented magic number)

@@ +2475,1 @@
>      mCT.Enumerate(TimeoutTickCB, this);

And also maybe note that this can change the value of mTimeoutTickNext (so it doesn't look like the next bit always ends up setting the delay to 3600s)
Attachment #8368341 - Flags: review?(hurley) → review+
(Assignee)

Updated

5 years ago
Summary: nsSocketTransportService::Poll wakes up every second during idle → nsSocketTransportService::Poll wakes up every second during spdy idle
https://hg.mozilla.org/mozilla-central/rev/8f2ed4975219
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in before you can comment on or make changes to this bug.