oraoto / pib

PHP in Browser (powered by WebAssembly)
https://oraoto.github.io/pib/
Apache License 2.0
956 stars 112 forks source link

Crashes after Clicking on Run in Chrome #17

Open shyim opened 5 years ago

shyim commented 5 years ago

If i click on Run it, after some seconds my Chrome Tab crashes Video Link

oraoto commented 5 years ago

Hello, @shyim, what's your Chrome version and OS, and how much RAM do you have?

I have test with Chrome 71.0.3578.98 and Windows 10, and it take about 3GB memory to compile the wasm, but it doesn't crash.

shyim commented 5 years ago

OS: Windows 10 newest October Update RAM: 16GB Chrome: 73.0.3639.1 (Offizieller Build) dev (64-Bit) (cohort: Dev)

Maybe cause i have dev channel? 🤔

shyim commented 5 years ago

Okay in stable it works. 🙈

desheffer commented 5 years ago

I'm seeing this issue in the newest stable version of Chrome. I click Run and Chrome crashes ("Aw, Snap!") about 15 seconds later.

Chrome Version 72.0.3626.119 (Official Build) (64-bit) OS: Arch Linux RAM: 16GB

mindplay-dk commented 5 years ago

I'm seeing this issue in the newest stable version of Chrome. I click Run and Chrome crashes ("Aw, Snap!") about 15 seconds later.

Same.

Chrome Version 73.0.3683.75 (Official Build) (64-bit), Win 10/Pro, 8GB.

oraoto commented 5 years ago

I can reproduce this problem with Chromium 72.0.3626.121, and Chromium output:

[40:65:0318/181104.583900:FATAL:memory_linux.cc(42)] Out of memory.

It seems that Chromium/Chrome is spending too much on optimizing wasm.

oraoto commented 5 years ago

One workaround is to disable wasm compilation and optimization:

chromium --js-flags="--no-wasm-tier-up"
shyim commented 5 years ago

Now the browser freezes

mindplay-dk commented 5 years ago

It seems that Chromium/Chrome is spending too much on optimizing wasm.

@oraoto You should let them know that maybe? I'm sure they'd appreciate feedback from a real-world project of this size - I don't think there are many yet :-)

TysonAndre commented 5 years ago

Does this still happen when pib is built with the latest version of the EMSDK (e.g. the currently deployed version)? I've found that I could reproduce this locally in the latest chrome with a similar setup, but the issues went away after updating emsdk and recompiling from scratch.

I've also run https://oraoto.github.io/pib/ a few dozen times in chrome 78 on linux, switching tabs, and it still hasn't crashed (the memory usage also remains stable).

If nobody's able to reproduce this any more, the README could be updated to mention chrome.

mindplay-dk commented 5 years ago

Still crashes here in the latest version of Chrome on Windows.

mindplay-dk commented 5 years ago

Version 78.0.3904.87 (Official Build) (64-bit)