Closed
Bug 976430
Opened 11 years ago
Closed 11 years ago
settings DB can become corrupted, triggering startup reboot cycle
Categories
(Core :: Storage: IndexedDB, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: vlad, Unassigned)
Details
I added some code to b2g/chrome/content/settings.js that looked like this:
SettingsListener.observe('b2g.restart-app-magic-pref', false, function(value) {
if (value == true) {
let appStartup = Cc['@mozilla.org/toolkit/app-startup;1']
.getService(Ci.nsIAppStartup);
appStartup.quit(Ci.nsIAppStartup.eForceQuit);
}
});
Upon sending that message from the Gaia Settings app, I do get a restart, but unfortunately the settings db ends up corrupted 9 out of 10 times. Lots of the following appear in the log, and I get a reboot cycle.
I/Gecko ( 4094): Cannot open Settings DB. Trying to open an old version?
E/GeckoConsole( 4094): [JavaScript Error: "IndexedDB UnknownErr: OpenDatabaseHelper.cpp:1790"]
Attached is a zip file with the bad /data/local/storage/persistent/chrome/idb/2588645841ssegtnti* . Just putting these files into place triggers the reboot loop. Note that the databases themselves aren't corrupted; sqlite3 reads them fine, and even if I vacuum and put them back it still triggers the loop. If I remove them and let gecko recreate them, it's fine.
It would be nice if we could handle this, even if just by nuking the db -- an unlucky power failure (battery yanked, power cable pulled, etc.) could soft-brick a phone due to this.
Reporter | ||
Comment 1•11 years ago
|
||
Er, is this because the value of b2g.restart-app-magic-pref is saved as "true"? I bet it is.
1789 if (QuotaManager::IsShuttingDown()) {
1790 IDB_REPORT_INTERNAL_ERR();
1791 return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
1792 }
Flags: needinfo?(Jan.Varga)
(In reply to Vladimir Vukicevic [:vlad] [:vladv] from comment #1)
> Er, is this because the value of b2g.restart-app-magic-pref is saved as
> "true"? I bet it is.
That might do it!
Reporter | ||
Comment 4•11 years ago
|
||
Rewrote code to set back to "false" before restarting. Crisis averted. I blame 1am.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•