Closed
Bug 1173356
Opened 9 years ago
Closed 9 years ago
Total failure to persist browser.db state across relaunches
Categories
(Firefox for iOS :: Data Storage, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: sleroux, Assigned: rnewman)
References
Details
Attachments
(2 files)
STR: 1. Launch app with code from latest master in Xcode onto iOS simulator (https://github.com/mozilla/firefox-ios/commit/1763aed1292e841ae5121ac03d3d7b0cfc2d3327) 2. Navigate to a few websites to populate the history 3. Re-run the application from Xcode 4. Previous history doesn't show up anymore
Reporter | ||
Updated•9 years ago
|
Flags: needinfo?(rnewman)
Reporter | ||
Updated•9 years ago
|
tracking-fennec: --- → ?
tracking-fxios:
--- → ?
Assignee | ||
Updated•9 years ago
|
Component: Home screen → Data Storage
Hardware: Other → All
Reporter | ||
Comment 2•9 years ago
|
||
I just reproduced this in my simulator. Here's the console log: [DEBUG] Did open IPv4 listening socket 6 [DEBUG] Did open IPv6 listening socket 7 [INFO] GCDWebServer started on port 53591 and reachable at http://localhost:53591/ 2015-06-10 11:24:17.257 [Debug] [BrowserDB.swift:65] init(files:): Initializing BrowserDB. 2015-06-10 11:24:17.258 [Debug] [BrowserDB.swift:124] createOrUpdate: Create or update tableList version 1. 2015-06-10 11:24:17.259 [Debug] [BrowserDB.swift:78] createTable(_:table:): Try create tableList version 1 2015-06-10 11:24:17.260 [Debug] [BrowserDB.swift:124] createOrUpdate: Create or update logins version 1. 2015-06-10 11:24:17.260 [Debug] [SQLiteLogins.swift:55] exists: 0 logins tables exist. 2015-06-10 11:24:17.260 [Debug] [BrowserDB.swift:78] createTable(_:table:): Try create logins version 1 2015-06-10 11:24:17.261 Client[57051:2996286] Warning: Unable to create restoration in progress marker file 2015-06-10 11:24:17.282 [Debug] [BrowserDB.swift:124] createOrUpdate: Create or update favicons version 0. 2015-06-10 11:24:17.282 [Debug] [BrowserDB.swift:78] createTable(_:table:): Try create favicons version 0 2015-06-10 11:24:17.282 [Info] [BrowserTable.swift:64] init(): SQLite version: 3.8.5 (3008005). 2015-06-10 11:24:17.282 [Debug] [BrowserDB.swift:124] createOrUpdate: Create or update BROWSER version 4. 2015-06-10 11:24:17.283 [Debug] [BrowserTable.swift:248] exists: 0 tables exist. Expected 4 2015-06-10 11:24:17.283 [Debug] [BrowserDB.swift:78] createTable(_:table:): Try create BROWSER version 4 2015-06-10 11:24:17.362 [Debug] [Profile.swift:341] beginTimedHistorySync(): Starting history sync timer. [DEBUG] Did open connection on socket 14 [DEBUG] Did connect [DEBUG] Did start background task [DEBUG] Connection received 350 bytes on socket 14 [DEBUG] Connection aborted with status code 405 on socket 14 [DEBUG] Connection sent 113 bytes on socket 14 [DEBUG] Did close connection on socket 14 [VERBOSE] [::1c1e:d158:0:0:53591] ::314f:d0dc:a79c:ed:53592 405 "GET /about/home/" (350 | 113) 2015-06-10 11:24:17.598 [Debug] [Profile.swift:170] onLocationChange: Ignoring navigation for nil. [DEBUG] Did open connection on socket 17 DEBUG: readerModeMessageHandler message: { Type = ReaderModeStateChange; Value = Unavailable; } [DEBUG] Connection received 311 bytes on socket 17 2015-06-10 11:24:17.611 [Debug] [BrowserViewController.swift:1497] readerMode(_:didChangeRead[DEBUG] Connection aborted with status code 405 on socket 17 erModeState:forBrowser:): New readerModeState: Unavailable [DEBUG] Connection sent 113 bytes on socket 17 [DEBUG] Did close connection on socket 17 [VERBOSE] [::1c1e:d159:0:0:53591] ::314f:d0dc:a79c:ed:53593 405 "GET /favicon.ico" (311 | 113) [DEBUG] Did disconnect [DEBUG] Did end background task
Assignee | ||
Comment 3•9 years ago
|
||
The DB tables aren't persisting across restarts. Which is weird. Can you grab your browser.db out of the Simulator and run PRAGMA integrity_check? Suggestions: * We should explicitly WAL checkpoint after a createOrUpdate in BrowserTable. * We should explicitly sqlite3_finalize our statements, rather than doing it in a deinit. The sooner that gets started, the less likely we'll miss a finalize due to an app kill.
Updated•9 years ago
|
tracking-fennec: ? → +
Updated•9 years ago
|
Assignee: nobody → rnewman
Reporter | ||
Comment 5•9 years ago
|
||
I attached the profile I have along with browser.db you were looking for. Also ran integrity_check on it: sqlite> PRAGMA integrity_check; ok
Flags: needinfo?(sleroux)
Comment 6•9 years ago
|
||
Looks like the tablelist isn't being created...
Assignee | ||
Comment 7•9 years ago
|
||
12:31:21 <@rnewman> sleroux: opening browser.db causes the WAL to replay, so it jumps to 76KB 12:31:26 <@rnewman> and all the tables are there This looks totally valid when opened locally.
Assignee | ||
Comment 8•9 years ago
|
||
Full WAL checkpointing doesn't help. This isn't limited to history, either: 2015-06-10 13:02:29.062 [Debug] [BrowserDB.swift:72] init(files:): Initializing BrowserDB. 2015-06-10 13:02:29.065 [Debug] [BrowserDB.swift:134] createOrUpdate: Create or update tableList version 1. 2015-06-10 13:02:29.067 [Debug] [BrowserDB.swift:85] createTable(_:table:): Try create tableList version 1 2015-06-10 13:02:29.068 [Debug] [SwiftData.swift:119] transaction: Op in transaction succeeded. Committing. 2015-06-10 13:02:29.069 [Debug] [BrowserDB.swift:134] createOrUpdate: Create or update logins version 1. 2015-06-10 13:02:29.069 [Debug] [SQLiteLogins.swift:55] exists: 0 logins tables exist. 2015-06-10 13:02:29.070 [Debug] [BrowserDB.swift:85] createTable(_:table:): Try create logins version 1 2015-06-10 13:02:29.070 [Debug] [SwiftData.swift:119] transaction: Op in transaction succeeded. Committing. ... so for some reason on relaunch the DB is just blank.
Summary: History being cleared whenever re-running the application → Total failure to persist browser.db state across relaunches
Assignee | ||
Comment 9•9 years ago
|
||
Somehow we're getting .bak files created when setup seems to complete.
Assignee | ||
Comment 10•9 years ago
|
||
Inside-out bugfixing: this fixes the SQL, and adds logging that would have shown the bug.
Attachment #8620728 -
Flags: review?(wjohnston)
Attachment #8620728 -
Flags: review?(sleroux)
Assignee | ||
Comment 11•9 years ago
|
||
Stefan: if Bug 1171732 got into Build 20, we'll need to respin a Build 21.
Flags: needinfo?(sarentz)
Comment 12•9 years ago
|
||
Comment on attachment 8620728 [details] [review] Pull req. Doh. Thanks.
Attachment #8620728 -
Flags: review?(wjohnston) → review+
Reporter | ||
Comment 13•9 years ago
|
||
Comment on attachment 8620728 [details] [review] Pull req. Looks good! Works on my simulator and device now.
Attachment #8620728 -
Flags: review?(sleroux) → review+
Assignee | ||
Comment 14•9 years ago
|
||
https://github.com/mozilla/firefox-ios/commit/acfe2dcd4ec9a2f1bc0faea9fb35fc273defbd82
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•