Closed
Bug 777185
Opened 13 years ago
Closed 13 years ago
Hook up content process crash reporting for B2G
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(blocking-basecamp:+, firefox18 fixed)
People
(Reporter: ted, Assigned: hub)
References
Details
(Keywords: feature, Whiteboard: [WebAPI:P0][LOE:S])
Attachments
(1 file, 2 obsolete files)
1.68 KB,
patch
|
fabrice
:
review+
|
Details | Diff | Splinter Review |
For content process crash reporting, the parent process will have to listen to an observer service notification and submit a report based on the ID it receives.
This code was all hooked up in XUL Fennec, so you can probably just copy what it did.
![]() |
||
Comment 1•13 years ago
|
||
https://github.com/mozilla-b2g/gaia/issues/2283 also has some discussion surrounding this.
![]() |
||
Updated•13 years ago
|
blocking-basecamp: --- → ?
Updated•13 years ago
|
blocking-basecamp: ? → +
Ted: Who do you think could do this? Could you or bsmedberg?
Assigning to Ted for now.
Assignee: nobody → ted.mielczarek
Reporter | ||
Comment 3•13 years ago
|
||
Not me, no. I don't know anything about the B2G chrome and I'm tied up in other work at the moment. It should be mostly copy-paste from the XUL fennec code.
Assignee: ted.mielczarek → nobody
Updated•13 years ago
|
Whiteboard: [WebAPI:P0]
Assignee | ||
Updated•13 years ago
|
Whiteboard: [WebAPI:P0] → [WebAPI:P0][LOE:S]
Assignee | ||
Comment 5•13 years ago
|
||
This is my current priority. Working on it.
Assignee | ||
Comment 6•13 years ago
|
||
It seems that we don't get a dumpID in case of abnormal termination. The dump file are there though.
I'm on PTO from now until Oct 19th. I will possibly have downtime to look at it, but if you really want to finish the patch before that, please, re-assign.
Assignee | ||
Comment 7•13 years ago
|
||
Fixed and working patch.
I don't think I'll be able to commit this before Monday. I'll do my best, luckily being on Paris it should be easier.
Attachment #668686 -
Attachment is obsolete: true
Attachment #668844 -
Flags: review?(fabrice)
Attachment #668844 -
Flags: feedback?(ted.mielczarek)
Comment 8•13 years ago
|
||
Comment on attachment 668844 [details] [diff] [review]
Bug 777185 - Hookup content process crash reporting.
Review of attachment 668844 [details] [diff] [review]:
-----------------------------------------------------------------
I want to be sure of the potential QI issue.
::: b2g/chrome/content/shell.js
@@ +85,4 @@
> try {
> + if (crashID == undefined || crashID == "")
> + crashID = Cc["@mozilla.org/xre/app-info;1"]
> + .getService(Ci.nsIXULRuntime).lastRunCrashID;
Nit: align .getService() with [
@@ +786,3 @@
> (function contentCrashTracker() {
> Services.obs.addObserver(function(aSubject, aTopic, aData) {
> if(aTopic == "ipc:content-shutdown") {
That test is useless since we only register for this topic. Let's remove it.
@@ +786,5 @@
> (function contentCrashTracker() {
> Services.obs.addObserver(function(aSubject, aTopic, aData) {
> if(aTopic == "ipc:content-shutdown") {
> + let cs = Cc["@mozilla.org/consoleservice;1"]
> + .getService(Ci.nsIConsoleService);
Nit: indentation
@@ +791,5 @@
> + cs.logStringMessage("content-shutdown has been caught");
> +
> + if (aSubject.QueryInterface(Ci.nsIPropertyBag2).hasKey("abnormal")) {
> + cs.logStringMessage("abnormal shutdown");
> + if (aSubject.hasKey("dumpID")) {
don't you need to QI here also? Storing aSubject.QueryInterface(Ci.nsIPropertyBag2) in a local would make it clearer to me.
Attachment #668844 -
Flags: review?(fabrice) → review-
Assignee | ||
Comment 9•13 years ago
|
||
Comment on attachment 668844 [details] [diff] [review]
Bug 777185 - Hookup content process crash reporting.
Review of attachment 668844 [details] [diff] [review]:
-----------------------------------------------------------------
::: b2g/chrome/content/shell.js
@@ +791,5 @@
> + cs.logStringMessage("content-shutdown has been caught");
> +
> + if (aSubject.QueryInterface(Ci.nsIPropertyBag2).hasKey("abnormal")) {
> + cs.logStringMessage("abnormal shutdown");
> + if (aSubject.hasKey("dumpID")) {
It does not seem to be necessary to QI the second time. BUT, I'm ok with use a local. Will update with that change.
Assignee | ||
Comment 10•13 years ago
|
||
addressed comments
Attachment #668844 -
Attachment is obsolete: true
Attachment #668844 -
Flags: feedback?(ted.mielczarek)
Attachment #669427 -
Flags: review?(fabrice)
Attachment #669427 -
Flags: feedback?
Assignee | ||
Updated•13 years ago
|
Attachment #669427 -
Flags: feedback? → feedback?(ted.mielczarek)
Comment 11•13 years ago
|
||
Comment on attachment 669427 [details] [diff] [review]
Bug 777185 - Hookup content process crash reporting.
Review of attachment 669427 [details] [diff] [review]:
-----------------------------------------------------------------
::: b2g/chrome/content/shell.js
@@ +788,5 @@
> + let cs = Cc["@mozilla.org/consoleservice;1"]
> + .getService(Ci.nsIConsoleService);
> + let props = aSubject.QueryInterface(Ci.nsIPropertyBag2);
> + if (props.hasKey("abnormal")) {
> + if (props.hasKey("dumpID")) {
nit: if (props.hasKey("abnormal") && props.hasKey("dumpID")) {
...
}
Attachment #669427 -
Flags: review?(fabrice) → review+
Assignee | ||
Updated•13 years ago
|
Attachment #669427 -
Flags: feedback?(ted.mielczarek)
Assignee | ||
Comment 12•13 years ago
|
||
![]() |
||
Comment 13•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 14•13 years ago
|
||
status-firefox18:
--- → fixed
![]() |
||
Comment 15•13 years ago
|
||
So, I think this is working, given those two reports I have seen from unagi devices:
bp-62664bb5-3295-441b-8a04-d379d2121016 and bp-a4035b13-3470-4fb1-b282-aa28b2121016
Assignee | ||
Comment 16•13 years ago
|
||
Excellent !!!!
You need to log in
before you can comment on or make changes to this bug.
Description
•