Bug 197040 - [Mac iOS WK2] Layout Test http/wpt/cache-storage/cache-quota-after-restart.any.html is a flaky failure
Summary: [Mac iOS WK2] Layout Test http/wpt/cache-storage/cache-quota-after-restart.an...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-04-17 16:36 PDT by Shawn Roberts
Modified: 2019-04-25 08:50 PDT (History)
10 users (show)

See Also:


Attachments
Patch (2.17 KB, patch)
2019-04-24 13:23 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shawn Roberts 2019-04-17 16:36:32 PDT
The following layout test is failing on Mac WK2, iOS Simulator WK2 Release and Debug

http/wpt/cache-storage/cache-quota-after-restart.any.html

Probable cause:

test was added in https://trac.webkit.org/changeset/243276/webkit and has been a flaky failure since added. iOS Simulator Release fails the most, but has been seen on other queues as well. 

Flakiness Dashboard:

https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=http%2Fwpt%2Fcache-storage%2Fcache-quota-after-restart.any.html

Diff:

--- /Volumes/Data/slave/ios-simulator-12-release-tests-wk2/build/layout-test-results/http/wpt/cache-storage/cache-quota-after-restart.any-expected.txt
+++ /Volumes/Data/slave/ios-simulator-12-release-tests-wk2/build/layout-test-results/http/wpt/cache-storage/cache-quota-after-restart.any-actual.txt
@@ -1,7 +1,8 @@
-CONSOLE MESSAGE: Cache API operation failed: Quota exceeded
 CONSOLE MESSAGE: Cache API operation failed: Quota exceeded
 
+Harness Error (TIMEOUT), message = null
+
 PASS Increasing quota 
-PASS After network process restart, verify quota is computed according space being used 
-PASS After network process restart, verify quota is computed according space being used and does not increase 
+TIMEOUT After network process restart, verify quota is computed according space being used Test timed out
+NOTRUN After network process restart, verify quota is computed according space being used and does not increase
Comment 1 Radar WebKit Bug Importer 2019-04-17 16:37:06 PDT
<rdar://problem/49997641>
Comment 2 youenn fablet 2019-04-23 14:42:24 PDT
There are two issues there:
- Test on iOS might be very slow so we should mark it this way in TestExpectations.
- Sometimes, disk writing fails. Doing some logging in NetworkCache::Storage, it seems that between the time we call Storage::dispatchWriteOperation and create the folder where to write using FileSystem::makeAllDirectories and the actual write operation in IOChannel::write, the folder get deleted. Sometimes the call to FileSystem::makeAllDirectories fails as well. Doing some logging, I do not see any calls to remove these folders from another thread.
Comment 3 youenn fablet 2019-04-24 13:13:09 PDT
As spotted by Antti, the synchronize mechanism is probably the one deleting the folder that has just been created.
This probably happens as write and synchronize share the same background queue and the queue is concurrent.
Comment 4 youenn fablet 2019-04-24 13:23:03 PDT
Created attachment 368167 [details]
Patch
Comment 5 WebKit Commit Bot 2019-04-25 08:50:24 PDT
Comment on attachment 368167 [details]
Patch

Clearing flags on attachment: 368167

Committed r244645: <https://trac.webkit.org/changeset/244645>
Comment 6 WebKit Commit Bot 2019-04-25 08:50:25 PDT
All reviewed patches have been landed.  Closing bug.