Bug 172861 - ResourceLoadStatistics are not using unique paths during test runs
Summary: ResourceLoadStatistics are not using unique paths during test runs
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-06-02 09:53 PDT by Brent Fulgham
Modified: 2017-06-02 17:20 PDT (History)
8 users (show)

See Also:


Attachments
Patch (10.33 KB, patch)
2017-06-02 14:41 PDT, 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 Brent Fulgham 2017-06-02 09:53:34 PDT
The ResourceLoadStatistics data store is not being set to a unique path when running tests, causing multiple processes to interact with the same file on disk. This is causing crashes in the test system.
Comment 1 Chris Dumez 2017-06-02 13:53:25 PDT
<rdar://problem/32442251>
Comment 2 Chris Dumez 2017-06-02 14:41:38 PDT
Created attachment 311863 [details]
Patch
Comment 3 Brent Fulgham 2017-06-02 14:59:09 PDT
Comment on attachment 311863 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=311863&action=review

> Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.cpp:71
> +    configuration->m_resourceLoadStatisticsDirectory = legacyConfiguration.resourceLoadStatisticsDirectory;

Do we need this same change in ProcessPoolConfiguration::createWithLegacyOptions?
Comment 4 Chris Dumez 2017-06-02 15:11:15 PDT
Comment on attachment 311863 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=311863&action=review

>> Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.cpp:71
>> +    configuration->m_resourceLoadStatisticsDirectory = legacyConfiguration.resourceLoadStatisticsDirectory;
> 
> Do we need this same change in ProcessPoolConfiguration::createWithLegacyOptions?

ProcessPoolConfiguration::createWithLegacyOptions() calls ProcessPoolConfiguration::create(), which will call the default constructor of ProcessPoolConfiguration which initializes m_resourceLoadStatisticsDirectory to WebsiteDataStore::defaultResourceLoadStatisticsDirectory() (in my patch). So it looks fine to me. Am I missing something? I don't think we have a legacy path for resource statistics so I assume using the default one is fine?
Comment 5 WebKit Commit Bot 2017-06-02 16:48:54 PDT
Comment on attachment 311863 [details]
Patch

Clearing flags on attachment: 311863

Committed r217743: <http://trac.webkit.org/changeset/217743>
Comment 6 WebKit Commit Bot 2017-06-02 16:48:55 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Brent Fulgham 2017-06-02 17:20:41 PDT
Comment on attachment 311863 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=311863&action=review

>>> Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.cpp:71
>>> +    configuration->m_resourceLoadStatisticsDirectory = legacyConfiguration.resourceLoadStatisticsDirectory;
>> 
>> Do we need this same change in ProcessPoolConfiguration::createWithLegacyOptions?
> 
> ProcessPoolConfiguration::createWithLegacyOptions() calls ProcessPoolConfiguration::create(), which will call the default constructor of ProcessPoolConfiguration which initializes m_resourceLoadStatisticsDirectory to WebsiteDataStore::defaultResourceLoadStatisticsDirectory() (in my patch). So it looks fine to me. Am I missing something? I don't think we have a legacy path for resource statistics so I assume using the default one is fine?

You are right: we have no legacy data to worry about here.