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

Issue 599209 link

Starred by 19 users

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

100% CPU usage in extension process, but time isn't in extension

Reported by b...@lastpass.com, Mar 30 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36

Steps to reproduce the problem:
Difficult to reproduce. We have received reports from our users. It has randomly happened to 2 people here, but can not readily reproduce.

What is the expected behavior?
Don't use 100% cpu.

What went wrong?
Activity monitor shows 100% cpu usage in LastPass extension. We pause the background page and the process stays at 100% cpu usage. It feels like the loop is occurring in a thread below/outside of our code.

We have sampled the process, please see attached.

WebStore page: 

Did this work before? N/A 

Chrome version: 49.0.2623.87  Channel: n/a
OS Version: OS X 10.11.3
Flash Version: Shockwave Flash 21.0 r0
 
lastpass_chrome_highload.txt
288 KB View Download

Comment 1 by meh...@chromium.org, Mar 31 2016

Cc: rsesek@chromium.org
Thanks for the log file.
Components: Blink>JavaScript
Fully symbolized sample is attached. Looks like there's a large GC happening in a nested runloop. It may be helpful to get a Chrome trace as well from about:tracing using the "Javascript and rendering" setting.
bug-599209.txt
432 KB View Download

Comment 3 by b...@lastpass.com, Apr 5 2016

We will get this to you the next time it happens. Appreciate you looking.
Labels: Needs-Feedback
What is the memory consumption of the process? What were the changes to the extension code?

Comment 5 by b...@lastpass.com, Apr 11 2016

We are still waiting for this to reproduce in-house again, so I don't have have exact memory data. I can say that memory holds steady when it gets into this state -- a coworker left it running over an entire weekend. It also happens separately in each user profile, a coworker had 2 processes spinning.

We don't know of any specific extension code that could cause this. I have tried to pause the background page a number of times while in this state to see if I can catch what was causing it in our code -- but there is never anything executing in our code.

If there is any specific memory stats that you want, please let us know and we would be happy to collect them the next time it happens.


Project Member

Comment 6 by sheriffbot@chromium.org, Apr 12 2016

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

For more details visit https://sites.google.com/a/chromium.org/dev/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Needs-Review Needs-Feedback
Please include a screenshot from the Chrome task manager including the column 'JavaScript memory'.
Attached are screenshots of CPU usage and Javascript memory between 2ish hours. Also attached is the trace. 

Chrome has been open for about 3 days without restarting.
Screen Shot 2016-04-14 at 1.16.01 PM.png
88.3 KB View Download
Screen Shot 2016-04-14 at 2.24.41 PM.png
123 KB View Download
trace_lpCPU.json.gz
2.8 MB Download

Comment 9 by rsesek@chromium.org, Apr 14 2016

I don't know why but that trace has nothing but the sampling thread captured, and nothing from the browser--only renderers. Can you try taking another trace? Select "Javascript and rendering" as the trace option, and maybe try with "Web Developer" as well.
Sorry, here we are: attached.
trace_lpCPU2.json.gz
7.9 MB Download
Labels: -Needs-Feedback OS-Windows
rsesek@ is the trace in #8 useful? I'm not sure how to tell which process corresponds with which extension, but there is a suspicious amount of CG happening in pid 67154.

I've seen LastPass get stuck at 100% CPU a few times recently (Chrome 50.0.2661.75, Windows 10). only happens with LastPass out of the dozens of extensions I use, and stops when I disable and re-enable it. I'll grab a trace next time.

67154 refers to the LastPass extension. You can know this by looking at the Task Manager screenshots under the Process ID column.

Comment 13 by j...@lastpass.com, Apr 20 2016

Here's another example on OS X -- I've found this is far more likely to happen if I leave several.    If you'd like me to leave it in this state let me know.  I've noticed this is far more likely to happen if you have many google docs / google sheets open
SpinningThread.png
90.8 KB View Download
trace_spinningthread.json.gz
1.1 MB Download
Cc: adamk@chromium.org
Due diligence: When was the last time the LastPass extension got updated? Do you see any correlation between a specific LastPass extension version and a Chrome version?
I found case from a LastPass customer that reported this issue with Chrome 46 and LastPass 3.2.41 back in November 2015. Since then we have gotten reports of it here and there. It only seems to happen when Chrome has been running for a few days.
Cc: -adamk@chromium.org hpayer@chromium.org u...@chromium.org
chantie, is your extension using worker threads? The trace in #13 looks like we are stuck in a worker/GC cycle. I suspect that this has something to do with the extension code.

hpayer@ and ulan@ WDYT?

Comment 17 by j...@lastpass.com, Apr 20 2016

hablich@ -- we do not use worker threads yet -- and in my trace, the background page is paused -- there's no javascript extension code running at all and there's no difference in CPU usage. 

Comment 18 by j...@lastpass.com, Apr 20 2016

@hablich -- This has happened with old and new versions of LastPass -- I don't see a correlation between any specific versions.
Cc: hablich@chromium.org
Owner: hpayer@chromium.org
Assigning to this weeks memory sheriff, hpayer@ could you have a look please?

Comment 20 by lid...@gmail.com, Apr 21 2016

I've encountered this issue quite a lot (for several months, at least), usually when I have a ton (30+) of tabs open.
Chrome 49.0.2623.112
LastPass 4.1.6

trace_test.json.gz
800 KB Download
Screenshot 2016-04-22 01.03.58.png
118 KB View Download

Comment 21 by jca...@gmail.com, Apr 22 2016

