Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
dev:hig:coredumps [2019/01/26 23:22]
alexxcons
dev:hig:coredumps [2019/03/23 17:08] (current)
blueberrybrownie grammar
Line 1: Line 1:
-<note warning>​I am not very experienced with coredumps. Would be good to have a revision of this wiki page, to make sure that I dont tell nonsense</​note>​+<note warning>​I am not very experienced with coredumps. Would be good to have a revision of this wiki page, to make sure that I don'​t ​tell nonsense</​note>​
  
-Afaik usually ​there is no need to attach coredumps to bugs. For most bugs it is sufficient to get the backtrace. For most distros it is possible to provide a meaningfull backtrace: +Usually ​there is no need to attach coredumps to bugs. For most distros it is possible to provide a meaningfull backtrace: https://​docs.xfce.org/​contribute/​bugs/​start#​backtraces
-https://​docs.xfce.org/​contribute/​bugs/​start#​backtraces+
  
-Afaik there are (at least) ​four different ways how to diagnose the cause of a crash+There are (at least) ​three different ways how to diagnose the cause of a crash
  
 1.) Provide a failsafe way to reproduce the crash 1.) Provide a failsafe way to reproduce the crash
 +
 If devs can reproduce the crash on their own, they can debug and hopefully fix it. If devs can reproduce the crash on their own, they can debug and hopefully fix it.
 However usually it is very hard to figure out why the crash happens for you, but not for others. However usually it is very hard to figure out why the crash happens for you, but not for others.
  
 2.) Provide a meaningfull backtrace by using debug packages 2.) Provide a meaningfull backtrace by using debug packages
 +
 Some distributions ship debug packages ( e.g <​package>​-dbg or <​package>​-dbgsym ). Some distributions ship debug packages ( e.g <​package>​-dbg or <​package>​-dbgsym ).
 If your distribution does so, you can create a coredump and add debug-symbols to it. ( Usually the raw coredump alone is not of much value ) If your distribution does so, you can create a coredump and add debug-symbols to it. ( Usually the raw coredump alone is not of much value )
 +
 Enable coredumps: Enable coredumps:
-- set "​ulimit -c unlimited"​ in a console to get coredumps for binaries started from this console +  * - set "​ulimit -c unlimited"​ in a console to get coredumps for binaries started from this console 
-- set "​ulimit -c unlimited"​ in .profile to get coredumps from everything+  ​* ​- set "​ulimit -c unlimited"​ in .profile to get coredumps from everything
 After that, you can use "gdb <​programm>​ <​coredump>"​ + "​add-symbol-file ~/​path/​to/​symbols.sym"​ + "​bt"​ to get a meaningfull backtrace. After that, you can use "gdb <​programm>​ <​coredump>"​ + "​add-symbol-file ~/​path/​to/​symbols.sym"​ + "​bt"​ to get a meaningfull backtrace.
 E.g. here some manual for Ubuntu: https://​wiki.ubuntu.com/​DebuggingProgramCrash E.g. here some manual for Ubuntu: https://​wiki.ubuntu.com/​DebuggingProgramCrash
  
-3.) Enable coredumps, attach ​the compressed coredump of the crash to the bugtracker, together ​with the application binary you used. ( debug packages need to be installedso that the coredump has debug symbols )+3.) Compile ​the appliaction ​with debug symbolsinstall it and provide a backtrace
  
-4.) Compile the appliaction with debug symbols, install it and provide a backtrace 
 If all the other options fail, you can still compile stuff from source with debug symbols enabled (e.g. "​./​autogen.sh --enable-debug"​ if the package uses autotools ) If all the other options fail, you can still compile stuff from source with debug symbols enabled (e.g. "​./​autogen.sh --enable-debug"​ if the package uses autotools )
 You will need to install the used build environment and all dependencies of the application in dev-version .. the build-tool usually tells what is missing. You will need to install the used build environment and all dependencies of the application in dev-version .. the build-tool usually tells what is missing.
 Reproduce the crash with the self-compiled binary, either via gdb or via coredump, so you get a backtrace which has file-names/​line-numbers. Reproduce the crash with the self-compiled binary, either via gdb or via coredump, so you get a backtrace which has file-names/​line-numbers.