Open Bug 1162698 Opened 7 years ago Updated 2 years ago

Thumbnail generation should have a time limit

Categories

(Firefox :: New Tab Page, defect, P3)

defect

Tracking

()

People

(Reporter: rowbot, Unassigned)

References

(Blocks 1 open bug)

Details

(4 keywords, Whiteboard: [MemShrink:p2][qf:p2:responsiveness])

Attachments

(1 file)

Attached file memory-report.json.gz
The thumbnail service seems to cause high CPU usage and high memory when trying to get a screenshot of a page that has a long load time.  The latest x64 nightly maxed out at 4.6 GB for me with only the about:newtab page open. Once the browser obtains the thumbnail, high CPU usage and high memory usage no longer occur.  I have also attached a report from about:memory when this occurs.  I did notice that the child process has about 930 MB in heap-unclassified, which seems really bad.

** Warning ** - The page in question is a PHP script that contains an infinite loop that just prints "Inifinite Loops! \o/".

STR:
1) Create a new profile.
2) Load [1] so that it gets put as a tile on about:newtab.
3) Close the browser and reopen it.
4) Open a new tab or browse to about:newtab.

[1] http://trowbotham.com/bug_tests/iloop.php

Actual Results:
For me, plugin-container consumes 15% CPU usage and memory usage quickly skyrockets.

Expected Results:
Normal resource usage when the browser is trying to obtain a thumbnail.
Forgot to mention that I am on Windows 7.
As master in these cases can you look on this issue?
Blocks: 497543
Severity: normal → major
Flags: needinfo?(ttaubert)
Keywords: footprint, mlk, topmlk
Sorry, my next two weeks look rather busy due to a lot of traveling. Might not be able to look into it anytime soon.
Flags: needinfo?(ttaubert)

Just wanted to pop back in to say that the runaway thumbnail service is still a thing. The example URL in comment #0 is obviously contrived, however, the point is that any misbehaving site that makes it into about:home's Top Sites can cause high CPU usage and high memory usage to persist for the duration of the user's browsing session (and every session after that since opening the browser will navigate to about:home by default resulting in the browser trying to get a thumbnail again) and will continue to use those resources until either a thumbnail is obtained, the site stops misbehaving, or it gets knocked out of the list of Top Sites.

Component: General → Activity Streams: Newtab
Product: Core → Firefox

The problem here appears to be it trying forever to generate thumbnails; we really should have a time limit on thumbnailing a site. (it's especially bad if we restart thumbnailing when the browser restarts).

Keywords: perf
Summary: Memory leak in thumbnail service on pages that take a long time to load → Thumbnail generation should have a time limit
Whiteboard: [MemShrink] → [MemShrink:p2][qf:p2:responsiveness]
Blocks: 1445085
Priority: -- → P3
Component: Activity Streams: Newtab → New Tab Page
You need to log in before you can comment on or make changes to this bug.