From Fedora Project Wiki

(Created page with "{{QA/Test_Case |description= |setup= #Install Fedora on your machine #After system installed, check if kexec-tools kernel-debuginfo and crash is installed via <pre>rpm -q kexec-t...")
 
No edit summary
 
Line 11: Line 11:
#Build crasher kernel module: <pre>make</pre>
#Build crasher kernel module: <pre>make</pre>
#Load crasher module:<pre>insmod crasher.ko </pre>
#Load crasher module:<pre>insmod crasher.ko </pre>
{{admon/note|crasher.ko can be complied by creasher.c and Makefile at|http://hongqing.fedorapeople.org/script/crasher.c http://hongqing.fedorapeople.org/script/Makefile}}
|actions=
|actions=
#Trigger crash via: <pre>echo c > /proc/sysrq-trigger</pre>
#Trigger crash via: <pre>echo c > /proc/sysrq-trigger</pre>

Latest revision as of 08:21, 26 March 2012

Description

Setup

  1. Install Fedora on your machine
  2. After system installed, check if kexec-tools kernel-debuginfo and crash is installed via
    rpm -q kexec-tools kernel-debuginfo kernel-devel crash
    If not, you can install via yum
    yum install kexec-tools kernel-debuginfo kernel-devel crash
  3. Reserve crashkernel for kdump by grubby
    grubby --args="crashkernl=128M" --update-kernel=$(grubby --default-kernel)
    Reboot system and check /proc/cmdline
      cat /proc/cmdline | grep "crashkernel"
  4. Edit /etc/kdump.conf, add this line:
     ext4 /dev/mapper/vg_dhcp6558-lv_root
     core_collector makedumpfile -E -d 31
  5. Apply changes and start kdump via
    service kdump restart
  6. Edit /etc/kdump.conf, add this line:
    core_collector makedumpfile -E -d 31
  7. Apply changes and start kdump via
    service kdump restart
  8. Build crasher kernel module:
    make
  9. Load crasher module:
    insmod crasher.ko 

How to test

  1. Trigger crash via:
    echo c > /proc/sysrq-trigger
  2. Analyse vmcore:
   readelf -a /var/crash/xxx/vmcore
   objdump -x /var/crash/xxx/vmcore
   eu-readelf -a /var/crash/xxx/vmcore
  1. Use crash to analyse vmcore:
   crash -i crash-simple.cmd /usr/lib/debug/lib/modules/xxx/vmlinux /var/crash/xxx/vmcore
   crash -i crash.cmd /usr/lib/debug/lib/modules/xxx/vmlinux /var/crash/xxx/vmcore
  1. Use gdb to analyse vmcore:
     gdb -x gdb.cmd /usr/lib/debug/lib/modules/xxx/vmlinux /var/crash/xxx/vmcore 

Expected Results

  1. Dump process could be monitered if console is connected
  2. System reboot successfully after dump vmcore finshed
  3. vmcore was found under path /var/crash/xxx/vmcore
  4. readelf should return 0, and no "warning" "warnings" found on output
    1. objdump should return 0
    2. eu-readelf should return 0
  5. No warning or error should be should found on crash output
  6. No warning or error should be should found on gdb output