I have encountered this issue quite often and just submitted a support ticket to Lastpass. I was on Version 49.0.2623.112 (64-bit) but just upgraded to Version 50.0.2661.86 (64-bit). 

Once the process goes to 100% the only way it will stop is if I kill the extension or restart Chrome. Happy to provide a log file if I can -- let me know what would help. 
Screen+Shot+2016-04-21+at+9.22.47+PM.png
279 KB View Download
Cc: mlippautz@chromium.org
Status: Assigned (was: Unconfirmed)
Could you please run Chrome with --js-flags="--trace-gc --trace-gc-verbose"? With that we would see GC activity.

Another thing that is odd: in #8 and #13 the JS live memory is extremely high, and even higher than committed which cannot be.

Comment 23 by lid...@gmail.com, Apr 22 2016

I saw that JS live memory issue too (see attached, 1st process is LastPass).
Screenshot 2016-04-22 00.59.07.png
162 KB View Download
Ignoring committed memory (it's not accurate for large objects I think), we are close or even above the heap limit of 1.4GB for live objects. We do more GCs when we are close to the limit, as the alternative would be crashing with out of memory.

Of course there could be a leak so that live memory accumulates.
The live memory/committed memory counters have to be fixed. This is confusing and misleading.

If the live memory counter is correct, that would indeed suggest that the extension is leaking some memory. That could explain the massive GC load close to the maximum heap size of 1.4G.
Anyhow, --js-flags="--trace-gc --trace-gc-verbose" would help.

I would also suggest to use dev tools to look into potential memory leaks.
I also ran into this issue many times with Lastpass, I had about 10 tabs open when it happened just now. I also had another browser open at the same time (without any extensions). CPU usage goes over 100% for Lastpass and remains that way until I kill Lastpass from the Chrome task manager. I think I also had Chrome open for a few days before it happened.
Screen Shot of extension usage.png
56.7 KB View Download

Comment 28 by b...@lastpass.com, May 9 2016

FYI -- We will be releasing a new version (4.1.9) of the extension today that should drastically improve our memory handling.

I suppose this ticket should remain open for a while to make sure this addresses the issue.

Comment 29 by lid...@gmail.com, May 15 2016

This issue was not resolved in 4.1.9. See attached for similar symptoms.
Screenshot 2016-05-16 02.47.39.png
104 KB View Download

Comment 30 by m...@afork.com, May 16 2016

Many of the reports of this on the lastpass forum are from Mac users.  I'm using Fedora 23 Linux with Chromium 48.0.2564.116 and 4.1.9 and I get this problem at least once a week, so it's not just Mac users.  I run two copies of Chromium (one with --user-data-dir).  I use some Google Docs constantly in one, but never in the other, so it's not purely a Google Docs thing.  The runaway Lastpass can happen in either instance.

The runaway will sometimes happen when I'm off using some app besides Chromium, in another workspace, ie, I don't think it's related to visiting a site which exercises Lastpass or Chromium in a particular way.  It often seems quite spontaneous.

Next time I'll try invoking Chromium with --js-flags="--trace-gc --trace-gc-verbose".  What will that do? (Ie, if it collects info, where will it put it?)

Those who believe this is an uncommon problem should Google[tm] for lastpass chrome cpu.
I have just hit this bug when my system ran out of memory, and I recall that every time it happened in the past I was using some memory-hungry application (or several memory-hungry Google services like Inbox and Docs, which are memory-hungry as well). Hope this helps.
I'm using Chromium on Debian Linux (stretch).

Comment 32 by jca...@gmail.com, Jun 6 2016

Encountered this again yesterday in Chrome 50.0.2661.102 and Lastpass 4.1.12. Has happened consistently for the past week or so, typically in the evening. 
Using Chrome 50.0.2661.102 and Lastpass 4.1.12
The process manager shows LastPass Extension using 100% CPU

Attached about:tracing before (bug) and after killing the extension (nobug)
The only difference seams to be PID 74684 doing a lot of GC stuff.


trace_bug1.json.gz
1.4 MB Download
trace_nobug.json.gz
1006 KB Download

Comment 34 by b...@lastpass.com, Jun 10 2016

We are making another release today that should address the largest memory leak. Please let us know if this problem continues with 4.1.16 or greater.

Problem is ongoing in 4.1.16. I literally have to keep the extension turned off and only enable it for a few seconds when I'm trying to login to a site.
Was lastpass always using WebSocket/Native messaging in the cases where the cpu usage went high? I'm trying to understand if we have some kind of leak in those cases...

Comment 37 by b...@lastpass.com, Jun 23 2016

If someone can send a heap snapshot to bob at lastpass.com, it will be helpful. We made a number of fixes and haven't been able to reproduce lately.

LastPass uses websockets on mac. (It connects to a local socket. If helper app is not present, it will continue to try to connect in a loop.) We potentially use native messaging on Windows, if enabled by user. 

If someone experiencing the problem can post the text from their LastPass Icon=>More Options=>About LastPass page, then it should help answer lazyboy@chromium.org's question.




I have not been able to repro this for the past month.
> I have not been able to repro this for the past month.

I can confirm that it worked fine for me, too, lately. 

Comment 40 by m...@afork.com, Jul 9 2016

This issue hasn't appeared for me for a while now (whereas previously it was about once a week).
It seems that a memory leak was fixed in lastpass that caused this regression. I am closing this issue since it does not reproduce anymore.
Status: WontFix (was: Assigned)
"Closing" the loop :-)

Resolution: Culprit in lastpass.

Sign in to add a comment