Cliff Wickman | 15 May 2013 20:43
Picon
Favicon

[PATCH] makedumpfile: buddy identification when noncyclic

From: Cliff Wickman <cpw@...>

The 'buddy' identification of free pages should be done for non-cyclical
dumps as well as cyclical.
Remove the cyclic test from this condition:
    if (info->flag_cyclic && (info->dump_level & DL_EXCLUDE_FREE))
I find this to speed the scan of page structures for a 1TB system from
60sec to 30sec.

And only do the exclude_free_page() procedure if free pages cannot be
identified using the buddy technique.

Signed-off-by: Cliff Wickman <cpw@...>
---
 makedumpfile.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Index: makedumpfile.mmap/makedumpfile.c
===================================================================
--- makedumpfile.mmap.orig/makedumpfile.c
+++ makedumpfile.mmap/makedumpfile.c
 <at>  <at>  -2979,7 +2979,9  <at>  <at>  out:
 	if (!get_value_for_old_linux())
 		return FALSE;

-	if (info->flag_cyclic && (info->dump_level & DL_EXCLUDE_FREE))
+	/* use buddy identification of free pages whether cyclic or not */
+	/* (this can reduce pages scan of 1TB memory from 60sec to 30sec) */
+	if (info->dump_level & DL_EXCLUDE_FREE)
 		setup_page_is_buddy();
(Continue reading)

Cliff Wickman | 15 May 2013 20:43
Picon
Favicon

[PATCH] makedumpfile: message on non-mmap kernels

From: Cliff Wickman <cpw@...>

If the crash kernel does not support mmap(2) of /proc/vmcore, make
makedumpfile fall back to using reads with a non-alarming message.

Signed-off-by: Cliff Wickman <cpw@...>
---
 makedumpfile.c |   37 ++++++++++++++++++++++---------------
 1 file changed, 22 insertions(+), 15 deletions(-)

Index: makedumpfile.mmap/makedumpfile.c
===================================================================
--- makedumpfile.mmap.orig/makedumpfile.c
+++ makedumpfile.mmap/makedumpfile.c
 <at>  <at>  -239,7 +239,7  <at>  <at>  read_page_desc(unsigned long long paddr,
 }

 static int
-update_mmap_range(off_t offset) {
+update_mmap_range(off_t offset, int initial) {
 	off_t start_offset;
 	off_t map_size;
 	off_t max_offset = get_max_file_offset();
 <at>  <at>  -258,10 +258,11  <at>  <at>  update_mmap_range(off_t offset) {
 				     info->fd_memory, start_offset);

 	if (info->mmap_buf == MAP_FAILED) {
-		ERRMSG("Can't map [%llx-%llx] with mmap()\n %s",
-		       (ulonglong)start_offset,
-		       (ulonglong)(start_offset + map_size),
(Continue reading)

Cliff Wickman | 15 May 2013 20:43
Picon
Favicon

[PATCH] makedumpfile: non-cyclic default

From: Cliff Wickman <cpw@...>

Make non-cyclic the default, as it is faster.

Dumping a 1TB memory is successful with a crashkernel=512M.
And allow -Y on the command line, as well as --non-cylic.

Signed-off-by: Cliff Wickman <cpw@...>
---
 makedumpfile.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Index: makedumpfile.mmap/makedumpfile.c
===================================================================
--- makedumpfile.mmap.orig/makedumpfile.c
+++ makedumpfile.mmap/makedumpfile.c
 <at>  <at>  -8585,13 +8585,14  <at>  <at>  main(int argc, char *argv[])
 	initialize_tables();

 	/*
-	 * By default, makedumpfile works in constant memory space.
+	 * By default, makedumpfile makes one pass through page structures.
+	 * Use --cyclic-buffer to work in constant memory space.
 	 */
-	info->flag_cyclic = TRUE;
+	info->flag_cyclic = FALSE;
 	
 	info->block_order = DEFAULT_ORDER;
 	message_level = DEFAULT_MSG_LEVEL;
-	while ((opt = getopt_long(argc, argv, "b:cDd:EFfg:hi:lMpRrsvXx:", longopts,
(Continue reading)

Cliff Wickman | 15 May 2013 20:43
Picon
Favicon

[PATCH] makedumpfile: turn off mmap for free page scan

From: Cliff Wickman <cpw@...>

Because addresses of each successive page structure are often descending
it is much faster to use read()'s, so set off info->flag_usemmap
while doing exclude_free_page().

Signed-off-by: Cliff Wickman <cpw@...>
---
 makedumpfile.c |   15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

Index: makedumpfile.mmap/makedumpfile.c
===================================================================
--- makedumpfile.mmap.orig/makedumpfile.c
+++ makedumpfile.mmap/makedumpfile.c
 <at>  <at>  -3925,9 +3925,18  <at>  <at>  _exclude_free_page(void)
 	return TRUE;
 }

+/*
+ * Note that this is a very lengthy process, even using mmap(2). The
+ * page structures in the free lists are read one-at-a-time, but using
+ * readpage_elf(), which reads an entire page.  And addresses of each
+ * successive page structure are often descending, which means that each
+ * read is another mmap(2) operation.
+ * It is much faster to use read()'s, so set off info->flag_usemmap here.
+ */
 int
 exclude_free_page(void)
 {
(Continue reading)

Cliff Wickman | 15 May 2013 20:43
Picon
Favicon

[PATCH] makedumpfile: warn on vmlinux without dwarf

From: Cliff Wickman <cpw@...>

If the vmlinux does not have dwarf information makedumpfile fails in
a rather obscure way, with a flood of redundant errors,

Make it fail with more of a hint of what is wrong.

Signed-off-by: Cliff Wickman <cpw@...>
---
 dwarf_info.c |    4 ++++
 1 file changed, 4 insertions(+)

Index: makedumpfile.mmap/dwarf_info.c
===================================================================
--- makedumpfile.mmap.orig/dwarf_info.c
+++ makedumpfile.mmap/dwarf_info.c
 <at>  <at>  -139,6 +139,10  <at>  <at>  process_module (Dwfl_Module *dwflmod,

 	/* get a debug context descriptor.*/
 	dwarf_info.dwarfd = dwfl_module_getdwarf (dwflmod, &dwbias);
+	if (dwarf_info.dwarfd == NULL) {
+		fprintf(stderr, "makedumpfile: dwfl_module_getdwarf error\n");
+		exit(1);
+	}
 	dwarf_info.elfd = dwarf_getelf(dwarf_info.dwarfd);

 	mod_name = dwfl_module_info(dwflmod, NULL, NULL, NULL, NULL, NULL,
WANG Chao | 14 May 2013 12:32
Picon
Favicon

[PATCH] kexec: check if memory is reserved only when loading kdump kernel.

When memory for crashkernel isn't reserved, it's confusing that kexec
spits error message for unloading kdump kernel as if we were loading it:

  # kexec -p -u
  Memory for crashkernel is not reserved
  Please reserve memory by passing "crashkernel=X <at> Y" parameter to the kernel
  Then try loading kdump kernel
  # echo $?
  1

It's more appropriate to test if memory is reserved only when
loading kdump kernel. With this patch:

  # kexec -p -u
  # echo $?
  0

It's also the same behavior with the case of trying to unload kernel
from unloaded state.

Signed-off-by: WANG Chao <chaowang@...>
---
 kexec/kexec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kexec/kexec.c b/kexec/kexec.c
index 911c0f6..6a13f79 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
 <at>  <at>  -1175,7 +1175,8  <at>  <at>  int main(int argc, char *argv[])
(Continue reading)

WANG Chao | 14 May 2013 05:56
Picon
Favicon

[PATCH] kexec: Replace printf() with die() to error out to stderr

Error messages are mixed stderr with stdout when we use die() along with
printf(). So use die() to keep error out consistent.

Signed-off-by: WANG Chao <chaowang@...>
---
 kexec/kexec.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/kexec/kexec.c b/kexec/kexec.c
index 53d6edc..911c0f6 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
 <at>  <at>  -1176,17 +1176,17  <at>  <at>  int main(int argc, char *argv[])
 	}

 	if ((kexec_flags & KEXEC_ON_CRASH) && !is_crashkernel_mem_reserved()) {
-		printf("Memory for crashkernel is not reserved\n");
-		printf("Please reserve memory by passing ");
-		printf("\"crashkernel=X <at> Y\" parameter to the kernel\n");
-		die("Then try loading kdump kernel\n");
+		die("Memory for crashkernel is not reserved\n"
+		    "Please reserve memory by passing"
+		    "\"crashkernel=X <at> Y\" parameter to kernel\n"
+		    "Then try to loading kdump kernel\n");
 	}

 	if (do_load && (kexec_flags & KEXEC_PRESERVE_CONTEXT) &&
 	    mem_max == ULONG_MAX) {
-		printf("Please specify memory range used by kexeced kernel\n");
-		printf("to preserve the context of original kernel with \n");
(Continue reading)

BLV | 14 May 2013 00:25

AFFAIRES ET PERSONNEL PRÊT OFFRE.


AFFAIRES ET PERSONNEL PRÊT OFFRE.? Envisagez-vous sérieusement à la recherche d'une entreprise ou
d'un prêt personnel? Avez-vous vu refuser un prêt par votre banque ou d'une autre et cela parce
société de financement financier de votre mauvaise cote de crédit? Voulez-vous démarrer une
entreprise et vous avez besoin de toute urgence tout type de prêt? Ensuite, vous pouvez demander:

personnel prêt
aux entreprises prêts
Consolidation Prêt
maison PRÊT
voiture prêt

Vous pouvez nous contacter dès maintenant que nous offrons actuellement tous les types de pf prêts à
tous les candidats de partout dans le monde à un taux d'intérêt bonifié de 3%. Vous pouvez accéder à
n'importe quelle quantité de prêt allant de 10.000 euros à 30,000,000.00 Euro. Postulez dès
maintenant alors que la dernière offre.

Cordialement,
Mr. Sarah Milton,
BLV Credit Group Limited,
London, United Kingdom.

_______________________________________________
kexec mailing list
kexec <at> lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
Dave Lloyd | 13 May 2013 17:40

Kernel panics when using kexec for rebooting

All:

I seem to be able to relatively reliably panic a system when using
kexec to reboot. This does not happen during a normal boot sequence.
Unfortunately, the stack trace I get for the panic is not consistent.
I've included a few here. Mostly they seem to center on what smells
like some sort of memory corruption to me. I'm kind of banging my head
against the wall with this, so any help would be greatly appreciated.

I have noticed, that I consistently get these messages when rebooting
with kexec, but not when going through the normal system boot process:

[    4.961700] ACPI Exception: AE_AML_PACKAGE_LIMIT, Index
(0x00000000FFFFFFFF) is beyond end of object (20110413/exoparg2-418)
[    4.973020] ACPI Error: Method parse/execution failed
[\_SB_.PCI0.IDE0.GTM_] (Node ffff880197c8cc18), AE_AML_PACKAGE_LIMIT
(20110413/psparse-536)
[    4.986228] ACPI Error: Method parse/execution failed
[\_SB_.PCI0.IDE0.CHN0._GTM] (Node ffff880317c72c18),
AE_AML_PACKAGE_LIMIT (20110413/psparse-536)
[    4.999842] ata1: ACPI get timing mode failed (AE 0x300b)
[    5.005457] ACPI Exception: AE_AML_PACKAGE_LIMIT, Index
(0x00000000FFFFFFFF) is beyond end of object (20110413/exoparg2-418)
[    5.016742] ACPI Error: Method parse/execution failed
[\_SB_.PCI0.IDE0.GTM_] (Node ffff880197c8cc18), AE_AML_PACKAGE_LIMIT
[    5.034348]  (20110413/psparse-536)
[    5.037859] ACPI Error: Method parse/execution failed
[\_SB_.PCI0.IDE0.CHN1._GTM] (Node ffff880317c72ce0),
AE_AML_PACKAGE_LIMIT (20110413/psparse-536)
[    5.051462] ata2: ACPI get timing mode failed (AE 0x300b)
(Continue reading)

Seiji Aguchi | 9 May 2013 01:18
Favicon

[PATCH]Add kmsg_dump() to kexec path

Problem
=======

From our support service experience, we always need to detect root cause of OS panic.
And customers in enterprise area never forgive us if we can't detect the root cause 
of panic due to lack of materials for investigation.

Kdump is a powerful troubleshooting feature, but it may accesses to multiple hardware, 
like HBA, FC-cable, to get to dump disk.

This means kdump is not robust against hardware failure.

Solution
========

Logging kernel message to persistent device is an effective way to get materials 
for investigation in case of kdump failure.

So, this patch adds kmsg_dump() to a kexec path.
Also, it adds KMSG_DUMP_KEXEC to pstore_cannot_block_path()
so that it can avoid deadlocking in kexec path.

Please see the detail of
pstore_cannot_block_path().
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/fs/pstore/platform.c?id=9f244e9cfd70c7c0f82d3c92ce772ab2a92d9f64

Actually, there are some objections about kmsg_dump(KMSG_DUMP_KEXEC) and EFI below.
But I still think adding kmsg_dump() to a kexec path is useful.

- http://marc.info/?l=linux-kernel&m=130698519720887&w=2
(Continue reading)

Anand Raj Manickam | 7 May 2013 15:40
Picon

crash read error: kernel virtual address / vmcore address mismatch ?

Hi ,
Sorry about re posting this as i did not find solution ...

I m facing a issue where on

#crash /data/linux-2.6.30.8/vmlinux /proc/vmcore

crash 6.1.6
Copyright (C) 2002-2013  Red Hat, Inc.
Copyright (C) 2004, 2005, 2006, 2010  IBM Corporation
Copyright (C) 1999-2006  Hewlett-Packard Co
Copyright (C) 2005, 2006, 2011, 2012  Fujitsu Limited
Copyright (C) 2006, 2007  VA Linux Systems Japan K.K.
Copyright (C) 2005, 2011  NEC Corporation
Copyright (C) 1999, 2002, 2007  Silicon Graphics, Inc.
Copyright (C) 1999, 2000, 2001, 2002  Mission Critical Linux, Inc.
This program is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions.  Enter "help copying" to see the conditions.
This program has absolutely no warranty.  Enter "help warranty" for details.

GNU gdb (GDB) 7.3.1
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...

crash: read error: kernel virtual address: c127a9c8  type: "cpu_possible_mask"
(Continue reading)


Gmane