too much recursion nsSessionStore.js (line 1896) and XPCSafeJSObjectWrapper (line 445)

RESOLVED WORKSFORME

Status

()

Firefox
Session Restore
--
major
RESOLVED WORKSFORME
10 years ago
9 years ago

People

(Reporter: spEctoRius, Unassigned)

Tracking

(Blocks: 1 bug, {hang})

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; uk; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; uk; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5

In Beta4 started unstable behavior with FF, memory was grabbing fast till it all gone, cpu was on 100%. Initially i thout that a problem was in Foxmarks, but later i found out that problem is with a Firebug. Actually i don`t know is that problem internal in Firebug, or it is Firefox. For now firebug is enabled in firefox, and generally disabled in it`s own method, but enabled for allowed sites such as localhost. The problem still exist in Beta 5.

Reproducible: Always

Steps to Reproduce:
1. Open firefox
2. Open more than 20 tabs
3. Turn on firebug
4. Restart firefox
Actual Results:  
Firefox leaks memory and hangs

Expected Results:  
Memory in range of 100 mb and be accessible for user actions

Next error catched today by firebug:
too much recursion
[Break on this error] this._writeFile(this._sessionFile, oState.toSource());
nsSessionStore.js (line 1896)
too much recursion
[Break on this error] null
XPCSafeJSObjectWr... (line 445)
(Reporter)

Updated

10 years ago
Keywords: footprint, hang
Version: unspecified → Trunk
(Reporter)

Comment 1

10 years ago
Also in firefox console i saw:

Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWebNavigation.sessionHistory]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://global/content/bindings/browser.xml ::  :: line 644"  data: no]
Source: chrome://global/content/bindings/browser.xml
Line: 650
(Reporter)

Comment 2

10 years ago
(In reply to comment #1)
> Also in firefox console i saw:
> 
> Error: [Exception... "Component returned failure code: 0x80004005
> (NS_ERROR_FAILURE) [nsIWebNavigation.sessionHistory]"  nsresult: "0x80004005
> (NS_ERROR_FAILURE)"  location: "JS frame ::
> chrome://global/content/bindings/browser.xml ::  :: line 644"  data: no]
> Source: chrome://global/content/bindings/browser.xml
> Line: 650
> 

just restarted FF and this error already their, i mean it occurs while FF starting and MAYBE it is not connected to this bug :)
(Reporter)

Comment 3

10 years ago
Anybody home ?

Comment 4

10 years ago
Does the same issue happen on a profile where Firebug isn't installed at all?
If not, have you reported the issue also to the Firebug developers?
(Reporter)

Comment 5

10 years ago
Other profiles seems normal, something changed in my current, that firebug goes crazy. And i`m not reported this to firebug yet =)  I should  ?  I`m asking cause i think that problem  is in FF. For now Firebug is disabled, but when i enables it - FF goes in crazy-memory-eating-state +)

Updated

10 years ago
Depends on: 429414

Comment 6

10 years ago
(In reply to comment #0)
> User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; uk; rv:1.9b5)
> Gecko/2008032620 Firefox/3.0b5
> Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; uk; rv:1.9b5)
> Gecko/2008032620 Firefox/3.0b5
> 
> In Beta4 started unstable behavior with FF, memory was grabbing fast till it
> all gone, cpu was on 100%. Initially i thout that a problem was in Foxmarks,
> but later i found out that problem is with a Firebug. Actually i don`t know is
> that problem internal in Firebug, or it is Firefox. For now firebug is enabled
> in firefox, and generally disabled in it`s own method, but enabled for allowed
> sites such as localhost. The problem still exist in Beta 5.
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1. Open firefox
> 2. Open more than 20 tabs
> 3. Turn on firebug
> 4. Restart firefox

I don't understand this step. You mean exit and restart Firefox?
(Reporter)

Comment 7

10 years ago
yes
but  i think that there is something in my profile that causing firebug to hang FF, and i dont`t know what. i also posted about issue to firebug developing
(Reporter)

Comment 8

10 years ago
Ouh, i didn`t notice that reply was from firebug developer =))))
What can i do, to provide more info about this issue???

Comment 9

10 years ago
I think we should wait and try Firebug 1.2a21X against FF3pre nightly after 4/20 before investing anymore time in this direction. Some/all of these may be already fixed.
Works For Me. The only problem is an impressive slow-down of page loading... but this is a Firebug problem. I think it must be resolved as WFM. Can anyone confirm?

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008051306 Minefield/3.0pre

Firebug 1.2.0a26x

