Bug 194480 - Flaky API Test: TestWebKitAPI.ProcessSwap.SessionStorage
Summary: Flaky API Test: TestWebKitAPI.ProcessSwap.SessionStorage
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-02-10 04:58 PST by Aakash Jain
Modified: 2019-02-27 17:40 PST (History)
12 users (show)

See Also:


Attachments
Patch (30.28 KB, patch)
2019-02-27 15:28 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (30.20 KB, patch)
2019-02-27 15:43 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aakash Jain 2019-02-10 04:58:03 PST
TestWebKitAPI.ProcessSwap.SessionStorage seems flaky. In https://ews-build.webkit-uat.org/#/builders/20/builds/819, the test Failed in run-api-tests step. However, in the immediately next retry step (re-run-api-tests), it passed.

Same thing happened in  https://ews-build.webkit-uat.org/#/builders/20/builds/829
Comment 1 Aakash Jain 2019-02-12 06:37:23 PST
Another one: https://ews-build.webkit-uat.org/#/builders/20/builds/880
(different test failure in re-run)
Comment 2 Aakash Jain 2019-02-27 05:54:55 PST
Can we prioritize this?
I am working on EWS for API tests, and this flaky failure is creating problem.
Comment 3 Chris Dumez 2019-02-27 06:55:55 PST
(In reply to Aakash Jain from comment #2)
> Can we prioritize this?
> I am working on EWS for API tests, and this flaky failure is creating
> problem.

Ok, I think I should have some time to look into this today.
Comment 4 Chris Dumez 2019-02-27 12:16:30 PST
It looks like sometimes, when StorageManager::setItem() is called, findStorageArea(connection, storageMapID) returns null, so we fail to set the item.
Comment 5 Chris Dumez 2019-02-27 12:39:13 PST
It is very weird, I see the StorageManager::CreateSessionStorageMap() getting sent by the WebProcess, then the StorageManager::SetItem() getting sent by the WebProcess. However, when it fails, on the UIProcess side, I see StorageManager::setItem() getting called but not StorageManager::createSessionStorageMap().

I added an assertion on sending side and it did not hit so the sender side believes that it was successful sending both IPC messages.

Both IPC messages are async so there is no way they could be processed out of order..
Comment 6 Chris Dumez 2019-02-27 15:28:44 PST
Created attachment 363141 [details]
Patch
Comment 7 Chris Dumez 2019-02-27 15:43:10 PST
Created attachment 363147 [details]
Patch
Comment 8 WebKit Commit Bot 2019-02-27 16:54:25 PST
Comment on attachment 363147 [details]
Patch

Clearing flags on attachment: 363147

Committed r242182: <https://trac.webkit.org/changeset/242182>
Comment 9 WebKit Commit Bot 2019-02-27 16:54:27 PST
All reviewed patches have been landed.  Closing bug.
Comment 10 Radar WebKit Bug Importer 2019-02-27 17:40:59 PST
<rdar://problem/48458499>