Bug 194480

Summary: Flaky API Test: TestWebKitAPI.ProcessSwap.SessionStorage
Product: WebKit Reporter: Aakash Jain <aakash_jain>
Component: Tools / TestsAssignee: Chris Dumez <cdumez>
Severity: Normal CC: aakash_jain, achristensen, ap, beidson, cdumez, commit-queue, ggaren, koivisto, lforschler, rniwa, webkit-bot-watchers-bugzilla, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=194481
Description Flags
Patch none

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]
Comment 7 Chris Dumez 2019-02-27 15:43:10 PST
Created attachment 363147 [details]
Comment 8 WebKit Commit Bot 2019-02-27 16:54:25 PST
Comment on attachment 363147 [details]

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