Last Comment Bug 698018 - Last closed tab in window becomes temporary Zombie compartment with Roboform add-on installed
: Last closed tab in window becomes temporary Zombie compartment with Roboform ...
Status: RESOLVED FIXED
[MemShrink:P3]
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: x86 Windows XP
: -- minor (vote)
: ---
Assigned To: general
:
Mentors:
http://www.roboform.com
Depends on:
Blocks: LeakyAddons ZombieCompartments
  Show dependency treegraph
 
Reported: 2011-10-28 09:59 PDT by Michael Kraft [:morac]
Modified: 2012-02-29 10:35 PST (History)
10 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Michael Kraft [:morac] 2011-10-28 09:59:43 PDT
Even though this is a very minor issue, I decided to report it anyway since it does change the default behavior of the browser and technically creates a zombie compartment, albeit temporarily.

When testing for Zombie Compartments in Firefox 7 through the Nightly loads, I found that the Roboform add-on is causing a temporary Zombie Compartment when closing the last tab in the browser.  

The memory will be released when a new tab is opened and another web page is loaded (or the window is closed).  The exception to this is if the Roboform add-on is disabled in the Add-ons Manager at this point.  If so the zombie compartment can become permanent and won't be removed, even if the window is closed.  I think this can be triggered by opening a new tab and closing it after the add-on is disabled, but I'm not 100% sure since Minefield suddenly started crashing when enabling Roboform after updating Minefield to the latest nightly (see bug 698015 for that).

Like I said, a minor issue considering the memory for all but the last tab is released and the last tab is eventually released as long as the add-on is never disabled.  Still, it defers from what Firefox does without Roboform installed and disabling the add-on can cause a permanent zombie compartment.

Also when disabling and re-enabling the add-on, an additional compartment may be created for Roboform's bootstrap.js file.  It seems to keep at most two compartments around.  This may possibly tie into the zombie compartment web page.


Steps to recreate:

1. Create a new Firefox profile
2. Make sure Roboform is not installed or enabled or otherwise attached to Firefox in any way.  This includes making sure that the Roboform "Attach Roboform To Firefox..." option under Browser Integration is not checked.
3. Open the following URL: about:memory?verbose
4. Open a new tab and go to http://www.roboform.com/support/news (or any URL really)
5. When the tab finishes loading, close it.
6. Refresh the tab with about:memory?verbose, you should see a line in there that says "compartment(http://www.roboform.com/support/news)"
7. At the bottom of the page click the "Minimize memory usage" button a few times.
8. At this point the "compartment(http://www.roboform.com/support/news)" will be gone, which is to be expected.
9. Exit Firefox, create a new Firefox profile and install Roboform.
10. Repeat steps 3 through 7.

Expected result:

As with Roboform not installed, the "compartment(http://www.roboform.com/support/news)" entry should be gone.

Actual results:

The "compartment(http://www.roboform.com/support/news)" persists until a new tab is opened and a different web page is loaded.  That or the window is closed.

The entry looks like:

│  ├─────412,448 B (01.03%) -- compartment(http://www.roboform.com/support/news)
│  │     ├──262,144 B (00.65%) -- mjit-code
│  │     │  ├──224,512 B (00.56%) -- method
│  │     │  ├───28,288 B (00.07%) -- regexp
│  │     │  └────9,344 B (00.02%) -- unused
│  │     ├──139,264 B (00.35%) -- gc-heap
│  │     │  ├──120,968 B (00.30%) -- arena-unused
│  │     │  ├────9,512 B (00.02%) -- objects
│  │     │  ├────7,040 B (00.02%) -- shapes
│  │     │  ├──────640 B (00.00%) -- type-objects
│  │     │  ├──────544 B (00.00%) -- arena-headers
│  │     │  ├──────288 B (00.00%) -- arena-padding
│  │     │  └──────272 B (00.00%) -- scripts
│  │     ├────5,472 B (00.01%) -- object-slots
│  │     ├────1,856 B (00.00%) -- property-tables
│  │     ├────1,664 B (00.00%) -- type-inference
│  │     │    ├──1,024 B (00.00%) -- tables
│  │     │    └────640 B (00.00%) -- object-main
│  │     ├────1,600 B (00.00%) -- shape-kids
│  │     ├──────432 B (00.00%) -- object-empty-shapes
│  │     └───────16 B (00.00%) -- script-data


Additional steps to show it's temporary:

11. Open a new tab and go to any URL.
12. Click the "Minimize memory usage" button a few times and the zombie compartment will be gone.

Additional, additional steps:

13. Repeat steps 3 through 7.
14. Disable Roboform in the Add-on Managers tab.
15. Open a new tab and close it.
15. The original zombie compartment may now be permanent.
Comment 1 Justin Lebar (not reading bugmail) 2011-10-28 10:02:19 PDT
Can we loop in the author of Roboform?
Comment 2 Ed Morley [:emorley] 2011-10-28 10:07:29 PDT
CCing some Roboform people.
Comment 3 Vadim Maslov 2011-10-28 15:49:57 PDT
new RF version 7.6.2 was released.

is it still there?
Comment 4 Michael Kraft [:morac] 2011-10-28 17:31:50 PDT
Behavior under Roboform version 7.6.2 is identical to that under 7.6.1.  There is no change.

Tested with 10.0a1 (2011-10-28) Windows XP 32-bit SP3.
Comment 5 Nicholas Nethercote [:njn] (on vacation until July 11) 2012-01-09 19:13:14 PST
https://developer.mozilla.org/en/Zombie_Compartments#Avoiding_zombie_compartments_in_add-ons might be useful reading for the Roboform authors.
Comment 6 Jorge Villalobos [:jorgev] 2012-02-22 11:03:19 PST
Michael, can you test the latest version? 7.6.5 claims to have fixed some memory leaks and there have been several releases after that.
Comment 7 Vadim Maslov 2012-02-22 11:07:28 PST
we did a substantial rewrite of mozilla integration to address this issue.

so try RF ver 7.7.2, it should be fixed.
Comment 8 Andrew Williamson [:eviljeff] 2012-02-29 10:35:19 PST
Can't replicate anymore in the latest download (7.7.2.0) so marking as fixed.

Note You need to log in before you can comment on or make changes to this bug.