This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] CI: set symbolizer for bootstrapping build
ClosedPublic

Authored by mizvekov on Aug 28 2022, 7:22 AM.

Details

Reviewers
ldionne
Mordante
Group Reviewers
Restricted Project
Commits
rG3012a0c373e9: [libcxx] CI: set symbolizer for bootstrapping build
Summary

Setting the symbolizer is required for getting a pretty
stack trace when Clang crashes.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>

Diff Detail

Event Timeline

mizvekov created this revision.Aug 28 2022, 7:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 28 2022, 7:22 AM
Herald added a subscriber: arichardson. · View Herald Transcript
mizvekov requested review of this revision.Aug 28 2022, 7:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 28 2022, 7:22 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne added inline comments.Aug 29 2022, 6:12 AM
libcxx/utils/ci/run-buildbot
474 ↗(On Diff #456184)

What tool picks up that environment variable? With a quick search, it looks like clang itself looks for it and symbolizes the crash trace when it can find it.

We are trying to keep run-buildbot agnostic of the versions of tools available on the CI machine, so this may belong more in` buildkite-pipeline.yml`, or perhaps we should also simply make llvm-symbolizer available in the $PATH on our CI nodes by changing libcxx/utils/ci/Dockerfile.

mizvekov added inline comments.Aug 29 2022, 6:28 AM
libcxx/utils/ci/run-buildbot
474 ↗(On Diff #456184)

Yeah that is the case, we need that so that we can have readable crash traces in the CI output.

Setting that variable for all configurations, or just making the unversioned tool available, would also help with crash traces in configurations other than the bootstrapping-build, so I will follow one of those approaches.

I love the idea of this change, but I too like it to use a different approach.

libcxx/utils/ci/run-buildbot
474 ↗(On Diff #456184)

I prefer the utils/ci/buildkite-pipeline.yml approach since we try to keep both
this file and the Dockerfile version agnostic

Can you add LLVM_SYMBOLIZER_PATH to utils/ci/buildkite-pipeline.yml like:
(Note these changes are very recent so you might need to rebase.)

- label: "Bootstrapping build"
  command: "libcxx/utils/ci/run-buildbot bootstrapping-build"
  artifact_paths:
    - "**/test-results.xml"
    - "**/*.abilist"
  env:
      CC: "clang-${LLVM_HEAD_VERSION}"
      CXX: "clang++-${LLVM_HEAD_VERSION}"
      LLVM_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer-${LLVM_HEAD_VERSION}"
  agents:
    queue: "libcxx-builders"
    os: "linux"
  retry:
    automatic:
      - exit_status: -1  # Agent was lost
        limit: 2
  timeout_in_minutes: 120
mizvekov updated this revision to Diff 456395.Aug 29 2022, 10:10 AM

I love the idea of this change, but I too like it to use a different approach.

Done, thanks!

mizvekov marked 2 inline comments as done.Aug 29 2022, 10:11 AM
Mordante accepted this revision as: Mordante.Aug 29 2022, 10:29 AM

LGTM! Thanks! I leave the final approval to @ldionne.

ldionne accepted this revision.Aug 30 2022, 5:22 AM
This revision is now accepted and ready to land.Aug 30 2022, 5:22 AM
This revision was landed with ongoing or failed builds.Aug 30 2022, 6:01 AM
This revision was automatically updated to reflect the committed changes.