WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
201002
Try to recover nicely when getting an unexpected schema in the service workers database
https://bugs.webkit.org/show_bug.cgi?id=201002
Summary
Try to recover nicely when getting an unexpected schema in the service worker...
Chris Dumez
Reported
2019-08-21 15:35:28 PDT
Try to recover nicely when getting an unexpected schema in the service workers database instead of crashing the network process.
Attachments
Patch
(9.55 KB, patch)
2019-08-21 15:38 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(11.32 KB, patch)
2019-08-21 15:49 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(13.13 KB, patch)
2019-08-22 12:03 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(13.13 KB, patch)
2019-08-22 12:31 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2019-08-21 15:35:47 PDT
<
rdar://problem/54574991
>
Chris Dumez
Comment 2
2019-08-21 15:38:08 PDT
Created
attachment 376935
[details]
Patch
Chris Dumez
Comment 3
2019-08-21 15:49:25 PDT
Created
attachment 376941
[details]
Patch
youenn fablet
Comment 4
2019-08-22 00:54:42 PDT
Comment on
attachment 376941
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=376941&action=review
> Source/WebCore/workers/service/server/RegistrationDatabase.cpp:173 > + openSQLiteDatabase(fullFilename);
It seems a bit strange to be able to recover ensureValidRecordsTable but not importRecords error. An error in importRecords is probably unrecoverable as well. In that case, we currently proceed with zero registration but we will no longer be able to push changes since push changes try to import before pushing changes. m_database->open error cases seem more difficult. Some error cases are recoverable (process suspension) but others are probably not recoverable. It might be safer to not flush it for now. We could cover all these cases by calling SQLiteFileSystem::deleteDatabaseFile(fullFilename) in scopeExit conditionally on a boolean storing whether recoverable or not. As a side note, it seems that if process suspension happens exactly at the time we try to open the database to import the service worker registrations, we will load zero registrations. Then, when being unsuspended, we will consider that there are zero registrations. At the first push change, we will import the registrations before pushing the changes. I am not sure this code path is correct. Maybe we should make sure to restart import at unsuspension time.
Chris Dumez
Comment 5
2019-08-22 12:03:49 PDT
Created
attachment 377032
[details]
Patch
Chris Dumez
Comment 6
2019-08-22 12:31:48 PDT
Created
attachment 377034
[details]
Patch
WebKit Commit Bot
Comment 7
2019-08-22 16:28:52 PDT
Comment on
attachment 377034
[details]
Patch Clearing flags on attachment: 377034 Committed
r249035
: <
https://trac.webkit.org/changeset/249035
>
WebKit Commit Bot
Comment 8
2019-08-22 16:28:53 PDT
All reviewed patches have been landed. Closing bug.
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