Comment 11

10 years ago
(In reply to comment #10)
> Works For Me. The only problem is an impressive slow-down of page loading...
> but this is a Firebug problem. 

There should be no significant slowdown in page loading with Firebug. Sites with large amounts of javascript will compile more slowly with the debugger enabled.
 
(Reporter)

Comment 12

10 years ago
This problem seems solved in 1.2 branch

Comment 13

10 years ago
This problem is NOT solved in 1.2 branch of Firebug and appears with Firebug 1.2b1 and Firefox 3 rc1. Steps to reproduce are the same: start firefox with multiple tabs, exit it, then start again, see your old tabs restored, see the error(s). Of course you must have "restore previous tabs" feature enabled.

I've seen similar (but not identical) errors quite often with my previous installation of Firefox 2 and Firebug 1.1 (both were the latest available versions). Therefore, this problem is not a new one, and certainly existed  before FF3 & fbug 12.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008051206 Firefox/3.0
Firebug 1.2.0b1

Example of error text:
[Exception... "Component is not available"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: file:///C:/Program%20Files/Mozilla%20Firefox%203/components/nsSessionStore.js :: sss_saveState :: line 1896"  data: no]
file:///C:/Program%20Files/Mozilla%20Firefox%203/components/nsSessionStore.js
Line 1896
Can you provide the links Fx tried to restore?

Comment 15

10 years ago
I will do my best to add them ASAP; however, I'm not sure if that can help.
First, these URLs often contain dynamic, rapidly changing content (such as blogs), which will changes at the time you'll be doing the tests. Moreover, I often get this error when having some of the local websites open (in a local Apache installation), or some sites with HTTP authorization. Would it be helpful if I attach my sessionstore.js from FF profile? can it be used to reproduce an error?
It could. Anyway before you copy it close Firefox 3, reopen it, open only links you want to provide us and close Fx, saving the session. So you'll not send us any link you don't want.

Comment 17

10 years ago
Created attachment 322915 [details]
2 sessionstore.js files

I was able to save my sessionstore.js file at the time this error occurred:

[Exception... "Component is not available"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: file:///C:/Program%20Files/Mozilla%20Firefox%203/components/nsSessionStore.js :: sss_saveState :: line 1896"  data: no]
file:///C:/Program%20Files/Mozilla%20Firefox%203/components/nsSessionStore.js
Line 1896

This archive contains 2 files: sessionstore-while-error.js, saved as soon as the error appeared (without closing FF), and sessionstore-just-after-error.js, saved after exiting FF.

As described above, this error also resulted in FF freezing for 5-7 seconds and not responding. Freeze occurs when switching tabs, and seems to affect certain tabs only, i.e. switching to some tabs causes this error while switching to other tabs does not.

Also, I was able to catch exactly the same error on a machine where FF3rc1 is installed, but no Firebug. So, this problem is not related to Firebug. The only extension these installations have in common is IE Tab (https://addons.mozilla.org/ru/firefox/addon/1419/), but no tabs are switched to IE mode when this error occurs, and I cannot find any evidence that IE Tab causes this trouble.
I can't reproduce. Try this:

If you haven't, upgrade Firefox to release candidate and test it in safe mode or with a blank profile.

If it works so, but not with your normal profile, probably it's a problem caused by an extension. So try to disable them one-by-one. 

When you find the problematic extension(s), inform us and its author.

Comment 19

10 years ago
Seems like bug 428283 is a duplicate (another evidence but no reliable testcase yet).

Comment 20

10 years ago
The same error happens with Firefox 3 rc2, with no extensions installed.
Flags: blocking-firefox3?
(Reporter)

Comment 21

10 years ago
Problem still unsolved =(
Unconfirmed bugs can't block - comments here seem to indicate that this is WFM for others.
Flags: blocking-firefox3?

Comment 23

10 years ago
I see the error messages mentioned in comment 13 and comment 17 routinely. 

I believe that the title problem was solve in FF3pre.

See also
Bug 410060 – 0x80004005 (NS_ERROR_FAILURE) in nsSessionStore.js (line 1749)

Bug 366509 – [SessionStore] "Component is not available" in sss_saveState :: line 1688

Comment 24

10 years ago
To Mike Beltzner:
Mike, I am not familiar with the procedure; what makes a bug confirmed? here we have at least three people with exactly the same error. It is true that we don't have a reliable test case, but the problem itself is not a bug one wants to see in FF3 final (we have evidence of slow performance and high memory usage). Is there any chance that some developer proficient in Session Store can look into this? maybe just to provide more ideas for a good test case (I'll gladly go and find a way to reproduce, but I need more ideas what can trigger this error)?

Comment 25

10 years ago
See also http://code.google.com/p/fbug/issues/detail?id=692
A user there points to a flash site. That might explain some of the variability in the reports on this bug.  

Comment 26

10 years ago
John, this "user" is me (I logged using another email, shirshin@imposant.com). However, this turned out to be a known security bug in Flash, and has nothing in common with the problem we're discussing here. See my last comment there, I provided a link with explanations.

The error that we're discussing here certainly happens on web sites that do not use Flash at all.

Comment 27

10 years ago
(In reply to comment #13)
> This problem is NOT solved in 1.2 branch of Firebug and appears with Firebug
> 1.2b1 and Firefox 3 rc1. Steps to reproduce are the same: start firefox with
> multiple tabs, exit it, then start again, see your old tabs restored, see the
> error(s). Of course you must have "restore previous tabs" feature enabled.

On 
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008052912 Firefox/3.0
I had 8 tabs open and one with Firebug enabled on. Exit select Save and Quit, restart. No error about session store in the Error Console.

Comment 28

10 years ago
See above my comment #17. It turns out this bug also happens w/o Firebug installed, and therefore not related to Firebug.

Comment 29

10 years ago
spEctoRius: Are you still able to reproduce this issue on Firefox 3.0 final? If not, please close this bug as WORKSFORME.

(In reply to comment #28)
> See above my comment #17.
That's actually bug 366509.
Whiteboard: [worksforme?]
Created attachment 327141 [details]
Relatively basic Sessionstore.js that will trigger this problem when combined with Firebug and GreaseMonkey

I reproduced this problem using the attached sessionstore.js file and having Firebug 1.2b3 and GreaseMonkey 0.8.20080609.0 installed.  Simply drop the sessionstore.js into the profile and load Firefox and whenever a tab is selected an infinite recursion occurs when the .toSource() function is called in saveState(). 

I also managed to recreate the problem without Firebug installed, but I had to have AI Roboform Toolbar 6.9.90 and GreaseMonkey 0.8.20080609.0 installed.  There are probably other combinations of extensions that can cause problems as well.

At this point I think there's a problem in the toSource() javascript function since that function is actually part of the javascript interpreter and there shouldn't be any way for an add-on to break it.  I don't see how GreaseMonkey or Firebug could cause an infinite recursion in the toSource() function.

I think this is somehow related to bug 366509 since the same basic conditions trigger this problem, though this one is harder to trigger that bug 366509 and this one requires add-ons to be installed.

Comment 31

10 years ago
Can this bug me marked as CONFIRMED now, and who can add that status? Also, should a blocking flag for Firefox 3.1 be added? To me, the problem seems rather serious.
I think the problem is with livejournal.com, because both Michael Kraft and Max Shirshin have reported a sessionstore with cs.com to be restored, which seems to be related to livejournal.com. I currently can't reproduce because I don't have a livejournal account.

Updated

10 years ago
Duplicate of this bug: 428283

Comment 34

10 years ago
Confirming. The patch in bug 366509 might fix this issue as well, though. I'd appreciate if any of you who can reproduce this recursion issue could try that patch (attachment #327156 [details] [diff] [review]).
Severity: critical → major
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: footprint
OS: Windows XP → All
Whiteboard: [worksforme?]
Hardware: PC → All
Blocks: 429414
No longer depends on: 429414

Comment 35

10 years ago
Are you still able to reproduce this issue with a 20081106 nightly build? If not, this bug was fixed by bug 407110.

Comment 36

10 years ago
Resolving as WORKSFORME since nobody opposed comment #35.
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → WORKSFORME

Comment 37

10 years ago
Just a small point on community: this was a real bug reported by a user that was fixed. Resolving WORKSFORME signals (to me) that the assessment was the bug was not real.

Comment 38

10 years ago
This problem still occurs in my browser with "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5" and Firebug 1.3.0, when I use more than 20 tabs.

Comment 39

10 years ago
Markus, I think you are better off opening a new bug report, but the key here is to find a way to reproduce it. For example, a test case like an HTML file with 21 links and instructions to open all in new tabs followed by what ever steps causes your problem. Without a test case there is almost nothing we can do.

Comment 40

9 years ago
I've the same problem for a long time, even though I've never installed FireBug -- I do have Web Developer, DOM Inspector and Session Manager, though.
You need to log in before you can comment on or make changes to this bug.