New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 620409 link

Starred by 3 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

Chromium is not cgroup-enabled. Uses /proc/meminfo for available memory

Reported by alireza....@gmail.com, Jun 15 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36

Steps to reproduce the problem:
1. Try to open Chrome/Chromium inside a Docker container or any other cgroup-enabled sandboxes. 
2. Give a maximum memory (eg 512mb) for that cgroup
3. Watch it crash after you open 4/5 tabs

What is the expected behavior?

What went wrong?
Looks like Chrome/Chromium reads the memory information from /proc/meminfo which is an old one. Unfortunately meminfo does not cgroup-ready and gives the actual memory of the host rather than the specific cgroup Chromium runs in. The confusion about available memory will cause Chromium to ask for more RAM than it supposed to have inside the cgroup, which forces cgroup to kill one of the chrome processes inside of it. That action (as you know) will randomly crash one of the tabs and/or extensions.

Crashed report ID: 

How much crashed? Just one tab

Is it a problem with a plugin? No 

Did this work before? N/A 

Chrome version: 51.0.2704.84  Channel: stable
OS Version: 4.7RC3
Flash Version: Shockwave Flash 21.0 r0
 
Cc: rnimmagadda@chromium.org
Labels: Needs-Feedback
@alireza.root: Could you please provide us the Crash ID [chrome://crashes] which would help us in triaging it further.

Thank you.
as you can see, even though two tabs are crashed, chrome://crashes won't show any history of them. 

link to screenshot(just in case):

https://imgur.com/UHHCkFo
screenshot.png
54.0 KB View Download
Project Member

Comment 3 by sheriffbot@chromium.org, Jun 16 2016

Labels: -Needs-Feedback Needs-Review
Owner: rnimmagadda@chromium.org
Thank you for providing more feedback. Adding requester "rnimmagadda@chromium.org" for another review and adding "Needs-Review" label for tracking.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Needs-Review Te-NeedsFurtherTriage
Owner: ----
This is a problem with setting cgroup limits on chrome in linux, since it is reading from /proc/meminfo it thinks it has way more than the cgroup actually allows.

If you point me to how to patch this, I can do it. It's a problem I experience all the time.

Comment 6 by groby@chromium.org, Sep 20 2016

base/process/process_metrics* would be a good starting point - a quick code search finds nothing else. 

https://cs.chromium.org/search/?q=%22proc/meminfo%22+-file:.py$&sq=package:chromium&type=cs

I'd suggest talking to OWNERs. For all I know we have odd compatibility reasons for doing this, or something.



Here's a 1st draft patch for it. It'll ONLY change &meminfo->total. 

Also, it probably contains some errors. 

I just wanted to check if I'm in the ballpark

1st_draft.patch
2.6 KB Download
Cc: thomasanderson@chromium.org
Labels: -Pri-2 -TE-NeedsFurtherTriage Pri-3
Status: Available (was: Unconfirmed)
Thanks for your interest in Chromum. Please see https://www.chromium.org/developers/contributing-code and use our code review system instead of attaching patches here.
Chromium, even...
sorry it's my first PR
here it is:
https://codereview.chromium.org/2745473002
Project Member

Comment 11 by sheriffbot@chromium.org, Mar 9 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Components: Internals>Core

Sign in to add a comment