New issue
Advanced search Search tips

Issue 743179 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Mar 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Chrome leaks Android System memory until phone has to be restarted

Reported by jens.ber...@mailbox.org, Jul 14 2017

Issue description

Device name:Sony Xperia Z3 Compact (D5803)

From "Settings > About Chrome"
Application version:Beta 60.0.3112.66
Operating system:Android 6.0.1 May 2016

URLs (if applicable): -

Steps to reproduce:
(0) Check system memory consumption in developer options of android
(1) Open Chrome
(2) Open some websites in multiple tabs
(3) Switch back and forth between Chrome and other Apps, open and close Tabs, navigate some Websites
(4) swipe away chrome, wait some minutes and then repeat steps 1-4 several times

Expected result:
System memory footprint should be roughly the same as in step 0 (+/- 50MB)

Actual result:
Phone becomes unusable because of low available RAM. The phone has 2GB RAM, where 1.7 GB are usable. Usually the amount used for System moves around 800 and 900 MB. The rest is available for apps and cache.
With Chrome 59 (and probably also with Android System WebView 59) and also with the current Beta 60, the amount used by "System" slowly raises up to 1.2-1.4 GB during one or two days of use. Even swiping away (closing) all apps does not lower this number. This leads to a lot of GC and swapping and therefore additional battery drain, besides repeated starting and stopping off apps and a general slowness. Only rebooting the phone helps.

After rolling back to the pre-installed versions of Chrome (50.0.2661.89) and WebView (50.0.2661.86), the problem does not exist anymore.

 
Components: Mobile>WebView
Labels: -Pri-3 Stability-Memory Pri-1 Type-Bug-Regression

Comment 2 by boliu@chromium.org, Jul 19 2017

can you take some memory-infra traces? instructions here: https://www.chromium.org/developers/how-tos/trace-event-profiling-tool/recording-tracing-runs#TOC-Capture-a-trace-from-Chrome-on-Android-with-DevTools-

Make sure to manually select trace categroies and make sure "memory-infra" is selected.

I think if this takes minutes to see the leak, then there probably isn't enough buffer space to record the whole thing. Maybe take a trace at the beginning of the process of maybe 10s, then take another one at the end. Make sure the same tabs are open in both traces, so can compare how memory has changed.

Comment 3 by boliu@chromium.org, Jul 19 2017

also is this only reproducible on that one device, or that's the only device you've tested?
Cc: ntfschr@chromium.org boliu@chromium.org
Components: -Mobile>WebView
Labels: Needs-Feedback
Removing the WebView component, because the bug clearly states this happens in Chrome.

This component is only for WebView-specific bugs.

Adding Needs-feedback for the questions boliu@ posted.
Cc: etienneb@chromium.org

Comment 6 by nav...@gmail.com, Aug 2 2017

I have the same issue on the same type of phone.
Sony Xperia Z3 Compact D5803
Android 6.0.1
Kernel 3.4.0-perf-gc14c2d5
Build number 23.5.A.1.291

The phone was constantly killing background apps and always acting like it was low on memory. The keyboard would be sluggish, the launcher would always get killed and restart, etc. Uninstalling Chrome (reverting back to 50.0 which is built into the phone) has resolved all of this and the phone feels like new. I was on chrome 59. 

I've attempted to record a trace, but not sure what demonstrates the leak in the trace. Do i need any other categories besides memory-infra? Will any personally identifiable information be included in the trace?
Sorry for my late reply.

To #3: I have only tested this one device.

Before I originally reported this issue, I could reproduce the issue several times. Every time I waited 1-2 days before I switched Chrome versions, because the memory usage goes up and down all the time and it takes a while until the memory gets really full.
Chrome 59 -> Memory issue
back to 50 -> No issue
again 59 -> Issue
back to 50 -> No issue
60 beta -> Issue
back to 50 -> No issue
...

After I posted this issue, I had a closer look using adb shell dumpsys meminfo and procstats when the memory was nearly full with Chrome 59 installed. Meminfo showed a huge amount of "Lost RAM", which looks a bit strange to me (see attached meminfo.txt). Unfortunately I only found out about /sys/kernel/debug/ion after I already rebooted the phone. :-( Maybe otherwise I could have seen something interesting...

To make things even more complicated:
After a further switch to 50 and then back to 59, I tried to reproduce it again to check /sys/kernel/debug/ion. But now the phone runs Chrome 59 without any memory issues for at least a week! I have no idea what is causing this.

If I see the memory issue again, I will check the ION debug entries.
I have no idea how I could record useful memory traces without opening and closing tabs, since it takes hours or days to reproduce the issue...
meminfo.txt
11.5 KB View Download
Project Member

Comment 8 by sheriffbot@chromium.org, Aug 2 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "ntfschr@chromium.org" to the cc list and removing "Needs-Feedback" label.

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

Comment 9 by nav...@gmail.com, Aug 9 2017

I've been running Chrome 50.0 for several days and still having memory problems so I don't feel like I can fairly point at Chrome 59 anymore (or Chrome at all for that matter)
Cc: -ntfschr@chromium.org
Status: WontFix (was: Unconfirmed)
***Bulk edit***

Closing due to inactivity, please feel free to reopen if needed.

Sign in to add a comment