Meego Wiki
Views

Quality/bkm/corewatcher

From MeeGo wiki
< Quality
Revision as of 02:26, 30 April 2011 by Gabrbedd (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Corewatcher

Corewatcher is a program that collects user space program crash information and then submits signature information and backtrace data to a central website for for statistical analysis and presentation to distribution developers. If your system is configured to create core dumps when a program crashes, corewatcher will analyze the core dumps and report the information back to a central site.

For MeeGo development, core dumps are enabled and corewatcher runs by default (since 1.1.90). When a crash happens, it will ask you if you wish to submit the information to MeeGo (http://crashdb.meego.com). You can also visit that site to see what the hot items currently are.

Configuring

The configuration file is /etc/corewatcher.conf. That file is very well documented, so refer to it for further information. It is highly recommended that you edit this file to change 'allow-submit' from 'ask' to 'yes'. (It's near the top)

allow-submit = yes

The reason is that the 'ask' isn't always working, in which case the core dumps and corewatcher will fill up your hard drive with the data in /tmp.

Getting the Backtraces

Here are the steps of how to get the backtrace log of a crashed program on meego handset

  • Find the "core" logs files under /tmp.
    • When a program crashed, there will be a "core" file (file name like "core.xxx") generated under /tmp automatically.
    • The current MeeGo supports it by default, no additional package needed.
  • Find which "core" log is for the crashed program.
    • In /tmp, there could be more than one "core" file, choose the latest one.
    • For example, if the crashed program is "meego-handset-people", and the latest "core" log is "core.1000", we can user command "file core.1000" to check whether the "core" log is generated for "meego-handset-people".
    • If it isn't, we could try the next latest "core" log with file command until we find the correct one
  • Use gdb to get the backtrace information of this crash.
    • Gdb hasn't been installed on the latest MeeGo image, we have to install it before we can get the backtrace information
    • Before start gdb, run comman "script" command to record the following screen output
    • Let’s still use "meego-handset-people" and "core.1000" for an example. Run command "gdb /usr/bin/meego-handset-people core.1000".
    • Firstly, gdb starts to reproduce the crashing process recorded in "core.1000". When it stops, we can input "bt" command in gdb console, and it starts to dump the backtrace of this crash.
    • After all backtrace is shown, input "quit" to leave gdb.
    • Input "exit" command to stop "script", and we get the screen output in "typescript" under the current folder
    • Open "typescript", the content after "bt" command is the backtrace we need for this crash

Troubleshooting

Corewatcher is filling up my hard drive — For some reason your dumps are not being submitted to the MeeGo server, and therefore they are being retained in your /tmp folder. The easiest solution (after `rm -rf /tmp/core*`) is to change 'allow-submit' from 'ask' to 'yes' (see #Configuring).

Personal tools