New issue
Advanced search Search tips

Issue 845451 link

Starred by 2 users

Issue metadata

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

Blocking:
issue 843511
issue 849381



Sign in to add a comment

content_shell_crash_test fails on mac in component builds

Project Member Reported by thakis@chromium.org, May 22 2018

Issue description

I recently added content_shell_crash_test to the clang tot bots. It fails on ToTMac:

https://ci.chromium.org/buildbot/chromium.clang/ToTMac/1649

https://chromium-swarm.appspot.com/task?id=3d9ef442783bbd10&refresh=10&show_raw=1

dyld: Library not loaded: @rpath/libbase.dylib
  Referenced from: /b/s/w/ir/out/Release/Content Shell.app/Contents/Frameworks/Content Shell Framework.framework/Helpers/crashpad_handler
  Reason: image not found


Looks like we probably need something like

    if (is_component_build) {
      ldflags += [
        # The helper is in Chromium.app/Contents/Versions/X/Chromium Helper.app/Conents/MacOS/
        # so set rpath up to the base.
        "-rpath",
        "@loader_path/../../../../../../..",
      ]
    }

for crashpad_helper?
 

Comment 1 by thakis@chromium.org, May 22 2018

Cc: h...@chromium.org inglorion@chromium.org

Comment 2 by thakis@chromium.org, May 22 2018

Blocking: 843511

Comment 3 by thakis@chromium.org, May 22 2018

Need to adjust rpath while copying over here: https://cs.chromium.org/chromium/src/content/shell/BUILD.gn?q=crashpad_handler+file:%5C.gn&sq=package:chromium&dr=C&l=626


This in the vicinity mentions install_name_tool and how it might not be the tool for the job and what to do instead: https://cs.chromium.org/chromium/src/content/shell/BUILD.gn?q=install_name_tool&sq=package:chromium&dr=C&l=748
Owner: thakis@chromium.org
Status: Started (was: Untriaged)
This attempts to make things work: https://cs.chromium.org/chromium/src/third_party/crashpad/crashpad/handler/BUILD.gn?l=140

I'll try and see why it doesn't seem to work.
Aha I can repro if I run it like so:

content/shell/tools/breakpad_integration_test.py --verbose --build-dir out/gn --binary out/gn/Content\ Shell.app/Contents/MacOS/Content\ Shell
Aha, I ran it with a space instead of a = after --crash-dumps-dir, this repros too:

out/gn/Content\ Shell.app/Contents/MacOS/Content\ Shell --run-web-tests chrome://crash --enable-crash-reporter --crash-dumps-dir=chrome
DYLD_PRINT_RPATHS=1 out/gn/Content\ Shell.app/Contents/MacOS/Content\ Shell --run-web-tests chrome://crash --enable-crash-reporter --crash-dumps-dir=chrome

...

RPATH failed to expanding     @rpath/libbase.dylib to: /Users/thakis/src/chrome/src/out/gn/Content Shell.app/Contents/Frameworks/Content Shell Framework.framework/Versions/C/Helpers/../../../../../../../../libbase.dylib
RPATH failed to expanding     @rpath/libbase.dylib to: /Users/thakis/src/chrome/src/out/gn/Content Shell.app/Contents/Frameworks/Content Shell Framework.framework/Versions/C/Helpers/../../../../../libbase.dylib
RPATH failed to expanding     @rpath/libbase.dylib to: /Users/thakis/src/chrome/src/out/gn/Content Shell.app/Contents/Frameworks/Content Shell Framework.framework/Versions/C/Helpers/./libbase.dylib
RPATH failed to expanding     @rpath/libbase.dylib to: /Users/thakis/src/chrome/src/out/gn/Content Shell.app/Contents/Frameworks/Content Shell Framework.framework/Versions/C/Helpers/../../../libbase.dylib
Project Member

Comment 10 by bugdroid1@chromium.org, Jun 1 2018

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

commit b9fc1f0e2535b5cd57527013d575ebcb99ce968b
Author: Nico Weber <thakis@chromium.org>
Date: Fri Jun 01 22:06:00 2018

mac: Make content_shell_crash_test work in component builds again.

This regressed in https://chromium-review.googlesource.com/c/chromium/src/+/967155

Bug:  845451 
Change-Id: I7b5f5fb1925c4c354d4796e154905b32909691df
Reviewed-on: https://chromium-review.googlesource.com/1083251
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563821}
[modify] https://crrev.com/b9fc1f0e2535b5cd57527013d575ebcb99ce968b/third_party/crashpad/crashpad/handler/BUILD.gn

Status: Fixed (was: Started)
This issue is fixed. One of the tests in content_shell_crash_test still fails on that bot, but let's use a new bug for that.
Blocking: 849381

Sign in to add a comment