Race condition when clearing cache data via Clear-Site-Data
Categories
(Core :: Networking: Cache, defect, P2)
Tracking
()
People
(Reporter: jesup, Assigned: jesup, NeedInfo)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
Right now Clear-Site-Data: cache has a race condition vs the spec -- because it does a dispatch from MainThread to the Cache IO thread that actually selects entries for eviction (and we can slightly defer when this runs as well), there's a small window where files may not be actually cleared, or where a file that was added after Clear-Site-Data ran on MainThread can be purged.
This bites CompressionDictionary support, which gets called directly to clear dictionaries for the site (to avoid races there), but can end up with a dictionary registered after Clear-Site-Data getting evicted. This can break WPT tests if the timing is just wrong.
Solve this by adding a creation time, and verify that any file we event was created before the time we started the eviction on MainThread
| Assignee | ||
Comment 1•11 months ago
|
||
The spec requires we clear the cache synchronously, effectively.
Updated•11 months ago
|
Updated•8 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Description
•