Changes between Initial Version and Version 1 of MacBacktrace


Ignore:
Timestamp:
Mar 25, 2008, 5:23:00 PM (16 years ago)
Author:
charlief
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MacBacktrace

    v1 v1  
     1
     2==Interpreting BOINC Crash Backtraces on the Mac==
     3
     4BOINC Manager, BOINC CLient, and the BOINC library libboinc.a all generate debugging information in their respective stderr.txt files in the event of a crash, including a backtrace.  When running on Mac OS 10.3 or OS 10.4, the backtrace is generated correctly for all versions of BOINC and its library since 5.10.3.  However, BOINC versions earlier than 6.1.11 do not correctly dump a backtrace under Mac OS 10.5.
     5
     6Executables released for general distribution usually have had most of their symbols stripped, so the backtrace generated when there is a crash in the field will typically only have hex addresses with few if any symbols.
     7
     8Whenever we release BOINC for the Mac, we archive the entire executable files with symbols for the Client and Manager before stripping the symbols for general distribution.  For BOINC version x.y.z, you can download these from:
     9<http://boinc.berkeley.edu/dl/boinc_x.y.z_macOSX_SymbolTables.zip>
     10
     11If you have a crash dump without debugging symbols, there are several ways to find the associated symbols.  These same techniques can be used for project applications as well as the BOINC Manager and Client:
     12- Replace the stripped executable with the unstripped version and run it again.
     13- Use the atos command-line utility to convert hex addresses to symbols.
     14- Use the GDB debugger to convert hex addresses to symbols.
     15
     16[Method 1]
     17Replace the stripped executable with the unstripped one for the correct architecture, and run it again to reproduce the crash with full symbols. 
     18
     19For the BOINC Manager or Client, the original stripped executable is a "universal binary" which contains the code for ppc, i386, and perhaps x86_64 architectures.  The boinc_x.y.z_macOSX_SymbolTables.zip file contains a separate unstripped executable for each single architecture for BOINC version x.y.z.)
     20
     21The BOINC Manager's executable is inside its bundle. 
     22You can replace the 32-bit Intel manager on the command line thus:
     23
     24   sudo cp [path]/BOINCManager_i386 /Applications/BOINCManager.app/Contents/MacOS/BOINCManager
     25
     26You should then confirm that the ownership and permissions have not changed:
     27ls -al /Applications/BOINCManager.app/Contents/MacOS
     28and you should see something like this:
     29-r-xr-sr-x  1 boinc_master  boinc_master  9197816 Mar 12 03:04 BOINCManager
     30
     31Note that you must rename the unstripped executable to have the same file name as the original.
     32
     33NOTE: This will work for all Mac BOINC versions _except_ 6.1.10 (which saved the symbols in a separate .dSYM file.)
     34
     35[Method 2]
     36Use the atos command-line utility to convert the hex address in the crash backtrace to its symbol. 
     37
     38This will work for project applications as well as the BOINC Manager and Client, but not for separate .dSYM files:
     39
     40For example, to find a symbol in BOINC Manager version 5.10.45, at the command line in the Terminal application, first enter:
     41   atos -o [path]/boinc_5.10.45_macOSX_SymbolTables/SymbolTables/BOINCManager_i386
     42then enter any number of hex values separated by spaces or carriage returns.  For example, entering the following:
     43   0x0009dc57 0x0009de45 0x000151f1 0x0007210a
     44will give the following output:
     45   QCRGetBacktraceAtIndex (in BOINCManager_i386) (QCrashReport.c:623)
     46   QCRPrintBacktraces (in BOINCManager_i386) (QCrashReport.c:756)
     47   boinc_catch_signal (in BOINCManager_i386) (diagnostics.C:554)
     48   CProgressBar::UpdateValue(double) (in BOINCManager_i386) (sg_ProgressBar.cpp:104)
     49
     50[Method 3]
     51Use gdb to convert the hex address in the crash backtrace to its symbol.  This will work for project applications as well as the BOINC Manager and Client, including separate .dSYM files:
     52
     53If the symbols are in the same file as the executable, or if the separate .dSYM file is in the same directory as the executable, first enter the following on the command line in the Terminal application:
     54   gdb [path to executable file]
     55If the executable file is not in the same directory as the .dSYM file, do this instead:
     56   gdb
     57   symbol [path to .dSYM file]
     58
     59Then, for each hex address of the form 0x12345678, enter the following:
     60   info line *0x12345678
     61Be sure to include the asterisk!
     62
     63For example, again examining BOINC Manager version 5.10.45:
     64   gdb [path]/boinc_5.10.45_macOSX_SymbolTables/SymbolTables/BOINCManager_i386
     65   info line *0x0007210a
     66produces the following output:
     67   Line 104 of "/Volumes/Sage/BOINC_Mac/boinc_5_10_45_tag/mac_build/../clientgui/
     68   sg_ProgressBar.cpp" starts at address 0x72102
     69   <__MIG_check__Reply__io_service_close_t+29> and ends at 0x7210c
     70   <__MIG_check__Reply__io_service_close_t+39>.
     71
     72This method is described at:
     73   <http://developer.apple.com/technotes/tn2004/tn2123.html#LISTPOSDEP>
     74There is also much useful information on the subject at:
     75   <http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html>
     76(scroll down to the section "Symbolizing Crash Dumps".)
     77
     78Notes: this web page says that the atos utility properly handles separate .dSYM files if you use the version of atos the which ships with XCODE Tools version 3.0.  Unfortunately, this is not true.  Also, these pages are focused on the crash reports automatically generated by the Mac OS, which are a bit different from the ones generated by BOINC.
     79