Closed
Bug 835563
Opened 11 years ago
Closed 11 years ago
When Gaia does setVisible(false), send the relevant process into the background immediately
Categories
(Firefox OS Graveyard :: General, defect)
Firefox OS Graveyard
General
Tracking
(blocking-b2g:tef+, firefox19 wontfix, firefox20 wontfix, firefox21 fixed, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 fixed)
People
(Reporter: justin.lebar+bug, Assigned: justin.lebar+bug)
References
Details
(Whiteboard: QARegressExclude)
Attachments
(1 file, 1 obsolete file)
8.81 KB,
patch
|
cjones
:
review+
|
Details | Diff | Splinter Review |
cjones and I think this is necessary to prevent edge cases where we receive a call and then kill the phone app due to low memory. In that sense, this blocks bug 834059, and I'm going to assume that patches here do not need additional approval to land. I have a patch which I'm testing now.
Assignee | ||
Comment 1•11 years ago
|
||
I think the membuster testcase [1] is killing the homescreen because the browser apparently does not setVisibile(false) tabs until it finishes taking a screenshot. At least, that's how I understand the code. [1] http://people.mozilla.com/~cjones/membuster.html
Assignee | ||
Comment 2•11 years ago
|
||
Separately, Gaia sends /every window into the background when it's first created/. :(
In window_manager.js::appendFrame()
> // A frame should start with visible false
> if ('setVisible' in iframe)
> iframe.setVisible(false);
So the suggested patch here kills the phone when it starts up, with current Gaia.
Assignee | ||
Comment 3•11 years ago
|
||
> So the suggested patch here kills the phone when it starts up, with current Gaia.
I should say, when we're under memory pressure.
Assignee | ||
Comment 4•11 years ago
|
||
I filed bug 835795 on the Gaia issue. It of course blocks any Gecko patch here.
Assignee | ||
Comment 5•11 years ago
|
||
Switching the ProcessPriorityManager to using the docshell's visibility was necessary because the document's visibility gets updated asynchronously.
Attachment #707647 -
Flags: review?(jones.chris.g)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → justin.lebar+bug
Assignee | ||
Comment 6•11 years ago
|
||
Comment on attachment 707647 [details] [diff] [review] Patch, v1 I'm having a lot of difficulty fixing the requisite issues in Gaia, so I believe less in this approach now. We've designed our APIs so that Gaia does not know, at the time it launches the communications app, whether a phone call is pending. So it's therefore difficult for Gaia to take the right action in this case. It would be wrong for Gaia to launch all apps receiving a system message as fg, because then we're right back where we started (the phone app has to compete for memory with these apps). There is a simple solution here, which is to give the phone app higher priority when it's in the fg.
Attachment #707647 -
Flags: review?(jones.chris.g)
Assignee | ||
Comment 7•11 years ago
|
||
> There is a simple solution here, which is to give the phone app higher priority when it's > in the fg. Unfortunately it's not so simple. :( Gaia sends the communications app into the background (bug 835795). We currently don't act on that for 1s, but that timeout isn't long enough. When I receive a call while we're busting processes, the 1s expires before the comm app is brought into the fg by Gaia, and we kill it. We could increase this timeout, but then that decreases the efficacy of the window manager. So I think we may be back to where we started (i.e., fixing bug 835795). The good news is that I have the FOREGROUND_COMMUNICATIONS patch all written. That's the easy part. :)
Assignee | ||
Updated•11 years ago
|
Comment 8•11 years ago
|
||
tef? since jlebar thinks it blocks bug 836199 which is tef+.
blocking-b2g: --- → tef?
Comment 10•11 years ago
|
||
What are the next steps here? The deadline for landing blocker bugs is rapidly approaching (2/15) and getting this landed sooner rather than later to shake out any possible regressions would be ideal.
Assignee | ||
Comment 11•11 years ago
|
||
Ultimately we need to fix bug 836199, bug 836638, and bug 837927. These all seem to be related. It doesn't really matter how we fix these three bugs (I'll call these three the "true blockers"). I have a bunch of bugs (this one included) that indicate my current thinking about the best way to fix the true blockers. These subordinate bugs are blocking+ only because of the curious way we've set up our approval system; if I didn't have these bugs marked as blocking, I'd have to wait days to land fixes, and I wouldn't have been able to get anyone to assist me on the Gaia side. I could have just put all of this work into the true blockers themselves and avoided creating false blockers, but that's confusing from a development point of view. I can post a patch for review here that does what the bug summary asks, but if it doesn't improve the situation with the true blockers, we're just churning code for no reason. I'm trying to evaluate whether the changes I've made here are an improvement, but it's hard to evaluate any one patch's impact on the true blockers. Realistically, I don't think we are going to fix the true blockers by the end of next week. This is a complex issue, and in addition to my own slow progress, we've been making slow progress on the Gaia side, which greatly slows down most of the platform work, because I can't evaluate my platform changes without the prerequisite Gaia changes.
Updated•11 years ago
|
status-b2g18-v1.0.1:
--- → affected
Assignee | ||
Comment 12•11 years ago
|
||
This seems to fix bug 837927 for me, although I've never had good luck reproducing it.
Attachment #707647 -
Attachment is obsolete: true
Attachment #712628 -
Flags: review?(jones.chris.g)
Updated•11 years ago
|
Attachment #712628 -
Flags: review?(jones.chris.g) → review+
Assignee | ||
Comment 13•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/1651dcb62397
Comment 14•11 years ago
|
||
Push & followups backed out for mochitest-2 and mochitest-other failures: https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=a74f08ec0e46 https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?changeset=f48618e815d1
Assignee | ||
Comment 15•11 years ago
|
||
I think the test failures may have been the result of not clobbering (strangely enough), so I've re-pushed with a clobber. https://hg.mozilla.org/integration/mozilla-inbound/rev/df71fc49f14f
Comment 16•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/df71fc49f14f
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 17•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g18/rev/15587a04ec3d https://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/c24117eec445
status-firefox19:
--- → wontfix
status-firefox20:
--- → wontfix
status-firefox21:
--- → fixed
Target Milestone: --- → B2G C4 (2jan on)
Comment 18•11 years ago
|
||
Can you please provide steps to verify this fix - as we will blackbox test from the UI?
Assignee | ||
Comment 19•11 years ago
|
||
Are you able to use adb?
Comment 20•11 years ago
|
||
sure am.
Assignee | ||
Comment 21•11 years ago
|
||
Like the vast majority of bugs, I don't think this is worth verifying; the code change is obvious here. But since you asked so nicely: * $ watch -n.1 adb shell b2g-procrank --oom * Open an app. Notice its oom_adj value. * Press the home button Its oom_adj value should immediately change. Before this patch, the oom_adj value would change after 1s.
Updated•11 years ago
|
Whiteboard: QARegressExclude
You need to log in
before you can comment on or make changes to this bug.
Description
•