FF will crash while rendering a huge amount of pictures using JS

UNCONFIRMED
Unassigned

Status

()

Core
JavaScript Engine
P3
normal
UNCONFIRMED
2 years ago
5 months ago

People

(Reporter: kill0rz, Unassigned)

Tracking

({crash, triage-deferred})

47 Branch
x86_64
Windows 7
crash, triage-deferred
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(crash signature)

(Reporter)

Description

2 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0
Build ID: 20160604131506

Steps to reproduce:

I wrote a testpage here: https://github.com/kill0rz/WBB2_Pic-Upload/tree/master/browsertest

I want to upload pictures to a website, but before uploading they should be resized using JS in browser.
Jut put a local copy of the test page and upload very much pictures at once.
That works using FF only with small amounts of data. Upload a huge amount, like 600MB/1000 files, will crash FF immediately.


Actual results:

FF crashes even before rendering the first images has been completed.


Expected results:

Just like other browsers, like Chrome, FF should process the files until the end.
(Reporter)

Updated

2 years ago
OS: Unspecified → Windows 7
Hardware: Unspecified → x86_64

Comment 1

2 years ago
So you are creating a lot of canvases in parallel.  It looks like they should be collected eventually, but you may stack too many up too quickly for them to be GC'd.

Can you try setting canvas.width=0 and canvas.height = 0 after you get the result out of the canvas?  That would free the canvas memory more aggressively.

Also, do you have a link for the crash in about:crashes?  I'm just guessing its an OOM.
Flags: needinfo?(git)
(Reporter)

Comment 2

2 years ago
Hi ben,

as you requested, here ist the link to the crash: https://crash-stats.mozilla.com/report/index/b896ae8c-9b22-4343-8ff2-fa48f2160608

Setting canvas.width=0 and canvas.height = 0 does not fix the problem nor delays the crash.

Comment 3

2 years ago
Ok.  I guess we need someone to investigate how chrome is avoiding this OOM while we are hitting it.
Crash Signature: https://crash-stats.mozilla.com/report/index/b896ae8c-9b22-4343-8ff2-fa48f2160608
Flags: needinfo?(git)
Keywords: crash

Updated

2 years ago
Crash Signature: https://crash-stats.mozilla.com/report/index/b896ae8c-9b22-4343-8ff2-fa48f2160608 → [@ OOM | large | NS_ABORT_OOM | NS_NewURI]
(Reporter)

Comment 4

2 years ago
Confirming, that this bug only appears in 32Bit FF. 64Bit FF handels at least 1,2GB upload data. Tested on Linux and Windows.
Keywords: triage-deferred
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.