Skip to content
This repository has been archived by the owner on May 18, 2022. It is now read-only.

RangeError: Array buffer allocation failed #90

Open
KyleMaas opened this issue Jan 21, 2021 · 4 comments
Open

RangeError: Array buffer allocation failed #90

KyleMaas opened this issue Jan 21, 2021 · 4 comments
Labels
bug Something isn't working waiting for upstream Waiting for upstream changes to be made

Comments

@KyleMaas
Copy link
Collaborator

After leaving an instance running for several days, I got the following error:

bundle-ui.js:73176 Uncaught (in promise) RangeError: Array buffer allocation failed
    at new ArrayBuffer (<anonymous>)
    at new Uint32Array (<anonymous>)
    at growTarrIndex (bundle-ui.js:73176)
    at updateSeqIndex (bundle-ui.js:73184)
    at write (bundle-ui.js:73346)
    at Object.o.write (bundle-ui.js:115586)
    at Stream._writeToSink (bundle-ui.js:8280)
    at Stream._handleBlock (bundle-ui.js:8313)
    at bundle-ui.js:8355
    at Object.getBlock (bundle-ui.js:7449)
@arj03
Copy link
Owner

arj03 commented Jan 21, 2021

Looks like it ran out of space?

@KyleMaas
Copy link
Collaborator Author

Looks like it's a RAM issue, not a storage issue. This machine's nowhere near 100% RAM consumption. Wondering if we're hitting a per-origin limit or if it's trying to read a blob that it already downloaded but which exceeds the maximum size of a single ArrayBuffer?

@KyleMaas
Copy link
Collaborator Author

Doing some debugging, on Firefox I get the following results:

var x = new ArrayBuffer(1.9 * 1024 * 1024 * 1024)
undefined
var x = new ArrayBuffer(2 * 1024 * 1024 * 1024)
Uncaught RangeError: invalid array length
    <anonymous> debugger eval code:1
var x = new ArrayBuffer(2 * 1000 * 1000 * 1000)
undefined

So there's a rough 2GB limit (<2GiB). If I do the same on Chromium:

var x = new ArrayBuffer(2 * 1000 * 1000 * 1000)
undefined
var x = new ArrayBuffer(2 * 1024 * 1024 * 1024)
VM279:1 Uncaught RangeError: Array buffer allocation failed
    at new ArrayBuffer (<anonymous>)
    at <anonymous>:1:9

@KyleMaas
Copy link
Collaborator Author

Reported upstream here:

ssbc/jitdb#93

@KyleMaas KyleMaas added bug Something isn't working waiting for upstream Waiting for upstream changes to be made labels Feb 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working waiting for upstream Waiting for upstream changes to be made
Projects
None yet
Development

No branches or pull requests

2 participants