Closed
Bug 749555
Opened 13 years ago
Closed 7 years ago
Large image possibly being loaded twice?
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: Marc42410, Unassigned)
Details
(Whiteboard: [MemShrink:P2][see comment 10])
Firefox consumes abnormal amount of memory(+60~100MB) and cpu resource(40~50%) on specific pages. Tested on Firefox 12.0 stable and a brand-new profile.
The memory usage increase happens when opening the page, but the cpu usage is rather normal.
If you switch to another tab and wait for several seconds and come back on the tab,
your pc will experience a spike in CPU usage and the increase in memory usage will come back.It seems that something is wrong with image-discarding. This may be a regression related to changes regarding image-discarding that landed in Firefox 12.
The URLs that causes the bug
http://support.amd.com/us/gpudownload/windows/Pages/radeonmob_win7-64.aspx
http://support.amd.com/us/gpudownload/windows/Pages/radeonmob_win7-32.aspx
If you have enough amount of memory and decent cpu, you would not even be able to notice the bug happening without paying much attention to it.
One more thing, my PC has loaded the pages without a problem a few times. The bug does not always happen. I'm not even sure if it is reproducible.
My Environment is
CPU:Athlon II x2 2.1GHz
MEM:8GB
VGA:Radeon HD 4250
OS:Win7 x64
Comment 1•13 years ago
|
||
DO you see in about in about:memory?verbose where those memory is used ?
With just one tab open:
109.78 MB (100.0%) -- explicit
├───65.65 MB (59.80%) -- images
│ ├──65.29 MB (59.47%) -- content
│ │ ├──65.29 MB (59.47%) -- used
│ │ │ ├──64.60 MB (58.85%) ── uncompressed-heap
│ │ │ └───0.69 MB (00.63%) ++ (2 tiny)
│ │ └───0.00 MB (00.00%) ++ unused
│ └───0.36 MB (00.32%) ++ chrome
├───22.96 MB (20.91%) -- js
│ ├───8.42 MB (07.67%) -- compartment(http://support.amd.com/us/gpudownload/windows/Pages/radeonmob_win7-32.aspx)
│ │ ├──3.37 MB (03.07%) -- gc-heap
│ │ │ ├──1.73 MB (01.58%) -- objects
│ │ │ │ ├──1.39 MB (01.27%) ── non-function
│ │ │ │ └──0.34 MB (00.31%) ── function
│ │ │ └──1.63 MB (01.49%) ++ (5 tiny)
│ │ ├──2.05 MB (01.86%) ── analysis-temporary
│ │ ├──1.80 MB (01.64%) ++ (7 tiny)
│ │ └──1.20 MB (01.10%) ── script-data
│ ├───6.92 MB (06.30%) -- compartment([System Principal], 0x6d60000)
│ │ ├──3.38 MB (03.08%) -- gc-heap
│ │ │ ├──1.16 MB (01.06%) ++ shapes
│ │ │ ├──1.11 MB (01.01%) ++ (5 tiny)
│ │ │ └──1.10 MB (01.00%) ++ objects
│ │ ├──2.28 MB (02.08%) ++ (8 tiny)
│ │ └──1.26 MB (01.15%) ── script-data
│ ├───2.88 MB (02.62%) ── gc-heap-decommitted
│ ├───1.76 MB (01.60%) ++ (8 tiny)
│ ├───1.71 MB (01.56%) ++ compartment(atoms)
│ └───1.27 MB (01.16%) ++ runtime
├───11.94 MB (10.87%) ── heap-unclassified
├────5.24 MB (04.78%) -- storage
│ ├──4.30 MB (03.91%) -- sqlite
│ │ ├──1.60 MB (01.45%) -- places.sqlite
│ │ │ ├──1.38 MB (01.26%) ── cache-used [3]
│ │ │ └──0.21 MB (00.19%) ++ (2 tiny)
│ │ ├──1.51 MB (01.37%) ++ (10 tiny)
│ │ └──1.19 MB (01.09%) ── other
│ └──0.95 MB (00.86%) ++ prefixset
├────2.13 MB (01.94%) ++ (8 tiny)
└────1.87 MB (01.70%) ++ layout
Other Measurements
0.10 MB ── canvas-2d-pixel-bytes
109.78 MB ── explicit
7.79 MB ── gfx-d2d-surfacecache
8.52 MB ── gfx-d2d-surfacevram
64.97 MB ── gfx-surface-image
0.00 MB ── gfx-surface-win32
97.02 MB ── heap-allocated
99.07 MB ── heap-committed
2.06% ── heap-committed-fragmentation
0.55 MB ── heap-dirty
13.98 MB ── heap-unallocated
2 ── js-compartments-system
5 ── js-compartments-user
11.00 MB ── js-gc-heap
0.70 MB ── js-gc-heap-arena-unused
0.00 MB ── js-gc-heap-chunk-clean-unused
0.00 MB ── js-gc-heap-chunk-dirty-unused
2.88 MB ── js-gc-heap-decommitted
2.77% ── js-gc-heap-unused-fraction
2.92 MB ── js-total-analysis-temporary
0.96 MB ── js-total-mjit
3.71 MB ── js-total-objects
3.81 MB ── js-total-scripts
2.94 MB ── js-total-shapes
2.44 MB ── js-total-strings
0.40 MB ── js-total-type-inference
0 ── low-memory-events-physical
0 ── low-memory-events-virtual
160.92 MB ── private
196.66 MB ── resident
0.00 MB ── shmem-allocated
0.00 MB ── shmem-mapped
4.30 MB ── storage-sqlite
507.08 MB ── vsize
After image-discarding has happend:
39.67 MB (100.0%) -- explicit
├──19.27 MB (48.57%) -- js
│ ├───6.76 MB (17.05%) -- compartment([System Principal], 0x6d60000)
│ │ ├──3.42 MB (08.63%) -- gc-heap
│ │ │ ├──1.17 MB (02.96%) -- shapes
│ │ │ │ ├──0.73 MB (01.83%) ── tree
│ │ │ │ └──0.45 MB (01.13%) ++ (2 tiny)
│ │ │ ├──1.09 MB (02.75%) -- objects
│ │ │ │ ├──0.77 MB (01.93%) ── function
│ │ │ │ └──0.32 MB (00.82%) ── non-function
│ │ │ ├──0.65 MB (01.64%) ── scripts
│ │ │ ├──0.45 MB (01.15%) -- arena
│ │ │ │ ├──0.42 MB (01.05%) ── unused
│ │ │ │ └──0.04 MB (00.09%) ++ (2 tiny)
│ │ │ └──0.05 MB (00.13%) ++ (3 tiny)
│ │ ├──1.26 MB (03.19%) ── script-data
│ │ ├──0.74 MB (01.87%) ++ shapes-extra
│ │ ├──0.50 MB (01.26%) ── analysis-temporary
│ │ ├──0.43 MB (01.07%) ++ (5 tiny)
│ │ └──0.41 MB (01.03%) ── object-slots
│ ├───4.60 MB (11.59%) -- compartment(http://support.amd.com/us/gpudownload/windows/Pages/radeonmob_win7-32.aspx)
│ │ ├──2.07 MB (05.21%) -- gc-heap
│ │ │ ├──0.54 MB (01.37%) ++ objects
│ │ │ ├──0.50 MB (01.25%) -- arena
│ │ │ │ ├──0.47 MB (01.19%) ── unused
│ │ │ │ └──0.02 MB (00.06%) ++ (2 tiny)
│ │ │ ├──0.46 MB (01.16%) ++ shapes
│ │ │ ├──0.45 MB (01.13%) ── scripts
│ │ │ └──0.12 MB (00.29%) ++ (2 tiny)
│ │ ├──1.10 MB (02.76%) ── script-data
│ │ ├──0.89 MB (02.24%) ++ (7 tiny)
│ │ └──0.55 MB (01.38%) ── analysis-temporary
│ ├───3.15 MB (07.95%) ── gc-heap-decommitted
│ ├───1.71 MB (04.32%) -- compartment(atoms)
│ │ ├──1.03 MB (02.60%) ── string-chars
│ │ └──0.68 MB (01.72%) -- gc-heap
│ │ ├──0.68 MB (01.70%) ── strings
│ │ └──0.01 MB (00.02%) ++ arena
│ ├───1.27 MB (03.21%) -- runtime
│ │ ├──0.77 MB (01.95%) ++ (6 tiny)
│ │ └──0.50 MB (01.26%) ── atoms-table
│ ├───0.61 MB (01.55%) ++ compartment(http://edge.sharethis.com/share5x/index.00c36c392960bf3ea24030df1d3e8056.html)
│ ├───0.60 MB (01.52%) ++ (6 tiny)
│ └───0.55 MB (01.38%) ── xpconnect
├───9.90 MB (24.96%) ── heap-unclassified
├───5.42 MB (13.66%) -- storage
│ ├──4.47 MB (11.27%) -- sqlite
│ │ ├──1.77 MB (04.46%) -- places.sqlite
│ │ │ ├──1.51 MB (03.81%) ── cache-used [3]
│ │ │ └──0.26 MB (00.66%) ++ (2 tiny)
│ │ ├──1.51 MB (03.79%) ++ (10 tiny)
│ │ └──1.20 MB (03.02%) ── other
│ └──0.95 MB (02.39%) -- prefixset
│ └──0.95 MB (02.39%) ── all
├───1.90 MB (04.79%) -- layout
│ ├──0.70 MB (01.77%) -- shell(chrome://browser/content/browser.xul)
│ │ ├──0.51 MB (01.29%) ── arenas
│ │ └──0.19 MB (00.48%) ++ (2 tiny)
│ ├──0.67 MB (01.69%) ++ (4 tiny)
│ └──0.53 MB (01.33%) ++ shell(http://support.amd.com/us/gpudownload/windows/Pages/radeonmob_win7-32.aspx)
├───1.05 MB (02.66%) -- images
│ ├──0.70 MB (01.76%) -- content
│ │ ├──0.70 MB (01.76%) -- used
│ │ │ ├──0.69 MB (01.73%) ── raw
│ │ │ └──0.01 MB (00.03%) ++ (2 tiny)
│ │ └──0.00 MB (00.00%) ++ unused
│ └──0.36 MB (00.90%) ++ chrome
├───0.87 MB (02.19%) ── xpti-working-set
├───0.69 MB (01.74%) ++ (6 tiny)
└───0.57 MB (01.44%) -- startup-cache
├──0.57 MB (01.44%) ── mapping
└──0.00 MB (00.00%) ── data
Other Measurements
0.00 MB ── canvas-2d-pixel-bytes
39.67 MB ── explicit
0.30 MB ── gfx-d2d-surfacecache
8.57 MB ── gfx-d2d-surfacevram
0.38 MB ── gfx-surface-image
0.00 MB ── gfx-surface-win32
27.97 MB ── heap-allocated
32.45 MB ── heap-committed
13.77% ── heap-committed-fragmentation
1.37 MB ── heap-dirty
16.03 MB ── heap-unallocated
2 ── js-compartments-system
5 ── js-compartments-user
10.00 MB ── js-gc-heap
1.12 MB ── js-gc-heap-arena-unused
0.00 MB ── js-gc-heap-chunk-clean-unused
0.00 MB ── js-gc-heap-chunk-dirty-unused
3.15 MB ── js-gc-heap-decommitted
1.78% ── js-gc-heap-unused-fraction
1.17 MB ── js-total-analysis-temporary
0.78 MB ── js-total-mjit
2.31 MB ── js-total-objects
3.59 MB ── js-total-scripts
2.76 MB ── js-total-shapes
1.88 MB ── js-total-strings
0.29 MB ── js-total-type-inference
0 ── low-memory-events-physical
0 ── low-memory-events-virtual
93.16 MB ── private
129.60 MB ── resident
0.00 MB ── shmem-allocated
0.00 MB ── shmem-mapped
4.47 MB ── storage-sqlite
As I have done further investigation on the cause, Firefox may not be the one to blame for this bug. The recently updated Microsoft Security Essentials's(Version4.0) real-time behavior monitoring could be causing Firefox to behave in the way it's not supposed to.
I can't be sure about that, so I'll leave this bug open for now until I get the concrete proof.
Please let me know if the bug is reproducible for you with MSE v4 installed in your computer.
Microsoft Security Essentials seems to be innocent. Uninstalling it did not fix the bug.
Disabling the Hardware Acceleration fixes the problem. I thought Catalyst 12.4 is the cause because the bug has started happening only recently(about 4/24~), but rolling back to 12.3 did not fix the bug. Maybe Firefox is at fault after all?
I thought disabling HA had fixed the problem, but it actually doesn't. The bug occurs even with HA disabled. I am almost at my wit's end...
In order to reproduce this bug, you must maximize the Firefox window so that you can see the grey background image on the URL I mentioned at the top. As long as you keep the window small enough to not see the background image, the bug does not reproduce.
On another note, the bug also happens on Chrome but not on IE9 or Opera 11.62.
I've found the cause. One of the image files on the page is the cause of the bug.
http://support.amd.com/Style%20Library/Images/AMD/main_content_bottom.png
When blocking this image with Adblock Plus, the bug stopped happening. You'll see a huge difference in memory usage if you do the same thing.
Steps to reproduce
1. Create a bland new profile.
2. Visit http://support.amd.com/us/gpudownload/windows/Pages/radeonmob_win7-64.aspx
3. The memory usage should go up to 100~150MB.
4. Install Adblock Plus
5. Put "http://support.amd.com/Style%20Library/Images/AMD/main_content_bottom.png" into the filter list.
6. Visit the page again.
7. Now memory usage is normal. About 1/2 the memory usage you see at the Step 2.
Comment 8•13 years ago
|
||
Confirmed against Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120430 Firefox/15.0a1 ID:20120430030504 (using a Browser independent Adblocker).
Image non-blocked:
191,631,132 B (100.0%) -- explicit
├───70,122,064 B (36.59%) ── heap-unclassified
├───68,770,700 B (35.89%) -- images
│ ├──68,469,636 B (35.73%) -- content
│ │ ├──68,469,636 B (35.73%) -- used
│ │ │ ├──67,733,700 B (35.35%) ── uncompressed-heap
│ │ │ ├─────735,936 B (00.38%) ── raw
│ │ │ └───────────0 B (00.00%) ── uncompressed-nonheap
│ │ └───────────0 B (00.00%) -- unused
│ │ ├──0 B (00.00%) ── raw
│ │ ├──0 B (00.00%) ── uncompressed-heap
│ │ └──0 B (00.00%) ── uncompressed-nonheap
│ └─────301,064 B (00.16%) ++ chrome
├───30,384,744 B (15.86%) ++ js
├───10,872,578 B (05.67%) ++ window-objects
├────6,333,512 B (03.31%) ++ storage
├────2,360,976 B (01.23%) ++ startup-cache
├────1,312,816 B (00.69%) ── xpti-working-set
├──────819,744 B (00.43%) ── atom-table
├──────352,152 B (00.18%) ++ layout
├──────275,360 B (00.14%) ++ gfx
├───────16,656 B (00.01%) ── cycle-collector
├────────9,808 B (00.01%) ── history-links-hashtable
├───────────22 B (00.00%) ── network-memory-cache
└────────────0 B (00.00%) ── spell-check
582,428 B ── canvas-2d-pixel-bytes
191,569,088 B ── explicit
7,863,760 B ── gfx-d2d-surfacecache
4,776,736 B ── gfx-d2d-surfacevram
68,052,780 B ── gfx-surface-image
0 ── ghost-windows
174,722,844 B ── heap-allocated
178,626,560 B ── heap-committed
2.17% ── heap-committed-fragmentation
1,204,224 B ── heap-dirty
28,698,482 B ── heap-unallocated
67,733,700 B ── images-content-used-uncompressed
Image blocked:
63,586,937 B (100.0%) -- explicit
├──30,439,280 B (47.87%) ++ js
├──11,169,804 B (17.57%) ++ window-objects
├──10,994,930 B (17.29%) ── heap-unclassified
├───6,499,752 B (10.22%) ++ storage
├───1,312,816 B (02.06%) ── xpti-working-set
├─────941,096 B (01.48%) -- images
│ ├──640,032 B (01.01%) -- content
│ │ ├──640,032 B (01.01%) -- used
│ │ │ ├──635,648 B (01.00%) ── raw
│ │ │ ├────4,384 B (00.01%) ── uncompressed-heap
│ │ │ └────────0 B (00.00%) ── uncompressed-nonheap
│ │ └────────0 B (00.00%) -- unused
│ │ ├──0 B (00.00%) ── raw
│ │ ├──0 B (00.00%) ── uncompressed-heap
│ │ └──0 B (00.00%) ── uncompressed-nonheap
│ └──301,064 B (00.47%) ++ chrome
├─────815,744 B (01.28%) ── atom-table
├─────672,531 B (01.06%) ++ startup-cache
├─────352,152 B (00.55%) ++ layout
├─────328,624 B (00.52%) ++ gfx
├──────49,360 B (00.08%) ── cycle-collector
├──────10,784 B (00.02%) ── history-links-hashtable
├──────────64 B (00.00%) ── network-memory-cache
└───────────0 B (00.00%) ── spell-check
557,500 B ── canvas-2d-pixel-bytes
63,589,181 B ── explicit
18,432 B ── gfx-d2d-surfacecache
4,751,808 B ── gfx-d2d-surfacevram
322,368 B ── gfx-surface-image
0 ── ghost-windows
42,992,102 B ── heap-allocated
55,484,416 B ── heap-committed
22.49% ── heap-committed-fragmentation
3,538,944 B ── heap-dirty
32,504,200 B ── heap-unallocated
4,384 B ── images-content-used-uncompressed
Besides the obvious, the increased "heap-unclassified" Usage in the non-blocked Case is remarkable IMHO, no?
Updated•13 years ago
|
Status: UNCONFIRMED → NEW
Component: General → ImageLib
Ever confirmed: true
QA Contact: general → imagelib
Whiteboard: [memshrink]
Comment 9•13 years ago
|
||
> When blocking this image with Adblock Plus, the bug stopped happening. You'll see a huge difference
> in memory usage if you do the same thing.
Well, did you look at the image you've blocked? It's a giant white block.
If you can reproduce the CPU usage being maxed out, that's certainly a bug. But I don't see how we could handle the fact that this page loads a giant white block any better than we currently do.
Comment 10•13 years ago
|
||
> Image non-blocked:
> 191,631,132 B (100.0%) -- explicit
> ├───70,122,064 B (36.59%) ── heap-unclassified
> ├───68,770,700 B (35.89%) -- images
> Image blocked:
> 63,586,937 B (100.0%) -- explicit
> ├──10,994,930 B (17.29%) ── heap-unclassified
I guess this is pretty suspicious. It almost looks like we've loaded the image twice. That would be bad!
Reporter | ||
Comment 11•13 years ago
|
||
@Justin
Yes, you're certainly right. I noticed the image having 10000px width after posting the comment and got astonished. Sorry about that...
It's better to change the description of the bug.
Switching back onto the tab took about as twice longer as it does on Chrome , so I jumped to the conclusion that it would be a bug. That may have something to do with the image being loaded twice.
Updated•13 years ago
|
Assignee: nobody → n.nethercote
Summary: abnormal memory & CPU usage on some specific pages → Large image possibly being loaded twice?
Whiteboard: [memshrink] → [MemShrink:P2][see comment 10]
Comment 12•13 years ago
|
||
I'll try to reproduce and if I can, use DMD to investigate.
Comment 13•12 years ago
|
||
I just tried to reproduce this on Linux and failed. When following comment 7's steps to reproduce, I didn't see memory usage go up much on step 3. In particular, the "images" sub-tree in about:memory never went above 1MB. So maybe it's a Win7-specific thing?
Updated•11 years ago
|
Assignee: n.nethercote → nobody
Comment 14•7 years ago
|
||
It seems unlikely we'll fix this.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•