Support:How To extract backtrace from coredump

From TBwiki
Revision as of 21:19, 6 October 2014 by Candy Chan (Talk | contribs)
Jump to: navigation, search

When a fault happens in toolpack, developers may need to get more useful informations to fix the problem.

How to give useful informations related to a fault in the code:

  1. Log to the primary server (ssh)
  2. Type tbsetup
    Usually all core files goes into the application's working directory.
  3. Type cd APPLICATION
    where:
    • APPLICATION is the application that crashes
    In this example, we'll suppose APPLICATION is toolpack_engine
  4. Execute command:
    gdb -se "APPLICATION" -ex "bt full" -ex "thread apply all bt" --batch -c CORE > /tmp/backtrace.txt
    where:
    • APPLICATION is the application that crashes
    • CORE is the core file.
    for example:
    gdb -se "/lib/tb/toolpack/pkg/2.8.5/bin/release/x86_64-linux64/toolpack_engine" -ex "bt full" -ex "thread apply all bt" --batch -c core.17900 > /tmp/backtrace.txt
    If you are not sure about which application caused the crash, you can look in the created file for:
    Core was generated by `./release/x86_64-linux64/toolpack_engine -gw 12358'.
    For example, in that specific example, the crash happened at:
    Program terminated with signal 11, Segmentation fault.
    #0 0x000000000043ce59 in CallBridgingSampleDisplayMenu ()
    #0 0x000000000043ce59 in CallBridgingSampleDisplayMenu ()
    No symbol table info available.
  5. Attach the file /tmp/backtrace.txt in your TBSupport Tracking System (ticket that you opened to report the problem).


Troubleshooting:

if you see:

# gdb
-bash: gdb: command not found

This is because you did not install the gdb package. You can do:

yum install gdb

If you prefer to run the application in gdb, consult this page

Personal tools