Kexec, kdump, and crash Presented by: Ben Buzbee Pika-Tux.

Slides:



Advertisements
Similar presentations
Debugging ACL Scripts.
Advertisements

Computer Software 3 Section A Software Basics CHAPTER PARSONS/OJA
VMWare to Hyper-V FOR SERVER What we looked at before migration  Performance – Hyper-V performs at near native speeds.  OS Compatibility – Hyper-V.
Chapter 9: Understanding System Initialization The Complete Guide To Linux System Administration.
Booting and Shutting Down the UNIX Operating System Arcadio A. Sincero Jr. 6/6/2001 CMSC 691X, Section 6080.
Linux+ Guide to Linux Certification Chapter Nine System Initialization.
Linux Booting Procedure
Linux Installation LINUX INSTALLATION. Download LINUX Linux Installation To install Red Hat, you will need to download the ISO images (CD Images) of the.
Linux+ Guide to Linux Certification, Second Edition Chapter 3 Linux Installation and Usage.
System initialisation
CS-3013 & CS-502, Summer 2006 Memory Management1 CS-3013 & CS-502 Summer 2006.
Stacking Virtual Machines How to mess stuff up… Konrad Lorincz Kevin Redwine Alex Sheh Harvard University June 27, 2015June 27, 2015June 27, 2015.
System Startup and Shutdown
Asynchronous Solution Appendix Eleven. Training Manual Asynchronous Solution August 26, 2005 Inventory # A11-2 Chapter Overview In this chapter,
Compilers and Interpreters. Translation to machine language Every high level language needs to be translated to machine code There are different ways.
NDT Tools Tutorial: How-To setup your own NDT server Rich Carlson Summer 04 Joint Tech July 19, 2004.
COMPUTER SOFTWARE Chapter 3. Software & Hardware? Computer Instructions or data, anything that can be stored electronically is Software. Hardware is one.
Tanenbaum 8.3 See references
Windows Debugging Demystified
Linux+ Guide to Linux Certification Chapter Three Linux Installation and Usage.
Troubleshooting. Why Troubleshoot? What Can Go Wrong? –Misconfigured zone –Misconfigured server –Misconfigured host –Misconfigured network.
Embedded Linux porting Kernel
Chapter 2 – Software Part A. Definition Computer is made up of two components Hardware Physical components Software Instructions for the computer Two.
Booting. Booting is the process of powering it on and starting the operating system. power on your machine, and in a few minutes your computer will be.
CS1550 Assignment 5 Multiprogramming Implementation notes Matt Craven.
From UEFI Shell to Linux - UEFI Linux BootLoader Zhang Rui Software Engineer Sep 28 th 2011.
Xen Virtualization Last Update Copyright 2011 Kenneth M. Chipps Ph.D.
Modification of Pktfilter tool 10/9/2015Pktfilter modification - Brad Baker1 Brad Baker CS591 Spring 2007 Term project.
Installation Overview Lab#2 1Hanin Abdulrahman. Installing Ubuntu Linux is the process of copying operating system files from a CD, DVD, or USB flash.
Brad Baker CS591 Spring 2007 Term project 10/15/ Pktfilter modification - Brad Baker.
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
Guide to Linux Installation and Administration, 2e1 Chapter 10 Managing System Resources.
Microsoft Disk Operating System Wellson Fung Mike McLaughlin Brian Singer Steve Tran.
Chapter 33 Troubleshooting Windows Errors. STOP Errors  When Microsoft Windows XP encounters a serious problem  And the operating system can't continue.
Linux Startup Process Presenter: Dipu Gupta.
Computer Systems Week 14: Memory Management Amanda Oddie.
7200 Samsung Confidential & Proprietary Information Copyright 2006, All Rights Reserved. 1/16 OfficeServ 7200 Enterprise IP Solutions Data Server S/W Upgrade.
Bootstrapping Steve Muckle Dave Eckhardt. Carnegie Mellon University1 Synchronization Project 3 checkpoint 1 Bboard post, web page Paging, COW optional.
School of Computer Science & Information Technology G6DICP - Lecture 6 Errors, bugs and debugging.
7200 Samsung Confidential & Proprietary Information Copyright 2006, All Rights Reserved. 1/7 OfficeServ 7200 Enterprise IP Solutions Data Server S/W Upgrade.
Linux Kernel Programming (LKP). LKP New sub-course New sub-course We will learn together We will learn together Evaluation of this part of course will.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
Overview of Windows Driver Development Reference: us/gstart/hh/gstart/gs_intro_031j.asp.
Implementation of Embedded OS
Lab 5 Department of Computer Science and Information Engineering National Taiwan University Lab5 - OS Kernel 2014/10/21/ 16 1.
GLAST Large Area Telescope Instrument Flight Software Flight Unit Design Review 16 September 2004 Secondary Boot Code (SBC) D.Wood Naval Research Laboratory.
System initialization Unit objectives A.Outline steps necessary to boot a Linux system, configure LILO and GRUB boot loaders, and dual boot Linux with.
© 2013 MontaVista Software, LLC. MontaVista Confidential and Proprietary. CGE7 Flight Recoder Demo Nawneet Anand.
Embedded Software Design Week II Linux Intro Linux Kernel.
Troubleshooting. Why Troubleshoot? What Can Go Wrong? –Misconfigured zone –Misconfigured server –Misconfigured host –Misconfigured network.
Windows Server 2003 { First Steps and Administration} Benedikt Riedel MCSE + Messaging
Linux on ARM7TDMI or Nothing is as easy as it looks Helicon technologies Ltd. How to run uClinux on NXP LPC22xx.
Rebuilding Linux Kernel Dedicated to penguin lovers everywhere 26 September 20161Rebuilding kernel by Visakh M R.
Andrea Chierici Virtualization tutorial Catania 1-3 dicember 2010
Operating System Kernel Compilation
GRUB 2 Dave Soergel.
Ashima Wadhwa Assistant Professor(giBS)
Chapter Objectives In this chapter, you will learn:
Data Server S/W Upgrade Samsung Electronics Co., Ltd.
Contents Todays Topic: Introduction to Computer Software We will learn
CONFIGURING HARDWARE DEVICE & START UP PROCESS
Operating System Kernel Compilation
Cracking the Coding Interview
Operating System Module 1: Linux Installation
Common C Programming Errors, GDB Debugging
IS3440 Linux Security Unit 7 Securing the Linux Kernel
COP 4343 Unix System Administration
SUSE Linux Enterprise Desktop Administration
Boot Process Mark Stanovich COP 5641 / CIS 4930.
Operating System Kernel Compilation
Presentation transcript:

