Issue 576409 in chromium: zygote: failed to adjust OOM score of renderer

7,464 views
Skip to first unread message

chro...@googlecode.com

unread,
Jan 11, 2016, 5:26:48 PM1/11/16
to chromi...@chromium.org
Status: Untriaged
Owner: ----
Labels: Type-Bug Pri-2 Cr-Internals-Core OS-Chrome

New issue 576409 by semenz...@chromium.org: zygote: failed to adjust OOM
score of renderer
https://code.google.com/p/chromium/issues/detail?id=576409

Did something change in the /proc permissions? I am seeing lots of these
in the chrome log (pretty close to ToT):

[16781:16804:0111/113532:ERROR:zygote_host_impl_linux.cc(512)] Failed to
adjust OOM score of renderer with pid 17030: Permission denied
[16781:16804:0111/113532:ERROR:zygote_host_impl_linux.cc(512)] Failed to
adjust OOM score of renderer with pid 17033: Permission denied
[16781:16804:0111/113532:ERROR:zygote_host_impl_linux.cc(512)] Failed to
adjust OOM score of renderer with pid 17046: Permission denied
[16781:16804:0111/113532:ERROR:zygote_host_impl_linux.cc(512)] Failed to
adjust OOM score of renderer with pid 17052: Permission denied
[16781:16804:0111/113532:ERROR:zygote_host_impl_linux.cc(512)] Failed to
adjust OOM score of renderer with pid 17053: Permission denied


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

chro...@googlecode.com

unread,
Jan 19, 2016, 9:14:02 PM1/19/16
to chromi...@chromium.org
Updates:
Cc: j...@chromium.org

Comment #1 on issue 576409 by qui...@chromium.org: zygote: failed to adjust
CCing one of the owners for that code.

chro...@googlecode.com

unread,
Jan 29, 2016, 2:15:30 PM1/29/16
to chromi...@chromium.org
Updates:
Status: Assigned
Owner: ric...@chromium.org
Cc: afak...@chromium.org

Comment #2 on issue 576409 by afak...@chromium.org: zygote: failed to
Can you please further triage this?

chro...@googlecode.com

unread,
Jan 29, 2016, 3:21:35 PM1/29/16
to chromi...@chromium.org

Comment #3 on issue 576409 by ric...@google.com: zygote: failed to adjust
Blah, the oom score failures are due to:

https://chromium.googlesource.com/chromiumos/third_party/kernel/+/1ba6b2f465b0bd71d0c67bf7b0b0a7e7f5989b98

This is an android patch that we have in chromium os that changes the
permissions of /proc/<pid>/oom_score_adj to be more restricted than
standard. Previously, this worked by using a setuid binary to write the oom
score, but we are trying to get rid of that. Will need to ask around with
the users of that code to see how critical this functionality is.

chro...@googlecode.com

unread,
Feb 2, 2016, 1:30:57 AM2/2/16
to chromi...@chromium.org
Updates:
Cc: rom...@google.com

Comment #4 on issue 576409 by djku...@chromium.org: zygote: failed to
(No comment was entered for this change.)

chro...@googlecode.com

unread,
Feb 2, 2016, 9:03:14 AM2/2/16
to chromi...@chromium.org

Comment #5 on issue 576409 by rom...@google.com: zygote: failed to adjust
These permissions are tested by CTS because we don't want to allow 3rd
party apps to change their own lifecycle or make themselves unkillable (or
less killable) - only System Server should be allowed to change the OOM
score of an app.

chro...@googlecode.com

unread,
Feb 5, 2016, 3:25:26 AM2/5/16
to chromi...@chromium.org
Updates:
Cc: chri...@chromium.org george...@chromium.org

Comment #6 on issue 576409 by ric...@chromium.org: zygote: failed to adjust
Adding some chrome/browser/memory OWNERS for comment.

The background is that we have been trying to get rid of the setuid sandbox
on Chrome OS. The last remaining use of the setuid sandbox was modifying a
process's oom score adjustment, and this functionality was recently removed
in https://codereview.chromium.org/1560033003.

