SlideShare ist ein Scribd-Unternehmen logo
1 von 5
Downloaden Sie, um offline zu lesen
Kdump 
What is kdump? 
Kdump is a kexec based crash dumping mechansim for Linux. Kdump functionality is broken 
mainly in two components, user space(kexec) and kernel space(kdump). Kernel space patches are 
already part of main line kernel tree. User space component is nothing but a patch on top of existing 
kexec tools. Kdump need two different kernel, one we can call standard(production) kernel and 
another we can call crash(capture) kernel. 
When the system kernel boots, it reserves a small section of memory for the crash kernel. This 
ensures that ongoing Dirct Memory Access(DMA) from the standard kernel does not corrupt the 
crash kernel. The kexec -p command loads the crash kernel into this reserved memory. 
On x86 machines, the first 640KB of physical memory is needed to boot, regardless of where the 
kernel loads. Therefore, kexec backs up this region just before rebooting into the crash kernel. 
All of the necessary information about the system kernel's core image is encoded in the ELF format, 
and stored in a reserved area of memory before a crash. The physical address of the start of the ELF 
header is passed to crash kernel through the elfcorehdr=boot parameter. Optionally the size of the 
ELF header can also be passed when using the elfcorehdr=size[KMG]@offset[KMG] syntax. 
Setup and Installation 
Kdump and kexec are currently supported on the x86, x86_64, ppc64, ia64, and s390x architectures. 
And Kdump is install in RHEL5, RHEL6, RHEL7 as default. 
The kdump service uses the /etc/kdump.conf file for configuration. Releases prior to RHEL 6.3 
added a special marker to this file in order to ensure kdump would not be enabled on Xen guests. 
This marker must be removed to enable kdump on Xen HVM guests. Steps to remove the marker 
are described below in "Modifying the kdump.conf file". The kdump service also needs to prepare 
an initial ramdisk (dumprd) for the kexec'ed kernel to use on boot. As kexecing into a kernel using 
paravirt drivers will not work, and is not supported, the dumprd cannot have the xen paravirt 
modules in it. In place of those modules, the standard disk and network drivers that operate on 
emulated devices presented from the Xen host must be present. How to prepare the dumprd is 
described below in "Preparing the kdump initrd (dumprd)". Generally, users will want to use the 
paravirt drivers and only switch to the emulated devices when a kexec is necessary. It is possible to 
configure the guest to run with paravirt drivers without losing the option to use emulated devices. 
How to configure the guest this way is described in "Booting with paravirt drivers, and without 
unplug". Finally, the "Testing kdump" section describes how to test that kdump works. 
Modifying the kdump.conf file 
How to enable and test kdump in RHEL7.0 guest 
1. Login RHEL7.0. 
2. Download the kexec-tools user-space package from the following URL:
http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL- 
7/compose/Server/x86_64/os/Packages/kexec-tools-2.0.4-8.el7.x86_64.rpm (Make sure 
the rpm file is the right version for your RHEL7 Version.) 
3. Install the kexec-tools, if it's not already installed. 
#rpm -Uvh/-ivh kexec-tools-*.rpm 
4. Open /etc/kdump.conf in an editor. 
5. Delete or comment out (using #) the line with the Kdump_not_supported_on_Xen_domU_guest 
marker, if it's present. 
Booting without paravirt drivers 
6. Preparing the kdump initrd (dumprd) 
#dracut -f /boot/initramfs-$(uname -r).img $(uname -r) 
7. Add the kernel command line parameter xen_emul_unplug=never crashkernel=128M to the 
kernel's command line and boot. This boots using the emulated devices (and appropriate drivers) 
and without paravirt drivers. 
Note: Another way to disable paravirt drivers and with emulated devices instead is: 
1). Change kernel command line parameter xen_emul_unplug=unnecessary 
2). Black list the xen pv modules 
#cat /etc/modprobe.d/blacklist.conf 
[...] 
# xen pv drivers 
blacklist xen_blkfront 
blacklist xen_netfront 
8. Check whether the paravirt driver have been loaded in the guest, 
# lsmod | grep xen 
If loaded they need to be unloaded with the modprobe -r command: 
# lsmod | grep xen 
xen_netfront 18905 0 
xen_blkfront 15687 3 
# modprobe -r xen_netfront 
# modprobe -r xen_blkfront 
9. Start the kdump server in the guest, this will generate a dumprd with the drivers necessary for 
the emulated devices
[guest]# service kdump start 
Redirecting to /bin/systemctl start kdump.service 
10. Check the kdump status 
[guest]# service kdump status 
Redirecting to /bin/systemctl status kdump.service 
kdump.service - Crash recovery kernel arming 
Loaded: loaded (/usr/lib/systemd/system/kdump.service; enabled) 
Active: active (exited) since Thu 2013-09-12 03:40:19 HKT; 1min 53s ago 
Process: 609 ExecStart=/usr/bin/kdumpctl start (code=exited, status=0/SUCCESS) 
Main PID: 609 (code=exited, status=0/SUCCESS) 
CGroup: /system.slice/kdump.service 
Sep 12 03:40:19 systemd[1]: Starting Crash recovery... 
Sep 12 03:40:19 kdumpctl[609]: kexec: loaded kdump ... 
Sep 12 03:40:19 kdumpctl[609]: Starting kdump: [OK] 
Sep 12 03:40:19 systemd[1]: Started Crash recovery ... 
Sep 12 03:42:10 systemd[1]: Started Crash recovery 
 
