WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
215813
syntax error in "DELETE FROM StorageAccessUnderTopFrameDomains"
https://bugs.webkit.org/show_bug.cgi?id=215813
Summary
syntax error in "DELETE FROM StorageAccessUnderTopFrameDomains"
Kate Cheney
Reported
2020-08-25 09:47:58 PDT
This SQLite query error has been appearing in some logging.
Attachments
Patch
(1.79 KB, patch)
2020-08-25 10:00 PDT
,
Kate Cheney
no flags
Details
Formatted Diff
Diff
Patch
(8.13 KB, patch)
2020-08-26 14:00 PDT
,
Kate Cheney
no flags
Details
Formatted Diff
Diff
Patch for landing
(8.45 KB, patch)
2020-08-27 09:19 PDT
,
Kate Cheney
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-08-25 09:58:23 PDT
<
rdar://problem/67743521
>
Kate Cheney
Comment 2
2020-08-25 10:00:32 PDT
Created
attachment 407202
[details]
Patch
Brent Fulgham
Comment 3
2020-08-25 10:14:50 PDT
Comment on
attachment 407202
[details]
Patch Looks good! r=me. Do we have a test for User Interaction expiration? (seems like maybe not?)
Kate Cheney
Comment 4
2020-08-25 10:18:39 PDT
(In reply to Brent Fulgham from
comment #3
)
> Comment on
attachment 407202
[details]
> Patch > > Looks good! r=me. >
Thanks!
> Do we have a test for User Interaction expiration? (seems like maybe not?)
It seems like we don't have one which checks that storage access has been deleted. I filed a radar to add one:
rdar://67744552
.
EWS
Comment 5
2020-08-25 12:24:13 PDT
Found 1 new test failure: http/tests/resourceLoadStatistics/operating-dates-all-but-cookies-removed-statistics-with-no-user-interaction-database.html
Kate Cheney
Comment 6
2020-08-26 14:00:12 PDT
Created
attachment 407336
[details]
Patch
Kate Cheney
Comment 7
2020-08-26 14:01:45 PDT
Looks like this error is occurring in code that should probably just be removed. Fixing the query resulted in incorrect behavior that was previously unnoticed because of the error causing an early return.
John Wilander
Comment 8
2020-08-26 17:31:50 PDT
Comment on
attachment 407336
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=407336&action=review
> Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:-2576 > - clearExpiredUserInteractions();
Since we will no longer clear expired user interactions here, won't the local variable oldestUserInteraction potentially get older than intended timestamps from mostRecentUserInteractionTime and change the if (!parameters().isRunningTest && now - oldestUserInteraction < parameters().minimumTimeBetweenDataRecordsRemoval) logic? Because oldestUserInteraction is updated before the call to shouldRemoveAllWebsiteDataFor() which in turn calls hasHadUnexpiredRecentUserInteraction(). Since the existing code was broken, I don't think we're making an actual change by removing the call to clearExpiredUserInteractions(), but we should acknowledge it in the change log at minimum. We could potentially move the oldestUserInteraction update to later in the loop so that user interaction timestamps have been clear before.
Kate Cheney
Comment 9
2020-08-26 17:48:10 PDT
(In reply to John Wilander from
comment #8
)
> Comment on
attachment 407336
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=407336&action=review
> > > Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:-2576 > > - clearExpiredUserInteractions(); > > Since we will no longer clear expired user interactions here, won't the > local variable oldestUserInteraction potentially get older than intended > timestamps from mostRecentUserInteractionTime and change the if > (!parameters().isRunningTest && now - oldestUserInteraction < > parameters().minimumTimeBetweenDataRecordsRemoval) logic? Because > oldestUserInteraction is updated before the call to > shouldRemoveAllWebsiteDataFor() which in turn calls > hasHadUnexpiredRecentUserInteraction(). Since the existing code was broken, > I don't think we're making an actual change by removing the call to > clearExpiredUserInteractions(), but we should acknowledge it in the change > log at minimum. We could potentially move the oldestUserInteraction update > to later in the loop so that user interaction timestamps have been clear > before.
Isn't the point of that local variable to take into account that expired statistics might need a little more time for users to interact with a website before removing non-cookie website data? So shouldn't we include the expired statistics in that calculation? Potentially I am misunderstanding.
Kate Cheney
Comment 10
2020-08-27 09:19:29 PDT
Created
attachment 407410
[details]
Patch for landing
Kate Cheney
Comment 11
2020-08-27 09:19:55 PDT
Landing this to fix the SQLite error and because we know the code isn’t doing anything right now. I added a comment in the ChangeLog explaining why we should not clear expired statistics before setting oldestUserInteraction, it would mean that now - oldestUserInteraction would almost always be equal to now, because clearing expired statistics sets the mostRecentUserInteraction time to 0, so we would always clear non-cookie website data without giving the extra time for user interaction.
EWS
Comment 12
2020-08-27 09:47:03 PDT
Committed
r266237
: <
https://trac.webkit.org/changeset/266237
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 407410
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug