Skip to content

Add tt coredump #3139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion doc/reference/tt_cli/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ help for the given command.
- Print the contents of ``.snap`` or ``.xlog`` files into stdout
* - :doc:`play <play>`
- Play the contents of ``.snap`` or ``.xlog`` files to another Tarantool instance
* - :doc:`coredump <coredump>`
- Manipulate Tarantool core dumps

.. toctree::
:hidden:
Expand All @@ -54,4 +56,5 @@ help for the given command.
connect <connect>
rocks <rocks>
cat <cat>
play <play>
play <play>
coredump <coredump>
73 changes: 73 additions & 0 deletions doc/reference/tt_cli/coredump.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
.. _tt-coredump:

Manipulating Tarantool core dumps
=================================

.. code-block:: bash

tt coredump COMMAND [ARGUMENT]

``tt coredump`` provides commands for manipulating Tarantool core dumps.

.. note::

``tt coredump`` does not support macOS.

Commands
--------

.. container:: table

.. list-table::
:widths: 20 80
:header-rows: 0

* - ``pack``
- Pack a Tarantool core dump and supporting data into a ``tar.gz`` archive
* - ``unpack``
- Unpack a Tarantool core dump archive
* - ``inspect``
- Inspect a Tarantool core dump directory with the
`GNU debugger <https://www.sourceware.org/gdb/>`__ (``gdb``)


Details
-------

To be able to investigate Tarantool crashes, make sure that core dumps are enabled
on the host. Here is the :ref:`instruction on enabling core dumps on Unix systems <admin-core_dumps>`.

``tt coredump pack`` packs the given core dump together with files and data
that can help the crash investigation. This includes:

* Tarantool executable
* Tarantool version information
* OS information
* Shared libraries

``tt coredump inspect`` requires ``gdb`` installed on the host.
The directory being inspected must have the same structure as the core dump archive
created by ``tt coredump pack``.

Examples
--------

* Pack a ``tar.gz`` file with a Tarantool core dump and supporting data:

.. code-block:: bash

tt coredump pack name.core


* Unpack a ``tar.gz`` archive packed by ``tt coredump pack``:

.. code-block:: bash

tt coredump unpack tarantool-core-dump.tar.gz


* Inspect the unpacked core dump with ``gdb``:

.. code-block:: bash

tt coredump inspect tarantool-core-dump