Closed
Bug 821710
Opened 13 years ago
Closed 13 years ago
Send the tab URL for B2G browser content crashes
Categories
(Firefox OS Graveyard :: General, defect, P3)
Tracking
(blocking-basecamp:+, firefox19 wontfix, firefox20 wontfix, firefox21 fixed, b2g18 fixed)
People
(Reporter: kairo, Assigned: cjones)
References
Details
Attachments
(2 files)
2.97 KB,
patch
|
ted
:
review+
|
Details | Diff | Splinter Review |
732 bytes,
patch
|
cjones
:
review+
|
Details | Diff | Splinter Review |
Bug 806515 is implementing the sending of the app origin with crash reports for processes that run an app, I'm splitting off to this bug the part about sending the currently active URL of crashing tab processes in the browser.
I hope that should complete us sending useful info in the URL field of all B2G content processes - or do we have others?
![]() |
Reporter | |
Updated•13 years ago
|
Blocks: b2g-crash-reporting
Comment 1•13 years ago
|
||
This bug (or something like it) may be necessary in order for us to distinguish between crashes in browser process and crashes in the main process. See bug 824658 comment 19.
blocking-basecamp: --- → ?
Comment 2•13 years ago
|
||
Please don't use the same field ("URL") for the browser's current URI and the app's manifest URI. That would be confusing, because it would give us no way to filter between app process crashes and browser process crashes.
Note also that a browser process may have multiple current URIs. At the moment we have one TabChid per browser process, but that may change. You should iterate over all the crashed ContentParent's TabParents and find their URIs (which you may have to send up to the parent; I'm not sure they're there at the moment).
Updated•13 years ago
|
blocking-basecamp: ? → +
Priority: -- → P3
Target Milestone: --- → B2G C3 (12dec-1jan)
Updated•13 years ago
|
Assignee: nobody → dale
Assignee | ||
Comment 3•13 years ago
|
||
(In reply to Justin Lebar [:jlebar] (away 12/21-1/2) from comment #1)
> This bug (or something like it) may be necessary in order for us to
> distinguish between crashes in browser process and crashes in the main
> process. See bug 824658 comment 19.
Main process crashes have the module "b2g" loaded, and browser processes have "plugin-container" loaded.
![]() |
Reporter | |
Comment 4•13 years ago
|
||
We also have the process type field that tells us easily what's a content process and what is the main process crashing, we don't need those workarounds for that.
Assignee | ||
Comment 5•13 years ago
|
||
(In reply to Justin Lebar [:jlebar] (away 12/21-1/2) from comment #2)
> Note also that a browser process may have multiple current URIs. At the
> moment we have one TabChid per browser process, but that may change. You
> should iterate over all the crashed ContentParent's TabParents and find
> their URIs (which you may have to send up to the parent; I'm not sure
> they're there at the moment).
We can have multiple tabchilds because of popups.
But in desktop, we just send the most-recently-navigated URI. I think that code will sort of accidentally Just Work even in remote browser processes with multiple tabs.
![]() |
Reporter | |
Comment 6•13 years ago
|
||
(In reply to Justin Lebar [:jlebar] (away 12/21-1/2) from comment #2)
> You
> should iterate over all the crashed ContentParent's TabParents and find
> their URIs (which you may have to send up to the parent; I'm not sure
> they're there at the moment).
We should always send only one URL, as that's all that our analysis supports. As comment #5 explains, we send the most recently navigated URI on desktop or mobile right now, if we have multiple URLs, we should do the same. In most cases, that's enough for analysis.
Assignee | ||
Comment 7•13 years ago
|
||
I think this should already be working. Let me check right quick.
Assignee | ||
Comment 8•13 years ago
|
||
bp-9a5a5ec5-c453-46d2-9999-c9de62121227 --- nope. *scratches head*
http://mxr.mozilla.org/mozilla-central/source/toolkit/crashreporter/nsExceptionHandler.cpp#292
294 static const char* kSubprocessBlacklist[] = {
295 "FramePoisonBase",
296 "FramePoisonSize",
297 "StartupTime",
298 "URL"
299 };
Whups!
Comment 9•13 years ago
|
||
cjones? does that just mean we need to remove the url field from the blacklist to get this fixed?
And how do I force a crash so I can test this out?
Comment 10•13 years ago
|
||
> And how do I force a crash so I can test this out?
$ adb shell
# b2g-ps
# kill -9 pid-of-browser-process
Comment 11•13 years ago
|
||
(In reply to Dale Harvey (:daleharvey) from comment #9)
> cjones? does that just mean we need to remove the url field from the
> blacklist to get this fixed?
I don't think that's the best solution, since it could be prone to races based on whichever caller happened to set the annotation last. I suspect it would be better to have TabParent actors set the annotation correctly in ActorDestroy, and ensure that ContentParent doesn't overwrite it.
Assignee | ||
Comment 12•13 years ago
|
||
The original problem that motivated the blacklist is that plugin subprocesses crash and generate crash reports, but those reports would also pick up annotations from the parent process. We want most of those parent-process annotations, except the ones in the blacklist.
For content processes however, all these annotations are supplied by the content process and are useful. (Except probably StartupTime ...) So we need to ensure that the annotations provided by the content processes "override" the ones from the parent process, and that we don't apply the blacklist when writing the .extra file.
Comment 13•13 years ago
|
||
The solution seems like a platform bug. Moving to General.
Component: Gaia::Browser → General
QA Contact: nhirata.bugzilla
Updated•13 years ago
|
Target Milestone: B2G C3 (12dec-1jan) → B2G C4 (2jan on)
Updated•13 years ago
|
Assignee: dale → nobody
Assignee | ||
Comment 14•13 years ago
|
||
Two things seem to be happening here
- the Annotate() function being used by CrashReporterParent seems to be bypassing the child-process blacklist. Whups.
- the code added by bug 806515 is unconditionally stomping the "URL" annotation with mAppManifestURL. For "browser" processes, this will be the empty string.
So even though browser processes (should) already be annotating the URL correctly, and that annotation shouldn't be filtered by the blacklist, it will be stomped by the code in bug 806515.
Assignee | ||
Comment 15•13 years ago
|
||
So it turns out the frontend is responsible for annotating URL in the common case. This patch lets TabChild serve that role in a simple way.
This also prefers the manual app-manifest annotation over whichever URI happened to have been loaded last in an app process.
Assignee: nobody → jones.chris.g
Attachment #698077 -
Flags: review?(ted)
Assignee | ||
Comment 16•13 years ago
|
||
Kill browser process
URL=http://www.bing.com/
killing dialer process
URL=app://communications.gaiamobile.org/manifest.webapp
![]() |
Reporter | |
Comment 17•13 years ago
|
||
The UI process of the browser app still sends it app manifest, though, right?
Assignee | ||
Comment 18•13 years ago
|
||
The browser UI runs in-process.
![]() |
Reporter | |
Comment 19•13 years ago
|
||
(In reply to Chris Jones [:cjones] [:warhammer] from comment #18)
> The browser UI runs in-process.
Ah, OK.
Comment 20•13 years ago
|
||
Comment on attachment 698077 [details] [diff] [review]
Send the URL along with "browser" process crashes
Review of attachment 698077 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/ipc/ContentParent.cpp
@@ +716,5 @@
> + // loaded in the child process with our manifest URL. We
> + // would rather associate the crashes with apps than
> + // random child windows loaded in them.
> + //
> + // XXX would be nice if we could get both ...
If you want both, file a followup to send the manifest URL in a separate annotation. We'd have to hook up some Socorro UI to display it (which is probably why URL was used here), but that would let you get the actual URL that's loaded out of webapps, which would be nice.
Attachment #698077 -
Flags: review?(ted) → review+
![]() |
Reporter | |
Comment 21•13 years ago
|
||
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #20)
> If you want both, file a followup to send the manifest URL in a separate
> annotation. We'd have to hook up some Socorro UI to display it (which is
> probably why URL was used here), but that would let you get the actual URL
> that's loaded out of webapps, which would be nice.
It would probably take us a few months to get such an additional field displayed in the Socorro UI (judging by how much is on their plans and the current state of Socorro UI development), and we'd need to change the desktop and mobile WebRT implementations to also send the app origin/manifest in the new field, or else we'd be heavily inconsistent in how we send that info across products.
We can revisit this later, but for at least v1.x of FxOS, I heavily prefer the current state of having this in the UI field as that gives us at least the chance to have decent crash analysis via Socorro.
Comment 22•13 years ago
|
||
Comment 23•13 years ago
|
||
This changeset appears to have broken the Android build on Mac:
/Users/dmose/r/inbound/src/dom/ipc/TabChild.cpp:33:32: fatal error: nsExceptionHandler.h: No such file or directory
I have --disable-crashreporter in my mozconfig, because <https://wiki.mozilla.org/Mobile/Fennec/Android#Setup_Fennec_mozconfig> says this is required.
Comment 24•13 years ago
|
||
Attachment #698809 -
Flags: review?(jst)
Assignee | ||
Updated•13 years ago
|
Attachment #698809 -
Flags: review?(jst) → review+
Comment 25•13 years ago
|
||
Thanks for the quick review, Chris. Landed on mozilla-inbound:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9de5e35606d2
Comment 26•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 27•13 years ago
|
||
Comment 28•13 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g18/rev/12da69f9e88a
https://hg.mozilla.org/releases/mozilla-b2g18/rev/245231194d06
status-b2g18:
--- → fixed
status-firefox19:
--- → wontfix
status-firefox20:
--- → wontfix
status-firefox21:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•