Linux Kernel Crash Dumps

Linux kernel crash dumps l.jpg
1 / 42
0
0
827 days ago, 241 views
PowerPoint PPT Presentation
Linux Part Crash Dumps. Matt D. Robinson and Tom Morano Silicon Representation PC Frameworks. Goals LKCD Segments Bit Outline Contemplations Part Starting Dumps Piece Dumping Snares/Execution Dump Start Code/Design Dump Tunables Prologue to LCRASH.

Presentation Transcript

Slide 1

´╗┐Linux Kernel Crash Dumps Matt D. Robinson and Tom Morano Silicon Graphics Computer Systems

Slide 2

Objectives LKCD Components Kernel Design Considerations Kernel Initiating Dumps Kernel Dumping Hooks/Execution Dump Initiation Code/Layout Dump Tunables Introduction to LCRASH Linux Kernel Crash Dumps Contents

Slide 3

LKCD made for Linux clients, bolster faculty and Linux piece engineers LKCD lessens MTBF and MTTR insights Kernel issues are settled all the more rapidly As the Linux bit turns out to be more mind boggling, the requirement for LKCD builds Linux Kernel Crash Dumps Objectives

Slide 4

Linux Kernel Crash Dumps LKCD Components LKCD Components Kernel changes to arrange, get bit disappointments, and spare crash dumps User level scripts to spare and design framework memory to a crash dump LCRASH, the part crash dump analyzer

Slide 5

Linux Kernel Crash Dumps Kernel Design Considerations The greatest outline contemplations were: Dump Save Mechanism Raw I/O versus Cushion Cache I/O Kernel Code Location Dump Storage NOTE: Other crash dump items accessible for Linux may utilize distinctive dumping strategies than those portrayed here

Slide 6

Linux Kernel Crash Dumps Kernel Design Considerations Dump Save Mechanism Crash Kernel Save Memory to Swap Space in Kernel Reset System Disk PROM Save Memory to Swap Space from PROM/BIOS Disk Reset System

Slide 7

Linux Kernel Crash Dumps Kernel Design Considerations Kernel spare technique picked on the grounds that: PROM/BIOS is excessively engineering particular reset/control off may clear memory bit circle driver limitations no plate to filesystem approval at PROM code can be adjusted in piece; PROM code is hard to roll out improvements for (in reverse similarity issues)

Slide 8

Linux Kernel Crash Dumps Kernel Design Considerations Raw I/O versus Cushion Cache I/O Buffer reserve locking averts taking care of dump workaround without real execution hit on essential I/O Re-section interfere with locking issue Raw I/O is not completely upheld in Linux yet (in the piece) - kiobuf code needs more work IDE, RAID, and so on., drivers require crude I/O snares (ebb and flow plan is to make driver layer above to stay away from fundamental locking)

Slide 9

Linux Kernel Crash Dumps Kernel Design Considerations Kernel Code Location Code changes are isolated into non specific and engineering particular records portion/vmdump.c curve/< curve >/bit/vmdump.c Additional adjustments made to linux/incorporate/sysctl.h , bit/sysctl.c , and bit crash snare capacities

Slide 10

Linux Kernel Crash Dumps Kernel Design Considerations Dump Storage Memory dumps are spared to swap space Swapping amid boot-up is an issue Disk parcel tables in memory - could this bring about an information defilement issue? Can't accept filesystem layer will be accessible amid crash

Slide 11

Linux Kernel Crash Dumps Kernel Initiating Dumps Initiating Dump Process Change to/proc/sys/vmdump/dumpdev calls dump_open() in portion dump_open() checks to guarantee the gadget determined is a square gadget focuses to a legitimate swap segment gadget has substantial character gadget file_operations table (as of now SCSI just, because of absence of crude I/O ability for IDE plates)

Slide 12

Linux Kernel Crash Dumps Kernel Initiating Dumps Errors in dump_open() are logged to framework log cushion Changes required for 2.3 (without devfs) because of confuse amongst piece and character significant/minor sets for a similar circle gadget Success of dump_open() showcases: dump_open(): dump gadget opened: 0x803 [sd(8,3)]

Slide 13

Linux Kernel Crash Dumps Kernel Dumping Hooks Kernel Hooks for Executing Crash Dump frenzy() was altered to perform SMP solidify and to call dump_execute() die_if_kernel() or pass on() calls dump_execute() after KDB, GDB, and show_registers() are done NMI (Non-Maskable Interrupt) snares still required for frameworks that bolster the capacity in equipment

Slide 14

Linux Kernel Crash Dumps Kernel Dumping Hooks Kernel Hooks and Parameters freeze() : enlist state is not spared, freeze string is spared die_if_kernel() or kick the bucket(): registers are spared, freeze string is non specific (for the time being) Interrupt handlers versus non I/O ask for bolt dumping should be separated

Slide 15

Linux Kernel Crash Dumps Kernel Dump Execution Kernel Dump Execution dump_execute() verifies whether dumping is turned on If DUMP_NONE is set, it returns instantly __dump_execute() , which is engineering particular, is called to spare the landfill Within __dump_execute() , dump header qualities are spared, memory pages are spared, and the capacity returns when finish

Slide 16

Linux Kernel Crash Dumps Kernel Dump Layout Kernel Dump Layout Dump Header Dump Page Headers Dump Pages

Slide 17

