Bug 169070

Summary: Don't keep dead resources in MemoryCache while under memory pressure.
Product: WebKit Reporter: Andreas Kling <kling>
Component: WebCore Misc.Assignee: Andreas Kling <kling>
Status: REOPENED ---    
Severity: Normal CC: buildbot, cdumez, commit-queue, dbates, japhet, rniwa, ryanhaddad
Priority: P2 Keywords: Performance
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for EWS
buildbot: commit-queue-
Archive of layout-test-results from ews100 for mac-elcapitan
none
Archive of layout-test-results from ews104 for mac-elcapitan-wk2
none
Archive of layout-test-results from ews124 for ios-simulator-wk2 none

Description Andreas Kling 2017-03-01 23:55:10 PST
Yep.
Comment 1 Andreas Kling 2017-03-02 00:00:54 PST
Created attachment 303178 [details]
Patch
Comment 2 WebKit Commit Bot 2017-03-02 01:02:37 PST
Comment on attachment 303178 [details]
Patch

Clearing flags on attachment: 303178

Committed r213274: <http://trac.webkit.org/changeset/213274>
Comment 3 WebKit Commit Bot 2017-03-02 01:02:42 PST
All reviewed patches have been landed.  Closing bug.
Comment 4 Ryan Haddad 2017-03-02 15:58:51 PST
This change appears to have caused a flaky crash seen with memory/memory-pressure-simulation.html

https://build.webkit.org/results/Apple%20Sierra%20Release%20WK1%20(Tests)/r213301%20(4134)/results.html
Comment 5 Ryan Haddad 2017-03-02 21:21:26 PST
Reverted r213274 for reason:

This change caused flakiness with LayoutTest memory/memory-pressure-simulation.html

Committed r213350: <http://trac.webkit.org/changeset/213350>
Comment 6 Andreas Kling 2017-03-15 10:40:36 PDT
Created attachment 304514 [details]
Patch for EWS

Okay, let's harden MemoryCache::remove() against being called with CachedResources that are not in the cache, as well as CachedResources that are cached, but not present in a session resources map.
EWS, what do you think?
Comment 7 Build Bot 2017-03-15 11:08:46 PDT
Comment on attachment 304514 [details]
Patch for EWS

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

Number of test failures exceeded the failure limit.
Comment 8 Build Bot 2017-03-15 11:08:53 PDT
Created attachment 304517 [details]
Archive of layout-test-results from ews100 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 9 Build Bot 2017-03-15 11:25:53 PDT
Comment on attachment 304514 [details]
Patch for EWS

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

Number of test failures exceeded the failure limit.
Comment 10 Build Bot 2017-03-15 11:25:59 PDT
Created attachment 304518 [details]
Archive of layout-test-results from ews104 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 11 Build Bot 2017-03-15 11:56:25 PDT
Comment on attachment 304514 [details]
Patch for EWS

Attachment 304514 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/3331732

Number of test failures exceeded the failure limit.
Comment 12 Build Bot 2017-03-15 11:56:34 PDT
Created attachment 304521 [details]
Archive of layout-test-results from ews124 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews124  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.6