javascript stack space quota too small

Bug #299714 reported by David Monro
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
firefox-3.0 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

When using HPSIM (HP's System Insight Manager, a free web-based application for managing collections of servers), if the collection of machines being viewed is too large, the list does not get populated, and an error is reported in the error console:

"script stack space quota is exhausted"

It looks like this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=420869
except that is supposed to be fixed.

Here's a chunk of javascript which can be used to find out roughly what the stack space limit is (taken from http://forums.mozillazine.org/viewtopic.php?f=23&t=633782&start=0&st=0&sk=t&sd=a )

    <script>
    var text = "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
    var goodlength = 0;
    var badlength = 0;
    var tweakvalue = prompt("Enter tweak value. Larger values will produce a more accurate result, but will take exponentially longer.",1);
    try {
        while(text.length < 2000000) {
            goodlength = text.length;
            text = text + text.substring(0,text.length/tweakvalue);
            badlength = text.length;
            var test = /^(1234567890)(.*)/m.test(text);
        }
        alert("stack space reached " + badlength + " bytes without throwing an exception.");
    }
    catch(ex) {
        alert(ex + "\nstack space quota is somewhere between: " + goodlength + " and " + badlength);
    }
    </script>

On my firefox-3 (version 3.0.4+nobinonly-0ubuntu0.8.10.1 from intrepid-updates), this produces an answer somewhere around 630000. One of my workmates uses fedora core 9 - his version reports somewhere around double this (and does work with HPSIM).

Can this number be grown substantially please?

Revision history for this message
David Monro (davidm-ub) wrote :

Having tested this on another machine I think the 32-bit version may have a stack double the size; I'm running the amd64 install on a machine with 2G of physical RAM.

I note the comment at the bottom of the mozilla bug:

"Note: this test is dependent upon architecture and available memory. On a
x86_64 machine with 2G and a 64bit build, it will fail with InternalError:
script stack space quota is exhausted however on a x86_64 with 4G and a 64bit
build it will pass."

So it is possible this is an upstream bug; I'll download a binary from the mozilla project and see how it behaves.

Revision history for this message
David Monro (davidm-ub) wrote :

OK, so it looks like mozilla doesn't do official amd64 builds? Downloaded the latest autofox build (firefox-3.0.5pre.en-US.linux-x86_64-2008112000.tar.bz2) - and it exhibits exactly the same behavior. So it looks like this is an upstream problem. Where do we go from here?

Revision history for this message
Alexander Sack (asac) wrote :

open a new bug in bugzilla against the core -> javascript engine component and give us the bug id so we can track your discussion there. thanks!

Changed in firefox-3.0:
status: New → Incomplete
Revision history for this message
Alexander Sack (asac) wrote :

Note: i think its probably already known as its from mozillazine forums. so double check that you searched for eventual dupes first.h

Revision history for this message
xteejx (xteejx) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. We are sorry that we do not always have the capacity to look at all reported bugs in a timely manner.
There have been many changes in Ubuntu since that time you reported the bug and your problem may have been fixed with some of the updates. It would help us a lot if you could test the current Ubuntu version (10.10). If you can test it, and it is still an issue, we would appreciate if you could upload updated logs by running apport-collect <bug #>, and any other logs that are relevant for this particular issue.

Revision history for this message
xteejx (xteejx) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in firefox-3.0 (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.