Bug 173804 - REGRESSION (AsyncImageDecoding): A tab with the WWDC keynote paused is killed for using excessive power (Image thrashing)
Summary: REGRESSION (AsyncImageDecoding): A tab with the WWDC keynote paused is killed...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-06-23 21:08 PDT by Antti Koivisto
Modified: 2017-06-26 20:28 PDT (History)
8 users (show)

See Also:


Attachments
patch (9.71 KB, patch)
2017-06-26 16:43 PDT, Antti Koivisto
simon.fraser: review+
Details | Formatted Diff | Diff
patch (9.08 KB, patch)
2017-06-26 16:58 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (9.20 KB, patch)
2017-06-26 17:11 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (9.67 KB, patch)
2017-06-26 17:24 PDT, Antti Koivisto
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews103 for mac-elcapitan (994.37 KB, application/zip)
2017-06-26 17:59 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews116 for mac-elcapitan (1.74 MB, application/zip)
2017-06-26 18:45 PDT, Build Bot
no flags Details
patch (10.17 KB, patch)
2017-06-26 19:05 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2017-06-23 21:08:54 PDT
Easy repro in trunk: 
1) https://www.apple.com/apple-events/june-2017/
2) notifyutil -p org.WebKit.lowMemory.begin
Comment 1 Antti Koivisto 2017-06-23 21:09:12 PDT
<rdar://problem/32623745>
Comment 2 Antti Koivisto 2017-06-26 16:43:16 PDT
Created attachment 313874 [details]
patch
Comment 3 Simon Fraser (smfr) 2017-06-26 16:51:04 PDT
Comment on attachment 313874 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=313874&action=review

> Source/WebCore/platform/graphics/BitmapImage.cpp:229
> +                imageObserver()->didDraw(*this);

It's confusing, and not very future-proof, to call something called 'didDraw' when we didn't actually draw.

> LayoutTests/fast/images/low-memory-decode.html:15
> +    }, 100);

This will always take 100ms. Consider using shouldBecomeTrue().
Comment 4 Antti Koivisto 2017-06-26 16:52:27 PDT
> It's confusing, and not very future-proof, to call something called
> 'didDraw' when we didn't actually draw.

Actually I'll get rid of this for the patch. It is not needed to fix the bug.
 
> > LayoutTests/fast/images/low-memory-decode.html:15
> > +    }, 100);
> 
> This will always take 100ms. Consider using shouldBecomeTrue().
Comment 5 Antti Koivisto 2017-06-26 16:58:19 PDT
Created attachment 313875 [details]
patch
Comment 6 Antti Koivisto 2017-06-26 16:59:24 PDT
> > > LayoutTests/fast/images/low-memory-decode.html:15
> > > +    }, 100);
> > 
> > This will always take 100ms. Consider using shouldBecomeTrue().

That doesn't work because it would make the test succeed even without code changes.
Comment 7 Simon Fraser (smfr) 2017-06-26 17:01:04 PDT
Comment on attachment 313875 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=313875&action=review

> LayoutTests/fast/images/low-memory-decode.html:15
> +    }, 200);

Maybe you can bail if you see > 1 decode.
Comment 8 Antti Koivisto 2017-06-26 17:11:13 PDT
Created attachment 313876 [details]
patch
Comment 9 Antti Koivisto 2017-06-26 17:24:35 PDT
Created attachment 313877 [details]
patch
Comment 10 Build Bot 2017-06-26 17:59:26 PDT
Comment on attachment 313877 [details]
patch

Attachment 313877 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/4003307

New failing tests:
fast/images/low-memory-decode.html
Comment 11 Build Bot 2017-06-26 17:59:27 PDT
Created attachment 313881 [details]
Archive of layout-test-results from ews103 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 12 Build Bot 2017-06-26 18:45:44 PDT
Comment on attachment 313877 [details]
patch

Attachment 313877 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/4003402

New failing tests:
fast/images/low-memory-decode.html
Comment 13 Build Bot 2017-06-26 18:45:46 PDT
Created attachment 313884 [details]
Archive of layout-test-results from ews116 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews116  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 14 Antti Koivisto 2017-06-26 19:05:56 PDT
Created attachment 313885 [details]
patch
Comment 15 WebKit Commit Bot 2017-06-26 20:28:04 PDT
Comment on attachment 313885 [details]
patch

Clearing flags on attachment: 313885

Committed r218826: <http://trac.webkit.org/changeset/218826>
Comment 16 WebKit Commit Bot 2017-06-26 20:28:06 PDT
All reviewed patches have been landed.  Closing bug.