Memory balloons disproportionally to the size of text file being opened

NEW
Unassigned

Status

()

Firefox
General
9 years ago
8 years ago

People

(Reporter: Bill Broadley, Unassigned)

Tracking

Trunk
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/2008111318 Ubuntu/8.10 (intrepid) Firefox/3.0.4
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/2008111318 Ubuntu/8.10 (intrepid) Firefox/3.0.4

Do not load if you aren't ready for firefox to hit 1.2GB.

To replicate:
mv .mozilla .mozilla-backup # insure it's a vanilla firefox config

Go to this url
http://www.archive.org/stream/titlelistofdocum024685mbp/titlelistofdocum024685mbp_djvu.txt

At least on ubuntu intrepid firefox process will increase to 1.2GB or so.

You should get a 4.9MB file, with a big block of <pre>.  It looks like OCR'd text and there happens to be a <b in it.  Replacing <pre> with <xmp> fixes it.

The missing </html> and </body> seem to have no effect, behavior does not change when I add them.

So basically I think firefox is trying to handle a <b ... > tag that is 100k lines long or something.  In any case this results in an unusable browser on any system with <= 1GB ram.  Even on a 2GB ram system it takes a few minutes of a non-responsive firefox to recover.

Reproducible: Always

Steps to Reproduce:
1. mv .mozilla .mozilla.backup # insure vanilla install
2. http://www.archive.org/stream/titlelistofdocum024685mbp/titlelistofdocum024685mbp_djvu.txt

Actual Results:  
Firefox downloads a 4.9MB page and expands to a process size of 1.2GB.

Expected Results:  
Process should not increase to 1.2GB, something like 100MB or less would be much more reasonable.


I opened bug on ubuntu as well:
https://bugs.launchpad.net/ubuntu/+source/firefox-3.0/+bug/304942

Comment 1

9 years ago
This might be a regression, needs testing against Firefox 2, it's certainly behind in performance compared to other browsers.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Summary: excessive memory use, 5MB file = 1.2GB of memory → Memory balloons disproportionally to the size of text file being opened
Version: unspecified → Trunk
Also seeing this in Vista HP SP1 using the latest trunk builds:

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2a1pre) Gecko/20081203 Minefield/3.2a1pre Firefox/3.0.4 ID:20081203114922

Comment 3

9 years ago
most likely dupe of bug 330029 or some other memory DoS

Comment 4

9 years ago
Not a regressions. 

Alexander Sack: The bug still occurs with Javascript disabled, is that expected?
(Reporter)

Comment 5

9 years ago
bug 330029 is a DoS based on javascript, this bug is triggered on a page
without javascript.

Comment 6

9 years ago
o.k, my mistake, I assumed it was the large text on the file because opening text files of such magnitude causes memory size to balloon as well, but not quite of the same magnitude.

Updated

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