kexec, kdump, and crash Presented by: Ben Buzbee Pika-Tux

Overview Overview of System Kexec Kernel compilation parameters Kdump Analysis

Kdump Overview We compile two kernels of the same version We run the first kernel (production kernel) until it crashes When it crashes, the kdump service uses kexec to load our section kernel (crash kernel) which dumps the crash parameters of the first

Production Kernel Crash Kernel Kdump Service Disk Main Memory Loads kexec reads writes

Crash tool Crash analyzes kernel memory – Requires the context of vmlinux Can analyze a crashed kernel’s memory dump Can analyze a running kernel’s memory

Kexec Packaged with kdump Used to execute a Linux kernel directly Serves the function of a bootloader apt-get install kdump-tools – Installs all the tools we need

Kernel Compilation Parameters CONFIG_KEXEC=y – Allows kexec to run the kernel directly CONFIG_CRASH_DUMP=y – Enables crash dumps so that kdump can work CONFIG_SMP=n – Required if you have multiple processors, kdump only works with one. (Symmetric Multi- Processing)

Parameters Continued CONFIG_DEBUG_INFO=y – Builds with symbols CONFIG_PHYSICAL_START=0x – Where the production kernel starts, must leave enough room for crash kernel before it

Crash Kernel Configure the same way as above, except must not use compression Since it’s uncompressed, will be vmlinux Append –kdump

Configure Kdump /etc/sysconfig/kdump KDUMP_RUNLEVEL=1 – Runlevel for the crash kernel KDUMP_SAVEDIR=file:///var/log/dump – Where to save dump

Edit the Boot Loader Edit grub to reserve some memory for the crash kernel – X is the offset, Y is the size (In MB) This is probably where I made a mistake – New grub menu? I did something wrong? Can’t tell.

Problems… So that didn’t work… Next approach: can I get crash to work on live memory?

Crash Utility Analyzes kernel memory – Primarily, to determine the cause of a crash Best use: – Analyze memory dumped after a crash (kdump) Resigned use: – Analyze running memory from /dev/mem

Curse you kexec… Tried to execute manually Now every time I reboot, it tries to do this and fails – Wrote a value somewhere that it doesn’t clean up?

Crash CONFIG_STRICT_DEVMEM=n – Otherwise we can’t view kernel memory while its running Syntax: crash vmlinux System.map – Must be uncompressed (i.e. not vmlinuz) – Made me use the System.map even though the versions were the same – not sure why

Crash - Problem Read error: kernel virtual address: c124edb8 type: ‘cpu_possible_mask’ Solution: Unknown Workaround: --minimal – Not ideal: Only allows a small subset of the total command set

(Minimal) Commands Log – Dump message buffer – Usefulness: High on crashed kernels, low otherwise sym – Translates symbol to virtual address – Usefulness: Low-Moderate (with rd)

(Minimal) Commands rd – Read memory – Usefulness: Moderate dis – Disassembles code at a given address – Usefulness: Low

(Minimal) Commands eval – Evaluates an expression – Usefulness: Low (I have a calculator)

Conclusion The setup is very involved and detailed I failed at it miserably The live analysis using crash is not particularly helpful The dump analysis using crash is moderately helpful – Maybe not worth the trouble of setup?