Changes between Version 9 and Version 10 of ServerDebug


Ignore:
Timestamp:
Apr 29, 2014, 9:12:30 PM (10 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ServerDebug

    v9 v10  
    1 = Trouble-shooting server components =
     1[[PageOutline]]
     2= Trouble-shooting a BOINC server =
    23
    3 A grab-bag of techniques for debugging BOINC server software:
     4== Trouble-shooting tools ==
    45
    5 == Log files ==
     6=== Log files ===
    67
    78Each server component (scheduler, feeder, transitioner, etc.) has its own log file.
     
    1516To control the verbosity of the log files:
    1617
    17  * Scheduler: set the desired [ProjectOptions#Scheduler:logging logging options]
     18 * Scheduler: set the desired [ProjectOptions#Loggin logging options]
    1819 * File upload handler: set [ProjectOptions#misc fuh_debug_level].
    19  * Other components: pass "-d N" (1=least verbose, 4=most verbose)
     20 * daemons: pass the cmdline arg "-d N" (1=least verbose, 4=most verbose)
     21  If you run server components with '''-d 4''', their database queries will be logged.
     22  This is verbose but extremely useful for tracking down database-level problems.
     23
     24=== Examining the database ===
     25
     26The [wiki:HtmlOps admin web interface] provides a web-based interface for
     27browsing your project's database.
     28
     29You can also use MySQL tools such as
     30 * The [http://dev.mysql.com/doc/refman/5.0/en/mysql.html mysql interpreter].
     31   The '[http://dev.mysql.com/doc/refman/5.0/en/show-processlist.html show processlist;]' query
     32   is useful for diagnosing DB performance problems.
     33 * [http://jeremy.zawodny.com/mysql/mytop/ mytop]: like 'top' for MySQL: shows running queries.
     34 * [http://www.phpmyadmin.net/ phpMyAdmin]: general-purpose web interface to MySQL
     35
     36=== Examining shared memory ===
     37
     38The command
     39{{{
     40bin/show_shmem
     41}}}
     42will print a textual summary of the contents of the shared-memory structure
     43that caches jobs and information about applications.
     44
     45== Trouble-shooting the job pipeline ==
     46
     47 * Are workunits (jobs) getting created correctly?
     48   Examine the database to see.
     49   If you're using a work generator, check its log file.
     50 * Are results (job instances) getting created?
     51   Examine the database to see.
     52   If you don't see results, check the transitioner log file.
     53 * Are jobs getting into shared memory?
     54   Use show_shmem (see above).
     55   You should see jobs.
     56   If not, check the feeder log file.
     57 * Is the scheduler sending jobs? If not, check its log file, preferably with the following log flags:
     58  * <debug_version/>: show details of app version selection
     59  * <debug_send/>: show details of job assignment
     60  * <debug_quota/>: show details of quota enforcement
     61 * Are clients processing jobs correctly?
     62   Check the status and stderr output of completed jobs.
     63 * Are output files getting uploaded?
     64   Check the file upload handler log file.
     65 * Are jobs getting validated?
     66   Check the validator log file.
     67 * Are jobs getting assimilated?
     68   Check the assimilator log file.
    2069
    2170== Debugging the scheduler ==
    2271
    23 Start by setting the appropriate logging options and examining the log file.
    24 
    25 If this doesn't reveal the problem, or if the scheduler is crashing,
     72If the scheduler is acting incorrectly or crashing,
     73and you like mucking around in C++ source code,
    2674you can run it under a debugger like `gdb`.
    2775The scheduler is a CGI program;
     
    4189}}}
    4290
    43 This is useful for figuring out why your project is generating 'no work available' messages.
    44 
    4591As an alternative to this, edit `sched/handle_request.cpp`,
    4692and put a call to `debug_sched("debug_sched");` just before `sreply.write(fout, sreq);`.
     
    55101#define DUMP_CORE_ON_SEGV 1
    56102}}}
    57 
    58 == MySQL interfaces ==
    59 
    60 You should become familiar with MySQL tools such as
    61  * The [http://dev.mysql.com/doc/refman/5.0/en/mysql.html mysql interpreter] and in particular the '[http://dev.mysql.com/doc/refman/5.0/en/show-processlist.html show processlist;]' query.
    62  * [http://jeremy.zawodny.com/mysql/mytop/ mytop]: like 'top' for MySQL
    63  * [http://www.phpmyadmin.net/ phpMyAdmin]: general-purpose web interface to MySQL
    64 
    65 == Database query tracing ==
    66 
    67 If you run server components with '''-d 4''',
    68 their database queries will be logged.
    69 This is verbose but extremely useful for tracking down database-level problems.