Closed Bug 1773225 Opened 2 years ago Closed 2 years ago

Repeatedly adding/removing iframe containing Wasm causes out of memory

Categories

(Core :: JavaScript: WebAssembly, defect, P3)

Firefox 101
x86
Unspecified
defect

Tracking

()

VERIFIED FIXED
111 Branch
Tracking Status
firefox-esr91 --- wontfix
firefox-esr102 --- wontfix
firefox101 --- wontfix
firefox102 --- wontfix
firefox103 --- wontfix
firefox109 --- wontfix
firefox110 --- wontfix
firefox111 --- verified

People

(Reporter: georgian.besleaga, Assigned: bvisness)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached file firefox-wasm-test.zip (deleted) —

Steps to reproduce:

  1. Open the attached index.html in Firefox 91.10.0esr (32-bit) and notice:
    Status: Compiled
    The answer to life itself: 42

  2. Click on the button labeled "Reload" next to "Remove the iframe and add it again" and notice the same output as in "1".

  3. Repeat "2" until the following output is observed (for me it happens after around ~10 times):
    Status: Compiling...
    The answer to life itself:

  4. Open the Developer Tools and notice in Console: "Uncaught out of memory"

Actual results:

An "out of memory" error occurred.

Expected results:

It should be possible to repeatedly add/remove an iframe containing Wasm without an out of memory occurring.

The issue seems to be specific to 32-bit versions. I could reproduce it with Firefox 101.0 (32-bit) too, but not with 91.10.0esr (64-bit) or 101.0 (64-bit).

Component: Untriaged → Javascript: WebAssembly
Product: Firefox → Core
Hardware: Unspecified → x86
Version: other → Firefox 101

Managed to reproduce on Windows 10 x32, the issue is not reproducible on Windows 10 x64.

Severity: -- → S4
Status: UNCONFIRMED → NEW
Has STR: --- → yes
Ever confirmed: true
Blocks: wasm-oom
Priority: -- → P3
Assignee: nobody → ben
Status: NEW → ASSIGNED

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:bvisness, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit auto_nag documentation.

Flags: needinfo?(rhunt)
Flags: needinfo?(ben)
Flags: needinfo?(rhunt)
Flags: needinfo?(ben)
Pushed by rhunt@eqrion.net: https://hg.mozilla.org/integration/autoland/rev/fd3606f15938 Avoid OOM from WASM memory on 32-bit platforms. r=rhunt
Pushed by rhunt@eqrion.net: https://hg.mozilla.org/integration/autoland/rev/e74de6e39fdb Avoid OOM from WASM memory on 32-bit platforms. r=rhunt
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
Flags: needinfo?(ben)
Flags: qe-verify+

Reproduce the issue with Windows 10x64 Firefox 91.10.0esr (32-bit).
Verified as fixed with Windows 10x64, Firefox Nightly 112.0a1(32-bit) and 111.0b7 (32-bit).

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: