New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 877055 link

Starred by 4 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Improve tracking/handling of external allocations between blink and v8

Project Member Reported by herhut@chromium.org, Aug 23

Issue description

The current approach to register external allocations (aka array buffer contents) with v8 does not scale to shared array buffers, as it assumes a single isolate that owns an allocation.

For now, we have disabled tracking of shared external allocations. This bugs is meant to track further development.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 23

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/093ae17e6116c940193d2189a7d3029978e7c415

commit 093ae17e6116c940193d2189a7d3029978e7c415
Author: Stephan Herhut <herhut@chromium.org>
Date: Thu Aug 23 17:06:51 2018

Do not register shared array buffer backing stores with v8

There is a mechanism that registers the size of the backing store of a
typed array with v8 if such backing store is used by a typed array in a
v8 isolate. This is done so that v8 can properly assess the memory
pressure of an isolate in the presence of external allocations.

With shared array buffers, we can no longer attribute a buffer to a
specific isolate, as it might be used by multiple isolates at the
same time. The current implementation tries to work around this by
only registering with one isolate but ultimately fails at doing so,
leading to false data.

As a stop-gap fix, this change disables registering of shared buffers
completely to at least keep the data consistent while we design a
working solution.

Change-Id: Ib007cbad6af80e6c82d6ab809bf14ce95c54fc93
Bug: chromium:877055
Reviewed-on: https://chromium-review.googlesource.com/1186461
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585527}
[add] https://crrev.com/093ae17e6116c940193d2189a7d3029978e7c415/third_party/WebKit/LayoutTests/fast/workers/chromium/worker-sharedarraybuffer-transfer-two-workers-expected.txt
[add] https://crrev.com/093ae17e6116c940193d2189a7d3029978e7c415/third_party/WebKit/LayoutTests/fast/workers/chromium/worker-sharedarraybuffer-transfer-two-workers.html
[modify] https://crrev.com/093ae17e6116c940193d2189a7d3029978e7c415/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc

Comment 2 by herhut@chromium.org, Today (23 hours ago)

Cc: viswa.karala@chromium.org phanindra.mandapaka@chromium.org susan.boorgula@chromium.org yangguo@chromium.org herhut@chromium.org
 Issue 921473  has been merged into this issue.

Comment 3 by herhut@chromium.org, Today (23 hours ago)

Cc: mlippautz@chromium.org
Attaching the example from the duplicate here to not forget that we have a nice testcase now.
index.html
1.2 KB View Download

Comment 4 by adamk@chromium.org, Today (16 hours ago)

Cc: gdeepti@chromium.org

Sign in to add a comment