Firefox memory leak when reloading WebAssembly-based websites/apps
Categories
(Core :: JavaScript: WebAssembly, defect)
Tracking
()
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:
- 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})
- On the host, open a resource monitor such as Task Manager for Windows, or System Monitor for Linux
- Sort by Memory usage in the resource monitor window so that the most usage is at the top
- Select to highlight the Firefox process, so that you can more easily view the memory usage used
- 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.
Comment 1•3 years ago
|
||
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.
Updated•3 years ago
|
Updated•3 years ago
|
Description
•