However, an Android kernel patch that affects Chrome OS kernels prevents
non-root users from writing /proc/<pid>/oom_score_adj, so these adjustments
are currently failing on Chrome OS. I wanted to get a feel for the what the
impact of this regression is likely to be for looking at next steps.

chro...@googlecode.com

unread,
Feb 5, 2016, 10:02:38 AM2/5/16
to chromi...@chromium.org

Comment #7 on issue 576409 by george...@google.com: zygote: failed to
This is pretty important. Basically, on Chrome OS, we guide the kernel so
that when it has to kill processes, it can start with less important tabs.

If we cannot adjust the OOM scores, then the kernel will have no way to
prioritize the killing, which will definitely degrade the user's experience.

Is there a workaround?

chro...@googlecode.com

unread,
Feb 5, 2016, 10:21:41 AM2/5/16
to chromi...@chromium.org

Comment #8 on issue 576409 by rom...@google.com: zygote: failed to adjust
You can give CAP_DAC_OVERRIDE to your process

chro...@googlecode.com

unread,
Feb 5, 2016, 5:34:30 PM2/5/16
to chromi...@chromium.org

Comment #11 on issue 576409 by ken...@corp.sandstorm.io: zygote: failed to
Thought from the peanut gallery: Wouldn't it be safe to allow processes to
set positive OOM adjustments, as long as they can't set negative? That
seems like it would suit Chrome's needs, in which tabs are only trying to
make themselves more killable, not less?

chro...@googlecode.com

unread,
Feb 5, 2016, 7:16:33 PM2/5/16
to chromi...@chromium.org

Comment #12 on issue 576409 by bugd...@chromium.org: zygote: failed to
adjust OOM score of renderer
https://code.google.com/p/chromium/issues/detail?id=576409#c12

The following revision refers to this bug:

https://chromium.googlesource.com/chromium/src.git/+/64068c39982ad795f5041302500d85ce5fef54aa

commit 64068c39982ad795f5041302500d85ce5fef54aa
Author: rickyz <ric...@chromium.org>
Date: Sat Feb 06 00:10:53 2016

Use the suid helper for oom_score_adj on Chrome OS.

Reverts https://codereview.chromium.org/1560033003/ for Chrome OS.
Chrome OS has a kernel patch which restricts the permissions of
oom_score_adj.

BUG=576409

Review URL: https://codereview.chromium.org/1671233002

