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

Issue 648397 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

mojo bindings has global state, but is built as a static library linked into a bunch of components

Project Member Reported by dcheng@chromium.org, Sep 19 2016

Issue description

jbroman@ tracked the component test failures in https://codereview.chromium.org/2345423002/ down to multiple WaitSetDispatchers being instantiated in components builds.

After looking at the stack traces for where it's constructed, we realized this is coming from SyncHandleRegistry::current(), which grabs a pointer out of a global LazyInstance.

Unfortunate, this global lives in a static_library() that ends up linked into a bunch of different components. So depending on which component the code lives in, you might end up using different SyncHandleRegistry objects.
 

Comment 1 by dcheng@chromium.org, Sep 21 2016

Status: Started (was: Assigned)
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 23 2016

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

commit 9c3e65898eceec294d486b1968ec0e2b7ee8f120
Author: dcheng <dcheng@chromium.org>
Date: Fri Sep 23 03:10:50 2016

Turn //mojo/public/cpp/bindings and //mojo/public/cpp/system into components

//mojo/public/cpp/bindings has global state: putting it in a source set
is trouble in a component build, since it's easy to end up with
multiple copies of globals in different components.

//mojo/public/cpp/system is a dependency of bindings, so change it to
a component as well to avoid multiple definitions in different
components that depend on bindings.

BUG= 648397 

Review-Url: https://codereview.chromium.org/2358133002
Cr-Commit-Position: refs/heads/master@{#420561}

[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/BUILD.gn
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/associated_group.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/associated_group_controller.h
[add] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/bindings_export.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/connector.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/filter_chain.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/interface_endpoint_client.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/lib/array_internal.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/lib/binding_state.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/lib/control_message_handler.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/lib/control_message_proxy.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/lib/fixed_buffer.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/lib/message_builder.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/lib/message_internal.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/lib/multiplex_router.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/lib/native_struct_data.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/lib/native_struct_serialization.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/lib/router.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/lib/serialization_context.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/lib/validation_context.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/lib/validation_errors.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/lib/validation_util.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/message.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/message_header_validator.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/native_struct.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/pipe_control_message_handler.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/pipe_control_message_proxy.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/string_traits_string16.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/sync_call_restrictions.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/sync_handle_registry.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/bindings/sync_handle_watcher.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/system/BUILD.gn
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/system/buffer.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/system/platform_handle.h
[add] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/system/system_export.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/cpp/system/watcher.h
[modify] https://crrev.com/9c3e65898eceec294d486b1968ec0e2b7ee8f120/mojo/public/interfaces/bindings/BUILD.gn

Comment 3 by dcheng@chromium.org, Sep 23 2016

Status: fixed (was: Started)

Sign in to add a comment