forked from flux-framework/flux-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Problem: debugging flux is not always easy and we accumulated some tricks along the way that ought to be shared with new developers. Start a page for this in the flux-core docs.
- Loading branch information
Showing
3 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
.. _debug: | ||
|
||
############### | ||
Debugging Notes | ||
############### | ||
|
||
*********************** | ||
source tree executables | ||
*********************** | ||
|
||
`libtool <https://www.gnu.org/software/libtool/manual/libtool.html>`_ is | ||
in use, so :option:`libtool e` trickery is needed to launch a tool against | ||
an actual compiled executable. Command front ends further complicate this. | ||
|
||
.. note:: | ||
:option:`libtool e` is shorthand for :option:`libtool --mode=execute`. | ||
|
||
Example: run a built-in sub-command under GDB | ||
|
||
.. code-block:: | ||
$ libtool e gdb --ex run --args src/cmd/flux version | ||
Example: run an external sub-command under GDB | ||
|
||
.. code-block:: | ||
$ src/cmd/flux /usr/bin/libtool e gdb --ex run --args src/cmd/flux-keygen | ||
Example: run the broker under GDB | ||
|
||
.. code-block:: | ||
$ src/cmd/flux start --wrap=libtool,e,gdb,--ex,run | ||
Example: run the broker under valgrind | ||
|
||
.. code-block:: | ||
$ src/cmd/flux start --wrap=libtool,e,valgrind | ||
*************** | ||
message tracing | ||
*************** | ||
|
||
Example: trace messages sent/received by a command | ||
|
||
.. code-block:: | ||
$ FLUX_HANDLE_TRACE=t flux kvs get foo | ||
Example: trace messages sent/received by two broker modules | ||
|
||
.. code-block:: | ||
$ flux module trace --full content kvs | ||
Example: trace messages sent/received by this broker on the overlay network | ||
|
||
.. code-block:: | ||
$ flux overlay trace --full |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,6 @@ Resources for Flux Developers | |
:maxdepth: 1 | ||
:caption: Contents: | ||
|
||
debug | ||
kvs | ||
broker |