Bug 207382

Summary: Regression (r256011): http/tests/resourceLoadStatistics/aggregate-sorted-data-no-storage-access.html is consistently failing
Product: WebKit Reporter: Aakash Jain <aakash_jain>
Component: Tools / TestsAssignee: Kate Cheney <katherine_cheney>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue, katherine_cheney, tsavell, webkit-bot-watchers-bugzilla, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=207183
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Aakash Jain 2020-02-07 04:42:20 PST
http/tests/resourceLoadStatistics/aggregate-sorted-data-no-storage-access.html is consistently failing. It started failing in r256011.

Results database: https://results.webkit.org/?suite=layout-tests&test=http%2Ftests%2FresourceLoadStatistics%2Faggregate-sorted-data-no-storage-access.html

Test run: https://build.webkit.org/builders/Apple-Catalina-Release-WK2-Tests/builds/2771
Test result: https://build.webkit.org/results/Apple-Catalina-Release-WK2-Tests/r256011%20(2771)/results.html

Diff:
 
-Registrable domain: subframe3
+Registrable domain: topframe2
     hadUserInteraction: No
     gotLinkDecorationFromPrevalentResource: No
-    subframeUnderTopFrameDomains:
-        topframe1
-        topframe4
-    subresourceUnderTopFrameDomains:
-        topframe3
-    subresourceUniqueRedirectsTo:
-        topframe2
-    isPrevalentResource: Yes
+    isPrevalentResource: No
     isVeryPrevalentResource: No
     dataRecordsRemoved: 0
-Registrable domain: topframe2
+Registrable domain: topframe3
     hadUserInteraction: No
     grandfathered: No
@@ -65,12 +58,19 @@
     isPrevalentResource: Yes
     isVeryPrevalentResource: No
     dataRecordsRemoved: 0
-Registrable domain: topframe3
+Registrable domain: subframe3
     gotLinkDecorationFromPrevalentResource: No
-    isPrevalentResource: No
+    subframeUnderTopFrameDomains:
+        topframe1
+        topframe4
+    subresourceUnderTopFrameDomains:
+        topframe3
+    subresourceUniqueRedirectsTo:
+        topframe2
+    isPrevalentResource: Yes
     isVeryPrevalentResource: No
Comment 1 Radar WebKit Bug Importer 2020-02-07 08:21:56 PST
<rdar://problem/59259844>
Comment 2 Yusuke Suzuki 2020-02-07 10:29:42 PST
Looks like ResourceLoadStatisticsMemoryStore::dumpResourceLoadStatistics needs to be fixed.
Comment 3 Yusuke Suzuki 2020-02-07 10:30:12 PST
The bug is in existing implementation of ResourceLoadStatisticsMemoryStore::dumpResourceLoadStatistics. It relies on particular hash-table ordering, while hash-table does not guarantee it.
Comment 4 Kate Cheney 2020-02-07 10:30:19 PST
Created attachment 390102 [details]
Patch
Comment 5 Kate Cheney 2020-02-07 10:31:58 PST
(In reply to Yusuke Suzuki from comment #3)
> The bug is in existing implementation of
> ResourceLoadStatisticsMemoryStore::dumpResourceLoadStatistics. It relies on
> particular hash-table ordering, while hash-table does not guarantee it.

Yes, this patch should fix it. I copied what you did in ResourceLoadStatisticsDatabaseStore.
Comment 6 Yusuke Suzuki 2020-02-07 10:36:58 PST
Comment on attachment 390102 [details]
Patch

r=me
Comment 7 Kate Cheney 2020-02-07 12:43:29 PST
missed expectations for one test. Uploading a new patch for landing.
Comment 8 Kate Cheney 2020-02-07 12:44:35 PST
Created attachment 390115 [details]
Patch for landing
Comment 9 WebKit Commit Bot 2020-02-07 13:29:39 PST
Comment on attachment 390115 [details]
Patch for landing

Clearing flags on attachment: 390115

Committed r256055: <https://trac.webkit.org/changeset/256055>
Comment 10 WebKit Commit Bot 2020-02-07 13:29:41 PST
All reviewed patches have been landed.  Closing bug.