ã¾ããã«ã¼ãã«ã®ãã³ããã¨ããããã«ãã
# yum install kexec-tools # chkconfig kdump on # reboot
解æç¨ã«crashã¨kernel-debuginfoãã¤ã³ã¹ãã¼ã«
# yum install crash # yum --enablerepo=base-debuginfo install kernel-debuginfo-`uname -r`
å¼·å¶çã«ã¯ã©ãã·ã¥ããã¦ã¿ã
# echo 1 > /proc/sys/kernel/sysrq # echo c > /proc/sysrq-trigger
åèµ·åããã®ã§/var/crashã確èª
# ls /var/crash/ 127.0.0.1-2015-10-04-12:23:48
ã¯ã©ãã·ã¥ãã¨ã«ãã£ã¬ã¯ããªãä½æãããä¸ã«ãã³ããã¡ã¤ã«vmcoreãä½æããã¦ããã
ããã¤ã¨yum install kernel-debuginfoã§ã¤ã³ã¹ãã¼ã«ãããdebuginfoãã¿ã®kernelã¤ã¡ã¼ã¸ã使ãã¨ã¯ã©ãã·ã¥æã®ç¶æ³ã解æãããã¨ãã§ããï¼ã¡ãªã¿ã«å¼æ°ãªãã ã¨ç¾å¨åä½ä¸ã®kernelã解æã§ãã)
# crash /usr/lib/debug/lib/modules/2.6.32-504.el6.x86_64/vmlinux /var/crash/127.0.0.1-2015-10-04-12\:23\:48/vmcore
ãã³ãä½ææã®èµ·åä¸ã®ããã»ã¹ãè¦ãã
crash> ps PID PPID CPU TASK ST %MEM VSZ RSS COMM 0 0 0 ffffffff81a8d020 RU 0.0 0 0 [swapper] 1 0 0 ffff88001c049500 IN 0.3 19232 1516 init 2 0 0 ffff88001c048aa0 IN 0.0 0 0 [kthreadd] ...
ã¯ã©ãã·ã¥æã®ã¹ã¿ãã¯ãã¬ã¼ã¹ãè¦ãã
crash> bt PID: 5147 TASK: ffff880019503540 CPU: 0 COMMAND: "bash" #0 [ffff8800197339e0] machine_kexec at ffffffff8103b68b #1 [ffff880019733a40] crash_kexec at ffffffff810c9852 #2 [ffff880019733b10] oops_end at ffffffff8152e070 #3 [ffff880019733b40] no_context at ffffffff8104c80b #4 [ffff880019733b90] __bad_area_nosemaphore at ffffffff8104ca95 #5 [ffff880019733be0] bad_area at ffffffff8104cbbe #6 [ffff880019733c10] __do_page_fault at ffffffff8104d36f #7 [ffff880019733d30] do_page_fault at ffffffff8152ffbe #8 [ffff880019733d60] page_fault at ffffffff8152d375 [exception RIP: sysrq_handle_crash+22] RIP: ffffffff81349616 RSP: ffff880019733e18 RFLAGS: 00010096 RAX: 0000000000000010 RBX: 0000000000000063 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000063 RBP: ffff880019733e18 R8: 0000000000000000 R9: ffffffff81648820 R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000 R13: ffffffff81b04060 R14: 0000000000000286 R15: 0000000000000004 ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018
run queueãè¦ããã§ãã
runq CPU 0 RUNQUEUE: ffff8800022168c0 CURRENT: PID: 5147 TASK: ffff880019503540 COMMAND: "bash" RT PRIO_ARRAY: ffff880002216a48 [no tasks queued] CFS RB_ROOT: ffff880002216958 [no tasks queued]