Skip to content

system_info() in browser crashes once memory usage goes over 2GB #3050

@abalabin-bamfunds

Description

@abalabin-bamfunds

Bug Report

Steps to Reproduce:

  1. Open the examples/blocks/src/dataset/index.html example in Edge of Chrome.
  2. Click 'delete'
  3. Change rows to 10'000'000 and update delay to 100ms
  4. Click Generate
  5. At the point the heap line in Server Memory chart gets to a bit above 2GB the charts stop updating
  6. Opening dev tools window you will see an exception like one of the following:

Example exception 1:
perspective-viewer.js:3135
Uncaught (in promise) Error: Error: 18446744071657544488 can't be represented as a JavaScript number
at 009d511e:0x2246c2
at 009d511e:0x127c98
at 009d511e:0x22657d
at 009d511e:0x189263
at 009d511e:0x6b2ab
at 009d511e:0xcf63e
at 009d511e:0x1a7abc

Example exception 2:
Uncaught (in promise) RangeError: Start offset -2145700264 is outside the bounds of the buffer
at new Uint8Array ()
at A (270f6099-94b4-4e7d-8f07-b3aa7801b1d2:1:2442)
at P.handle_request (270f6099-94b4-4e7d-8f07-b3aa7801b1d2:1:1505)
at async MessagePort. (270f6099-94b4-4e7d-8f07-b3aa7801b1d2:1:5877)

Example exception 3:
Uncaught (in promise) RangeError: offset is out of bounds
at Uint8Array.set ()
at H (270f6099-94b4-4e7d-8f07-b3aa7801b1d2:1:1992)
at P.handle_request (270f6099-94b4-4e7d-8f07-b3aa7801b1d2:1:1355)
at MessagePort. (270f6099-94b4-4e7d-8f07-b3aa7801b1d2:1:5885)

Expected Result:

  1. I expect system_info() calls to work and not throw exceptions.
  2. I expect perspective to be able to use up to 4GB of wasm memory without crashing.

Actual Result:

One of the example exceptions happens. Exception 1 stops system_info() from working. Exceptions 2 and 3 completely halt perspective worker.

Environment:

Observed on Windows 11, Edge and Chrome browsers.
perspective 3.7.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions