New issue
Advanced search Search tips

Issue 621263 link

Starred by 2 users

Issue metadata

Status: Archived
Owner: ----
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android
Pri: 3
Type: Bug



Sign in to add a comment

Shared objects in build have symbols which violate ODR (one definition rule)

Project Member Reported by kmarshall@chromium.org, Jun 18 2016

Issue description

When running blimp_unittests with asan enabled (is_asan=1 in GN), this error is shown at runtime:

==35349==ERROR: AddressSanitizer: odr-violation (0x7f5d791da400):
  [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 0x4e7137  (/usr/local/google/home/marshallk/blimp/src/out/asan/blimp_unittests+0x4e7137)
    #1 0x7f5d55d01b1d  (libclient_sources_for_ppapi.so+0x1fb1d)

  [2]:
    #0 0x4e7137  (/usr/local/google/home/marshallk/blimp/src/out/asan/blimp_unittests+0x4e7137)
    #1 0x7f5d785d1ead  (/usr/local/google/home/marshallk/blimp/src/out/asan/./libgpu.so+0x104ead)

==35349==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
==35349==ABORTING


It looks like the issue is that the PPAPI proxy code is compiling its own cmd_buffer_helper.o, which collides with the cmd_buffer_helper that is built indirectly by //gpu.

We can disable this warning and others like it so that asan can check other parts of the build, but it's probably good to clean the build of these warnings rather than just suppressing them.
 

Comment 1 by w...@chromium.org, Jun 20 2016

Cc: bbudge@chromium.org
Components: Internals>Plugins>Pepper
Labels: -Pri-2 OS-Android OS-Linux Pri-3
Owner: kmarshall@chromium.org
Status: Assigned (was: Untriaged)
kmarshall: It seems surprising that we're linking in any of PPAPI at all, since neither Client nor Engine currently support it.

Adding bbudge@, in case this is a PPAPI build issue, in which case it presumably affects Chrome as well.
Cc: -bbudge@chromium.org
-bbudge (omg, Pinball Construction Set!)

If that's the case, then I can simply this by setting enable_plugins = false in the blimp_engine.gn args.

I am still hitting other ODR violations, this time in the media stack.

These globals were registered at these points:
  [1]:
    #0 0x4e2f17  (/usr/local/google/home/marshallk/blimp/src/out/asan/blimp_unittests+0x4e2f17)
    #1 0x7f273b3ec2cd  (/usr/local/google/home/marshallk/blimp/src/out/asan/./libcontent.so+0x6f4c2cd)

  [2]:
    #0 0x4e2f17  (/usr/local/google/home/marshallk/blimp/src/out/asan/blimp_unittests+0x4e2f17)
    #1 0x7f272bdf764d  (/usr/local/google/home/marshallk/blimp/src/out/asan/./libmedia.so+0xa7064d)

==18712==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 media::VideoCaptureMachine' at ../../media/capture/content/screen_capture_device_core.cc

I'm tracking that one down now.

Comment 3 by bbudge@chromium.org, Jun 20 2016

:)

Comment 4 by w...@chromium.org, Jun 20 2016

Re #2: Yes, OMG indeed. I'd be wary of building with enable_plugins = false - it's hard to believe that that configuration is every actually tested.  Re the ODR violations, is this because you're doing a component build, by any chance?
Cc: bbudge@chromium.org
+bbudge, in case there's a better way to exclude PPAPI builds short of disabling all plugins.

Yes, it's a component build. The problem is that the unit tests executable indirectly depends on both the //content and //gpu components. These components have clashing source_set dependencies. For example, "content/browser:browser" and "//media:media" depend on "//media/capture:capture". This results in conflicting symbols in the media .so file and the content .so file, which asan is catching.

It seems like "enable_plugins" is the only flag-based way we can disable PPAPI builds w/o requiring build file refactoring.

Comment 6 by bbudge@chromium.org, Jun 20 2016

I believe all Chrome plugins are PPAPI now. So they are equivalent as far as the build is concerned.
Owner: ----
Status: Archived (was: Assigned)
blimp_unittests will be removed soon, so this bug (if it still exists) is obsolete.
Labels: Archive-Blimp

Sign in to add a comment