Closed
Bug 968297
Opened 10 years ago
Closed 10 years ago
Nuwa causes the process priority manager to miscompute priorities for applications in the foreground
Categories
(Core :: IPC, defect)
Tracking
()
Tracking | Status | |
---|---|---|
b2g18 | --- | unaffected |
b2g-v1.1hd | --- | unaffected |
b2g-v1.2 | --- | unaffected |
b2g-v1.3 | --- | fixed |
b2g-v1.3T | --- | fixed |
b2g-v1.4 | --- | fixed |
People
(Reporter: gsvelto, Assigned: gsvelto)
References
Details
Attachments
(1 file, 1 obsolete file)
1.24 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #950266 +++ While testing an unrelated bug I've noticed that after Nuwa has been re-enabled the priorities of foreground applications where completely wrong. You can check the issue with the following STR: - Launch an application - Send it into the background - Run adb shell /system/bin/b2g-info, you should get something like this for the application (the application has foreground priority, nice == 18): NAME TID NICE USS PSS RSS VSIZE OOM_ADJ USER Communications 2269 18 8.4 11.3 25.8 72.0 2 app_2269 - Bring the application back in the foreground and run b2g-info again, you should get this (the application has foreground priority, nice == 1) NAME TID NICE USS PSS RSS VSIZE OOM_ADJ USER Communications 2269 1 8.4 11.3 25.8 72.0 2 app_2269 Instead you will still get background priority for the app: NAME TID NICE USS PSS RSS VSIZE OOM_ADJ USER Communications 2269 18 8.4 11.3 25.8 72.0 2 app_2269 A quick investigation shows that the |mHighPriorityChildIDs| in the ProcessPriorityManagerImpl contains a stray element: this causes the process priority manager to think that there's an high priority process present which in turn forces everybody else into low priorities.
This will likely cause the foreground app to get killed more often as we start running low on memory (which we do a lot). So I'd say this is a blocker.
blocking-b2g: --- → 1.3?
Updated•10 years ago
|
blocking-b2g: 1.3? → 1.3+
Comment 2•10 years ago
|
||
Nuwa is the process left in mHighPriorityChildIDs. I don't think Nuwa should be put in mHighPriorityChildIDs, its priority is decided once it is ready.
Comment 3•10 years ago
|
||
Attachment #8371251 -
Flags: review?(khuey)
Attachment #8371251 -
Flags: feedback?(cyu)
Comment 4•10 years ago
|
||
Comment on attachment 8371251 [details] [diff] [review] Don't add Nuwa process to mHighPriorityChildIDs Looks good to me.
Attachment #8371251 -
Flags: feedback?(cyu) → feedback+
Assignee | ||
Comment 5•10 years ago
|
||
Taking this bug since I'm already familiar with the code. The proposed patch does fixes the issue at hand but introduces another problem because we're still notifying the parent process that the child priority has changed. This patch prevents priority changes to the Nuwa process entirely instead. A cleaner approach would be to implement a Nuwa-specific ParticularProcessPriorityManager that would contain only empty stubs for all non-required methods but since this is a 1.3+ bug let's keep it simple.
Attachment #8371251 -
Flags: review?(khuey)
Attachment #8371653 -
Flags: review?(khuey) → review+
Assignee | ||
Updated•10 years ago
|
Attachment #8371251 -
Attachment is obsolete: true
Assignee | ||
Comment 6•10 years ago
|
||
Try run is here https://tbpl.mozilla.org/?tree=Try&rev=9b732b3ecf8d The patch applies cleanly to mozilla-b2g28_v1_3
Keywords: checkin-needed
Assignee | ||
Updated•10 years ago
|
status-b2g18:
--- → unaffected
status-b2g-v1.1hd:
--- → unaffected
status-b2g-v1.2:
--- → unaffected
status-b2g-v1.3:
--- → affected
status-b2g-v1.3T:
--- → affected
status-b2g-v1.4:
--- → affected
Comment 7•10 years ago
|
||
Gabriele, I'm seeing Nuwa get OOM killed on mozilla-central as of last night. Is this possibly related to your work in process priority manager? See bug 969224.
See Also: → 969224
Comment 8•10 years ago
|
||
Oops. Must not be since you haven't landed anything yet. Seems like it might be related, though.
Comment 9•10 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/32e2494ae624
Keywords: checkin-needed
Assignee | ||
Comment 10•10 years ago
|
||
(In reply to Ben Kelly [:bkelly] from comment #7) > Gabriele, I'm seeing Nuwa get OOM killed on mozilla-central as of last > night. Is this possibly related to your work in process priority manager? > See bug 969224. It can be related to the bug I fixed here. Without my patch it is possible that the Nuwa process' priority gets adjusted; if it's sent into the background there's good chances it will be killed due to OOM in low-memory conditions.
Updated•10 years ago
|
Comment 11•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/32e2494ae624
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Comment 14•10 years ago
|
||
Adding the changeset for tarako merge : https://hg.mozilla.org/releases/mozilla-b2g28_v1_3t/rev/956077a1502b
You need to log in
before you can comment on or make changes to this bug.
Description
•