ceph/doc/dev/developer_guide/debugging-gdb.rst
Josh Soref 8abce157f1 doc: Fix many spelling errors
* administrators
* allocated
* allowed
* approximate
* authenticate
* availability
* average
* behavior
* binaries
* bootstrap
* bootstrapping
* capacity
* cephadm
* clients
* combining
* command
* committed
* comparison
* compiled
* consequences
* continues
* convenience
* cookie
* crypto
* dashboard
* deduplication
* defaults
* delivered
* deployment
* describe
* directory
* documentation
* dynamic
* elimination
* entries
* expectancy
* explicit
* explicitly
* exporter
* github
* hard
* healthcheck
* heartbeat
* heavily
* http
* indices
* infrastructure
* inherit
* layout
* lexically
* likelihood
* logarithmic
* manually
* metadata
* minimization
* minimize
* object
* of
* operation
* opportunities
* overwrite
* prioritized
* recipe
* records
* requirements
* restructured
* running
* scalability
* second
* select
* significant
* specify
* subscription
* supported
* synonym
* throttle
* unpinning
* upgraded
* value
* version
* which
* with

Plus some line wrapping and additional edits...

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-07-02 23:38:18 -04:00

44 lines
1.4 KiB
ReStructuredText

GDB - The GNU Project Debugger
==============================
`The GNU Project Debugger (GDB) <https://www.sourceware.org/gdb>`_ is
a powerful tool that allows you to analyze the execution flow
of a process.
GDB can help to find bugs, uncover crash errors or track the
source code during execution of a development cluster.
It can also be used to debug Teuthology test runs.
GET STARTED WITH GDB
--------------------
Basic usage with examples can be found `here. <https://geeksforgeeks.org/gdb-command-in-linux-with-examples>`_
GDB can be attached to a running process. For instance, after deploying a
development cluster, the process number (PID) of a ``ceph-osd`` daemon can be found in::
$ cd build
$ cat out/osd.0.pid
Attaching gdb to the process::
$ gdb ./bin/ceph-osd -p <pid>
.. note::
It is recommended to compile without any optimizations (``-O0`` gcc flag)
in order to avoid elimination of intermediate values.
Stopping for breakpoints while debugging may cause timeouts, so the following
configuration options are suggested::
[osd]
osd_op_thread_timeout = 1500
osd_op_thread_suicide_timeout = 1500
Debugging Teuthology Tests
^^^^^^^^^^^^^^^^^^^^^^^^^^
``src/script/ceph-debug-docker.sh`` can be used to analyze Teuthology failures::
$ ./ceph-debug-docker.sh <branch-name>
Refer to the script header for more information.