Closed Bug 713216 Opened 13 years ago Closed 7 years ago

Stylish add-on causing growing cycle collection time in Firefox/Seamonkey

Categories

(Core :: JavaScript Engine, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: mz+bugzilla, Assigned: mccr8)

References

Details

(Whiteboard: [Snappy:P3])

Attachments

(1 file, 2 obsolete files)

Attached file cc heap dump (obsolete) (deleted) —
That is second found add-on, which causing growing cc time. Build: Mozilla/5.0 (Windows NT 5.1; rv:12.0a1) Gecko/20111222 Firefox/12.0a1 Stylish 1.2.4 Clean profile, no other add-ons, only changed settings are browser.link.open_newwindow 2 browser.tabs.opentabfor.middleclick false browser.tabs.warnOnOpen false javascript.options.mem.log true Steps to reproduce: 1) In Stylish properties create new style called ixbt with such data @namespace url(http://www.w3.org/1999/xhtml); @-moz-document domain("www.ixbt.com") { .news_left_col {width: 15% !important;} .news_right_col {width: 15% !important;} } 2) Visit http://www.ixbt.com/news/hard/index.shtml page 3) Using calendar in upper left corner open with middle mouse click 10-15-20 news windows. 4) Wait until pages finished loading and close windows one by one 5) Check about:memory to see that there are no zombie compartments and then check cc times. After each test run I get cc times growing by 80-100 ms, results from third run: GC(T+1343.0) Type:Glob, Total:44,2, Wait:0,1, Mark:35,0, Sweep:8,8, FinObj:1,0, FinStr:0,0, FinScr:0,1, FinShp:3,2, DisCod:0,4, DisAnl:0,4, XPCnct:2,2, Destry:0,0, End:2,2, +Chu:0, -Chu:0, Reason: API CC(T+1344.3) collected: 126 (126 waiting for GC), suspected: 190, duration: 266 ms. GC(T+1347.1) Type:Glob, Total:53,2, Wait:0,1, Mark:36,5, Sweep:15,9, FinObj:0,9, FinStr:0,0, FinScr:0,3, FinShp:2,5, DisCod:0,3, DisAnl:0,5, XPCnct:2,1, Destry:0,0, End:2,2, +Chu:0, -Chu:0, Reason: API CC(T+1352.3) collected: 112 (112 waiting for GC), suspected: 100, duration: 250 ms. CC heap dump after two runs attached, same dump after three runs in next comment
Attached file cc heap dump after third run (obsolete) (deleted) —
Also, if I use tabs for opening links, issue doesn't appear, tested on 30+ tabs from same site, after closing them cc time drops back to low value GC(T+589.9) Type:Glob, Total:23,1, Wait:0,1, Mark:15,8, Sweep:6,6, FinObj:1,2, FinStr:0,4, FinScr:0,2, FinShp:1,2, DisCod:0,5, DisAnl:0,8, XPCnct:1,4, Destry:0,0, End:1,9, +Chu:0, -Chu:0, Reason: API CC(T+591.0) collected: 1880 (1880 waiting for GC), suspected: 1715, duration: 32 ms. GC(T+595.0) Type:Glob, Total:21,5, Wait:0,1, Mark:15,7, Sweep:5,3, FinObj:0,5, FinStr:0,0, FinScr:0,1, FinShp:0,9, DisCod:0,4, DisAnl:0,4, XPCnct:1,7, Destry:0,0, End:1,9, +Chu:0, -Chu:0, Reason: API CC(T+600.0) collected: 112 (112 waiting for GC), suspected: 179, duration: 47 ms.
Blocks: 608954
It'll be interesting to see why the cycle collector graph gets big in this case. It could just be the addon holding onto memory in a weird way.
I suppose, add-on continue to hold some data, which in general case discarded and freed when window closes. Also, I've e-mailed to add-on author, he may find what is wrong checking from his side :)
I don't really know what to do with the information posted so far, so I'm afraid I won't be much help until we narrow it down some more.
What does Stylish actually end up doing given the steps in comment 0?
After #1 it will register the code with the stylesheet service and save to an sqlite database. For #2 and #3, every new window will get a nsIWebProgressListener registered. onLocationChange, it will call an XPCOM service which searches the sqlite DB and returns any styles (XPCOM objects) matching the URL. In this case it will find one and will update the Stylish icon to the "colorful" icon. In #3 and #4 when the current tab changes, the same search as above happens. Those are the most relevant things that are happening, but there's a number of other things going on for new windows. One test would really narrow it down: does the problem occur without step #1 (creating the style)? If not, and if it's not happening when creating/switching tabs as Phoenix says, that would seem to indicate some problem with the nsIWebProgressListener when it actually receives results from its search. The overlay code is viewable at https://addons.mozilla.org/en-US/firefox/files/browse/136340/file/content/overlay.js
(In reply to Jason Barnabe (np) from comment #7) >One test would really narrow it down: does the problem occur without step #1 >(creating the style)? If not, and if it's not happening when creating/switching >tabs as Phoenix says, that would seem to indicate some problem with the >nsIWebProgressListener when it actually receives results from its search. I'll test this at Monday
Okay, I made additional tests and their results is funny, with today nightly Mozilla/5.0 (Windows NT 5.1; rv:12.0a1) Gecko/20111225 Firefox/12.0a1 it's enough to just install Stylish to get growing cc times. Even if it disabled, cc times still continue to grow. No stylish installed, cc times after three test runs: CC(T+586.8) collected: 1737 (1737 waiting for GC), suspected: 1498, duration: 16 ms. Stylish installed, disabled, after first test run: CC(T+253.2) collected: 3866 (3866 waiting for GC), suspected: 2026, duration: 94 ms. After second: CC(T+469.3) collected: 107 (107 waiting for GC), suspected: 184, duration: 188 ms. After third: CC(T+669.7) collected: 1690 (1690 waiting for GC), suspected: 186, duration: 265 ms. I also test case when Stylish enabled and style for site created, duration time numbers are exact same.
Assignee: general → continuation
With new memory reporters available, I get some new data on this. After a couple of days, cc times us usual grows to huge numbers, to be exact: CC(T+148841.2) duration: 3760ms, suspected: 313, visited: 870698 RCed and 2552559 GCed, collected: 0 RCed and 0 GCed (0 waiting for GC) ForgetSkippable 1 times before CC, min: 0 ms, max: 0 ms, avg: 0 ms, total: 0 ms, removed: 801 GC(T+148923.8) Total Time: 777,5ms, Compartments Collected: 637, Total Compartments: 637, MMU (20ms): 0%, MMU (50ms): 0%, Max Pause: 622,2ms, Allocated: 330MB, +Chunks: 0, -Chunks: 0 Slice: 0, Pause: 75,0 (When: 0,0ms, Reason: SET_NEW_DOCUMENT): Purge: 0,2ms, Mark: 54,2ms, Mark Discard Code: 19,2ms, Mark Roots: 44,2ms Slice: 9, Pause: 622,2 (When: 1039,7ms, Reason: INTER_SLICE_GC): Mark: 499,2ms, Mark Delayed: 0,1ms, Mark Weak: 0,2ms, Mark Gray: 498,7ms, Mark Gray and Weak: 0,2ms, Finalize Start Callback: 1,1ms, Sweep: 120,5ms, Sweep Atoms: 6,3ms, Sweep Compartments: 55,9ms, Sweep Tables: 28,1ms, Sweep Object: 5,3ms, Sweep String: 0,6ms, Sweep Script: 6,3ms, Sweep Shape: 29,0ms, Sweep Discard Code: 14,7ms, Discard Analysis: 12,1ms, Discard TI: 0,1ms, Free TI Arena: 0,9ms, Sweep Types: 0,9ms, Clear Script Analysis: 9,3ms, Finalize End Callback: 15,5ms, Deallocate: 0,1ms, End Callback: 0,5ms Totals: Purge: 0,2ms, Mark: 627,7ms, Mark Discard Code: 19,2ms, Mark Roots: 44,2ms, Mark Delayed: 0,9ms, Mark Weak: 0,2ms, Mark Gray: 498,7ms, Mark Gray and Weak: 0,2ms, Finalize Start Callback: 1,1ms, Sweep: 120,5ms, Sweep Atoms: 6,3ms, Sweep Compartments: 55,9ms, Sweep Tables: 28,1ms, Sweep Object: 5,3ms, Sweep String: 0,6ms, Sweep Script: 6,3ms, Sweep Shape: 29,0ms, Sweep Discard Code: 14,7ms, Discard Analysis: 12,1ms, Discard TI: 0,1ms, Free TI Arena: 0,9ms, Sweep Types: 0,9ms, Clear Script Analysis: 9,3ms, Finalize End Callback: 15,5ms, Deallocate: 0,1ms, End Callback: 0,5ms I'm checked about:memory and that what I see there with only two windows with about: pages opened: 958,348,135 B (100.0%) -- explicit ├──592,897,356 B (61.87%) -- window-objects │ ├──582,125,188 B (60.74%) -- top(none)/detached/window([system]) │ │ ├──581,748,400 B (60.70%) -- js/compartment([System Principal], about:blank) │ │ │ ├──302,968,832 B (31.61%) -- gc-heap │ │ │ │ ├───87,725,976 B (09.15%) ── unused-gc-things [304] │ │ │ │ ├───83,963,424 B (08.76%) -- shapes │ │ │ │ │ ├──53,890,416 B (05.62%) ── tree [303] │ │ │ │ │ ├──17,234,160 B (01.80%) ── dict [303] │ │ │ │ │ └──12,838,848 B (01.34%) ── base [303] │ │ │ │ ├───67,496,976 B (07.04%) -- objects │ │ │ │ │ ├──50,683,152 B (05.29%) ── function [303] │ │ │ │ │ └──16,813,824 B (01.75%) ── non-function [303] │ │ │ │ ├───60,603,752 B (06.32%) ── scripts [303] │ │ │ │ └────3,178,704 B (00.33%) ── sundries [304] │ │ │ ├──217,356,872 B (22.68%) ── script-data [303] Full about:memory?verbose data attached as file. Also, I'm checked about:compartment page, there was no ghost windows, but one other strange thing: User Compartments about:blank [2] System Compartments [System Principal], about:blank [310] [System Principal], about:compartments?verbose [2] [System Principal], about:memory?verbose Am I understand right, that this is more then 300 blank windows kept alive for some reasons? Is there something else I can do to help to debug this issue?
Nick, does this look like any of the existing about:blank weirdness we have?
(In reply to Andrew McCreight [:mccr8] from comment #11) > Nick, does this look like any of the existing about:blank weirdness we have? I don't think so. You can get lots of them if you have a session restore with many tabs, but I don't think that's the case here.
Whiteboard: [MemShrink]
I tested this on Firefox 14. I do get longer CC times after running that tab opening/closing gamut, but only for a few cycles, and with a high margin of error. It doesn't seem to matter whether Stylish is installed.
Ok, I misunderstood the original instructions, and I can reproduce this. After opening a 15 or so windows with Stylish installed and then closing them, the CC times jump to just under 600ms and stay there. No stylesheets need to be installed for this to happen. Things return to normal after a restart. about:memory?verbose: 178,011,169 B (100.0%) -- explicit ├───84,487,144 B (47.46%) ── heap-unclassified ├───80,346,832 B (45.14%) -- js │ ├──61,695,704 B (34.66%) -- compartment([System Principal], 0x2b7d97b10000) │ │ ├──35,094,528 B (19.71%) -- gc-heap │ │ │ ├──11,514,720 B (06.47%) -- objects │ │ │ │ ├───9,049,312 B (05.08%) ── function │ │ │ │ └───2,465,408 B (01.38%) ── non-function │ │ │ ├───9,031,776 B (05.07%) -- shapes │ │ │ │ ├──4,646,320 B (02.61%) ── tree │ │ │ │ ├──2,341,136 B (01.32%) ── base │ │ │ │ └──2,044,320 B (01.15%) ── dict │ │ │ ├───7,027,728 B (03.95%) -- arena │ │ │ │ ├──6,353,760 B (03.57%) ── unused │ │ │ │ ├────399,792 B (00.22%) ── padding │ │ │ │ └────274,176 B (00.15%) ── headers │ │ │ ├───6,923,904 B (03.89%) ── scripts │ │ │ ├─────247,328 B (00.14%) ── strings │ │ │ ├─────206,832 B (00.12%) ── type-objects │ │ │ └─────142,240 B (00.08%) ── xml │ │ ├──17,011,104 B (09.56%) ── script-data │ │ ├───5,956,320 B (03.35%) -- shapes-extra │ │ │ ├──3,145,728 B (01.77%) ── compartment-tables │ │ │ ├──1,486,432 B (00.84%) ── tree-tables │ │ │ ├────917,760 B (00.52%) ── dict-tables │ │ │ └────406,400 B (00.23%) ── tree-shape-kids │ │ ├───2,565,920 B (01.44%) -- objects │ │ │ ├──2,462,080 B (01.38%) ── slots │ │ │ ├─────92,064 B (00.05%) ── misc │ │ │ └─────11,776 B (00.01%) ── elements │ │ ├─────434,048 B (00.24%) -- mjit │ │ │ ├──393,216 B (00.22%) ── code │ │ │ └───40,832 B (00.02%) ── data │ │ ├─────294,560 B (00.17%) -- type-inference │ │ │ └──294,560 B (00.17%) ── script-main │ │ ├─────262,144 B (00.15%) ── analysis-temporary │ │ └──────77,080 B (00.04%) ── string-chars │ ├───6,356,752 B (03.57%) -- runtime │ │ ├──4,194,304 B (02.36%) ── stack-committed │ │ ├──1,048,576 B (00.59%) ── atoms-table │ │ ├────503,568 B (00.28%) ── contexts │ │ ├────262,144 B (00.15%) ── gc-marker │ │ ├────208,896 B (00.12%) ── runtime-object │ │ ├────131,072 B (00.07%) ── regexp-code │ │ ├──────4,096 B (00.00%) ── normal │ │ └──────4,096 B (00.00%) ── temporary │ ├───6,197,248 B (03.48%) ── gc-heap-decommitted │ ├───2,438,144 B (01.37%) ── xpconnect │ ├───2,362,896 B (01.33%) -- compartment(atoms) │ │ ├──1,556,480 B (00.87%) -- gc-heap │ │ │ ├──1,516,576 B (00.85%) ── strings │ │ │ └─────39,904 B (00.02%) -- arena │ │ │ ├──19,296 B (00.01%) ── unused │ │ │ ├──12,160 B (00.01%) ── headers │ │ │ └───8,448 B (00.00%) ── padding │ │ └────806,416 B (00.45%) ── string-chars │ ├─────688,128 B (00.39%) ── gc-heap-chunk-admin │ ├─────295,232 B (00.17%) -- compartment(about:blank) │ │ ├──249,856 B (00.14%) -- gc-heap │ │ │ ├──160,520 B (00.09%) -- arena │ │ │ │ ├──156,424 B (00.09%) ── unused [4] │ │ │ │ ├────2,144 B (00.00%) ── padding [4] │ │ │ │ └────1,952 B (00.00%) ── headers [4] │ │ │ ├───53,832 B (00.03%) -- shapes │ │ │ │ ├──19,152 B (00.01%) ── base [4] │ │ │ │ ├──18,360 B (00.01%) ── tree [4] │ │ │ │ └──16,320 B (00.01%) ── dict [4] │ │ │ ├───31,776 B (00.02%) -- objects │ │ │ │ ├──26,624 B (00.01%) ── function [4] │ │ │ │ └───5,152 B (00.00%) ── non-function [4] │ │ │ ├────3,120 B (00.00%) ── type-objects [4] │ │ │ └──────608 B (00.00%) ── scripts [4] │ │ ├───33,248 B (00.02%) -- shapes-extra │ │ │ ├──20,736 B (00.01%) ── compartment-tables [4] │ │ │ ├───9,472 B (00.01%) ── dict-tables [4] │ │ │ ├───2,176 B (00.00%) ── tree-tables [4] │ │ │ └─────864 B (00.00%) ── tree-shape-kids [4] │ │ ├───12,096 B (00.01%) -- objects │ │ │ ├──11,520 B (00.01%) ── slots [4] │ │ │ └─────576 B (00.00%) ── misc [4] │ │ └───────32 B (00.00%) ── script-data [4] │ ├─────165,112 B (00.09%) -- compartment([System Principal], file:///home/kris/theme-test/bootstrap.js, 0x2b7d98f66000) │ │ ├──131,072 B (00.07%) -- gc-heap │ │ │ ├───70,528 B (00.04%) -- arena │ │ │ │ ├──68,408 B (00.04%) ── unused │ │ │ │ ├───1,096 B (00.00%) ── padding │ │ │ │ └───1,024 B (00.00%) ── headers │ │ │ ├───27,440 B (00.02%) -- shapes │ │ │ │ ├──16,320 B (00.01%) ── tree │ │ │ │ ├───7,840 B (00.00%) ── base │ │ │ │ └───3,280 B (00.00%) ── dict │ │ │ ├───27,024 B (00.02%) -- objects │ │ │ │ ├──19,488 B (00.01%) ── function │ │ │ │ └───7,536 B (00.00%) ── non-function │ │ │ ├────4,256 B (00.00%) ── scripts │ │ │ ├────1,248 B (00.00%) ── type-objects │ │ │ └──────576 B (00.00%) ── strings │ │ ├───16,992 B (00.01%) -- shapes-extra │ │ │ ├───9,216 B (00.01%) ── compartment-tables │ │ │ ├───4,640 B (00.00%) ── tree-tables │ │ │ ├───1,792 B (00.00%) ── tree-shape-kids │ │ │ └───1,344 B (00.00%) ── dict-tables │ │ ├────9,704 B (00.01%) ── script-data │ │ ├────5,856 B (00.00%) -- objects │ │ │ ├──5,632 B (00.00%) ── slots │ │ │ ├────208 B (00.00%) ── misc │ │ │ └─────16 B (00.00%) ── elements │ │ ├──────848 B (00.00%) ── string-chars │ │ └──────640 B (00.00%) -- type-inference │ │ └──640 B (00.00%) ── script-main │ ├─────110,728 B (00.06%) -- compartment([System Principal], file:///home/kris/check-compatibility/bootstrap.js, 0x2b7d98f63000) │ │ ├───90,112 B (00.05%) -- gc-heap │ │ │ ├──45,824 B (00.03%) -- arena │ │ │ │ ├──44,360 B (00.02%) ── unused │ │ │ │ ├─────760 B (00.00%) ── padding │ │ │ │ └─────704 B (00.00%) ── headers │ │ │ ├──20,048 B (00.01%) -- objects │ │ │ │ ├──16,448 B (00.01%) ── function │ │ │ │ └───3,600 B (00.00%) ── non-function │ │ │ ├──19,360 B (00.01%) -- shapes │ │ │ │ ├──11,720 B (00.01%) ── tree │ │ │ │ ├───5,040 B (00.00%) ── base │ │ │ │ └───2,600 B (00.00%) ── dict │ │ │ ├───3,952 B (00.00%) ── scripts │ │ │ ├─────864 B (00.00%) ── type-objects │ │ │ └──────64 B (00.00%) ── strings │ │ ├───11,104 B (00.01%) -- shapes-extra │ │ │ ├───8,704 B (00.00%) ── compartment-tables │ │ │ ├───1,280 B (00.00%) ── tree-shape-kids │ │ │ ├─────832 B (00.00%) ── dict-tables │ │ │ └─────288 B (00.00%) ── tree-tables │ │ ├────5,024 B (00.00%) -- objects │ │ │ ├──4,864 B (00.00%) ── slots │ │ │ ├────144 B (00.00%) ── misc │ │ │ └─────16 B (00.00%) ── elements │ │ ├────4,024 B (00.00%) ── script-data │ │ ├──────352 B (00.00%) -- type-inference │ │ │ └──352 B (00.00%) ── script-main │ │ └──────112 B (00.00%) ── string-chars │ ├──────36,888 B (00.02%) -- compartment(moz-nullprincipal:{290f8c36-754b-4427-bb48-67db357ba8fb}) │ │ ├──32,768 B (00.02%) -- gc-heap │ │ │ ├──26,472 B (00.01%) -- arena │ │ │ │ ├──25,888 B (00.01%) ── unused │ │ │ │ ├─────328 B (00.00%) ── padding │ │ │ │ └─────256 B (00.00%) ── headers │ │ │ ├───3,120 B (00.00%) -- shapes │ │ │ │ ├──1,640 B (00.00%) ── tree │ │ │ │ ├────840 B (00.00%) ── base │ │ │ │ └────640 B (00.00%) ── dict │ │ │ ├───2,832 B (00.00%) -- objects │ │ │ │ ├──2,496 B (00.00%) ── function │ │ │ │ └────336 B (00.00%) ── non-function │ │ │ ├─────192 B (00.00%) ── type-objects │ │ │ └─────152 B (00.00%) ── scripts │ │ ├───2,432 B (00.00%) -- shapes-extra │ │ │ ├──2,048 B (00.00%) ── compartment-tables │ │ │ ├────288 B (00.00%) ── dict-tables │ │ │ └─────96 B (00.00%) ── tree-shape-kids │ │ ├───1,680 B (00.00%) -- objects │ │ │ ├──1,536 B (00.00%) ── slots │ │ │ └────144 B (00.00%) ── misc │ │ └───────8 B (00.00%) ── script-data │ ├───────────0 B (00.00%) ── gc-heap-chunk-dirty-unused │ └───────────0 B (00.00%) ── gc-heap-chunk-clean-unused ├────5,711,008 B (03.21%) -- storage │ ├──5,092,432 B (02.86%) -- sqlite │ │ ├──1,353,520 B (00.76%) -- places.sqlite │ │ │ ├──1,256,376 B (00.71%) ── cache-used [2] │ │ │ ├─────65,752 B (00.04%) ── schema-used [2] │ │ │ └─────31,392 B (00.02%) ── stmt-used [2] │ │ ├──1,200,272 B (00.67%) ── other │ │ ├────639,664 B (00.36%) -- extensions.sqlite │ │ │ ├──429,792 B (00.24%) ── cache-used │ │ │ ├──197,472 B (00.11%) ── stmt-used │ │ │ └───12,400 B (00.01%) ── schema-used │ │ ├────620,056 B (00.35%) -- chromeappsstore.sqlite │ │ │ ├──595,584 B (00.33%) ── cache-used │ │ │ ├───17,600 B (00.01%) ── stmt-used │ │ │ └────6,872 B (00.00%) ── schema-used │ │ ├────303,168 B (00.17%) -- addons.sqlite │ │ │ ├──264,792 B (00.15%) ── cache-used │ │ │ ├───28,192 B (00.02%) ── stmt-used │ │ │ └───10,184 B (00.01%) ── schema-used │ │ ├────213,496 B (00.12%) -- content-prefs.sqlite │ │ │ ├──198,792 B (00.11%) ── cache-used │ │ │ ├───10,560 B (00.01%) ── stmt-used │ │ │ └────4,144 B (00.00%) ── schema-used │ │ ├────206,424 B (00.12%) -- webappsstore.sqlite │ │ │ ├──199,584 B (00.11%) ── cache-used │ │ │ ├────6,840 B (00.00%) ── schema-used │ │ │ └────────0 B (00.00%) ── stmt-used │ │ ├────200,472 B (00.11%) -- urlclassifier3.sqlite │ │ │ ├──129,328 B (00.07%) ── stmt-used │ │ │ ├───66,792 B (00.04%) ── cache-used │ │ │ └────4,352 B (00.00%) ── schema-used │ │ ├────119,744 B (00.07%) -- downloads.sqlite │ │ │ ├───99,792 B (00.06%) ── cache-used │ │ │ ├───16,800 B (00.01%) ── stmt-used │ │ │ └────3,152 B (00.00%) ── schema-used │ │ ├────109,760 B (00.06%) -- permissions.sqlite │ │ │ ├───99,792 B (00.06%) ── cache-used │ │ │ ├────7,856 B (00.00%) ── stmt-used │ │ │ └────2,112 B (00.00%) ── schema-used │ │ ├────107,264 B (00.06%) -- signons.sqlite │ │ │ ├───99,792 B (00.06%) ── cache-used │ │ │ ├────5,536 B (00.00%) ── schema-used │ │ │ └────1,936 B (00.00%) ── stmt-used │ │ └─────18,592 B (00.01%) -- cookies.sqlite │ │ ├──10,840 B (00.01%) ── cache-used │ │ ├───4,496 B (00.00%) ── stmt-used │ │ └───3,256 B (00.00%) ── schema-used │ └────618,576 B (00.35%) -- prefixset │ └──618,576 B (00.35%) ── all ├────4,894,344 B (02.75%) -- window-objects │ ├──2,082,752 B (01.17%) -- top(chrome://browser/content/browser.xul, id=1) │ │ └──2,082,752 B (01.17%) -- active │ │ ├──2,072,768 B (01.16%) -- window(chrome://browser/content/browser.xul) │ │ │ ├──1,190,688 B (00.67%) -- layout │ │ │ │ ├────706,672 B (00.40%) ── arenas │ │ │ │ ├────483,664 B (00.27%) ── style-sets │ │ │ │ └────────352 B (00.00%) ── text-runs │ │ │ ├────493,216 B (00.28%) ── style-sheets │ │ │ └────388,864 B (00.22%) ── dom [2] │ │ └──────9,984 B (00.01%) -- window(about:blank) │ │ └──9,984 B (00.01%) ── dom [4] │ ├──1,075,200 B (00.60%) -- top(about:addons, id=10) │ │ └──1,075,200 B (00.60%) -- active │ │ ├────876,928 B (00.49%) -- window(about:addons) │ │ │ ├──617,120 B (00.35%) -- layout │ │ │ │ ├──403,056 B (00.23%) ── arenas │ │ │ │ └──214,064 B (00.12%) ── style-sets │ │ │ ├──158,800 B (00.09%) ── style-sheets │ │ │ └──101,008 B (00.06%) ── dom [2] │ │ ├────197,248 B (00.11%) -- window(about:blank) │ │ │ ├──192,128 B (00.11%) -- layout │ │ │ │ ├──153,616 B (00.09%) ── style-sets │ │ │ │ └───38,512 B (00.02%) ── arenas │ │ │ └────5,120 B (00.00%) ── dom [2] │ │ └──────1,024 B (00.00%) -- window([system]) │ │ └──1,024 B (00.00%) ── dom │ ├────900,744 B (00.51%) -- top(about:memory?verbose, id=21) │ │ └──900,744 B (00.51%) -- active │ │ └──900,744 B (00.51%) -- window(about:memory?verbose) │ │ ├──873,136 B (00.49%) -- layout │ │ │ ├──721,520 B (00.41%) ── arenas │ │ │ ├──151,360 B (00.09%) ── style-sets │ │ │ └──────256 B (00.00%) ── text-runs │ │ ├───16,024 B (00.01%) ── style-sheets │ │ └───11,584 B (00.01%) ── dom [2] │ ├────213,568 B (00.12%) -- top(resource://gre-resources/hiddenWindow.html, id=3) │ │ └──213,568 B (00.12%) -- active │ │ └──213,568 B (00.12%) -- window(resource://gre-resources/hiddenWindow.html) │ │ ├──208,112 B (00.12%) -- layout │ │ │ ├──153,216 B (00.09%) ── style-sets │ │ │ └───54,896 B (00.03%) ── arenas │ │ └────5,456 B (00.00%) ── dom [2] │ ├────197,120 B (00.11%) -- top(about:blank, id=8) │ │ └──197,120 B (00.11%) -- active │ │ └──197,120 B (00.11%) -- window(about:blank) │ │ ├──192,128 B (00.11%) -- layout │ │ │ ├──153,616 B (00.09%) ── style-sets │ │ │ └───38,512 B (00.02%) ── arenas │ │ └────4,992 B (00.00%) ── dom [2] │ ├────197,120 B (00.11%) -- top(about:blank, id=7) │ │ └──197,120 B (00.11%) -- active │ │ └──197,120 B (00.11%) -- window(about:blank) │ │ ├──192,128 B (00.11%) -- layout │ │ │ ├──153,616 B (00.09%) ── style-sets │ │ │ └───38,512 B (00.02%) ── arenas │ │ └────4,992 B (00.00%) ── dom [2] │ ├────197,120 B (00.11%) -- top(about:blank, id=9) │ │ └──197,120 B (00.11%) -- active │ │ └──197,120 B (00.11%) -- window(about:blank) │ │ ├──192,128 B (00.11%) -- layout │ │ │ ├──153,616 B (00.09%) ── style-sets │ │ │ └───38,512 B (00.02%) ── arenas │ │ └────4,992 B (00.00%) ── dom [2] │ └─────30,720 B (00.02%) -- top(none) │ └──30,720 B (00.02%) -- detached │ └──30,720 B (00.02%) -- window([system]) │ └──30,720 B (00.02%) ── dom [30] ├────1,298,480 B (00.73%) ── xpti-working-set ├──────407,680 B (00.23%) ── atom-table ├──────347,256 B (00.20%) -- layout │ └──347,256 B (00.20%) ── style-sheet-cache ├──────224,161 B (00.13%) -- startup-cache │ ├──223,521 B (00.13%) ── mapping │ └──────640 B (00.00%) ── data ├──────144,160 B (00.08%) -- images │ ├───74,528 B (00.04%) -- chrome │ │ ├──74,528 B (00.04%) -- used │ │ │ ├──74,528 B (00.04%) ── uncompressed-heap │ │ │ ├───────0 B (00.00%) ── 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 │ └───69,632 B (00.04%) -- content │ ├──69,632 B (00.04%) -- used │ │ ├──69,632 B (00.04%) ── raw │ │ ├───────0 B (00.00%) ── 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 ├───────78,720 B (00.04%) -- gfx │ ├──77,152 B (00.04%) ── font-shaped-words │ └───1,568 B (00.00%) ── font-cache ├───────69,800 B (00.04%) ── cycle-collector ├────────1,584 B (00.00%) ── history-links-hashtable └────────────0 B (00.00%) ── spell-check
It might be worth noting that when I have https://addons.mozilla.org/addon/extension-test enabled and perform those steps, I wind up with a zombie compartment for every one of those windows with the URL of a script that gets loaded via an overlay into the browser windows.
Whiteboard: [MemShrink] → [MemShrink][Snappy]
Whiteboard: [MemShrink][Snappy] → [Snappy]
Rechecked on today nightly, just after one test run I get: CC(T+267.6) duration: 281ms, suspected: 366, visited: 53251 RCed and 170111 GCed, collected: 9 RCed and 0 GCed (9 waiting for GC) ForgetSkippable 4 times before CC, min: 0 ms, max: 0 ms, avg: 0 ms, total: 0 ms, removed: 668 In about:compartments [System Principal], about:blank [27] [System Principal], about:compartments [2] [System Principal], about:memory?verbose cc and gc heap dump (10 MB, too large to attach): http://www.cs.iptcom.net/debug/heap_dump_2012.08.22.zip
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #584048 - Attachment is obsolete: true
Attachment #584049 - Attachment is obsolete: true
These are the top ten most common things in the graph: 126011 JS Object 44100 JS Script 10335 nsJSEventListener 9526 nsEventListenerManager 3796 XPCWrappedNative 1967 nsChildContentList 1367 FragmentOrElement (XUL) menupopup chrome://browser/content/browser.xul 1108 nsNodeInfo (XUL) 952 FragmentOrElement (XUL) menuseparator chrome://browser/content/browser.xul 921 FragmentOrElement (XUL) menuitem chrome://browser/content/browser.xul Maybe there are tons of event listeners holding onto JS that we aren't marking somehow?
Odd... what is keeping those EventListenerManagers alive?
(In reply to Andrew McCreight [:mccr8] from comment #17) > Maybe there are tons of event listeners holding onto JS that we aren't > marking somehow? I've seen other things in the past that made me think that, in particular bootstrapped extensions which add event listeners to nodes and then remove the nodes, but not the event listeners, at cleanup wind up with their bootstrap sandboxes kept alive.
Here is what is keeping one of the EventListenerManagers alive: 0BBFBD08 [nsXPCWrappedJS (nsIObserver)] --[mJSObj]-> 0B68B8E0 [JS Object (Object)] --[URL_STRINGS]-> 07B82C00 [JS Object (XULElement)] --[xpc_GetJSPrivate(obj)]-> 06BBE1F0 [XPCWrappedNative (XULElement)] --[mIdentity]-> 0645E650 [FragmentOrElement (XUL) stringbundle id='stylish-url-strings' chrome://browser/content/browser.xul] --[GetParent()]-> 056DEBA0 [FragmentOrElement (XUL) stringbundleset id='stringbundleset' chrome://browser/content/browser.xul] --[mAttrsAndChildren[i]]-> 056DEBF0 [FragmentOrElement (XUL) stringbundle id='bundle_brand' chrome://browser/content/browser.xul] --[mNodeInfo]-> 0B524650 [nsNodeInfo (XUL) stringbundle] --[mOwnerManager]-> 053B04F0 [nsNodeInfoManager] --[mDocument]-> 06BC1800 [nsDocument normal (XUL) chrome://browser/content/browser.xul] --[mCommandDispatcher]-> 06C67620 [nsXULCommandDispatcher] --[]-> 06BBD3D0 [FragmentOrElement (XUL) commandset id='placesCommands' chrome://browser/content/browser.xul] --[mAttrsAndChildren[i]]-> 0BD9FF10 [FragmentOrElement (XUL) command id='placesCmd_new:livemark' chrome://browser/content/browser.xul] --[[via hash] mListenerManager]-> 0BD9FF60 [nsEventListenerManager] --[mListeners[i] mListener]-> 0816A440 [nsJSEventListener] --[mScopeObject]-> 07B81040 [JS Object (ChromeWindow)] --[BookmarksMenuButton]-> 0B6480D0 [JS Object (Object)] --[personalToolbar]-> 0B698560 [JS Object (XULElement)] --[xpc_GetJSPrivate(obj)]-> 06CF7910 [XPCWrappedNative (XULElement)] --[mIdentity]-> 0B5FF5B0 [FragmentOrElement (XUL) toolbar id='PersonalToolbar' class='chromeclass-directories' chrome://browser/content/browser.xul] --[GetParent()]-> 071CC510 [FragmentOrElement (XUL) toolbox id='navigator-toolbox' chrome://browser/content/browser.xul] --[GetParent()]-> 071CC4C0 [FragmentOrElement (XUL) vbox id='browser-panel' chrome://browser/content/browser.xul] --[GetParent()]-> 071CC470 [FragmentOrElement (XUL) deck id='tab-view-deck' chrome://browser/content/browser.xul] --[GetParent()]-> 05032E70 [FragmentOrElement (XUL) window id='main-window' chrome://browser/content/browser.xul] --[mAttrsAndChildren[i]]-> 056DEDD0 [FragmentOrElement (XUL) commandset id='mainCommandSet' chrome://browser/content/browser.xul] --[mAttrsAndChildren[i]]-> 062A2240 [FragmentOrElement (XUL) command id='cmd_close' chrome://browser/content/browser.xul] --[[via hash] mListenerManager]-> 062A23D0 [nsEventListenerManager] Root 0BBFBD08 is a ref counted object with 2 unknown edge(s). known edges: 0BBFBD08 [nsXPCWrappedJS (nsIObserver)] --[self]-> 0BBFBD08
Whiteboard: [Snappy] → [Snappy:P3]
This is pretty old, and a lot of stuff has changed in the meanwhile. I'm sorry we never figured out what was wrong.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → INCOMPLETE
Andrew, this problem is easily reproducible in 5 minutes on current trunk, what else information do you need?
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
Status: REOPENED → NEW
In bug 646941 you implied this still occurs today. Is that confirmed?
Flags: needinfo?(pppx)
Yes, it is
Flags: needinfo?(pppx)
Just ran into what looks like this myself, so taking the hint to disable Stylish and see if that helps.
Non-Webextensions are going away so I'm marking this incomplete.
Status: NEW → RESOLVED
Closed: 10 years ago7 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: