Closed Bug 1754355 Opened 3 years ago Closed 3 years ago

Firefox memory leak when reloading WebAssembly-based websites/apps

Categories

(Core :: JavaScript: WebAssembly, defect)

Firefox 96
defect

Tracking

()

RESOLVED DUPLICATE of bug 1749298

People

(Reporter: gridlocdev, Unassigned)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0

Steps to reproduce:

  1. Navigate to any page running WebAssembly (such as https://pyodide.org/en/stable/console.html or any Blazor WebAssembly application {the default blazorwasm template notably also works})
  2. On the host, open a resource monitor such as Task Manager for Windows, or System Monitor for Linux
  3. Sort by Memory usage in the resource monitor window so that the most usage is at the top
  4. Select to highlight the Firefox process, so that you can more easily view the memory usage used
  5. On the webpage that runs the WebAssembly code, wait for the page to fully load and then refresh the loaded webpage again (It should be visible immediately, and I was able to refresh enough to push the process up to as much as I wanted until the browser stopped working.)

Actual results:

Each refresh (or two), the memory usage of the Firefox process rises a normal amount and then stays around ~55MiB above what it was before with each subsequent refresh.

So far, I have reproduced this issue using two major WebAssembly projects: Blazor WebAssembly (Microsoft's .NET based front-end wasm framework), and Pyodide (a browser-based Python terminal emulator based on WebAssembly). This issue may also be present on other WASM applications as well, these are just what I had time to test.

I've also tested and reproduced this issue on three separate operating systems (Windows 10, Ubuntu 20.04, and Pop! OS 20.04), all running Firefox v96.

Expected results:

The memory usage should rise up a bit, then go down as system resources are no longer used to load content on the page. The example of working behavior is the resource usage of any Chromium-based browser while loading the same WebAssembly applications.

The Bugbug bot thinks this bug should belong to the 'Core::Javascript: WebAssembly' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Javascript: WebAssembly
Product: Firefox → Core
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.