[opensuse-factory] few tips for crash catching, work with core files, debuginfo installation
Well, some applications in 11.3 accidentally crash. But most of them
does not want to crash in a moment I am debugging them in the gdb, I
searched in the documentation and found a simple solution.
Collect cores:
1. Set SOFTCORELIMIT in /etc/sysconfig/ulimit to "unlimited"
or do this just now by:
ulimit -c unlimited
2. mkdir /cores ; chmod +t /cores ; chmod og+rw /cores
3. Add a line to /etc/sysctl.conf:
kernel.core_pattern = /cores/%e-%t-%u.core
or do this just now by:
echo "/cores/%e-%t-%u.core" >/proc/sys/kernel/core_pattern
Core files will be stacked to /cores and ordered by application name and
time and will never overwrite. You can easily find a most crashing
application there.
Install debuginfo:
gdb often complains on missing debuginfo packages. You can easily
install all of them by copy and paste it to the console input of
following command:
eval zypper install $(sed -n 's/Try: zypper install//p')
Well, you can do the same using the gdb log file and then reading it:
eval zypper install $(sed -n 's/Try: zypper install//p'
Two weeks ago I sent few tips for getting of core files. If you did so, maybe you already have many core files and want to get backtraces as easy as possible. Then you can like my script to get good backtraces from these core files with a minimal effort. It checks for needed debuginfo packages, makes a backtrace, and extracts relevant part to .gdbbt file. Simply place following two files into the /cores directory, mark the shell file executable and then simply run: cd /cores ./A-backtraces.sh Tips: It is good to generate backtraces before online update. If you get a new instance of the library, debuginfos may not fit. Don't forget to subscribe to Update Debug repository: http://download.opensuse.org/debug/update/11.3/ -- Best Regards / S pozdravem, Stanislav Brabec software developer --------------------------------------------------------------------- SUSE LINUX, s. r. o. e-mail: sbrabec@suse.cz Lihovarská 1060/12 tel: +420 284 028 966, +49 911 740538747 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/
participants (1)
-
Stanislav Brabec