Cr-Commit-Position: refs/heads/master@{#373959}

[modify]
http://crrev.com/64068c39982ad795f5041302500d85ce5fef54aa/content/browser/zygote_host/zygote_communication_linux.cc

chro...@googlecode.com

unread,
Feb 12, 2016, 6:11:29 PM2/12/16
to chromi...@chromium.org

Comment #13 on issue 576409 by dian...@chromium.org: zygote: failed to
Issue chrome-os-partner:50217 has been merged into this issue.

chro...@googlecode.com

unread,
Feb 12, 2016, 6:14:31 PM2/12/16
to chromi...@chromium.org
Updates:
Cc: josa...@chromium.org
Labels: -Pri-2 Pri-1 M-49 Merge-Request-49

Comment #14 on issue 576409 by dian...@chromium.org: zygote: failed to
I think we need to get this on M-49 too. See http://crosbug.com/p/50217

chro...@googlecode.com

unread,
Feb 12, 2016, 6:21:32 PM2/12/16
to chromi...@chromium.org
Updates:
Labels: -Merge-Request-49 Merge-Approved-49 Hotlist-Merge-Approved

Comment #15 on issue 576409 by tin...@google.com: zygote: failed to adjust
OOM score of renderer
https://code.google.com/p/chromium/issues/detail?id=576409#c15

Your change meets the bar and is auto-approved for M49 (branch: 2623)

chro...@googlecode.com

unread,
Feb 12, 2016, 7:34:07 PM2/12/16
to chromi...@chromium.org
Updates:
Labels: -Merge-Approved-49 merge-merged-2623

Comment #16 on issue 576409 by bugd...@chromium.org: zygote: failed to
adjust OOM score of renderer
https://code.google.com/p/chromium/issues/detail?id=576409#c16

The following revision refers to this bug:

https://chromium.googlesource.com/chromium/src.git/+/1430bbebd6e380a331ebe8de4cadf8149f2c4c42

commit 1430bbebd6e380a331ebe8de4cadf8149f2c4c42
Author: Ricky Zhou <ric...@chromium.org>
Date: Fri Feb 12 23:27:42 2016

Use the suid helper for oom_score_adj on Chrome OS.

Reverts https://codereview.chromium.org/1560033003/ for Chrome OS.
Chrome OS has a kernel patch which restricts the permissions of
oom_score_adj.

BUG=576409
TBR=mdem...@chromium.org

Review URL: https://codereview.chromium.org/1671233002

Cr-Commit-Position: refs/heads/master@{#373959}
(cherry picked from commit 64068c39982ad795f5041302500d85ce5fef54aa)

Review URL: https://codereview.chromium.org/1692183005 .

Cr-Commit-Position: refs/branch-heads/2623@{#388}
Cr-Branched-From:
92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}

[modify]
http://crrev.com/1430bbebd6e380a331ebe8de4cadf8149f2c4c42/content/browser/zygote_host/zygote_host_impl_linux.cc

chro...@googlecode.com

unread,
Feb 15, 2016, 10:32:00 AM2/15/16
to chromi...@chromium.org

Comment #17 on issue 576409 by bugd...@chromium.org: zygote: failed to
adjust OOM score of renderer
https://code.google.com/p/chromium/issues/detail?id=576409#c17

The following revision refers to this bug:

https://chrome-internal.googlesource.com/bling/chromium.git/+/1430bbebd6e380a331ebe8de4cadf8149f2c4c42

commit 1430bbebd6e380a331ebe8de4cadf8149f2c4c42
Author: Ricky Zhou <ric...@chromium.org>
Date: Fri Feb 12 23:27:42 2016


chro...@googlecode.com

unread,
Feb 16, 2016, 8:42:38 PM2/16/16
to chromi...@chromium.org

Comment #21 on issue 576409 by ric...@chromium.org: zygote: failed to
I looked a bit more, and due to some refactoring that took place while this
was goign on, the fix was incorrect (but the cherry-pick for stable was
correct). Will get a proper fix out shortly.

chro...@googlecode.com

unread,
Feb 16, 2016, 9:30:52 PM2/16/16
to chromi...@chromium.org

Comment #22 on issue 576409 by ric...@chromium.org: zygote: failed to
https://codereview.chromium.org/1702273002 should be going out with a fix
soon - I tested this on a chromebook and verified that the error messages
go away.

chro...@googlecode.com

unread,
Feb 16, 2016, 11:45:57 PM2/16/16
to chromi...@chromium.org

Comment #23 on issue 576409 by bugd...@chromium.org: zygote: failed to
adjust OOM score of renderer
https://code.google.com/p/chromium/issues/detail?id=576409#c23

The following revision refers to this bug:

https://chromium.googlesource.com/chromium/src.git/+/7a5332d762625352a252355a3d7735dd2de4fbea

commit 7a5332d762625352a252355a3d7735dd2de4fbea
Author: rickyz <ric...@chromium.org>
Date: Wed Feb 17 04:12:45 2016

Move use_suid_sandbox_for_adj_oom_score_ logic to zygote_host_impl_linux.cc.

Previous refactoring had split the definition and use of this variable
into two different classes, resulting in
use_suid_sandbox_for_adj_oom_score_ effectively always being false.

TBR=mdem...@chromium.org,ker...@chromium.org
BUG=576409

Review URL: https://codereview.chromium.org/1702273002

Cr-Commit-Position: refs/heads/master@{#375781}

[modify]
http://crrev.com/7a5332d762625352a252355a3d7735dd2de4fbea/content/browser/zygote_host/zygote_communication_linux.cc
[modify]
http://crrev.com/7a5332d762625352a252355a3d7735dd2de4fbea/content/browser/zygote_host/zygote_host_impl_linux.cc
[modify]
http://crrev.com/7a5332d762625352a252355a3d7735dd2de4fbea/content/browser/zygote_host/zygote_host_impl_linux.h
Reply all
Reply to author
Forward
0 new messages