Last Comment Bug 759966 - Duplicate "about:blank" compartments caused by being logged into sites
: Duplicate "about:blank" compartments caused by being logged into sites
Status: RESOLVED INVALID
[MemShrink]
:
Product: Firefox
Classification: Client Software
Component: General (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on: 752357 754771
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-30 18:40 PDT by Nicholas Nethercote [:njn] (on vacation until July 11)
Modified: 2012-06-12 23:50 PDT (History)
15 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Nicholas Nethercote [:njn] (on vacation until July 11) 2012-05-30 18:40:56 PDT
In bug 759581 comment 4, jlebar started seeing duplicated compartments like this in about:compartments:

  https://bugzilla.mozilla.org/
  https://bugzilla.mozilla.org/, about:blank

I've just started seeing them myself today;  I'm fairly sure this is a recent regression.  For each compartment, in about:compartments we show the compartment's principals name, and then we show its location (if it has one).  I.e. only one of these compartments has its location set, and the location is "about:blank", which is surprising.

This doesn't have anything to do with session restore;  it has something to do with logging into sites.  If I am logged into Bugzilla and I open any Bugzilla page, I get duplicate compartments of this kind.  If I log out of Bugzilla, the "about:blank" ones disappear.  I've been seeing duplicates when logged into Gmail as well.
Comment 1 Andrew McCreight [:mccr8] 2012-05-30 19:07:39 PDT
Ah, yes, this is what I was seeing.  Some kind of zombie compartment caused by the login doorhanger maybe?
Comment 2 Andrew McCreight [:mccr8] 2012-05-30 19:16:33 PDT
I don't know if this would help, but I should be able to get the complete contents of these compartments using JS_DumpHeapComplete, if we can figure out which compartments (by address) are of interest.
Comment 3 Nicholas Nethercote [:njn] (on vacation until July 11) 2012-05-30 19:38:38 PDT
Ok, it's not a regression.  I just tested with a version prior to bug 754771 and got this:

  https://bugzilla.mozilla.org/ [2]

When I log out the "[2]" goes away.  So I suspect this behaviour has been present for a while but the "[2]" wasn't enough to get people's attention.  In fact, it took two things to get people to notice:  (a) bug 752357's listing of locations for non-system compartments and (b) then bug 754771's addition of the "about:blank" location for these duplicate compartments.  (Also, I bet it wasn't two compartments prior to CPG.)

So, questions:

- What is it about logging in that causes this?

- Is the second compartment necessary?

- If it is necessary, can be come up with a better location than "about:blank", which is quite confusing?
Comment 4 Nicholas Nethercote [:njn] (on vacation until July 11) 2012-05-30 19:41:47 PDT
jlebar pointed something out on IRC:  you don't have to go through the log-in process in Bugzilla to see the second compartment, you just have to be logged in.  I.e. if you are logged in and then restart Firefox, you still see the second compartment.
Comment 5 Alice0775 White 2012-05-30 21:26:01 PDT
Range about https://bugzilla.mozilla.org/ [2]
In m-c
Cannot reproduce:
http://hg.mozilla.org/mozilla-central/rev/2db9df42823d
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/15.0 Firefox/15.0a1 ID:20120504030509
Can reproduce:
http://hg.mozilla.org/mozilla-central/rev/e1a40027dc7e
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/15.0 Firefox/15.0a1 ID:20120504014349
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=2db9df42823d&tochange=e1a40027dc7e

In m-inbound
Cannot reproduce:
http://hg.mozilla.org/integration/mozilla-inbound/rev/ac00c792933e
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/15.0 Firefox/15.0a1 ID:20120503001006
Can reproduce:
http://hg.mozilla.org/integration/mozilla-inbound/rev/bed8c4e3dfdf
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/15.0 Firefox/15.0a1 ID:20120503001301
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=ac00c792933e&tochange=bed8c4e3dfdf

I cannot: 2654f79e0e84
I can reproduce: bed8c4e3dfdf

So, triggered by
bed8c4e3dfdf	Luke Wagner — Bug 650353 - Implement Compartment-Per-Global in XPConnect. r=mrbkap
Comment 6 Nicholas Nethercote [:njn] (on vacation until July 11) 2012-05-30 21:46:06 PDT
Thanks for the confirmation that CPG was the root cause, Alice!
Comment 7 Nicholas Nethercote [:njn] (on vacation until July 11) 2012-05-30 22:11:47 PDT
After talking to bz, I've concluded this is behaving exactly as it should.  Both Gmail and Bugzilla (when logged in) contain an iframe that doesn't specify a URI.
When you log out of Bugzilla, that iframe is no longer present, something to do with it not loading YUI in that case.

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