Closed
Bug 1124126
Opened 9 years ago
Closed 9 years ago
[FFOS7715 v2.1] permissions.sqlite might be corrupted during power off test
Categories
(Firefox OS Graveyard :: Stability, defect)
Tracking
(blocking-b2g:2.1S+, firefox39 wontfix, firefox40 wontfix, firefox41 fixed, b2g-v2.1 fixed, b2g-v2.1S fixed, b2g-v2.2 fixed, b2g-master fixed)
People
(Reporter: rhung, Assigned: rhung)
References
Details
Attachments
(4 files, 8 obsolete files)
4.00 KB,
application/x-sqlite3
|
Details | |
4.09 KB,
patch
|
Details | Diff | Splinter Review | |
4.89 KB,
patch
|
jocheng
:
approval-mozilla-b2g37+
|
Details | Diff | Splinter Review |
4.05 KB,
patch
|
jocheng
:
approval-mozilla-b2g34+
|
Details | Diff | Splinter Review |
When running power off test, permissions.sqlite might be corrupted when creating the table(moz_hosts). Currently, there is no error handling or permissions.sqlite and table re-creation, so the file keeps corrupted in subsequent reboot and app permissions are never be loaded to it successfully.
Assignee | ||
Updated•9 years ago
|
blocking-b2g: --- → 2.1S?
Updated•9 years ago
|
Assignee: nobody → rhung
Assignee | ||
Comment 2•9 years ago
|
||
Create a patch as attachment to delete and re-create /data/local/permissions.sqlite when it is corrupted already.
Assignee | ||
Comment 3•9 years ago
|
||
Update patch files as attachment to confirm the creation of permissions.sqlite and table.
Assignee | ||
Comment 4•9 years ago
|
||
Update a patch with more debug information.
Assignee | ||
Comment 5•9 years ago
|
||
Hi, Fabrice, Could you help to review this patch or forward it to proper owners? Thank you.
Flags: needinfo?(fabrice)
Attachment #8579185 -
Flags: review?(fabrice)
Updated•9 years ago
|
Flags: needinfo?(fabrice)
Comment 6•9 years ago
|
||
Comment on attachment 8579185 [details] [diff] [review] Bug-1124126-Retry-database-connection-for-the-case-o.patch Review of attachment 8579185 [details] [diff] [review]: ----------------------------------------------------------------- Redirecting to Benjamin since he seems to have reviewed some of the recents changes there.
Attachment #8579185 -
Flags: review?(fabrice) → review?(benjamin)
Comment 7•9 years ago
|
||
Comment on attachment 8579185 [details] [diff] [review] Bug-1124126-Retry-database-connection-for-the-case-o.patch I like where this is going, however I don't think we should be dumping to stderr for this sort of thing. There are two things we should be doing for these kinds of errors: * sending a console message so that it appears in the browser console * sending a telemetry probe That should happen both with generic InitDB failure and in the specific case of NS_ERROR_FILE_CORRUPTED.
Attachment #8579185 -
Flags: review?(benjamin) → review-
Assignee | ||
Comment 8•9 years ago
|
||
Hi, Benjamin, Thank you for your comments. The reason why using "printf_stderr" is because I can check if DB initialization is failed via adb logs(adb logcat) for the case of b2g. If using the two ways you mentioned at comment#7, could you let me know how to check this DB init failure for the case of b2g?
Flags: needinfo?(benjamin)
Comment 9•9 years ago
|
||
I don't know b2g code that well, but presumably the remote debugger has access to the console messages. The point of telemetry is that we can count these errors in the field: I don't know whether B2G has telemetry enabled or not.
Flags: needinfo?(benjamin)
Assignee | ||
Comment 10•9 years ago
|
||
Hi, Benjamin, I have revised my patch according to comment 9, could you help to take a look at my patch? About the telemetry, I found that it is not enabled by default for all projects. In dolphin 2.1s, it is not enabled, but it is enabled in flame master branch. However, I still add a telemetry probe for generic InitDB failure since it is a common bug both for B2G and firefox browser.
Attachment #8579185 -
Attachment is obsolete: true
Attachment #8595782 -
Flags: review?(benjamin)
Comment 11•9 years ago
|
||
Comment on attachment 8595782 [details] [diff] [review] Bug-1124126-Retry-database-connection-for-the-case-of-corrupted-DB-file.patch This patch records telemetry/log if InitDB fails completely. But it doesn't record the case where the initial OpenDatabase fails but the subsequent remove/OpenDatabase succeeds. Which means that if we throw away the user's permissions, we won't notice. Can we log and measure the initial failure case also?
Flags: needinfo?(rhung)
Assignee | ||
Comment 12•9 years ago
|
||
Hi, Benjamin, Agree on your points. Besides, I think it would be better to focus on the recovery of a corrupted permissions.sqlite in this bug. So, I have revised the patch considerably again. Could you take a look to the patch? The patch focus on the recovery of corrupted permissions.sqlite and recording related information in console messages and telemetry if it is still failed, instead of handling the case of InitDB fails completely. Furthermore, the patch also records the message about remove/OpenDatabase succeed and a DB connection is established successfully to the valid permissions.sqlite.
Attachment #8595782 -
Attachment is obsolete: true
Attachment #8595782 -
Flags: review?(benjamin)
Flags: needinfo?(rhung) → needinfo?(benjamin)
Assignee | ||
Comment 13•9 years ago
|
||
Attachment #8599156 -
Attachment is obsolete: true
Attachment #8599160 -
Flags: review?(benjamin)
Comment 14•9 years ago
|
||
Comment on attachment 8599160 [details] [diff] [review] Bug-1124126-Retry-database-connection-for-the-case-of-corrupted-DB-file.patch This looks good, but I'd like another telemetry probe to count "Defective permissions.sqlite has been removed".
Flags: needinfo?(benjamin)
Attachment #8599160 -
Flags: review?(benjamin) → feedback+
Assignee | ||
Comment 15•9 years ago
|
||
Hi, Benjamin, I have revised my patch again according to comment 14. Could you have a look to the patch? Thank you.
Attachment #8599160 -
Attachment is obsolete: true
Flags: needinfo?(benjamin)
Attachment #8606899 -
Flags: review?(benjamin)
Updated•9 years ago
|
Flags: needinfo?(benjamin)
Attachment #8606899 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 16•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=a121822965bc
Assignee | ||
Comment 17•9 years ago
|
||
Addressed reviewer comment carry r+.
Attachment #8606899 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Assignee | ||
Updated•9 years ago
|
Attachment #8554379 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Attachment #8563859 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Attachment #8571226 -
Attachment is obsolete: true
Assignee | ||
Comment 18•9 years ago
|
||
NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings. [Approval Request Comment] Bug caused by (feature/regressing bug #): Potential bug. User impact if declined: Device cannot boot up under some conditions. Testing completed: Pass monkey test locally Risk to taking this patch (and alternatives if risky): Low, only retry DB file creation when it is corrupted. String or UUID changes made by this patch: None
Attachment #8608524 -
Flags: approval-mozilla-b2g37?
Assignee | ||
Comment 19•9 years ago
|
||
NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings. [Approval Request Comment] Bug caused by (feature/regressing bug #): Potential bug. User impact if declined: Device cannot boot up under some conditions. Testing completed: Pass monkey test locally. Risk to taking this patch (and alternatives if risky): Low, only retry DB file creation when it is corrupted. String or UUID changes made by this patch: None
Attachment #8608527 -
Flags: approval-mozilla-b2g34?
Comment 20•9 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/d28b6a36dfee
Keywords: checkin-needed
Updated•9 years ago
|
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Updated•9 years ago
|
Attachment #8608527 -
Flags: approval-mozilla-b2g34? → approval-mozilla-b2g34+
Updated•9 years ago
|
Attachment #8608524 -
Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
Updated•9 years ago
|
status-b2g-v2.1:
--- → affected
status-b2g-v2.1S:
--- → affected
status-b2g-v2.2:
--- → affected
status-b2g-master:
--- → affected
Comment 21•9 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/fd7b06b22d00 https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/23203116eac3
https://hg.mozilla.org/mozilla-central/rev/d28b6a36dfee
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S13 (29may)
You need to log in
before you can comment on or make changes to this bug.
Description
•