Revisions of crash
Bernhard Walle (bwalle)
committed
(revision 115)
- Increase NR_CPUs on x86_64 to 4096 (FATE#304266).
Bernhard Walle (bwalle)
committed
(revision 114)
- Don't fail to start when no namelist (kernel) is specified on the command line and live debugging (/dev/mem) is used.
Bernhard Walle (bwalle)
committed
(revision 113)
Advise the user to use crosscrash if he tries to open dumps from different machines (FATE #302896).
Bernhard Walle (bwalle)
committed
(revision 112)
- Increase NR_CPUS to 1024 on ppc64. - Implement size changes of struct module for kernel 2.6.27. to be able to open dumps with that kernel version at ppc64.
Bernhard Walle (bwalle)
committed
(revision 111)
- Fix segmentation fault while executing crash command without any parameter (bnc#441818).
Bernhard Walle (bwalle)
committed
(revision 110)
Add crash-fix-files-2.6.25-later.diff
Bernhard Walle (bwalle)
committed
(revision 109)
- SIAL extension: bitfield handling fixup.
Bernhard Walle (bwalle)
committed
(revision 108)
- Require /usr/bin/nm.
Bernhard Walle (bwalle)
committed
(revision 107)
- update to crash 4.0-7.4 o Fix for a build regression for non-xen architectures introduced in version 4.0-7.3. - Remove crash-non-xen-build.diff: Mainline.
Bernhard Walle (bwalle)
committed
(revision 106)
- Fix build on non-Xen architectures (s390/s390x and ppc64).
Bernhard Walle (bwalle)
committed
(revision 105)
- update to crash 4.0-7.3 - Fix for nonsensical usage of the "set" command when running against the xen hypervisor binary. - Fix for "bt" command on x86 architectures when the backtrace starts on the hard IRQ stack. - Fix for "search -k" option on some ia64 hardware, depending upon the underlying physical memory layout. - Fixes for the "bt" command when running against the xen hypervisor binary. - The "foreach" command has been removed from the set of commands supported for usage with the xen hypervisor. - Fix for "irq -d" option when run on x86_64 xen kernels. - Avoid the symbolic translation of ia64 unity-mapped region 7 kernel virtual addresses as they are displayed by the "bt -r" and "rd -[sS]" commands. - Remove redundant storage of "swapper_pg_dir" symbol value during x86 initialization. - Recognize the removal of the "jiffies" variable when running against newer versions of the xen hypervisor by indicating "--:--:--" next to the UPTIME display. - Fix to determine whether an x86 or x86_64 xen hypervisor was built with PERCPU_SHIFT value of 12 or 13.
Bernhard Walle (bwalle)
committed
(revision 104)
- update to crash 4.0-7.2 o Fix for initialization-time failure when running against 2.6.27 x86_64 kernels, which indicate "crash: cannot resolve: end_pfn". o When an improper structure member offset or structure size is attempted, a partial crash backtrace is displayed in the ensuing error message. o Fix for LKCD kerntypes debuginfo files to use "node_states" when "node_online_map" is not in use. o Implement support for s390/s390x CONFIG_SPARSEMEM kernels. o Fix for "kmem -[sS]" when running against 2.6.27 CONFIG_SLUB kernels, in which the kmem_cache.objects and .order members were replaced by a kmem_cache_order_objects structure. o Increased the maximum number of SIAL commands from 100 to 200. - Remove crash-config-sparse.diff: Mainline. - Remove crash-config-sparse.diff: Mainline.
Bernhard Walle (bwalle)
committed
(revision 103)
- Fix Bugzilla number.
Bernhard Walle (bwalle)
committed
(revision 102)
- Update crash-config-sparse.diff to match new upstream patch version that will be included in next upstream release (bnc#237891).
Bernhard Walle (bwalle)
committed
(revision 101)
- call "/usr/bin/nm" without -D first, and if that fails, use "-D".
Bernhard Walle (bwalle)
committed
(revision 100)
- update "/usr/bin/nm -d" instead of "/usr/bin/nm" to display the backtrace because that works even if crash has been compiled without debug information (without -g)
Bernhard Walle (bwalle)
committed
(revision 99)
- update to crash 4.0-7.1 o Fix to address RT kernel's renaming of the address_space.nrpages member to address_space.__nrpages o For crash utility debug backtraces displayed in error conditions, the usage of __builtin_return_address() has been replaced with the backtrace() function. o Fix for ia64 hypervisor backtraces when the entries in the cpu map are not contiguous. o Fix to make shell-escaped commands in a crash input file direct their output properly. o Fix to allow the usage of the "-i inputfile" command line option when operating from an init script. o Fix for the "kmem -P <address>" option, where <address> is an invalid physical address. o Fix for a potential endless cascade of SIGFPE exceptions during session initialization when a vmlinux and vmcore do not match, and a correct System.map or a non-debug vmlinux file is not supplied. o More gracefully handle a nonsensical "search -u <address>" command attempt on a kernel thread or any context with no user address space. o Reworked the "search" command for usage with the Xen Hypervisor. o Fix for initialization-time segmentation violation due to a module allocating and creating an exported symbol list outside of its own virtual address space, and then overwriting its own symbol list pointer. o Implementation of a "--minimal" command line option, which brings up a crash session that is restricted to the "log", "dis", "rd", "sym", "eval" and "exit" commands. - drop crash-builtin-return-addr: mainline - drop crash-rt-nrpages: mainline - drop crash-minimal-debugging.diff: mainline --This line, and those below, will be ignored-- D crash-4.0-6.3.tar.bz2 A crash-4.0-7.1.tar.bz2 D crash-builtin-return-addr M crash-compressed-kernel M crash-config-sparse.diff M crash-fixed-uninitialised M crash-make-emacs-default.diff D crash-minimal-debugging.diff D crash-rt-nrpages M crash-search-also-in-lib-crash M crash-sles9-time.patch M crash.changes M crash.spec Diff for working copy: . Index: crash-compressed-kernel =================================================================== --- crash-compressed-kernel (revision 98) +++ crash-compressed-kernel (working copy) @@ -28,7 +28,7 @@ --- a/defs.h +++ b/defs.h -@@ -93,7 +93,7 @@ +@@ -94,7 +94,7 @@ #define HIST_BLKSIZE (4096) #define STREQ(A, B) ((A != NULL) && (B != NULL) && (strcmp((char *)(A), (char *)(B)) == 0)) @@ -37,7 +37,7 @@ (strncmp((char *)(A), (char *)(B), strlen((char *)(B))) == 0)) #define BZERO(S, N) (memset(S, NULLCHAR, N)) #define BCOPY(S, D, C) (memcpy(D, S, C)) -@@ -300,6 +300,8 @@ struct program_context { +@@ -302,6 +302,8 @@ struct program_context { char *prompt; /* this program's prompt */ unsigned long long flags; /* flags from above */ char *namelist; /* linux namelist */ @@ -46,7 +46,7 @@ char *dumpfile; /* dumpfile or /dev/kmem */ char *live_memsrc; /* live memory driver */ char *system_map; /* get symbol values from System.map */ -@@ -3295,6 +3297,7 @@ void dump_offset_table(char *, ulong); +@@ -3298,6 +3300,7 @@ void dump_offset_table(char *, ulong); int is_elf_file(char *); int is_elf_file_in_dir(const char *file, const char *dir); int is_kernel(char *); @@ -56,7 +56,7 @@ int select_namelist(char *); --- a/kernel.c +++ b/kernel.c -@@ -3466,10 +3466,10 @@ display_sys_stats(void) +@@ -3470,10 +3470,10 @@ display_sys_stats(void) if (pc->system_map) { fprintf(fp, " SYSTEM MAP: %s\n", pc->system_map); fprintf(fp, "DEBUG KERNEL: %s %s\n", @@ -71,7 +71,7 @@ if (pc->debuginfo_file) --- a/main.c +++ b/main.c -@@ -309,6 +309,7 @@ main(int argc, char **argv) +@@ -313,6 +313,7 @@ main(int argc, char **argv) * Take the kernel and dumpfile arguments in either order. */ while (argv[optind]) { @@ -79,7 +79,7 @@ if (is_remote_daemon(argv[optind])) { if (pc->flags & DUMPFILE_TYPES) { -@@ -321,21 +322,28 @@ main(int argc, char **argv) +@@ -325,21 +326,28 @@ main(int argc, char **argv) continue; } @@ -224,7 +224,7 @@ clean_exit(1); } } -@@ -2497,27 +2507,148 @@ is_elf_file(char *s) +@@ -2505,27 +2515,148 @@ is_elf_file(char *s) } /* @@ -380,7 +380,7 @@ if (!STRNEQ(eheader, ELFMAG) || eheader[EI_VERSION] != EV_CURRENT) return FALSE; -@@ -2593,9 +2724,35 @@ is_kernel(char *file) +@@ -2601,9 +2732,35 @@ is_kernel(char *file) } bailout: Index: crash-config-sparse.diff =================================================================== --- crash-config-sparse.diff (revision 98) +++ crash-config-sparse.diff (working copy) @@ -3,10 +3,15 @@ References: bnc#412894 Acked-by: Bernhard Walle <bwalle@suse.de> -diff -Naurp crash-4.0-6.3/defs.h crash-4.0-6.3-config-sparse/defs.h ---- crash-4.0-6.3/defs.h 2008-04-29 19:39:17.000000000 +0200 -+++ crash-4.0-6.3-config-sparse/defs.h 2008-08-12 17:03:54.000000000 +0200 -@@ -2634,6 +2634,8 @@ struct efi_memory_desc_t { +--- + defs.h | 4 ++++ + s390.c | 1 + + s390x.c | 1 + + 3 files changed, 6 insertions(+) + +--- a/defs.h ++++ b/defs.h +@@ -2639,6 +2639,8 @@ struct efi_memory_desc_t { #define TIF_SIGPENDING (2) @@ -15,7 +20,7 @@ #endif /* S390 */ #ifdef S390X -@@ -2656,6 +2658,8 @@ struct efi_memory_desc_t { +@@ -2661,6 +2663,8 @@ struct efi_memory_desc_t { #define TIF_SIGPENDING (2) @@ -24,9 +29,8 @@ #endif /* S390X */ #ifdef PLATFORM -diff -Naurp crash-4.0-6.3/s390.c crash-4.0-6.3-config-sparse/s390.c ---- crash-4.0-6.3/s390.c 2008-04-29 19:39:17.000000000 +0200 -+++ crash-4.0-6.3-config-sparse/s390.c 2008-08-12 17:04:03.000000000 +0200 +--- a/s390.c ++++ b/s390.c @@ -130,6 +130,7 @@ s390_init(int when) machdep->dump_irq = s390_dump_irq; if (!machdep->hz) @@ -35,9 +39,8 @@ break; case POST_INIT: -diff -Naurp crash-4.0-6.3/s390x.c crash-4.0-6.3-config-sparse/s390x.c ---- crash-4.0-6.3/s390x.c 2008-04-29 19:39:16.000000000 +0200 -+++ crash-4.0-6.3-config-sparse/s390x.c 2008-08-12 17:04:01.000000000 +0200 +--- a/s390x.c ++++ b/s390x.c @@ -128,6 +128,7 @@ s390x_init(int when) machdep->dump_irq = s390x_dump_irq; if (!machdep->hz) Index: crash-fixed-uninitialised =================================================================== --- crash-fixed-uninitialised (revision 98) +++ crash-fixed-uninitialised (working copy) @@ -29,7 +29,7 @@ ar -rs ${PROGRAM}lib.a ${OBJECT_FILES} --- a/defs.h +++ b/defs.h -@@ -92,8 +92,8 @@ +@@ -93,8 +93,8 @@ #define HIST_BLKSIZE (4096) @@ -76,7 +76,7 @@ + --- a/memory.c +++ b/memory.c -@@ -2905,7 +2905,7 @@ do_vm_flags(ulong flags) +@@ -2968,7 +2968,7 @@ do_vm_flags(ulong flags) #define VM_REF_CHECK_DECVAL(X,V) \ (DO_REF_SEARCH(X) && ((X)->cmdflags & VM_REF_NUMBER) && ((X)->decval == (V))) #define VM_REF_CHECK_STRING(X,S) \ Index: crash-make-emacs-default.diff =================================================================== --- crash-make-emacs-default.diff (revision 98) +++ crash-make-emacs-default.diff (working copy) @@ -4,7 +4,7 @@ --- a/main.c +++ b/main.c -@@ -818,12 +818,6 @@ setup_environment(int argc, char **argv) +@@ -846,12 +846,6 @@ setup_environment(int argc, char **argv) pc->flags |= READLINE; pc->editing_mode = "no_mode"; @@ -17,7 +17,7 @@ /* * Resolve $HOME .rc file first, then the one in the local directory. -@@ -869,7 +863,7 @@ setup_environment(int argc, char **argv) +@@ -897,7 +891,7 @@ setup_environment(int argc, char **argv) } if (STREQ(pc->editing_mode, "no_mode")) Index: crash-search-also-in-lib-crash =================================================================== --- crash-search-also-in-lib-crash (revision 98) +++ crash-search-also-in-lib-crash (working copy) @@ -18,7 +18,7 @@ --- a/defs.h +++ b/defs.h -@@ -3274,6 +3274,7 @@ void dump_symbol_table(void); +@@ -3295,6 +3295,7 @@ void dump_symbol_table(void); void dump_struct_table(ulong); void dump_offset_table(char *, ulong); int is_elf_file(char *); @@ -51,7 +51,7 @@ --- a/symbols.c +++ b/symbols.c -@@ -2586,6 +2586,28 @@ bailout: +@@ -2604,6 +2604,28 @@ bailout: return(is_bfd_format(file)); } Index: crash-sles9-time.patch =================================================================== --- crash-sles9-time.patch (revision 98) +++ crash-sles9-time.patch (working copy) @@ -16,7 +16,7 @@ --- a/defs.h +++ b/defs.h -@@ -532,6 +532,7 @@ struct kernel_table { +@@ -539,6 +539,7 @@ struct kernel_table { ulong p2m_mfn_cache_hits; ulong p2m_page_cache_hits; ulong relocate; @@ -24,7 +24,7 @@ }; /* -@@ -4394,6 +4395,13 @@ extern struct lkcd_environment *lkcd; +@@ -4434,6 +4435,13 @@ extern struct lkcd_environment *lkcd; #endif /* LKCD_COMMON */ @@ -40,7 +40,7 @@ */ --- a/kernel.c +++ b/kernel.c -@@ -164,6 +164,12 @@ kernel_init() +@@ -167,6 +167,12 @@ kernel_init() verify_version(); @@ -53,7 +53,7 @@ if (symbol_exists("__per_cpu_offset")) { if (LKCD_KERNTYPES()) i = get_cpus_possible(); -@@ -3468,7 +3474,7 @@ get_uptime(char *buf, ulonglong *j64p) +@@ -3596,7 +3602,7 @@ get_uptime(char *buf, ulonglong *j64p) if (symbol_exists("jiffies_64")) { get_symbol_data("jiffies_64", sizeof(ulonglong), &jiffies_64); @@ -62,7 +62,7 @@ wrapped = (jiffies_64 & 0xffffffff00000000ULL); if (wrapped) { wrapped -= 0x100000000ULL; -@@ -3870,6 +3876,7 @@ dump_kernel_table(int verbose) +@@ -4028,6 +4034,7 @@ dump_kernel_table(int verbose) fprintf(fp, "(%ld%%)\n", kt->p2m_page_cache_hits * 100 / kt->p2m_pages_searched); else fprintf(fp, "\n"); @@ -72,7 +72,7 @@ /* --- a/task.c +++ b/task.c -@@ -3197,6 +3197,12 @@ start_time_timespec(void) +@@ -3350,6 +3350,12 @@ start_time_timespec(void) default: break; } @@ -85,7 +85,7 @@ tt->flags |= NO_TIMESPEC; -@@ -3229,6 +3235,11 @@ convert_start_time(ulonglong start_time, +@@ -3382,6 +3388,11 @@ convert_start_time(ulonglong start_time, ulong tmp1, tmp2; ulonglong wrapped; Index: crash.changes =================================================================== --- crash.changes (revision 98) +++ crash.changes (working copy) @@ -1,3 +1,40 @@ +------------------------------------------------------------------- +Tue Aug 19 18:30:18 CEST 2008 - bwalle@suse.de + +- update to crash 4.0-7.1 + o Fix to address RT kernel's renaming of the + address_space.nrpages member to address_space.__nrpages + o For crash utility debug backtraces displayed in error + conditions, the usage of __builtin_return_address() has been + replaced with the backtrace() function. + o Fix for ia64 hypervisor backtraces when the entries in the cpu + map are not contiguous. + o Fix to make shell-escaped commands in a crash input file direct + their output properly. + o Fix to allow the usage of the "-i inputfile" command line + option when operating from an init script. + o Fix for the "kmem -P <address>" option, where <address> is an + invalid physical address. + o Fix for a potential endless cascade of SIGFPE exceptions during + session initialization when a vmlinux and vmcore do not match, + and a correct System.map or a non-debug vmlinux file is not + supplied. + o More gracefully handle a nonsensical "search -u <address>" + command attempt on a kernel thread or any context with no user + address space. + o Reworked the "search" command for usage with the Xen + Hypervisor. + o Fix for initialization-time segmentation violation due to a + module allocating and creating an exported symbol list outside + of its own virtual address space, and then overwriting its own + symbol list pointer. + o Implementation of a "--minimal" command line option, which + brings up a crash session that is restricted to the "log", + "dis", "rd", "sym", "eval" and "exit" commands. +- drop crash-builtin-return-addr: mainline +- drop crash-rt-nrpages: mainline +- drop crash-minimal-debugging.diff: mainline + ------------------------------------------------------------------- Fri Aug 15 10:36:35 CEST 2008 - bwalle@suse.de Index: crash.spec =================================================================== --- crash.spec (revision 98) +++ crash.spec (working copy) @@ -19,7 +19,7 @@ %endif Url: http://people.redhat.com/anderson/ Summary: Crash utility for live systems; netdump, diskdump, LKCD or mcore dumpfiles -Version: 4.0.6.3 +Version: 4.0.7.1 Release: 1 Þfine crash_version %(echo %{version} | cut -d . -f 1-2) Þfine crash_subversion %(echo %{version} | cut -d . -f 3-4) @@ -40,10 +40,7 @@ Patch4: %{name}-fixed-uninitialised Patch5: %{name}-sles9-time.patch Patch6: %{name}-compressed-kernel -Patch7: %{name}-builtin-return-addr -Patch8: %{name}-rt-nrpages -Patch9: %{name}-config-sparse.diff -Patch10: %{name}-minimal-debugging.diff +Patch7: %{name}-config-sparse.diff BuildRequires: bison flex ncurses-devel zlib-devel Þscription @@ -125,10 +122,7 @@ %patch4 -p1 %patch5 -p1 %patch6 -p1 -%patch7 -p0 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 +%patch7 -p1 ## SIAL patches # cd sial-scripts-%{scripts_version} ## Patch here Index: crash-4.0-7.1.tar.bz2 =================================================================== Binary file crash-4.0-7.1.tar.bz2 has changed Index: crash-4.0-6.3.tar.bz2 =================================================================== Binary file crash-4.0-6.3.tar.bz2 has changed Index: crash-builtin-return-addr =================================================================== --- crash-builtin-return-addr (revision 98) +++ crash-builtin-return-addr (working copy) @@ -1,136 +1,0 @@ -Index: defs.h -=================================================================== -RCS file: /nfs/projects/cvs/crash/defs.h,v -retrieving revision 1.347 -diff -u -r1.347 defs.h ---- defs.h 23 Apr 2008 19:54:00 -0000 1.347 -+++ defs.h 14 May 2008 15:40:40 -0000 -@@ -46,6 +46,7 @@ - #include <sys/param.h> - #include <sys/wait.h> - #include <sys/time.h> -+#include <execinfo.h> /* backtrace() */ - - #define BASELEVEL_REVISION "4.0" - -@@ -1797,18 +1798,18 @@ - char argbuf[1]; - }; - --static inline void --save_return_address(ulong *retaddr) --{ -- retaddr[0] = (ulong) __builtin_return_address(0); --#if defined(X86) || defined(PPC) || defined(X86_64) || defined(PPC64) -- if (__builtin_frame_address(1)) -- retaddr[1] = (ulong) __builtin_return_address(1); -- if (__builtin_frame_address(2)) -- retaddr[2] = (ulong) __builtin_return_address(2); -- if (__builtin_frame_address(3)) -- retaddr[3] = (ulong) __builtin_return_address(3); --#endif -+#define NUMBER_STACKFRAMES 4 -+ -+#define SAVE_RETURN_ADDRESS(retaddr) \ -+{ \ -+ int i; \ -+ int saved_stacks; \ -+ \ -+ saved_stacks = backtrace((void **)retaddr, NUMBER_STACKFRAMES); \ -+ \ -+ /* explicitely zero out the invalid addresses */ \ -+ for (i = saved_stacks; i < NUMBER_STACKFRAMES; i++) \ -+ retaddr[i] = 0; \ - } - - #endif /* !GDB_COMMON */ -Index: symbols.c -=================================================================== -RCS file: /nfs/projects/cvs/crash/symbols.c,v -retrieving revision 1.162 -diff -u -r1.162 symbols.c ---- symbols.c 14 Apr 2008 17:54:56 -0000 1.162 -+++ symbols.c 14 May 2008 15:55:01 -0000 -@@ -8913,8 +8913,8 @@ - return offset2; - - if (pc->flags & DATADEBUG) { -- ulong retaddr[4] = { 0 }; -- save_return_address(retaddr); -+ ulong retaddr[NUMBER_STACKFRAMES] = { 0 }; -+ SAVE_RETURN_ADDRESS(retaddr); - sprintf(errmsg, - "invalid (optional) structure member offsets: %s or %s", - item1, item2); -@@ -8936,8 +8936,8 @@ - return size2; - - if (pc->flags & DATADEBUG) { -- ulong retaddr[4] = { 0 }; -- save_return_address(retaddr); -+ ulong retaddr[NUMBER_STACKFRAMES] = { 0 }; -+ SAVE_RETURN_ADDRESS(retaddr); - sprintf(errmsg, "invalid (optional) structure sizes: %s or %s", - item1, item2); - datatype_error(retaddr, errmsg, func, file, line); -@@ -8964,8 +8964,8 @@ - return offset; - - if (offset < 0) { -- ulong retaddr[4] = { 0 }; -- save_return_address(retaddr); -+ ulong retaddr[NUMBER_STACKFRAMES] = { 0 }; -+ SAVE_RETURN_ADDRESS(retaddr); - sprintf(errmsg, "invalid structure member offset: %s", - item); - datatype_error(retaddr, errmsg, func, file, line); -@@ -8982,8 +8982,8 @@ - return size; - - if (size < 0) { -- ulong retaddr[4] = { 0 }; -- save_return_address(retaddr); -+ ulong retaddr[NUMBER_STACKFRAMES] = { 0 }; -+ SAVE_RETURN_ADDRESS(retaddr); - sprintf(errmsg, "invalid structure size: %s", item); - datatype_error(retaddr, errmsg, func, file, line); - } -@@ -9051,7 +9051,7 @@ - thisfile = get_thisfile(); - - fprintf(stderr, "[%s] error trace: ", thisfile); -- for (i = 3; i >= 0; i--) { -+ for (i = (NUMBER_STACKFRAMES-1); i >= 0; i--) { - if (retaddr[i]) - fprintf(stderr, "%s%lx%s", - i == 3 ? "" : "=> ", -@@ -9065,7 +9065,7 @@ - return; - } - -- for (i = 0; i < 4; i++) { -+ for (i = 0; i < NUMBER_STACKFRAMES; i++) { - if (!(lookfor = retaddr[i])) - continue; - -Index: tools.c -=================================================================== -RCS file: /nfs/projects/cvs/crash/tools.c,v -retrieving revision 1.60 -diff -u -r1.60 tools.c ---- tools.c 2 Jan 2008 14:15:13 -0000 1.60 -+++ tools.c 14 May 2008 15:58:23 -0000 -@@ -41,11 +41,11 @@ - { - int end_of_line, new_line; - char buf[BUFSIZE]; -- ulong retaddr[4] = { 0 }; -+ ulong retaddr[NUMBER_STACKFRAMES] = { 0 }; - va_list ap; - - if (CRASHDEBUG(1) || (pc->flags & DROP_CORE)) { -- save_return_address(retaddr); -+ SAVE_RETURN_ADDRESS(retaddr); - console("error() trace: %lx => %lx => %lx => %lx\n", - retaddr[3], retaddr[2], retaddr[1], retaddr[0]); - } Index: crash-minimal-debugging.diff =================================================================== --- crash-minimal-debugging.diff (revision 98) +++ crash-minimal-debugging.diff (working copy) @@ -1,150 +1,0 @@ -From: Sharyathi Nagesh <sharyath@in.ibm.com> -To: Crash-utility@redhat.com, anderson@redhat.com, - HOLZHEU@de.ibm.com, BUENDGEN@de.ibm.com -Cc: ssant@in.ibm.com - - Sachin and myself have worked on this patch. In case the memory dump is -corrupted crash tool exits from execution and we don't have any means to -debug the problem. This feature provides minimalistic features to crash -and help in debugging even if dump is corrupted. - -Description of the patch: - This patch will provide the minimal functionality in crash tool. -This patch has been generated against crash-4.0.6.2. - This feature will read the dump, even if it is corrupted. It -provides minimal debugging features, as provided by lcrash tool earlier. -It provides access to dmesg, symbol information, disassembly and memory -read features. - You can get into minimal mode by providing "--minimal" option while -starting crash - eg: crash --minimal <vmlinux> <dump> -======================================================================== -Testing: - This patch has been tested on the corrupted dump images on z-series -machine. - 'help' command in the minimal mode gives out put in a line, not -like the way out put is generated in the normal mode of operation. - -Please go through the features and let us know your thoughts -======================================================================== - -Acked-by: Bernhard Walle <bwalle@suse.de> - ---- - cmdline.c | 8 ++++++++ - defs.h | 2 ++ - help.c | 6 ++++-- - main.c | 16 +++++++++++++--- - 4 files changed, 27 insertions(+), 5 deletions(-) - ---- a/cmdline.c -+++ b/cmdline.c -@@ -2137,3 +2137,11 @@ wait_for_children(ulong waitflag) - stall(1000); - } - } -+ -+int minimal_functions(char *name) -+{ -+ return STREQ("log", name) || STREQ("help",name) || \ -+ STREQ("dis", name) || STREQ("q", name) || \ -+ STREQ("sym", name) || STREQ("exit", name)|| \ -+ STREQ("rd", name); -+} ---- a/defs.h -+++ b/defs.h -@@ -184,6 +184,7 @@ struct number_option { - #define PLEASE_WAIT (0x200000000000000ULL) - #define IFILE_ERROR (0x400000000000000ULL) - #define KERNTYPES (0x800000000000000ULL) -+#define MINIMAL_MODE (0x1000000000000000ULL) - - #define ACTIVE() (pc->flags & LIVE_SYSTEM) - #define DUMPFILE() (!(pc->flags & LIVE_SYSTEM)) -@@ -3143,6 +3144,7 @@ int received_SIGINT(void); - void debug_redirect(char *); - int CRASHPAGER_valid(void); - char *setup_scroll_command(void); -+int minimal_functions(char *); - - /* - * tools.c ---- a/help.c -+++ b/help.c -@@ -420,12 +420,14 @@ display_help_screen(char *indent) - for (i = 0; i < rows; i++) { - namep = &pc->cmdlist[i]; - for (j = 0; j < HELP_COLUMNS; j++) { -- fprintf(fp,"%-15s", *namep); -+ if(!((pc->flags & MINIMAL_MODE)&&!(minimal_functions(*namep)))) -+ fprintf(fp,"%-15s", *namep); - namep += rows; - if ((namep - pc->cmdlist) >= pc->ncmds) - break; - } -- fprintf(fp,"\n%s", indent); -+ if(!(pc->flags & MINIMAL_MODE)) -+ fprintf(fp,"\n%s", indent); - } - - fprintf(fp, "\n%s%s version: %-6s gdb version: %s\n", indent, ---- a/main.c -+++ b/main.c -@@ -57,6 +57,7 @@ static struct option long_options[] = { - {"no_scroll", 0, 0, 0}, - {"reloc", required_argument, 0, 0}, - {"active", 0, 0, 0}, -+ {"minimal", 0, 0, 0}, - {0, 0, 0, 0} - }; - -@@ -201,6 +202,9 @@ main(int argc, char **argv) - kt->flags |= RELOC_SET; - } - -+ else if (STREQ(long_options[option_index].name, "minimal")) -+ pc->flags |= MINIMAL_MODE; -+ - else { - error(INFO, "internal error: option %s unhandled\n", - long_options[option_index].name); -@@ -504,7 +508,7 @@ main_loop(void) - #else - error(FATAL, XEN_HYPERVISOR_NOT_SUPPORTED); - #endif -- } else { -+ } else if(!(pc->flags & MINIMAL_MODE)){ - read_in_kernel_config(IKCFG_INIT); - kernel_init(); - machdep_init(POST_GDB); -@@ -532,7 +536,7 @@ main_loop(void) - #else - error(FATAL, XEN_HYPERVISOR_NOT_SUPPORTED); - #endif -- } else { -+ } else if(!(pc->flags & MINIMAL_MODE)){ - display_sys_stats(); - show_context(CURRENT_CONTEXT()); - } -@@ -622,7 +626,10 @@ reattempt: - return; - - pc->curcmd = pc->program_name; -- error(INFO, "command not found: %s\n", args[0]); -+ if (!(pc->flags & MINIMAL_MODE)) -+ error(INFO, "command not found: %s\n", args[0]); -+ else -+ error(INFO, "command: %s not available in minimal mode\n", args[0]); - - if (pc->curcmd_flags & REPEAT) - pc->curcmd_flags &= ~REPEAT; -@@ -637,6 +644,9 @@ get_command_table_entry(char *name) - { - struct command_table_entry *cp; - struct extension_table *ext; -+ -+ if ((pc->flags & MINIMAL_MODE) && !minimal_functions(name)) -+ return NULL; - - for (cp = pc->cmd_table; cp->name; cp++) { - if (STREQ(cp->name, name)) Index: crash-rt-nrpages =================================================================== --- crash-rt-nrpages (revision 98) +++ crash-rt-nrpages (working copy) @@ -1,37 +1,0 @@ -From: Bernhard Walle <bwalle@suse.de> -Subject: [PATCH] Use address_space.__nrpages for RT kernel -References: bnc#389907 -To: crash-utility@redhat.com - -The patch mapping_nrpages.patch from RT kernel - - Subject: mm/fs: abstract address_space::nrpages - - Currently the tree_lock protects mapping->nrpages, this will not be - possible much longer. Hence abstract the access to this variable so that - it can be easily replaced by an atomic_ulong_t. - - Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> - -renames address_space.nrpages to address_space.__nrpages. This patch implements -that renaming for crash if address_space.nrpages is invalid. - - -Signed-off-by: Bernhard Walle <bwalle@suse.de> - ---- - memory.c | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/memory.c -+++ b/memory.c -@@ -320,6 +320,9 @@ vm_init(void) - MEMBER_OFFSET_INIT(block_device_bd_disk, "block_device", "bd_disk"); - MEMBER_OFFSET_INIT(inode_i_mapping, "inode", "i_mapping"); - MEMBER_OFFSET_INIT(address_space_nrpages, "address_space", "nrpages"); -+ if (INVALID_MEMBER(address_space_nrpages)) -+ MEMBER_OFFSET_INIT(address_space_nrpages, "address_space", "__nrpages"); -+ - MEMBER_OFFSET_INIT(gendisk_major, "gendisk", "major"); - MEMBER_OFFSET_INIT(gendisk_fops, "gendisk", "fops"); - MEMBER_OFFSET_INIT(gendisk_disk_name, "gendisk", "disk_name");
Bernhard Walle (bwalle)
committed
(revision 98)
- minimal debugging support for corrupted dumps (FATE#304994)
Bernhard Walle (bwalle)
committed
(revision 97)
Actually apply the patch :)
Bernhard Walle (bwalle)
committed
(revision 96)
- fix CONFIG_SPARSEMEM kernels on s390x (bnc#412894) [IBM patch] --This line, and those below, will be ignored-- A crash-config-sparse.diff M crash.changes M crash.spec Diff for working copy: . Index: crash.changes =================================================================== --- crash.changes (revision 95) +++ crash.changes (working copy) @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Aug 14 17:04:24 CEST 2008 - bwalle@suse.de + +- fix CONFIG_SPARSEMEM kernels on s390x (bnc#412894) [IBM patch] + ------------------------------------------------------------------- Wed May 14 22:59:37 CEST 2008 - bwalle@suse.de Index: crash.spec =================================================================== --- crash.spec (revision 95) +++ crash.spec (working copy) @@ -104,7 +104,7 @@ Upon loading the sial.so object file with extend, any SIAL scripts located in the /usr/share/sial/crash or $HOME/.sial directories will be -loaded automatically.� +loaded automatically. Index: crash-config-sparse.diff =================================================================== --- crash-config-sparse.diff (revision 95) +++ crash-config-sparse.diff (working copy) @@ -1,0 +1,43 @@ +diff -Naurp crash-4.0-6.3/defs.h crash-4.0-6.3-config-sparse/defs.h +--- crash-4.0-6.3/defs.h 2008-04-29 19:39:17.000000000 +0200 ++++ crash-4.0-6.3-config-sparse/defs.h 2008-08-12 17:03:54.000000000 +0200 +@@ -2634,6 +2634,8 @@ struct efi_memory_desc_t { + + #define TIF_SIGPENDING (2) + ++#define _MAX_PHYSMEM_BITS 31 ++ + #endif /* S390 */ + + #ifdef S390X +@@ -2656,6 +2658,8 @@ struct efi_memory_desc_t { + + #define TIF_SIGPENDING (2) + ++#define _MAX_PHYSMEM_BITS 64 ++ + #endif /* S390X */ + + #ifdef PLATFORM +diff -Naurp crash-4.0-6.3/s390.c crash-4.0-6.3-config-sparse/s390.c +--- crash-4.0-6.3/s390.c 2008-04-29 19:39:17.000000000 +0200 ++++ crash-4.0-6.3-config-sparse/s390.c 2008-08-12 17:04:03.000000000 +0200 +@@ -130,6 +130,7 @@ s390_init(int when) + machdep->dump_irq = s390_dump_irq; + if (!machdep->hz) + machdep->hz = HZ; ++ machdep->max_physmem_bits = _MAX_PHYSMEM_BITS; + break; + + case POST_INIT: +diff -Naurp crash-4.0-6.3/s390x.c crash-4.0-6.3-config-sparse/s390x.c +--- crash-4.0-6.3/s390x.c 2008-04-29 19:39:16.000000000 +0200 ++++ crash-4.0-6.3-config-sparse/s390x.c 2008-08-12 17:04:01.000000000 +0200 +@@ -128,6 +128,7 @@ s390x_init(int when) + machdep->dump_irq = s390x_dump_irq; + if (!machdep->hz) + machdep->hz = HZ; ++ machdep->max_physmem_bits = _MAX_PHYSMEM_BITS; + break; + + case POST_INIT:
Displaying revisions 281 - 300 of 395