Attempts to print a stacktrace on segfault in our integration tests (backport #2776) #2813
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸
🎉 New feature
Closes #
Depends on: gazebo-tooling/action-gz-ci#81Summary
Our integration tests often segfault in CI leaving us clueless as to whats happening. This commit is an attempt to vendor backward-cpp and at the same time allows us to get a stacktrace of our segfaulting tests in CI. The current status of this PR is draft.
Other options considered:
We vendor backward-cpp in
gz-launch
and ingz-utils
. Sadly the ubuntu package is not very useful as no cmake targets are provided. I could try to vendor it in gz-cmake or write a bespokeFindBackward
package. However, our goal is to use it in tests. This is a very specific use case and I feel maybe the simplest option is to vendor it here and link it against the tests. That way we do not introduce more dependencies via 3rd party package managers and the user has no need to have anything else installed.Test it
This commit has an example of a test I purposely introduced a segfault in. You can take a look at the github runners and see the stacktrace, Unfortunately, for Jenkins, there may need to be some minor changes on the buildfarm side. In particular we need to install
libdwarf-dev
,libdw-dev
andbinutils-dev
. We will also need to build withRelWithDebInfo
.Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.This is an automatic backport of pull request #2776 done by [Mergify](https://mergify.com).