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

Issue 601189 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

ODR violation: gpu::CommandBufferHelper in libclient_sources_for_ppapi.so and libgpu.so

Project Member Reported by lukasza@chromium.org, Apr 6 2016

Issue description

1. Configure gn args as follows:

   dcheck_always_on = true
   is_asan = true
   is_component_build = true
   is_debug = false
   use_goma = true

2. Build

3. Try to run layout tests - for example:

   $ DISPLAY=:20 third_party/WebKit/Tools/Scripts/run-webkit-tests -t gn -v


Expected: tests are run

Actual: ASAN detects an ODR violation and no tests are run

=================================================================
==7656==ERROR: AddressSanitizer: odr-violation (0x7f5ccda43c00):
  [1] size=48 'vtable for gpu::CommandBufferHelper' ../../gpu/command_buffer/client/cmd_buffer_helper.cc
  [2] size=48 'vtable for gpu::CommandBufferHelper' ../../gpu/command_buffer/client/cmd_buffer_helper.cc
These globals were registered at these points:
  [1]:
    #0 0x5006b6  (/usr/local/google/home/lukasza/src/chromium4/src/out/gn/content_shell+0x5006b6)
    #1 0x7f5cb0f53acb  (/usr/local/google/home/lukasza/src/chromium4/src/out/gn/./libclient_sources_for_ppapi.so+0x21acb)

  [2]:
    #0 0x5006b6  (/usr/local/google/home/lukasza/src/chromium4/src/out/gn/content_shell+0x5006b6)
    #1 0x7f5ccd62bb2b  (/usr/local/google/home/lukasza/src/chromium4/src/out/gn/./libgpu.so+0xd0b2b)

==7656==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0
SUMMARY: AddressSanitizer: odr-violation: global 'vtable for gpu::CommandBufferHelper' at ../../gpu/command_buffer/client/cmd_buffer_helper.cc
==7656==ABORTING

 
Note that the problem does not seem to repro with a GYP builds (i.e. it does not repro with Release build and GYP_DEFINES="use_goma=1 component=shared_library disable_nacl=1 asan=1").
Cc: brettw@chromium.org dcheng@chromium.org
Labels: Build-Tools-GN
dcheng@ / brettw@ - who would be the right person to follow-up on this bug?

Comment 3 by nasko@chromium.org, Apr 8 2016

Owner: piman@chromium.org
piman@, can you route this appropriately?

Comment 4 by piman@chromium.org, Apr 11 2016

I think this is an artifact of component builds, I'm not sure we can fix in that case.

There are 2 versions on the GPU code, one that's used in chrome (libgpu.so) and one that's used by pepper plugins (libclient_sources_for_ppapi.so). They end up defining the same symbols because it's the same code. It's not a problem for non-component builds, because the symbols normally in libgpu.so aren't exported.

I'll see if there's a way for component builds to workaround the issue.
Cc: jyasskin@chromium.org glider@chromium.org
Labels: Stability-Memory-AddressSanitizer
glider@, might you have any suggestions?

Comment 6 by piman@chromium.org, Jun 16 2016

Cc: fsam...@chromium.org piman@chromium.org
 Issue 616628  has been merged into this issue.
Components: Build
Labels: -Build-Tools-GN

Comment 8 by piman@chromium.org, Jun 27 2016

https://codereview.chromium.org/2098153002/ should fix this.

Comment 9 by piman@chromium.org, Jun 27 2016

Status: Started (was: Untriaged)
Project Member

Comment 10 by bugdroid1@chromium.org, Jun 27 2016

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

commit 864ffa6980cbf6a23a3f6a6153aa5a2ec93e2b3a
Author: piman <piman@chromium.org>
Date: Mon Jun 27 21:00:01 2016

Fix ODR violation in ppapi/proxy

ppapi/proxy component shouldn't be including gpu internal sources, but link
against the gpu component.

BUG= 601189 
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel

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

[modify] https://crrev.com/864ffa6980cbf6a23a3f6a6153aa5a2ec93e2b3a/gpu/command_buffer/client/BUILD.gn
[modify] https://crrev.com/864ffa6980cbf6a23a3f6a6153aa5a2ec93e2b3a/ppapi/proxy/BUILD.gn

Comment 11 by piman@chromium.org, Jun 27 2016

Status: Fixed (was: Started)

Sign in to add a comment