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

Issue 905000 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
OOO until 2019-01-24
Closed: Nov 14
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 905008
issue 905449



Sign in to add a comment

Assertion failure uploading uniforms to WebGL from multithreaded WebAssembly program

Project Member Reported by kbr@chromium.org, Nov 13

Issue description

Attempting to upload a uniform value to WebGL from a multithreaded WebAssembly program results in the following assertion failure in a debug build, or a build with dcheck_always_on=true:

[87532:775:1113/130013.706764:FATAL:array_buffer_view.h(59)] Check failed: !IsShared(). 
0   libbase.dylib                       0x000000010b9e1b1f base::debug::StackTrace::StackTrace(unsigned long) + 31
1   libbase.dylib                       0x000000010b8d8f6f logging::LogMessage::~LogMessage() + 223
2   libblink_modules.dylib              0x000000011bb2e274 blink::FlexibleArrayBufferView::BaseAddressMaybeOnStack() const + 116
3   libblink_modules.dylib              0x000000011bb22050 blink::WebGL2RenderingContextBase::uniform4fv(blink::WebGLUniformLocation const*, blink::TypedFlexibleArrayBufferView<WTF::Float32Array> const&, unsigned int, unsigned int) + 48
4   libblink_modules.dylib              0x000000011b491da5 blink::webgl2_rendering_context_v8_internal::uniform4fv1Method(v8::FunctionCallbackInfo<v8::Value> const&) + 741
5   libv8.dylib                         0x0000000109761319 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) + 937
6   libv8.dylib                         0x000000010975fa22 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) + 978
7   libv8.dylib                         0x000000010975e10a v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) + 554
8   libv8.dylib                         0x000000010975dcaa v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) + 122
9   libv8.dylib                         0x000000010a5ce892 v8_Default_embedded_blob_ + 2903506


FlexibleArrayBuffer must allow shared ArrayBuffers. The WebIDL should also be changed to use AllowShared where FlexibleArrayBuffer is used, though it seems the AllowShared checks aren't catching this.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 14

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

commit 9fd73df94beeba86347d3afb8b521269669a22fb
Author: Kenneth Russell <kbr@chromium.org>
Date: Wed Nov 14 02:26:22 2018

Allow SharedArrayBuffer with FlexibleArrayBufferView.

Assertions fail when running multithreaded WebAssembly code which uses
WebGL.

Bug:  905000 
Change-Id: Ic45df5f43aa859a5f9225586f4836919ef31b54a
Reviewed-on: https://chromium-review.googlesource.com/c/1334844
Reviewed-by: James Darpinian <jdarpinian@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607875}
[modify] https://crrev.com/9fd73df94beeba86347d3afb8b521269669a22fb/third_party/blink/renderer/core/typed_arrays/flexible_array_buffer_view.h
[modify] https://crrev.com/9fd73df94beeba86347d3afb8b521269669a22fb/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.idl
[modify] https://crrev.com/9fd73df94beeba86347d3afb8b521269669a22fb/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.idl

lgtm, thanks!
Blocking: 905449
Status: Fixed (was: Started)
Fixed. Filed follow-on bug about enforcing and testing the AllowShared extended Web IDL attribute.

Blocking: 905008

Sign in to add a comment