Changes between Initial Version and Version 1 of DebugClientWin


Ignore:
Timestamp:
04/25/07 12:34:41 (11 years ago)
Author:
Nicolas
Comment:

Converted by an automatic script

Legend:

Unmodified
Added
Removed
Modified
  • DebugClientWin

    v1 v1  
     1= Debugging the BOINC Windows client =
     2
     3
     4== Symbol Files ==
     5 Symbol files are used by various Windows debugging engines to match up memory addresses to symbol names. Symbol names are names of variables,  functions, and subroutines that a developer has named a piece of code before the compilation process.
     6
     7Symbol files for BOINC can be found here:[http://boinc.berkeley.edu/dl/ http://boinc.berkeley.edu/dl/]
     8
     9The files generally start out like boinc_xxx_pdb.zip where the xxx is  the version of BOINC you are running.
     10
     11The uncompressed files should be stored in the same directory as BOINC.
     12
     13
     14== Crashes ==
     15 If either BOINC or the BOINC Manager crash,  (they unexpectedly stop running or disappear), there should be some diagnostic information recorded in stderrdae.txt for  BOINC and stderrgui.txt for the BOINC Manager.
     16
     17The diagnostic information we are looking for is called a call stack which  is described below.
     18
     19
     20== Call stacks ==
     21 Call stacks help us identify where the problem is by telling us which file and what line number in the source code the error occurred in.
     22
     23Here is an example of a good call stack:
     24
     25
     26{{{
     27***UNHANDLED EXCEPTION****
     28Reason: Access Violation (0xc0000005) at address 0x00411A87 write attempt to address 0x00000000
     29
     301: 06/08/05 15:07:01
     311: c:\boincsrc\main\boinc\client\cs_benchmark.c(310) +8 bytes (CLIENT_STATE::cpu_benchmarks_poll)
     321: c:\boincsrc\main\boinc\client\client_state.c(431) +0 bytes (CLIENT_STATE::do_something)
     33}}}
     34  Here is an example of a bad call stack:
     35
     36
     37{{{
     38***UNHANDLED EXCEPTION****
     39Reason: Access Violation (0xc0000005) at address 0x7C34FEDC read attempt to address 0x05595D90
     40
     411: 06/08/05 00:36:54
     421: SymGetLineFromAddr(): GetLastError = 126
     431: SymGetLineFromAddr(): GetLastError = 126
     441: SymGetLineFromAddr(): GetLastError = 126
     451: SymGetLineFromAddr(): GetLastError = 126
     46}}}
     47
     48== Extracting call stacks ==
     49 If we need a call stack to help solve a problem that doesn't manifest itself as a crash you can still extract a call stack from a running program using some freeware tools Microsoft publishes called Debugging Tools for Windows.
     50
     51The Debugging Tools for Windows can be found here: [http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx Debugging Tools for Windows]
     52
     53Once these tools are installed on your machine and the symbol files are extracted to the BOINC installation directory you can run 'WinDBG.exe' and attach to the 'BOINC.exe' process through the file menu to begin your debugging session. Once 'WinDBG.exe' has attached itself  to 'BOINC.exe' you can view the call stack by typing 'kb' in the command window and then hitting enter.
     54
     55Here is an example of the output 'WinDBG.exe' displays when it dumps a call stack:
     56
     57
     58{{{
     59ChildEBP RetAddr  Args to Child
     600012fafc 7c821364 77e42439 00000000 0012fb40 ntdll!KiFastSystemCallRet
     610012fb00 77e42439 00000000 0012fb40 ffffff4a ntdll!NtDelayExecution+0xc
     620012fb68 77e424b7 00000064 00000000 0012fee0 kernel32!SleepEx+0x68
     63*** WARNING: Unable to verify checksum for C:\Program Files\BOINC\boinc.exe
     640012fb78 00430206 00000064 00424b3c 9999999a kernel32!Sleep+0xf
     650012fb80 00424b3c 9999999a 3fb99999 00000002 boinc!boinc_sleep+0x16 [c:\boincsrc\main\boinc_public\lib\util.c @ 251]
     660012fee0 00424f87 0012fefc 9999999a 3fb99999 boinc!NET_XFER_SET::do_select+0x26c [c:\boincsrc\main\boinc_public\client\net_xfer.c @ 319]
     670012fef4 00407a2d 00000000 00000000 7c34f6f4 boinc!NET_XFER_SET::net_sleep+0x17 [c:\boincsrc\main\boinc_public\client\net_xfer.c @ 245]
     680012ff18 004225dd 9999999a 3fb99999 00000000 boinc!CLIENT_STATE::net_sleep+0x7d [c:\boincsrc\main\boinc_public\client\client_state.c @ 369]
     690012ff38 0042276f 7ffdf000 00000000 00000000 boinc!boinc_main_loop+0x7d [c:\boincsrc\main\boinc_public\client\main.c @ 331]
     700012ff60 00431c0d 00000002 017acfc0 016def68 boinc!main+0x11f [c:\boincsrc\main\boinc_public\client\main.c @ 412]
     710012ffc0 77e523cd 00000000 00000000 7ffdf000 boinc!mainCRTStartup+0x143 [f:\vs70builds\3077\vc\crtbld\crt\src\crtexe.c @ 398]
     720012fff0 00000000 00431aca 00000000 78746341 kernel32!BaseProcessStart+0x23
     73}}}
     74  Warning: You may need to add the BOINC directory to 'WinDBG.exe' symbol search path from the File menu in order to get a valid call stack.
     75