11. Trigger a kerne panic in guest 
[guest]# echo c > /proc/sysrq-trigger 
[46185.558117] SysRq : Trigger a crash 
[46185.559029] BUG: unable to handle kernel NULL pointer dereference at (null) 
[46185.559029] IP: [<ffffffff813a7676>] sysrq_handle_crash+0x16/0x20 
[46185.559029] PGD 3bc7a067 PUD 3b5ba067 PMD 0 
[46185.559029] Oops: 0002 [#1] SMP 
[46185.559029] Modules linked in: ipt_MASQUERADE iptable_nat nf_nat_ipv4 nf_nat 
nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT xt_CHECKSUM 
iptable_mangle bridge stp llc ip6table_filter ip6_tables iptable_filter ip_tables ebtable_nat ebtables 
sg crc32_pclmul xen_netfront crc32c_intel ghash_clmulni_intel microcode i2c_piix4 pcspkr 
serio_raw i2c_core mperf nfsd auth_rpcgss nfs_acl lockd sunrpc xfs libcrc32c sd_mod crc_t10dif 
ata_generic pata_acpi xen_blkfront ata_piix libata floppy dm_mirror dm_region_hash dm_log 
dm_mod 
[46185.559029] CPU: 0 PID: 14330 Comm: bash Not tainted 3.10.0-15.el7.x86_64 #1 
[46185.559029] Hardware name: Red Hat HVM domU, BIOS 3.1.2-371.el5 05/07/2013 
[46185.559029] task: ffff88003bfe5c40 ti: ffff88003c450000 task.ti: ffff88003c450000 
[46185.559029] RIP: 0010:[<ffffffff813a7676>] [<ffffffff813a7676>] 
sysrq_handle_crash+0x16/0x20 
[46185.559029] RSP: 0018:ffff88003c451e88 EFLAGS: 00010082 
[46185.559029] RAX: 000000000000000f RBX: ffffffff819a6d40 RCX: ffff88003fc0fee0 
[46185.559029] RDX: 0000000000000000 RSI: ffff88003fc0e368 RDI: 0000000000000063 
[46185.559029] RBP: ffff88003c451e88 R08: ffffffff81c176bc R09: 000000000000021d 
[46185.559029] R10: 000000000000021c R11: 0000000000000003 R12: 0000000000000063 
[46185.559029] R13: 0000000000000246 R14: 0000000000000004 R15: 0000000000000000
[46185.559029] FS: 00007f5f667c3740(0000) GS:ffff88003fc00000(0000) 
knlGS:0000000000000000 
[46185.559029] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 
[46185.559029] CR2: 0000000000000000 CR3: 000000001896a000 CR4: 00000000000006f0 
[46185.559029] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 
[46185.559029] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 
[46185.559029] Stack: 
[46185.559029] ffff88003c451ec0 ffffffff813a7dd2 0000000000000002 00007f5f667c9000 
[46185.559029] ffff88003c451f50 0000000000000002 0000000000000000 ffff88003c451ed8 
[46185.559029] ffffffff813a82bf ffff88003ba59780 ffff88003c451ef8 ffffffff811feb4d 
[46185.559029] Call Trace: 
[46185.559029] [<ffffffff813a7dd2>] __handle_sysrq+0xa2/0x170 
[46185.559029] [<ffffffff813a82bf>] write_sysrq_trigger+0x2f/0x40 
[46185.559029] [<ffffffff811feb4d>] proc_reg_write+0x3d/0x80 
[46185.559029] [<ffffffff8119cd3d>] vfs_write+0xbd/0x1e0 
[46185.559029] [<ffffffff8119d709>] SyS_write+0x49/0xa0 
[46185.559029] [<ffffffff81608fd9>] system_call_fastpath+0x16/0x1b 
[46185.559029] Code: 45 39 65 34 75 e5 4c 89 ef e8 f7 f7 ff ff eb db 0f 1f 44 00 00 66 66 66 66 90 
55 c7 05 e0 a9 57 00 01 00 00 00 48 89 e5 0f ae f8 <c6> 04 25 00 00 00 00 01 5d c3 66 66 66 66 90 
55 31 c0 c7 05 3e 
[46185.559029] RIP [<ffffffff813a7676>] sysrq_handle_crash+0x16/0x20 
[46185.559029] RSP <ffff88003c451e88> 
[46185.559029] CR2: 0000000000000000 
kdump: dump target is /dev/mapper/rhel_dhcp--11--60-root 
kdump: saving to /sysroot//var/crash/127.0.0.1-2013.09.13-16:30:30/ 
kdump: saving vmcore-dmesg.txt 
kdump: saving vmcore-dmesg.txt complete 
kdump: saving vmcore 
Copying data : [100 %] 
kdump: saving vmcore complete 
Rebooting. 
[ 5.048363] Restarting system. 
12. Login the guest and check the vmcore file , you shuld first install the crash tool and kernel-debuginfo-* 
packages. 
For RHEL7.0 guest, you can get the kernel version via 'uname -r', and then get the currect version 
of kernel-debuginfo-* & kernel-debuginfo-common-* packages from 
https://brewweb.devel.redhat.com/
13. Check the vmcore file, vmcore can be analyzed 
Booting with paravirt drivers, and without unplug 
14. Preparing the kdump initrd (dumprd) 
#dracut -f /boot/initramfs-$(uname -r).img $(uname -r) 
15. Edit /etc/modprobe.d/blacklist.conf by adding the three lines shown below to blacklist the 
drivers used for the emulated devices. This will ensure that even if the host presents the emulated 
devices to the guest, the guest will use the paravirt drivers instead. 
blacklist ata_piix 
blacklist 8139too 
blacklist 8139cp 
16. Change xen_emul_unplug=never to xen_emul_unplug=unnecessary in kernel command line 
and reboot 
17. Ensure that the kdump service has started 
#service kdump status 
18. Trigger a kerne panic in guest 
[guest]# echo c > /proc/sysrq-trigger 
19. Login the guest and check the vmcore file, vmcore can be analyzed

Weitere Àhnliche Inhalte

KĂŒrzlich hochgeladen

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

KĂŒrzlich hochgeladen (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Empfohlen

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data ScienceChristy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Empfohlen (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Kdump

  • 1. Kdump What is kdump? Kdump is a kexec based crash dumping mechansim for Linux. Kdump functionality is broken mainly in two components, user space(kexec) and kernel space(kdump). Kernel space patches are already part of main line kernel tree. User space component is nothing but a patch on top of existing kexec tools. Kdump need two different kernel, one we can call standard(production) kernel and another we can call crash(capture) kernel. When the system kernel boots, it reserves a small section of memory for the crash kernel. This ensures that ongoing Dirct Memory Access(DMA) from the standard kernel does not corrupt the crash kernel. The kexec -p command loads the crash kernel into this reserved memory. On x86 machines, the first 640KB of physical memory is needed to boot, regardless of where the kernel loads. Therefore, kexec backs up this region just before rebooting into the crash kernel. All of the necessary information about the system kernel's core image is encoded in the ELF format, and stored in a reserved area of memory before a crash. The physical address of the start of the ELF header is passed to crash kernel through the elfcorehdr=boot parameter. Optionally the size of the ELF header can also be passed when using the elfcorehdr=size[KMG]@offset[KMG] syntax. Setup and Installation Kdump and kexec are currently supported on the x86, x86_64, ppc64, ia64, and s390x architectures. And Kdump is install in RHEL5, RHEL6, RHEL7 as default. The kdump service uses the /etc/kdump.conf file for configuration. Releases prior to RHEL 6.3 added a special marker to this file in order to ensure kdump would not be enabled on Xen guests. This marker must be removed to enable kdump on Xen HVM guests. Steps to remove the marker are described below in "Modifying the kdump.conf file". The kdump service also needs to prepare an initial ramdisk (dumprd) for the kexec'ed kernel to use on boot. As kexecing into a kernel using paravirt drivers will not work, and is not supported, the dumprd cannot have the xen paravirt modules in it. In place of those modules, the standard disk and network drivers that operate on emulated devices presented from the Xen host must be present. How to prepare the dumprd is described below in "Preparing the kdump initrd (dumprd)". Generally, users will want to use the paravirt drivers and only switch to the emulated devices when a kexec is necessary. It is possible to configure the guest to run with paravirt drivers without losing the option to use emulated devices. How to configure the guest this way is described in "Booting with paravirt drivers, and without unplug". Finally, the "Testing kdump" section describes how to test that kdump works. Modifying the kdump.conf file How to enable and test kdump in RHEL7.0 guest 1. Login RHEL7.0. 2. Download the kexec-tools user-space package from the following URL:
  • 2. http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL- 7/compose/Server/x86_64/os/Packages/kexec-tools-2.0.4-8.el7.x86_64.rpm (Make sure the rpm file is the right version for your RHEL7 Version.) 3. Install the kexec-tools, if it's not already installed. #rpm -Uvh/-ivh kexec-tools-*.rpm 4. Open /etc/kdump.conf in an editor. 5. Delete or comment out (using #) the line with the Kdump_not_supported_on_Xen_domU_guest marker, if it's present. Booting without paravirt drivers 6. Preparing the kdump initrd (dumprd) #dracut -f /boot/initramfs-$(uname -r).img $(uname -r) 7. Add the kernel command line parameter xen_emul_unplug=never crashkernel=128M to the kernel's command line and boot. This boots using the emulated devices (and appropriate drivers) and without paravirt drivers. Note: Another way to disable paravirt drivers and with emulated devices instead is: 1). Change kernel command line parameter xen_emul_unplug=unnecessary 2). Black list the xen pv modules #cat /etc/modprobe.d/blacklist.conf [...] # xen pv drivers blacklist xen_blkfront blacklist xen_netfront 8. Check whether the paravirt driver have been loaded in the guest, # lsmod | grep xen If loaded they need to be unloaded with the modprobe -r command: # lsmod | grep xen xen_netfront 18905 0 xen_blkfront 15687 3 # modprobe -r xen_netfront # modprobe -r xen_blkfront 9. Start the kdump server in the guest, this will generate a dumprd with the drivers necessary for the emulated devices
  • 3. [guest]# service kdump start Redirecting to /bin/systemctl start kdump.service 10. Check the kdump status [guest]# service kdump status Redirecting to /bin/systemctl status kdump.service kdump.service - Crash recovery kernel arming Loaded: loaded (/usr/lib/systemd/system/kdump.service; enabled) Active: active (exited) since Thu 2013-09-12 03:40:19 HKT; 1min 53s ago Process: 609 ExecStart=/usr/bin/kdumpctl start (code=exited, status=0/SUCCESS) Main PID: 609 (code=exited, status=0/SUCCESS) CGroup: /system.slice/kdump.service Sep 12 03:40:19 systemd[1]: Starting Crash recovery... Sep 12 03:40:19 kdumpctl[609]: kexec: loaded kdump ... Sep 12 03:40:19 kdumpctl[609]: Starting kdump: [OK] Sep 12 03:40:19 systemd[1]: Started Crash recovery ... Sep 12 03:42:10 systemd[1]: Started Crash recovery 
 11. Trigger a kerne panic in guest [guest]# echo c > /proc/sysrq-trigger [46185.558117] SysRq : Trigger a crash [46185.559029] BUG: unable to handle kernel NULL pointer dereference at (null) [46185.559029] IP: [<ffffffff813a7676>] sysrq_handle_crash+0x16/0x20 [46185.559029] PGD 3bc7a067 PUD 3b5ba067 PMD 0 [46185.559029] Oops: 0002 [#1] SMP [46185.559029] Modules linked in: ipt_MASQUERADE iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT xt_CHECKSUM iptable_mangle bridge stp llc ip6table_filter ip6_tables iptable_filter ip_tables ebtable_nat ebtables sg crc32_pclmul xen_netfront crc32c_intel ghash_clmulni_intel microcode i2c_piix4 pcspkr serio_raw i2c_core mperf nfsd auth_rpcgss nfs_acl lockd sunrpc xfs libcrc32c sd_mod crc_t10dif ata_generic pata_acpi xen_blkfront ata_piix libata floppy dm_mirror dm_region_hash dm_log dm_mod [46185.559029] CPU: 0 PID: 14330 Comm: bash Not tainted 3.10.0-15.el7.x86_64 #1 [46185.559029] Hardware name: Red Hat HVM domU, BIOS 3.1.2-371.el5 05/07/2013 [46185.559029] task: ffff88003bfe5c40 ti: ffff88003c450000 task.ti: ffff88003c450000 [46185.559029] RIP: 0010:[<ffffffff813a7676>] [<ffffffff813a7676>] sysrq_handle_crash+0x16/0x20 [46185.559029] RSP: 0018:ffff88003c451e88 EFLAGS: 00010082 [46185.559029] RAX: 000000000000000f RBX: ffffffff819a6d40 RCX: ffff88003fc0fee0 [46185.559029] RDX: 0000000000000000 RSI: ffff88003fc0e368 RDI: 0000000000000063 [46185.559029] RBP: ffff88003c451e88 R08: ffffffff81c176bc R09: 000000000000021d [46185.559029] R10: 000000000000021c R11: 0000000000000003 R12: 0000000000000063 [46185.559029] R13: 0000000000000246 R14: 0000000000000004 R15: 0000000000000000
  • 4. [46185.559029] FS: 00007f5f667c3740(0000) GS:ffff88003fc00000(0000) knlGS:0000000000000000 [46185.559029] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [46185.559029] CR2: 0000000000000000 CR3: 000000001896a000 CR4: 00000000000006f0 [46185.559029] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [46185.559029] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [46185.559029] Stack: [46185.559029] ffff88003c451ec0 ffffffff813a7dd2 0000000000000002 00007f5f667c9000 [46185.559029] ffff88003c451f50 0000000000000002 0000000000000000 ffff88003c451ed8 [46185.559029] ffffffff813a82bf ffff88003ba59780 ffff88003c451ef8 ffffffff811feb4d [46185.559029] Call Trace: [46185.559029] [<ffffffff813a7dd2>] __handle_sysrq+0xa2/0x170 [46185.559029] [<ffffffff813a82bf>] write_sysrq_trigger+0x2f/0x40 [46185.559029] [<ffffffff811feb4d>] proc_reg_write+0x3d/0x80 [46185.559029] [<ffffffff8119cd3d>] vfs_write+0xbd/0x1e0 [46185.559029] [<ffffffff8119d709>] SyS_write+0x49/0xa0 [46185.559029] [<ffffffff81608fd9>] system_call_fastpath+0x16/0x1b [46185.559029] Code: 45 39 65 34 75 e5 4c 89 ef e8 f7 f7 ff ff eb db 0f 1f 44 00 00 66 66 66 66 90 55 c7 05 e0 a9 57 00 01 00 00 00 48 89 e5 0f ae f8 <c6> 04 25 00 00 00 00 01 5d c3 66 66 66 66 90 55 31 c0 c7 05 3e [46185.559029] RIP [<ffffffff813a7676>] sysrq_handle_crash+0x16/0x20 [46185.559029] RSP <ffff88003c451e88> [46185.559029] CR2: 0000000000000000 kdump: dump target is /dev/mapper/rhel_dhcp--11--60-root kdump: saving to /sysroot//var/crash/127.0.0.1-2013.09.13-16:30:30/ kdump: saving vmcore-dmesg.txt kdump: saving vmcore-dmesg.txt complete kdump: saving vmcore Copying data : [100 %] kdump: saving vmcore complete Rebooting. [ 5.048363] Restarting system. 12. Login the guest and check the vmcore file , you shuld first install the crash tool and kernel-debuginfo-* packages. For RHEL7.0 guest, you can get the kernel version via 'uname -r', and then get the currect version of kernel-debuginfo-* & kernel-debuginfo-common-* packages from https://brewweb.devel.redhat.com/
  • 5. 13. Check the vmcore file, vmcore can be analyzed Booting with paravirt drivers, and without unplug 14. Preparing the kdump initrd (dumprd) #dracut -f /boot/initramfs-$(uname -r).img $(uname -r) 15. Edit /etc/modprobe.d/blacklist.conf by adding the three lines shown below to blacklist the drivers used for the emulated devices. This will ensure that even if the host presents the emulated devices to the guest, the guest will use the paravirt drivers instead. blacklist ata_piix blacklist 8139too blacklist 8139cp 16. Change xen_emul_unplug=never to xen_emul_unplug=unnecessary in kernel command line and reboot 17. Ensure that the kdump service has started #service kdump status 18. Trigger a kerne panic in guest [guest]# echo c > /proc/sysrq-trigger 19. Login the guest and check the vmcore file, vmcore can be analyzed