New issue
Advanced search Search tips

Issue 789673 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 18
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 1
Type: Bug

Blocking:
issue 598073


Show other hotlists

Hotlists containing this issue:
XXX


Sign in to add a comment

Prevent system sleep when an upload has recently been started when the network service is enabled.

Project Member Reported by mmenke@chromium.org, Nov 29 2017

Issue description

WakeLockResourceThrottle prevents entering sleep for first 30 seconds of an upload.  The network service doesn't use ResourceThrottles, so requests bypass it when the service is in use.  We should find a way to enable similar (Possibly better) behavior when the network service is enabled.
 

Comment 1 by dxie@chromium.org, May 17 2018

Labels: -Pri-3 Proj-Servicification-Canary OS-All Pri-1
Status: Available (was: Untriaged)

Comment 2 by dxie@chromium.org, May 18 2018

Labels: -OS-All OS-Windows OS-Linux OS-Mac OS-Chrome OS-Android
Labels: -Proj-Servicification-Canary Proj-Servicification
The description is actually wrong - WakeLockResourceThrottle prevents entering sleep *after* the first 30 seconds of an upload, until the upload is complete.
Matt, I am not sure that this should block the initial roll out to canary, but should block the roll out to 100%, wdyt?
I suspect usage is low enough that it shouldn't block Canary rollout (It's also a feature we could consider removing - as-is, it can prevent sleep on some sites that use hanging POST operations for chat channels, for instance).

On the other hand, having a system go to sleep in the middle of a 5 GB upload could be pretty frustrating.
+1 for removing this feature due to hanging POST abuse. My home desktop refuses to sleep if Yahoo mail is open.
Labels: Hotlist-KnownIssue
Owner: mmenke@chromium.org
Status: Assigned (was: Available)
We could also improve the behavior - once we've uploaded the body, for instance, we could release the WakeLock, rather than waiting for request completion (That doesn't handle redirects, but if you respond to a 5 GB upload with a redirect that requires re-sending the upload....).

Anyhow, why don't I try removing the behavior, and we can see if we get any complaints.  The original author of the class is still around, so I'll rope them into the CL.
Project Member

Comment 10 by bugdroid1@chromium.org, Jul 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/96f42aeca92bc375433a34b2cc2854fe54b5395e

commit 96f42aeca92bc375433a34b2cc2854fe54b5395e
Author: Matt Menke <mmenke@chromium.org>
Date: Wed Jul 18 11:34:36 2018

Prevent POSTs from blocking suspend mode.

The goal of this log was not to enter suspending mode while uploading
a large resource, but it also causes hanging POST requests, sometimes
used for chat channels, to prevent a system from entering suspend mode.
It also can keep systems awake after their lid is closed, consuming
battery unexpectedly.  Chrome is the only browser that does this.

We'll either need to port the behavior to work with the network service,
or remove it from Chrome before we ship the network service (So it's one
less difference between Chrome with / without the network service).  We
opted to go with the latter approach, since the current behavior can
cause problems.  There's also a wake lock web API under discussion,
though not yet shipped.

TBR=jam@chromium.org

Bug:  571250 ,  789673 
Change-Id: I6e121b9a862496dfb2da630a180cd00cdde30528
Reviewed-on: https://chromium-review.googlesource.com/1140207
Commit-Queue: Matt Menke <mmenke@chromium.org>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: Ryo Hashimoto <hashimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576006}
[modify] https://crrev.com/96f42aeca92bc375433a34b2cc2854fe54b5395e/content/browser/BUILD.gn
[modify] https://crrev.com/96f42aeca92bc375433a34b2cc2854fe54b5395e/content/browser/loader/resource_dispatcher_host_impl.cc
[delete] https://crrev.com/fe271294e83d3aa93219baf7fe66e81304489a1c/content/browser/loader/wake_lock_resource_throttle.cc
[delete] https://crrev.com/fe271294e83d3aa93219baf7fe66e81304489a1c/content/browser/loader/wake_lock_resource_throttle.h

Status: Fixed (was: Assigned)

Sign in to add a comment