Debugging

Differences between revisions 1 and 9 (spanning 8 versions)
Revision 1 as of 2009-05-22 23:37:42
Size: 1655
Editor: APuteaux-154-1-12-174
Comment:
Revision 9 as of 2010-02-15 15:11:28
Size: 2395
Editor: c-24-21-43-9
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from Chromium/Debug
When you want to file a bug, it should be filed '''upstream''' using this '''[[http://code.google.com/p/chromium/issues/entry?template=Defect%20on%20Linux|linux template]]'''.
Please always include the result of the following command:
{{{
dpkg -l | grep chromium-}}}
Line 3: Line 9:
If chromium crashes and if you want to file a [[http://code.google.com/p/chromium/issues/entry|bug upstream]], you will need to provide a proper backtrace for your crash. If chromium crashes and if you want to file a '''[[http://code.google.com/p/chromium/issues/entry?template=Defect%20on%20Linux|bug upstream]]''', you need to provide a proper backtrace for your crash.
Line 9: Line 15:
The debug package for chromium is called '''chromium-browser-dbg''' (it's big, ~120MB). It could be installed and removed like any other packages. The debug package for chromium is called '''chromium-browser-dbg''' (it's big, ~75MB). It could be installed and removed like any other packages.
Line 18: Line 24:
gdb /usr/lib/chromium-browser/chrome 2>&1 | tee gdb-chromium.txt chromium-browser --debug 2>&1 | tee gdb-chromium.txt
Line 35: Line 41:
Note: ''ldd /usr/lib/chromium-browser/chrome'' could give you a clue of which libs are loaded, and http://packages.ubuntu.com/ could tell you in which package they live. Note: ''ldd /usr/lib/chromium-browser/chromium-browser'' could give you a clue of which libs are loaded, and http://packages.ubuntu.com/ could tell you in which package they live.
Line 38: Line 44:

Note: since chromium is multi-process (it spawns several processes, such as the sandbox and all renderers), the stack may be useless, depending on where the crash occurs. You can then try with --single-process (after --debug). If it is still not enough, you can try inferring from the upstream chrome debugging tips: http://code.google.com/p/chromium/wiki/LinuxDebugging
----
CategoryDebugging

When you want to file a bug, it should be filed upstream using this linux template. Please always include the result of the following command:

dpkg -l | grep chromium-

Debugging Chromium crashes

If chromium crashes and if you want to file a bug upstream, you need to provide a proper backtrace for your crash.

It could be accomplished using gdb and some debug packages.

If you know nothing about gdb, the generic instructions are available here: Backtraces with gdb

The debug package for chromium is called chromium-browser-dbg (it's big, ~75MB). It could be installed and removed like any other packages.

Note: you may need other debug packages if the backtrace shows lines like "#5 0x083949e0 in ?? ()". In that case, you need the corresponding -dbg or -dbgsym packages. Instructions about those are available in DebuggingProgramCrash

Once done, open a terminal and proceed as follow:

chromium-browser --debug 2>&1 | tee gdb-chromium.txt
(gdb) handle SIG33 pass nostop noprint
(gdb) set pagination 0
(gdb) run <arguments, if any>

do what you need to do to trigger the crash, then:

(gdb) backtrace
(gdb) thread apply all backtrace
(gdb) quit

Check the file gdb-chromium.txt to see if it contains symbols (as few "?? ()" as possible). If not, please locate and install the missing debug package(s) and retry.

Note: ldd /usr/lib/chromium-browser/chromium-browser could give you a clue of which libs are loaded, and http://packages.ubuntu.com/ could tell you in which package they live.

Once you feel it's good enough, you may attach the file gdb-chromium.txt to your bug report.

Note: since chromium is multi-process (it spawns several processes, such as the sandbox and all renderers), the stack may be useless, depending on where the crash occurs. You can then try with --single-process (after --debug). If it is still not enough, you can try inferring from the upstream chrome debugging tips: http://code.google.com/p/chromium/wiki/LinuxDebugging


CategoryDebugging

Chromium/Debugging (last edited 2012-07-11 10:33:46 by mitya57)