Linux Kernel Crash Dumps Kernel Dump Layout Dump header is composed out first; it contains fundamental data about dump Memory pages are composed next, each with a page header containing virtual address of the page in memory size of page (imperative if packed) page banners (compacted, crude, dump end) The last stride is a re-compose of the landfill header which refreshes the aggregate number of pages composed

Slide 18

Linux Kernel Crash Dumps Kernel Dump Limitations Kernel Dump Limitations Current interfere with accidents will bolt up with reentry to circle driver work Dump header should be composed out more regularly Raw I/O abilities should be included piece for more plate drivers (utilizing kiobufs, dissipate assemble records, and so forth.) Page writing required for requested dumps More designs should be upheld

Slide 19

Linux Kernel Crash Dumps Kernel Recovery of Crash Dump Kernel Reboot After Crash During early boot-up, the framework runs the/and so on/rc.d/rc.sysinit script, which thusly runs/sbin/vmdump/sbin/vmdump keeps running with either the config or spare choice config sets all dump tunables and endeavors to open the landfill gadget spare looks for a crash dump in dump gadget and spares it to plate (if asked for)

Slide 20

Linux Kernel Crash Dumps Kernel/proc Tunables Kernel Tunables/proc/sys/vmdump contains all LKCD portion tunables/proc/sys/bit/frenzy is adjusted so that the framework reboots after LKCD makes a crash dump dumpdev holds the name of the landfill gadget dump_compress_pages figures out whether the memory pages ought to be packed dump_level shows which pages to dump to plate (just three levels at present bolstered)

Slide 21

Linux Kernel Crash Dumps Kernel Dump Tunables/and so on/sysconfig/vmdump holds all LKCD tunables (the/proc tunables are changed consequently): DUMP_ACTIVE=1 DUMPDEV=/dev/vmdump DUMPDIR=/var/log/vmdump DUMP_SAVE=1 DUMP_LEVEL=4 DUMP_COMPRESS_PAGES=1 PANIC_TIMEOUT=5

Slide 22

Linux Kernel Crash Dumps Kernel Dump Tunables DUMP_ACTIVE Determines if the crash dump scripts ought to play out any activities; the default esteem is 1 (dynamic). Set to 0 to not spare or design framework for crash dumps

Slide 23

Linux Kernel Crash Dumps Kernel Dump Tunables DUMPDEV The name of the landfill gadget; this ordinarily is/dev/vmdump . NOTE: It is prescribed to change what gadget/dev/vmdump focuses to as opposed to change this esteem straightforwardly, as/dev/vmdump is typically a typical connection.

Slide 24

Linux Kernel Crash Dumps Kernel Dump Tunables DUMPDIR The name of the index to spare dumps to; this commonly is/var/log/vmdump . DUMP_SAVE Whether to spare the crash dump to circle or not. The framework will even now be arranged to spare crash dumps paying little respect to the estimation of DUMP_SAVE .

Slide 25

Linux Kernel Crash Dumps Kernel Dump Tunables DUMP_LEVEL Determines how much memory (or not) ought to be spared in the crash dump. Default esteem is 4 ( DUMP_ALL ), albeit different values, for example, 0 ( DUMP_NONE ) and 1 ( DUMP_HEADER ) are likewise legitimate. This sets/proc/sys/vmdump/dump_level to a similar esteem (/sbin/vmdump config ).

Slide 26

Linux Kernel Crash Dumps Kernel Dump Tunables DUMP_COMPRESS_PAGES Determines whether to pack memory pages when sparing memory picture to plate. Defaults to 1 (pack). This sets/proc/sys/vmdump/dump_compress_pages to a similar esteem (/sbin/vmdump config ).

Slide 27

Linux Kernel Crash Dumps Kernel Dump Tunables PANIC_TIMEOUT Changes the measure of time to rest before resetting the framework after a product disappointment. Changes/proc/sys/part/frenzy to a similar esteem (/sbin/vmdump config ). Take note of: This esteem ought to dependably be non-zero; if zero, the framework will turn inconclusively until it is reset by hand.

Slide 28

Linux Kernel Crash Dumps Kernel Dump Files Kernel Dump Files vmdump.N holds the crash dump information spared from DUMPDEV ; it is a duplicate of the memory picture at the season of the framework crash map.N is a duplicate of/boot/System.map Both records expected to perform crash investigation; delivers in map.N indicate values in vmdump.N ; if the documents don't originate from a similar bit construct, crash investigation might be off base

Slide 29

Linux Kernel Crash Dumps Introduction to LCRASH Overview of LCRASH Linux framework crash dump examination device Provides access to portion information in LKCD crash dumps or live framework memory Displays itemized data about a framework crash Can be utilized intelligently or to produce framework crash dump reports

Slide 30

Linux Kernel Crash Dumps Introduction to LCRASH Crash Dump Report General framework data Type of crash Dump of the framework log_buf List of dynamic undertakings Kernel stack follow demonstrating the capacity rings prompting to the point of the crash

Slide 31

Linux Kernel Crash Dumps Introduction to LCRASH Interactive Commands For a more definite examination of the components of a crash Kernel information showed in a reasonable, simple to-peruse way Invoked by means of an ASCII order line UI including charge line altering and summon history Command yield can be channeled to utilities, for example, increasingly and grep

Slide 32

Linux Kernel Crash Dumps Introduction to LCRASH Examples of LCRASH orders detail Displays applicable framework data and the substance of the log_buf a

SPONSORS