Cannot consistently allocate large typedArrays
Reported by
jf.pamb...@gmail.com,
Jan 13 2017
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 Steps to reproduce the problem: 1. Open a new tab. 2. Open Dev tools. 3. Type 'a = new Float32Array(512*515*1000) <enter>', this will probably work, but not always. 4. a) A second 'a = new Float32Array(512*515*1000) <enter>' always result in a "Array buffer allocation failed" b) Reload tab, then 'a = new Float32Array(512*515*1000) <enter>', fails about 50% of the time. What is the expected behavior? 1) I expect to be able to allocate several gigabytes of typeArrays in a 64bit chrome instance. 2) I expect that reloading the web application will not result in a different behavior than loading it in the first place. This is particularly annoying when developing/debugging. What went wrong? 1) not sure, maybe some kind of artificial limit? 2) memory associated with then tab not being released completely before the reloaded application is executed? Did this work before? N/A Chrome version: 55.0.2883.87 Channel: stable OS Version: Flash Version: Shockwave Flash 24.0 r0 I understand that allocating one or more 1GB typedArray is not a common use case.. but I kind of need it to visualize large datasets. Anything I can do to proactively help?
,
Jan 16 2017
Tested this issue in Ubuntu 14.04 with chrome version #55.0.2883.87. On typing "a = new Float32Array(512*515*1000)" in the dev console for couple of times, the chrome browser is becoming non-responsive and its getting crashed. jf.pambrun@ please let us know is this is the issue you are facing??? Thank You....
,
Jan 16 2017
In my case, it never becomes non-responsive, nor crashes. Looks like you can allocate as much memory as you want until you run out. On my end, on the 'new tab' page, I can allocate up to about 1.8 GB with one new Float32Array. However, on a normal application with JS, CSS and HTML to render, I can only allocate about 700 MB without getting the "Uncaught RangeError: Array buffer allocation failed". I have 12+GB of available memory on a 64-bit system. Also, I can have multiple tabs with a 1.8GB of Float32Array as depicted here, but not a single one with 1.9 GB: http://dl.dropbox.com/u/168338/screenshots/20170116082603.png Another issue is that on reload (F5), the memory is not completely cleared. As a consequence, allocating 1 GB in a empty tab works fine, but refreshing and quickly allocating 1 GB fails. Meaning that if you allocated 1 GB at the beginning of your application, it will work the first time, but not if you press F5. I have tested this on Chrome 55 (Linux and windows) and Chrome 57 on Linux. In the end, I would expect 1) to be able to instantiate several arrays in the same tab, each up to 4 GB is size, until memory runs out and 2) I would expect that the previous instance does not affect the next when pressing 'F5'.
,
Jan 16 2017
,
Jan 20 2017
This is currently WAI. There is a hard limit per tab (~ 1.8 GB) on purpose currently. Having said that, there is currently work going on upping the limit.
,
Jan 20 2017
It is unfortunate that there is a hard limit, but how about the refresh issue. Should Chrome ensure the TypedArray are GC'ed so that the limited 1.8GB is at least available from the start?
,
Jan 20 2017
Might be related to issue 671489 where devtools keeps strong references to the log. kozyatinskiy@: wdyt? |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by dtapu...@chromium.org
, Jan 13 2017