[Tarantool-patches] [PATCH] tools: implement toolchain for crash artefacts

Igor Munkin imun at tarantool.org
Tue Apr 20 01:51:35 MSK 2021


I've checked the patch into master.

On 25.02.21, Igor Munkin wrote:
> This patch introduces two scripts to ease crash artefacts collecting and
> loading for postmortem analysis:
> 
> * tarabrt.sh - the tool collecting a tarball with the crash artefacts
>   the right way: the coredump with the binary, all loaded shared libs,
>   Tarantool version (this is a separate exercise to get it from the
>   binary built with -O2). Besides, the tarball has a unified layout, so
>   it can be easily processed with the second script:
>   - /coredump - core dump file on the root level
>   - /binary - tarantool executable on the root level
>   - /version - plain text file on the root level with
>     `tarantool --version` output
>   - /checklist - plain text file on the root level with
>     the list of the collected entities
>   - all shared libraries used by the crashed instance - their layout
>     respects the one on the host machine, so them can be easily loaded
>     with the following gdb command: set sysroot $(realpath .)
> 
>   The script can be easily used either manually or via
>   kernel.core_pattern variable.
> 
> * gdb.sh - the auxiliary script originally written by @Totktonada, but
>   needed to be adjusted to the crash artefacts layout every time. Since
>   there is a unified layout, the original script is enhanced a bit to
>   automatically load the coredump via gdb the right way.
> 
> Closes #5569
> 
> Signed-off-by: Igor Munkin <imun at tarantool.org>
> ---
> 
> Issue: https://github.com/tarantool/tarantool/issues/5569
> Branch: https://github.com/tarantool/tarantool/tree/imun/gh-5569-coredump-tooling
> 
>  changelogs/unreleased/tarabrt.md |   3 +
>  tools/gdb.sh                     |  59 ++++++++
>  tools/tarabrt.sh                 | 234 +++++++++++++++++++++++++++++++
>  3 files changed, 296 insertions(+)
>  create mode 100644 changelogs/unreleased/tarabrt.md
>  create mode 100755 tools/gdb.sh
>  create mode 100755 tools/tarabrt.sh
> 

<snipped>

> -- 
> 2.25.0
> 

-- 
Best regards,
IM


More information about the Tarantool-patches mailing list