Closed
Bug 1475293
Opened 8 years ago
Closed 8 years ago
wasm out of memory
Categories
(Core :: JavaScript: WebAssembly, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: datnhanlz, Unassigned, NeedInfo)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0
Build ID: 20180712100120
Steps to reproduce:
git clone https://github.com/rustwasm/wasm-bindgen.git
Go to examples/hello_world
./build
Actual results:
View in Firefox, then refresh the page => uncaught exception: out of memory
(Its work ok in Chromium)
Expected results:
It should work as it work Chromium?
Comment 1•8 years ago
|
||
Thanks for the summary. I tried to reproduce but got it working, on both Firefox Nightly (63) and Firefox release (61), even after several reloads.
- Which platform (32 bits, 64 bits, ARM, ARM64 etc.) / operating system are you using?
- If you can consistently reproduce the issue, would you be so kind to host the example somewhere on the web (even github pages would be sufficient), so I can try the result with the exact same Rust/node dependencies that you have used during build?
- Can you reproduce the issue in safe mode (that is, with all addons disabled)?
- Is the browser developers' console open when you reload?
The bug happens to me both on Firefox Beta, then I switch to Firefox Nightly and it still there!
My system:
Fedora 27 (update frequently)
x86_64
Intel© Core™ i5-4278U CPU @ 2.60GHz × 2
(It is a mini mac)
rustc +nightly -V
rustc 1.29.0-nightly (e5f6498d3 2018-07-10)
rustc -V
rustc 1.27.1 (5f2b325f6 2018-07-07)
I have no add-ons installed in Firefox
* about:addons => Just see a list of recommended add-ons
* about:addons/Extensions => You don't have any add-ons of this type installed
* about:addons/Themes => Default / Dark (disabled) / Light (disabled)
* about:addons/Plugins => OpenH264 Video Codec provided by Cisco Systems, Inc.
Give `safe mode` a try? (after `restart with add ons disabled`):
```
ReferenceError: WebAssembly is not defined
```
============================================
Close Firefox, open it again in normal mode:
* First visit to http://localhost:8080/ => OK
* Refresh it many times:
-- Very few times: OK
-- Most times, see this in console:
```
[WDS] Disconnected! client:170:5
uncaught exception: out of memory
```
-- Few times with this (along with the above messages)
```
Error: Loading chunk 1 failed.
(missing: http://localhost:8080/1.index.js)
```
I don't think it is related to node. Because I run it without node lead to similar situation. The following are steps to build a similar app without using node/webpack. It will ignore `index.js`.
1. Duplicate the `hello_world` example to `hello_world_nm`
2. In `examples/hello_world_nm/Cargo.toml`, change its name to `hello_world_nm`
3. Add `"examples/hello_world_nm",` to wasm-bindgen/Cargo.toml's workspace's members
4. Replace `hello_world_nm/index.html` with the attach file
5. Replace `hello_world_nm/build.sh` with the attach file
6. ./build.sh
7. Serve it with some simple static server
For example: https://crates.io/crates/simple-http-server
8. View it in Firefox => OK
9. Refresh (F5) many this => similar result
Comment 6•8 years ago
|
||
I'll check again later; for some reason the hello_world examples don't compile on my machine anymore, after an update of rustc nightly. Thanks for providing the extra info!
Flags: needinfo?(bbouvier)
Comment 7•8 years ago
|
||
Now I can compile, but still cannot reproduce. Any chance you're using a 32-bits build of Firefox? (This can be seen from the "Help" > "About Nightly" option in the hamburger menu)
Note that the error message you're seeing in the console seems to indicate that Webpack Dev Server disconnects; in that case, if it's using compileStreaming or another streaming API to compile, it might happen that a broken network stream involves an unexpected error that we might report as an out-of-memory error. (Just a theory, I haven't checked the code yet)
Does it also happen with simple-http-server or python's embedded HTTP server? (I couldn't even reproduce with webpack either, for what it's worth)
Flags: needinfo?(bbouvier)
Hi,
Did you misunderstand what I said:
> 8. View it in Firefox => OK
> 9. Refresh (F5) many times => similar result
________________________________^^^^^^^^^^^^^^ This means: it is still "Out of memory", sorry for not say more clearly!
Firefox version: 63.0a1 (2018-07-18) (64-bit) (Ctrl-C from the About Nightly and paste here)
It's now: OOM-aF5 = Out of memory after refresh/F5
I try to remove the `/home/username/.mozilla` folder then try again, still OOM-aF5.
One instance of server:
* Firefox => OOM-aF5 (almost every refresh cause OOM, sometimes Firefox crashs the tab)
* Chromium => run normally on every F5
=> It is not because of the server
The 9-step above produce a wasm app that load by 'fetch', then instantiate by: 'WebAssembly.instantiate' (not use streaming) => still cause OOM-aF5
I am currently trying to reproduce on a newly install VirtualBox/Fedora28, but Rust-nightly break wasm-bindgen again now. I will give it a test after wasm-bindgen work on the new Rust nightly.
Flags: needinfo?(datnhanlz)
I try with Fedora28/VirtualBox
Webpack => Still have `[WDS] Disconnected`, but the app works (No OOM).
--no-modules => Works perfectly
My system is Fedora 27, so, the bug must be related to Fedora 27 only or just because of my own system?
I don't want to upgrade my system frequently, but now it seems I have to upgrade to F28!
I am going to mark this as INVALID now!
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•