...
- Impalad - debug port is 30000 + x , where x is the running number of impalads started. If 3 daemons are started, the ports range from 3000[0-2].
- Catalogd - debug port is 30000 + x, where x is the size of the cluster. If 3 daemons are started the debug port is 3000330030.
As soon as the JVM is started, it is possible to connect using the above ports. The simplest debugger is jdb
:
(jdb is not too convenient by default, so it is recommended to wrap jdb in the rlwrap command, e.g.: alias jdb='rlwrap jdb')
Code Block |
---|
jdb -attach localhost:3000030030 |
Using Eclipse to attach to a running Impalad JVM
...
Code Block | ||||
---|---|---|---|---|
| ||||
define hook-stop handle SIGSEGV stop print pass end define hook-run handle SIGSEGV nostop noprint pass end define hook-continue handle SIGSEGV nostop noprint pass end |
...
The follow bash function is useful for getting the stack traces of all the threads (there are usually plenty of them).
...
Additional .gdbinit fun can be had by using some of the "pretty printer" functions available for STL/Boost libraries. These are each added directly into the .gdbinit file as functions, or (with GDB v7+) using Python extensions. This helps to output data structures in a much easier to read format. Some examples are:
STL support
STL via Python
Boost support via Pythonpretty printers for GDB
Debugging on a cluster machine
...