Closed
Bug 823474
Opened 12 years ago
Closed 7 years ago
Add error handling after attempting to generate crash reporter
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(blocking-basecamp:-)
People
(Reporter: shelly, Unassigned)
References
Details
Attachments
(2 files, 2 obsolete files)
1.46 KB,
patch
|
Details | Diff | Splinter Review | |
3.27 KB,
text/plain
|
Details |
When system detects an abnormal shutdown, it attempts to generate a crash reporter here:
http://mxr.mozilla.org/mozilla-central/source/dom/ipc/ContentParent.cpp#643
Notice that we are assuming the |crashReporter| is always valid, however, if the child process is fail at launching and is dead already, the return value of |GenerateCrashReport| will be false, keep calling methods of this null instance result in a segmentation fault.
Propose: Add an error handling to |crashReporter| here, or maybe somewhere else too.
Reporter | ||
Comment 1•12 years ago
|
||
Reporter | ||
Comment 2•12 years ago
|
||
Compile error fixed.
Attachment #694329 -
Attachment is obsolete: true
Reporter | ||
Comment 3•12 years ago
|
||
This is the call stack when |ActorDestroy| is being called from ContentParent, and program received a signal SIGSEGV, result in a crash due to segmentation fault.
Reporter | ||
Comment 4•12 years ago
|
||
Attachment #695577 -
Attachment is obsolete: true
Comment 5•12 years ago
|
||
noming, as /may/ be a fix for bug 700594 and if it's not then this is yet another stability issue that we want fixed for v1.
blocking-basecamp: --- → ?
Updated•12 years ago
|
blocking-basecamp: ? → +
Hi Shelly, how are you reproducing this bug?
Reporter | ||
Comment 7•12 years ago
|
||
Hi Chris, I found this bug while working on bug 811636, here's a short summary about bug 811636: Child process might die before IPC channel is connected properly, e.g. child process fails at execv() after doing a fork(), and currently we miss to handle such an extreme error case.
The reproduce steps would be the following:
1. Apply the patch from bug 811363.
2. Launch b2g, and kill the Preallocated-app process.
3. Go to system/b2g, rename |plugin-container| to something else, e.g. |plugin-container.2|.
4. Launch any web-app from Homescreen.
Result:
Program received SIGSEGV.
When a SIGCHLD signal is caught and if it's an abnormal exit from a child process, I call |ContentParent->OnChannelError()| to handle this kind of situation. |ActorDestroy()| is then being called from ContentParent, at this point, it tries to generate a crash reporter but fails at |crashReporter->GenerateCrashReport(this, NULL);|.
Reporter | ||
Comment 8•12 years ago
|
||
(In reply to Shelly Lin [:shelly] from comment #7)
> The reproduce steps would be the following:
> 1. Apply the patch from bug 811363.
Typo, should be bug 811636.
Oh my, bug 811636 is very scary. Is this something you've been seeing in the field?
Reporter | ||
Comment 10•12 years ago
|
||
I was reported "If you use up all the system memory, sometimes result in a blank Homescreen (Homescreen app fail to relaunch)". However, I didn't experience the exact fail in person because I never use the b2g aggressively, plus, we lack of such an error log about this kind of situation, at least not on logcat, make it harder to narrow down the cause.
Child processes are launched with the same OOM class as their launcher, and will only use less memory, so the odds of this causing bug 700594 are pretty slim.
Comment 12•12 years ago
|
||
How are things going here, Shelly? Do you need a hand?
Flags: needinfo?(slin)
Updated•12 years ago
|
Target Milestone: --- → B2G C4 (2jan on)
Comment 13•12 years ago
|
||
since this no longer blocks 808607, is this really blocking-basecamp?
blocking-basecamp: + → ?
Reporter | ||
Comment 14•12 years ago
|
||
I've already attached a fix to this bug, if you think it's okay for v1, then I'll add some comments for the change, thanks.
Flags: needinfo?(slin)
Comment 15•12 years ago
|
||
cjones can likely provide comments on the fix.
Flags: needinfo?(jones.chris.g)
The patch here is aiming to fix the issue that caused bug 825976, but I don't think this patch is correct.
In the steps of comment 7, we wouldn't have finished initializing IPC so I'm not sure that we would reach ActorDestroy(). I would expect us to need something like bug 773925 to fix that problem.
Flags: needinfo?(jones.chris.g)
Comment 17•12 years ago
|
||
This won't block basecamp as we can ship without shutdown crashes in v1.
blocking-basecamp: ? → -
Reporter | ||
Updated•10 years ago
|
Assignee: slin → nobody
Comment 18•7 years ago
|
||
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•