Skip to contentSkip to conversation

makedumpfile fails on SGI machine

PATCH In review Bernhard Walle 3 participants 22 messages Jul 30, 2008 – Sep 1, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

makedumpfile 1.2.7 fails on a SGI machine with following error:

readmem: Can't convert a virtual address(a0007fff8f900000) to offset.

The debug output is

--------------------------------------- 8< -------------------------- LOAD (0)
phys_start : 3014000000
phys_end : 301466d660
virt_start : a000000100000000
virt_end : a00000010066d660
LOAD (1)
phys_start : 3000080000
phys_end : 3000400000
virt_start : e000003000080000
virt_end : e000003000400000
LOAD (2)
phys_start : 3003000000
phys_end : 3006000000
virt_start : e000003003000000
virt_end : e000003006000000
LOAD (3)
phys_start : 3006000000
phys_end : 3014000000
virt_start : e000003006000000
virt_end : e000003014000000
LOAD (4)
phys_start : 3014000000
phys_end : 3014f0b000
virt_start : e000003014000000
virt_end : e000003014f0b000
LOAD (5)
phys_start : 3014f0b000
phys_end : 3018000000
virt_start : e000003014f0b000
virt_end : e000003018000000
LOAD (6)
phys_start : 3038000000
phys_end : 307bffe000
virt_start : e000003038000000
virt_end : e00000307bffe000
LOAD (7)
phys_start : b000080000
phys_end : b000400000
virt_start : e00000b000080000
virt_end : e00000b000400000
LOAD (8)
phys_start : b003000000
phys_end : b006000000
virt_start : e00000b003000000
virt_end : e00000b006000000
LOAD (9)
phys_start : b006000000
phys_end : b079e8c000
virt_start : e00000b006000000
virt_end : e00000b079e8c000
LOAD (10)
phys_start : b079e8c000
phys_end : b079e92000
virt_start : e00000b079e8c000
virt_end : e00000b079e92000
LOAD (11)
phys_start : b079e92000
phys_end : b079e93000
virt_start : e00000b079e92000
virt_end : e00000b079e93000
LOAD (12)
phys_start : b079e93000
phys_end : b07a3f2000
virt_start : e00000b079e93000
virt_end : e00000b07a3f2000
LOAD (13)
phys_start : b07a3f2000
phys_end : b07a452000
virt_start : e00000b07a3f2000
virt_end : e00000b07a452000
LOAD (14)
phys_start : b07a452000
phys_end : b07a7fe000
virt_start : e00000b07a452000
virt_end : e00000b07a7fe000
LOAD (15)
phys_start : b07b800000
phys_end : b07b801000
virt_start : e00000b07b800000
virt_end : e00000b07b801000
LOAD (16)
phys_start : b07b801000
phys_end : b07b88c000
virt_start : e00000b07b801000
virt_end : e00000b07b88c000
LOAD (17)
phys_start : b07b88c000
phys_end : b07b894000
virt_start : e00000b07b88c000
virt_end : e00000b07b894000
LOAD (18)
phys_start : b07b894000
phys_end : b07b896000
virt_start : e00000b07b894000
virt_end : e00000b07b896000
LOAD (19)
phys_start : b07b896000
phys_end : b07b89e000
virt_start : e00000b07b896000
virt_end : e00000b07b89e000
LOAD (20)
phys_start : b07b89e000
phys_end : b07b89f000
virt_start : e00000b07b89e000
virt_end : e00000b07b89f000
LOAD (21)
phys_start : b07b89f000
phys_end : b07ba00000
virt_start : e00000b07b89f000
virt_end : e00000b07ba00000
LOAD (22)
phys_start : b07ba00000
phys_end : b07bd5a000
virt_start : e00000b07ba00000
virt_end : e00000b07bd5a000
LOAD (23)
phys_start : b07bd94000
phys_end : b07be00000
virt_start : e00000b07bd94000
virt_end : e00000b07be00000
LOAD (24)
phys_start : b07be00000
phys_end : b07be12000
virt_start : e00000b07be00000
virt_end : e00000b07be12000
LOAD (25)
phys_start : b07be80000
phys_end : b07be8e000
virt_start : e00000b07be80000
virt_end : e00000b07be8e000
Linux kdump

max_mapnr : 2c1efa3

num of NODEs : 2

Memory type : DISCONTIGMEM

mem_map (0)

  mem_map    : 0
  pfn_start  : 0
  pfn_end    : c00c00
mem_map (1)
  mem_map    : a0007fff8f900000
  pfn_start  : c00c00
  pfn_end    : c1efff
mem_map (2)
  mem_map    : 0
  pfn_start  : c1efff
  pfn_end    : 2c00c00
mem_map (3)
  mem_map    : a0007fffff900000
  pfn_start  : 2c00c00
  pfn_end    : 2c1efa3

Checking for memory holes : [100 %] readmem: Can't convert a
virtual address(a0007fff8f900000) to offset. --------------------------------------- >8 --------------------------

After debugging that, I didn't find an error code. That address is in fact the beginning of the mem_map of that node, and is in fact not mapped (I verified that in crash).

With an older kernel and an older makedumpfile it succeeds. The debugging output here is:

---------------------------------------- 8< -------------------------- LOAD (0)
phys_start : 3014000000
phys_end : 30145ac840
virt_start : a000000100000000
virt_end : a0000001005ac840
LOAD (1)
phys_start : 3000080000
phys_end : 3000400000
virt_start : e000003000080000
virt_end : e000003000400000
LOAD (2)
phys_start : 3003000000
phys_end : 3006000000
virt_start : e000003003000000
virt_end : e000003006000000
LOAD (3)
phys_start : 3006000000
phys_end : 3014000000
virt_start : e000003006000000
virt_end : e000003014000000
LOAD (4)
phys_start : 3014000000
phys_end : 3015b9f000
virt_start : e000003014000000
virt_end : e000003015b9f000
LOAD (5)
phys_start : 3015b9f000
phys_end : 3018000000
virt_start : e000003015b9f000
virt_end : e000003018000000
LOAD (6)
phys_start : 3038000000
phys_end : 307bffe000
virt_start : e000003038000000
virt_end : e00000307bffe000
LOAD (7)
phys_start : b000080000
phys_end : b000400000
virt_start : e00000b000080000
virt_end : e00000b000400000
LOAD (8)
phys_start : b003000000
phys_end : b006000000
virt_start : e00000b003000000
virt_end : e00000b006000000
LOAD (9)
phys_start : b006000000
phys_end : b079ea2000
virt_start : e00000b006000000
virt_end : e00000b079ea2000
LOAD (10)
phys_start : b079ea2000
phys_end : b07a3f4000
virt_start : e00000b079ea2000
virt_end : e00000b07a3f4000
LOAD (11)
phys_start : b07a3f4000
phys_end : b07a452000
virt_start : e00000b07a3f4000
virt_end : e00000b07a452000
LOAD (12)
phys_start : b07a452000
phys_end : b07a7fe000
virt_start : e00000b07a452000
virt_end : e00000b07a7fe000
LOAD (13)
phys_start : b07b800000
phys_end : b07b801000
virt_start : e00000b07b800000
virt_end : e00000b07b801000
LOAD (14)
phys_start : b07b801000
phys_end : b07b88c000
virt_start : e00000b07b801000
virt_end : e00000b07b88c000
LOAD (15)
phys_start : b07b88c000
phys_end : b07b894000
virt_start : e00000b07b88c000
virt_end : e00000b07b894000
LOAD (16)
phys_start : b07b894000
phys_end : b07b896000
virt_start : e00000b07b894000
virt_end : e00000b07b896000
LOAD (17)
phys_start : b07b896000
phys_end : b07b89e000
virt_start : e00000b07b896000
virt_end : e00000b07b89e000
LOAD (18)
phys_start : b07b89e000
phys_end : b07b89f000
virt_start : e00000b07b89e000
virt_end : e00000b07b89f000
LOAD (19)
phys_start : b07b89f000
phys_end : b07ba00000
virt_start : e00000b07b89f000
virt_end : e00000b07ba00000
LOAD (20)
phys_start : b07ba00000
phys_end : b07bd5a000
virt_start : e00000b07ba00000
virt_end : e00000b07bd5a000
LOAD (21)
phys_start : b07bd94000
phys_end : b07be00000
virt_start : e00000b07bd94000
virt_end : e00000b07be00000
LOAD (22)
phys_start : b07be00000
phys_end : b07be12000
virt_start : e00000b07be00000
virt_end : e00000b07be12000
LOAD (23)
phys_start : b07be80000
phys_end : b07be8e000
virt_start : e00000b07be80000
virt_end : e00000b07be8e000

max_mapnr : 2c1efa3

num of NODEs : 2

Memory type : DISCONTIGMEM

pfn_end of node (1) is over max_mapnr.
pfn_start: 2c00000
pfn_end : 2c1f000
max_mapnr: 2c1efa3
mem_map (0)

  mem_map    : 0
  pfn_start  : 0
  pfn_end    : c00000
mem_map (1)
  mem_map    : a0007fff8f938000
  pfn_start  : c00000
  pfn_end    : c1f000
mem_map (2)
  mem_map    : 0
  pfn_start  : c1f000
  pfn_end    : 2c00000
mem_map (3)
  mem_map    : a0007fffff938000
  pfn_start  : 2c00000
  pfn_end    : 2c1efa3

--------------------- >8 -----------------------------------------

Can you help here? I'm currently a bit short in time ... :-(

Bernhard

Signature · 6 lines
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#1 lore raw

Hi Bernhard,

Thank you for the report.

Quoted 5 lines · Bernhard Walle

After debugging that, I didn't find an error code. That address is in fact the beginning of the mem_map of that node, and is in fact not mapped (I verified that in crash).

With an older kernel and an older makedumpfile it succeeds.

I'd like to know whether this problem is due to the makedumpfile regression or either the unsupported kernel. Could you please fill the following items ?

* Problematic condition
kernel version: ?
makedumpfile version: 1.2.7

* Successful condition
kernel version: ?
makedumpfile version: ?

And could you please test the combination of successful kernel and problematic makedumpfile(1.2.7) ?

Thanks
Ken'ichi Ohmichi

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#2 lore raw
Quoted 10 lines · Ken'ichi Ohmichi
Quoted 5 lines · Bernhard Walle

After debugging that, I didn't find an error code. That address is in fact the beginning of the mem_map of that node, and is in fact not mapped (I verified that in crash).

With an older kernel and an older makedumpfile it succeeds.

I'd like to know whether this problem is due to the makedumpfile regression or either the unsupported kernel. Could you please fill the following items ?

* Problematic condition
kernel version: 2.6.26
makedumpfile version: 1.2.7

* Successful condition
kernel version: 2.6.16.60 (SLES kernel)
makedumpfile version: 1.1.4 (SLES 10 SP2 version, but in fact that is
1.1.4 although -v displays something different ;-))

Quoted 2 lines

And could you please test the combination of successful kernel and problematic makedumpfile(1.2.7) ?

That works. Seems to be some kernel change.

Bernhard

Signature · 6 lines
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#3 lore raw

Hi Bernhard,

Quoted 21 lines · Bernhard Walle
Quoted 9 lines · Ken'ichi Ohmichi
Quoted 5 lines · Bernhard Walle

After debugging that, I didn't find an error code. That address is in fact the beginning of the mem_map of that node, and is in fact not mapped (I verified that in crash).

With an older kernel and an older makedumpfile it succeeds.

I'd like to know whether this problem is due to the makedumpfile regression or either the unsupported kernel. Could you please fill the following items ?

* Problematic condition
kernel version: 2.6.26
makedumpfile version: 1.2.7

* Successful condition
kernel version: 2.6.16.60 (SLES kernel)
makedumpfile version: 1.1.4 (SLES 10 SP2 version, but in fact that is
1.1.4 although -v displays something different ;-))

Quoted 4 lines
Quoted 2 lines

And could you please test the combination of successful kernel and problematic makedumpfile(1.2.7) ?

That works. Seems to be some kernel change.

Thank you for quick response.

I tried to reproduce this problem on my machine by using an ia64 linux-2.6.26 discontigmem kernel, but it could not do it. makeudmpifle did not fail. I want to know whether this problem depends on the kernel or either the machine. Could you send me the kernel .config file ?

Thanks
Ken'ichi Ohmichi

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#4 lore raw
Quoted 6 lines · Ken'ichi Ohmichi

I tried to reproduce this problem on my machine by using an ia64 linux-2.6.26 discontigmem kernel, but it could not do it. makeudmpifle did not fail. I want to know whether this problem depends on the kernel or either the machine. Could you send me the kernel .config file ?

I think that problem is machine specific. However, here is the .config.

Bernhard

Signature · 1 line
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#5 lore raw

Hi Bernhard,

Quoted 8 lines · Bernhard Walle
Quoted 5 lines · Ken'ichi Ohmichi

I tried to reproduce this problem on my machine by using an ia64 linux-2.6.26 discontigmem kernel, but it could not do it. makeudmpifle did not fail. I want to know whether this problem depends on the kernel or either the machine. Could you send me the kernel .config file ?

I think that problem is machine specific. However, here is the .config.

Thank you for config file.

I'm starting the kernel compiling.
I'll investigate this problem the next week.

Thanks
Ken'ichi Ohmichi

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#6 lore raw
Quoted 5 lines · Ken'ichi Ohmichi

Thank you for config file.

I'm starting the kernel compiling.
I'll investigate this problem the next week.

Thanks in advance.

Bernhard

Signature · 6 lines
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#7 lore raw
In reply to Ken'ichi Ohmichi

Hi Bernhard,

Quoted 11 lines · Ken'ichi Ohmichi
Quoted 6 lines · Ken'ichi Ohmichi
Quoted 4 lines

I tried to reproduce this problem on my machine by using an ia64 linux-2.6.26 discontigmem kernel, but it could not do it. makeudmpifle did not fail. I want to know whether this problem depends on the kernel or either the machine. Could you send me the kernel .config file ?

I think that problem is machine specific. However, here is the .config.

Thank you for config file.

I'm starting the kernel compiling.
I'll investigate this problem the next week.

Unfortunately, the compiled kernel got panic when booting. So I cannot reproduce this problem on my machine yet. I'm trying it again.

BTW, I'd like to know some conditions of this problem. So please let me know the makedumpfile commandline which you run.
Ex. # makedumpfile -d 31 -x vmlinux /proc/vmcore dumpfile

I doubt that makedumpfile cannot distinguish the pgtable correctly. I created the debugging patch. Please run makedumpfile-1.2.7 applied with it by '-D' option, and report the output.
According to your kernel .config file, the output should contain "PAGETABLE_4L : ON".

Thanks
Ken'ichi Ohmichi

---

ia64.c renamed from v1.2.7/ia64.c +8 -9
diff -puN backup/v1.2.7/ia64.c makedumpfile/ia64.c
@@ -67,21 +67,20 @@ get_machdep_info_ia64(void)
 	else
 		info->vmalloc_start = KERNEL_VMALLOC_BASE;
 
-	if ((vt.mem_flags & MEMORY_PAGETABLE_4L)
-	    || (vt.mem_flags & MEMORY_PAGETABLE_3L))
-		return TRUE;
-
 	/*
 	 * Check the pgtable (3 Levels or 4 Levels).
 	 */
-	if (!strncmp(SRCFILE(pud_t), STR_PUD_T_4L, strlen(STR_PUD_T_4L)))
+	if ((vt.mem_flags & MEMORY_PAGETABLE_4L)
+	    || !strncmp(SRCFILE(pud_t), STR_PUD_T_4L, strlen(STR_PUD_T_4L))) {
 		vt.mem_flags |= MEMORY_PAGETABLE_4L;
-
-	else if (!strncmp(SRCFILE(pud_t), STR_PUD_T_3L, strlen(STR_PUD_T_3L)))
+		DEBUG_MSG("PAGETABLE_4L : ON\n");
+	} else if ((vt.mem_flags & MEMORY_PAGETABLE_3L)
+	    || !strncmp(SRCFILE(pud_t), STR_PUD_T_3L, strlen(STR_PUD_T_3L))) {
 		vt.mem_flags |= MEMORY_PAGETABLE_3L;
-
-	else
+		DEBUG_MSG("PAGETABLE_3L : ON\n");
+	} else {
 		MSG("Can't distinguish the pgtable.\n");
+	}
 
 	return TRUE;
 }

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#8 lore raw
Quoted 4 lines · Ken'ichi Ohmichi

BTW, I'd like to know some conditions of this problem. So please let me know the makedumpfile commandline which you run.
Ex. # makedumpfile -d 31 -x vmlinux /proc/vmcore dumpfile

  # makedumpfile -d 3 -D vmcore.sles11 vmcore.sles11.filtered
Quoted 5 lines

I doubt that makedumpfile cannot distinguish the pgtable correctly. I created the debugging patch. Please run makedumpfile-1.2.7 applied with it by '-D' option, and report the output.
According to your kernel .config file, the output should contain "PAGETABLE_4L : ON".

See the attachment.

Bernhard

Signature · 1 line
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#9 lore raw

Hi Bernhard,

Quoted 7 lines · Bernhard Walle
Quoted 3 lines · Ken'ichi Ohmichi

BTW, I'd like to know some conditions of this problem. So please let me know the makedumpfile commandline which you run.
Ex. # makedumpfile -d 31 -x vmlinux /proc/vmcore dumpfile

  # makedumpfile -d 3 -D vmcore.sles11 vmcore.sles11.filtered
Quoted 7 lines
Quoted 5 lines

I doubt that makedumpfile cannot distinguish the pgtable correctly. I created the debugging patch. Please run makedumpfile-1.2.7 applied with it by '-D' option, and report the output.
According to your kernel .config file, the output should contain "PAGETABLE_4L : ON".

See the attachment.

Thanks for the log.
makedumpfile can distinguish the pgtable correctly.

Can the crash utility translate the virtual address 0xa0007fff8f900000 to physical address ? Please run the following subcommand on the crash utility.

crash> vtop 0xa0007fff8f900000

Thanks
Ken'ichi Ohmichi

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#10 lore raw

Hi,

Quoted 16 lines · Ken'ichi Ohmichi
Quoted 7 lines · Bernhard Walle
Quoted 3 lines · Ken'ichi Ohmichi

BTW, I'd like to know some conditions of this problem. So please let me know the makedumpfile commandline which you run.
Ex. # makedumpfile -d 31 -x vmlinux /proc/vmcore dumpfile

  # makedumpfile -d 3 -D vmcore.sles11 vmcore.sles11.filtered
Quoted 7 lines
Quoted 5 lines

I doubt that makedumpfile cannot distinguish the pgtable correctly. I created the debugging patch. Please run makedumpfile-1.2.7 applied with it by '-D' option, and report the output.
According to your kernel .config file, the output should contain "PAGETABLE_4L : ON".

See the attachment.

Quoted 8 lines

Thanks for the log.
makedumpfile can distinguish the pgtable correctly.

Can the crash utility translate the virtual address 0xa0007fff8f900000 to physical address ? Please run the following subcommand on the crash utility.

crash> vtop 0xa0007fff8f900000

crash> vtop 0xa0007fff8f900000
VIRTUAL PHYSICAL
a0007fff8f900000 (not mapped)

PAGE DIRECTORY: a000000100914000
PGD: a000000100914000 => 30030bc000
PUD: e0000030030bfff8 => 30030c0000
PMD: e0000030030c3e38 => 30030c4000
PTE: e0000030030c7200 => 0

But I guess that's normal with virtual memory maps:

$ zgrep VIRTUAL_M /proc/config.gz 
CONFIG_VIRTUAL_MEM_MAP=y

Bernhard

Signature · 9 lines
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development

“Make everything as simple as possible, but not simpler.”
       -- Albert Einstein

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#11 lore raw

Hi,

Quoted 25 lines · Bernhard Walle
Quoted 12 lines
Quoted 12 lines · Ken'ichi Ohmichi
Quoted 3 lines

BTW, I'd like to know some conditions of this problem. So please let me know the makedumpfile commandline which you run.
Ex. # makedumpfile -d 31 -x vmlinux /proc/vmcore dumpfile

  # makedumpfile -d 3 -D vmcore.sles11 vmcore.sles11.filtered
Quoted 5 lines

I doubt that makedumpfile cannot distinguish the pgtable correctly. I created the debugging patch. Please run makedumpfile-1.2.7 applied with it by '-D' option, and report the output.
According to your kernel .config file, the output should contain "PAGETABLE_4L : ON".

See the attachment.

Quoted 8 lines

Thanks for the log.
makedumpfile can distinguish the pgtable correctly.

Can the crash utility translate the virtual address 0xa0007fff8f900000 to physical address ? Please run the following subcommand on the crash utility.

crash> vtop 0xa0007fff8f900000

crash> vtop 0xa0007fff8f900000
VIRTUAL PHYSICAL
a0007fff8f900000 (not mapped)

Quoted 5 lines

PAGE DIRECTORY: a000000100914000
PGD: a000000100914000 => 30030bc000
PUD: e0000030030bfff8 => 30030c0000
PMD: e0000030030c3e38 => 30030c4000
PTE: e0000030030c7200 => 0

Thank you for the report :-)

I'll compare the vtop logic of the crash utility with the one of makedumpfile.

Thanks
Ken'ichi Ohmichi

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#12 lore raw
In reply to Bernhard Walle

Hi Bernhard,

Quoted 32 lines · Bernhard Walle
Quoted 12 lines
Quoted 12 lines · Ken'ichi Ohmichi
Quoted 3 lines

BTW, I'd like to know some conditions of this problem. So please let me know the makedumpfile commandline which you run.
Ex. # makedumpfile -d 31 -x vmlinux /proc/vmcore dumpfile

  # makedumpfile -d 3 -D vmcore.sles11 vmcore.sles11.filtered
Quoted 5 lines

I doubt that makedumpfile cannot distinguish the pgtable correctly. I created the debugging patch. Please run makedumpfile-1.2.7 applied with it by '-D' option, and report the output.
According to your kernel .config file, the output should contain "PAGETABLE_4L : ON".

See the attachment.

Quoted 8 lines

Thanks for the log.
makedumpfile can distinguish the pgtable correctly.

Can the crash utility translate the virtual address 0xa0007fff8f900000 to physical address ? Please run the following subcommand on the crash utility.

crash> vtop 0xa0007fff8f900000

crash> vtop 0xa0007fff8f900000
VIRTUAL PHYSICAL
a0007fff8f900000 (not mapped)

PAGE DIRECTORY: a000000100914000
PGD: a000000100914000 => 30030bc000
PUD: e0000030030bfff8 => 30030c0000
PMD: e0000030030c3e38 => 30030c4000
PTE: e0000030030c7200 => 0

Quoted 4 lines

But I guess that's normal with virtual memory maps:

$ zgrep VIRTUAL_M /proc/config.gz 
CONFIG_VIRTUAL_MEM_MAP=y

Thank you for your help.

I found an ia64 discontigmem kernel problem that the 'pgdat_list.node_mem_map' has an unexpected value, and I created the attached patch for avoiding the problem. If applying this patch, makedumpfile takes mem_map's information from a symbol 'vmem_map' instead of 'pgdat_list.node_mem_map'.
It is for makedumpfile-1.2.8. Could you please test it ?

Note:
This solution needs a symbol 'vmem_map', but vmcoreinfo data in /proc/vmcore does not contain it. So "-x" option is necessary for running makedumpfile like the following.

 # makedumpfile -c -d31 -x vmlinux /proc/vmcore dumpfile

Thanks
Ken'ichi Ohmichi

makedumpfile.c renamed from v1.2.8/makedumpfile.c +20 -5
diff -puN backup/v1.2.8/makedumpfile.c makedumpfile/makedumpfile.c
@@ -1819,6 +1819,7 @@ get_symbol_info()
 	 * Get symbol info.
 	 */
 	SYMBOL_INIT(mem_map, "mem_map");
+	SYMBOL_INIT(vmem_map, "vmem_map");
 	SYMBOL_INIT(mem_section, "mem_section");
 	SYMBOL_INIT(pkmap_count, "pkmap_count");
 	SYMBOL_INIT_NEXT(pkmap_count_next, "pkmap_count");
@@ -2110,6 +2111,7 @@ generate_vmcoreinfo()
 	 * write the symbol of 1st kernel
 	 */
 	WRITE_SYMBOL("mem_map", mem_map);
+	WRITE_SYMBOL("vmem_map", vmem_map);
 	WRITE_SYMBOL("mem_section", mem_section);
 	WRITE_SYMBOL("pkmap_count", pkmap_count);
 	WRITE_SYMBOL("pkmap_count_next", pkmap_count_next);
@@ -2350,6 +2352,7 @@ read_vmcoreinfo()
 		return FALSE;
 
 	READ_SYMBOL("mem_map", mem_map);
+	READ_SYMBOL("vmem_map", vmem_map);
 	READ_SYMBOL("mem_section", mem_section);
 	READ_SYMBOL("pkmap_count", pkmap_count);
 	READ_SYMBOL("pkmap_count_next", pkmap_count_next);
@@ -2912,6 +2915,7 @@ get_mm_discontigmem()
 {
 	int i, j, id_mm, node, num_mem_map, separate_mm = FALSE;
 	unsigned long pgdat, mem_map, pfn_start, pfn_end, node_spanned_pages;
+	unsigned long vmem_map;
 	struct mem_map_data temp_mmd;
 
 	num_mem_map = get_num_mm_discontigmem();
@@ -2924,6 +2928,13 @@ get_mm_discontigmem()
 		separate_mm = TRUE;
 	}
 
+	if (SYMBOL(vmem_map) != NOT_FOUND_SYMBOL) {
+		if (!readmem(VADDR, SYMBOL(vmem_map), &vmem_map, sizeof vmem_map)) {
+			ERRMSG("Can't get vmem_map.\n");
+			return FALSE;
+		}
+	}
+
 	/*
 	 * Get the first node_id.
 	 */
@@ -2937,11 +2948,6 @@ get_mm_discontigmem()
 	}
 	id_mm = 0;
 	for (i = 0; i < vt.numnodes; i++) {
-		if (!readmem(VADDR, pgdat + OFFSET(pglist_data.node_mem_map),
-		    &mem_map, sizeof mem_map)) {
-			ERRMSG("Can't get mem_map.\n");
-			return FALSE;
-		}
 		if (!readmem(VADDR, pgdat + OFFSET(pglist_data.node_start_pfn),
 		    &pfn_start, sizeof pfn_start)) {
 			ERRMSG("Can't get node_start_pfn.\n");
@@ -2954,6 +2960,15 @@ get_mm_discontigmem()
 		}
 		pfn_end = pfn_start + node_spanned_pages;
 
+		if (SYMBOL(vmem_map) == NOT_FOUND_SYMBOL) {
+			if (!readmem(VADDR, pgdat + OFFSET(pglist_data.node_mem_map),
+			    &mem_map, sizeof mem_map)) {
+				ERRMSG("Can't get mem_map.\n");
+				return FALSE;
+			}
+		} else
+			mem_map = vmem_map + SIZE(page) * pfn_start;
+
 		if (separate_mm) {
 			/*
 			 * For some ia64 NUMA systems.
makedumpfile.h renamed from v1.2.8/makedumpfile.h +1 -0
diff -puN backup/v1.2.8/makedumpfile.h makedumpfile/makedumpfile.h
@@ -814,6 +814,7 @@ extern struct vm_table		vt;
 
 struct symbol_table {
 	unsigned long long	mem_map;
+	unsigned long long	vmem_map;
 	unsigned long long	mem_section;
 	unsigned long long	pkmap_count;
 	unsigned long long	pkmap_count_next;

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#13 lore raw
Quoted 47 lines · Ken'ichi Ohmichi

Hi Bernhard,

Quoted 31 lines · Bernhard Walle
Quoted 12 lines
Quoted 12 lines · Ken'ichi Ohmichi
Quoted 3 lines

BTW, I'd like to know some conditions of this problem. So please let me know the makedumpfile commandline which you run.
Ex. # makedumpfile -d 31 -x vmlinux /proc/vmcore dumpfile

  # makedumpfile -d 3 -D vmcore.sles11 vmcore.sles11.filtered
Quoted 5 lines

I doubt that makedumpfile cannot distinguish the pgtable correctly. I created the debugging patch. Please run makedumpfile-1.2.7 applied with it by '-D' option, and report the output.
According to your kernel .config file, the output should contain "PAGETABLE_4L : ON".

See the attachment.

Quoted 8 lines

Thanks for the log.
makedumpfile can distinguish the pgtable correctly.

Can the crash utility translate the virtual address 0xa0007fff8f900000 to physical address ? Please run the following subcommand on the crash utility.

crash> vtop 0xa0007fff8f900000

crash> vtop 0xa0007fff8f900000
VIRTUAL PHYSICAL
a0007fff8f900000 (not mapped)

PAGE DIRECTORY: a000000100914000
PGD: a000000100914000 => 30030bc000
PUD: e0000030030bfff8 => 30030c0000
PMD: e0000030030c3e38 => 30030c4000
PTE: e0000030030c7200 => 0

Quoted 4 lines

But I guess that's normal with virtual memory maps:

$ zgrep VIRTUAL_M /proc/config.gz 
CONFIG_VIRTUAL_MEM_MAP=y

Thank you for your help.

I found an ia64 discontigmem kernel problem that the 'pgdat_list.node_mem_map' has an unexpected value, and I created the attached patch for avoiding the problem. If applying this patch, makedumpfile takes mem_map's information from a symbol 'vmem_map' instead of 'pgdat_list.node_mem_map'.
It is for makedumpfile-1.2.8. Could you please test it ?

Quoted 6 lines

Note:
This solution needs a symbol 'vmem_map', but vmcoreinfo data in /proc/vmcore does not contain it. So "-x" option is necessary for running makedumpfile like the following.

 # makedumpfile -c -d31 -x vmlinux /proc/vmcore dumpfile

Hi Ken'ichi,

Thanks for your patch!

I am wondering if the discontigmem kernel has a legitimate bug, we probably should report it?

I tested your patch on a machine that used to fail in executing 'makedumpfile'. It now generated a dump file fine.

Running 4.0.7.1 crash against the dump file looked good! I will test on other types machines later.

Thanks for your help (and Bernhard's) while i was chasing down a nasty bug that panicked kdump kernel at boot with 2.6.27 kernel on an IA64 machine.

Regards,
- jay

Quoted 98 lines

Thanks
Ken'ichi Ohmichi

diff -puN backup/v1.2.8/makedumpfile.c makedumpfile/makedumpfile.c

makedumpfile.c renamed from v1.2.8/makedumpfile.c +20 -5
@@ -1819,6 +1819,7 @@ get_symbol_info()
 	 * Get symbol info.
 	 */
 	SYMBOL_INIT(mem_map, "mem_map");
+	SYMBOL_INIT(vmem_map, "vmem_map");
 	SYMBOL_INIT(mem_section, "mem_section");
 	SYMBOL_INIT(pkmap_count, "pkmap_count");
 	SYMBOL_INIT_NEXT(pkmap_count_next, "pkmap_count");
@@ -2110,6 +2111,7 @@ generate_vmcoreinfo()
 	 * write the symbol of 1st kernel
 	 */
 	WRITE_SYMBOL("mem_map", mem_map);
+	WRITE_SYMBOL("vmem_map", vmem_map);
 	WRITE_SYMBOL("mem_section", mem_section);
 	WRITE_SYMBOL("pkmap_count", pkmap_count);
 	WRITE_SYMBOL("pkmap_count_next", pkmap_count_next);
@@ -2350,6 +2352,7 @@ read_vmcoreinfo()
 		return FALSE;
 
 	READ_SYMBOL("mem_map", mem_map);
+	READ_SYMBOL("vmem_map", vmem_map);
 	READ_SYMBOL("mem_section", mem_section);
 	READ_SYMBOL("pkmap_count", pkmap_count);
 	READ_SYMBOL("pkmap_count_next", pkmap_count_next);
@@ -2912,6 +2915,7 @@ get_mm_discontigmem()
 {
 	int i, j, id_mm, node, num_mem_map, separate_mm = FALSE;
 	unsigned long pgdat, mem_map, pfn_start, pfn_end, node_spanned_pages;
+	unsigned long vmem_map;
 	struct mem_map_data temp_mmd;
 
 	num_mem_map = get_num_mm_discontigmem();
@@ -2924,6 +2928,13 @@ get_mm_discontigmem()
 		separate_mm = TRUE;
 	}
 
+	if (SYMBOL(vmem_map) != NOT_FOUND_SYMBOL) {
+		if (!readmem(VADDR, SYMBOL(vmem_map), &vmem_map, sizeof vmem_map)) {
+			ERRMSG("Can't get vmem_map.\n");
+			return FALSE;
+		}
+	}
+
 	/*
 	 * Get the first node_id.
 	 */
@@ -2937,11 +2948,6 @@ get_mm_discontigmem()
 	}
 	id_mm = 0;
 	for (i = 0; i < vt.numnodes; i++) {
-		if (!readmem(VADDR, pgdat + OFFSET(pglist_data.node_mem_map),
-		    &mem_map, sizeof mem_map)) {
-			ERRMSG("Can't get mem_map.\n");
-			return FALSE;
-		}
 		if (!readmem(VADDR, pgdat + OFFSET(pglist_data.node_start_pfn),
 		    &pfn_start, sizeof pfn_start)) {
 			ERRMSG("Can't get node_start_pfn.\n");
@@ -2954,6 +2960,15 @@ get_mm_discontigmem()
 		}
 		pfn_end = pfn_start + node_spanned_pages;
 
+		if (SYMBOL(vmem_map) == NOT_FOUND_SYMBOL) {
+			if (!readmem(VADDR, pgdat + OFFSET(pglist_data.node_mem_map),
+			    &mem_map, sizeof mem_map)) {
+				ERRMSG("Can't get mem_map.\n");
+				return FALSE;
+			}
+		} else
+			mem_map = vmem_map + SIZE(page) * pfn_start;
+
 		if (separate_mm) {
 			/*
 			 * For some ia64 NUMA systems.

diff -puN backup/v1.2.8/makedumpfile.h makedumpfile/makedumpfile.h

makedumpfile.h renamed from v1.2.8/makedumpfile.h +1 -1
@@ -814,6 +814,7 @@ extern struct vm_table		vt;
 
 struct symbol_table {
 	unsigned long long	mem_map;
+	unsigned long long	vmem_map;
 	unsigned long long	mem_section;
 	unsigned long long	pkmap_count;
 	unsigned long long	pkmap_count_next;
 
 
 
------------------------------------------------------------------------
Quoted 4 lines

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#14 lore raw

Hi Jay,

Quoted 11 lines · Jay Lan
Quoted 11 lines

I found an ia64 discontigmem kernel problem that the 'pgdat_list.node_mem_map' has an unexpected value, and I created the attached patch for avoiding the problem. If applying this patch, makedumpfile takes mem_map's information from a symbol 'vmem_map' instead of 'pgdat_list.node_mem_map'.
It is for makedumpfile-1.2.8. Could you please test it ?

Note:
This solution needs a symbol 'vmem_map', but vmcoreinfo data in /proc/vmcore does not contain it. So "-x" option is necessary for running makedumpfile like the following.

Quoted 8 lines
Quoted 1 line
 # makedumpfile -c -d31 -x vmlinux /proc/vmcore dumpfile

Hi Ken'ichi,

Thanks for your patch!

I am wondering if the discontigmem kernel has a legitimate bug, we probably should report it?

Yes, we should.
I'm investigating this problem more to report it.

Quoted 4 lines

I tested your patch on a machine that used to fail in executing 'makedumpfile'. It now generated a dump file fine.

Running 4.0.7.1 crash against the dump file looked good!

Thank you for your testing.
It is a good news to me, and I will merge the patch into the next makedumpfile.

Quoted 1 line

I will test on other types machines later.

Thanks too.

Thanks
Ken'ichi Ohmichi

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#15 lore raw
In reply to Jay Lan

Hi Ken'ichi Ohmichi,

Quoted 8 lines · Jay Lan

Thanks for your patch!

I am wondering if the discontigmem kernel has a legitimate bug, we probably should report it?

I tested your patch on a machine that used to fail in executing 'makedumpfile'. It now generated a dump file fine.

thanks for the patch, I can also report that with the patch and with vmlinux it works now. However, shouldn't we add that vmem_map to VMCOREINFO of the kernel?

Thanks also Jay for testing!

Bernhard

Signature · 6 lines
Bernhard Walle, SUSE Linux Products GmbH, Architecture Development

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#16 lore raw

PATCH 1/1 Fix the difference between node_mem_map and node_start_pfn. (Re: makedumpfile fails on SGI machine)

Hi Bernhard, Jay,

Quoted 5 lines · Bernhard Walle

Hi Ken'ichi Ohmichi,

Quoted 2 lines · Jay Lan

Thanks for your patch!

Quoted 8 lines
Quoted 5 lines

I am wondering if the discontigmem kernel has a legitimate bug, we probably should report it?

I tested your patch on a machine that used to fail in executing 'makedumpfile'. It now generated a dump file fine.

thanks for the patch, I can also report that with the patch and with vmlinux it works now.

Thank you for the report. It's a good news :-)

Quoted 1 line

However, shouldn't we add that vmem_map to VMCOREINFO of the kernel?

I think that we would rather fix the kernel bug than add vmem_map to VMCOREINFO of the kernel. If fixing it, makedumpfile does not need vmem_map.

The attached patch fixes the kernel bug, and makedumpfile can work without '-x' option. I tested it on my ia64 none-NUMA machine, and it works fine. Could you test the attached patch on your machine again ?

Thanks
Ken'ichi Ohmichi

---
[PATCH][ia64] Fix the difference between node_mem_map and node_start_pfn.

makedumpfile[1] cannot run on ia64 discontigmem kernel, because the member node_mem_map of struct pgdat_list has invalid value. This patch fixes it.

node_start_pfn shows the start pfn of each node, and node_mem_map should point 'struct page' of each node's node_start_pfn.
On my machine, node0's node_start_pfn shows 0x400 and its node_mem_map points 0xa0007fffbf000000. This address is the same as vmem_map, so the node_mem_map points 'struct page' of pfn 0, even if its node_start_pfn shows 0x400.

The cause is due to the round down of min_pfn in count_node_pages(). This patch fixes it.

makedumpfile[1]: dump filtering command
https://sourceforge.net/projects/makedumpfile/

---

arch/ia64/mm/discontig.c +0 -1
@@ -631,7 +631,6 @@ static __init int count_node_pages(unsig
 			(min(end, __pa(MAX_DMA_ADDRESS)) - start) >>PAGE_SHIFT;
 #endif
 	start = GRANULEROUNDDOWN(start);
-	start = ORDERROUNDDOWN(start);
 	end = GRANULEROUNDUP(end);
 	mem_data[node].max_pfn = max(mem_data[node].max_pfn,
 				     end >> PAGE_SHIFT);
include/asm-ia64/meminit.h +0 -1
@@ -47,7 +47,6 @@ extern int reserve_elfcorehdr(unsigned l
  */
 #define GRANULEROUNDDOWN(n)	((n) & ~(IA64_GRANULE_SIZE-1))
 #define GRANULEROUNDUP(n)	(((n)+IA64_GRANULE_SIZE-1) & ~(IA64_GRANULE_SIZE-1))
-#define ORDERROUNDDOWN(n)	((n) & ~((PAGE_SIZE<<MAX_ORDER)-1))
 
 #ifdef CONFIG_NUMA
   extern void call_pernode_memory (unsigned long start, unsigned long len, void *func);

_

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#17 lore raw

Re: [PATCH][ia64] Fix the difference between node_mem_map and node_start_pfn. (Re: makedumpfile fails on SGI machine)

Hi,

Quoted 11 lines · Ken'ichi Ohmichi
Quoted 3 lines

However, shouldn't we add that vmem_map to VMCOREINFO of the kernel?

I think that we would rather fix the kernel bug than add vmem_map to VMCOREINFO of the kernel. If fixing it, makedumpfile does not need vmem_map.

The attached patch fixes the kernel bug, and makedumpfile can work without '-x' option. I tested it on my ia64 none-NUMA machine, and it works fine. Could you test the attached patch on your machine again ?

Thanks for the patch! This works fine on my machine.

Bernhard

Bernhard

Signature · 6 lines
Bernhard Walle, SUSE Linux Products GmbH, Architecture Development

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#19 lore raw

Re: [PATCH][ia64] Fix the difference between node_mem_map and node_start_pfn. (Re: makedumpfile fails on SGI machine)

In reply to Ken'ichi Ohmichi
Quoted 11 lines · Ken'ichi Ohmichi

Hi Bernhard, Jay,

Quoted 8 lines · Bernhard Walle

Hi Ken'ichi Ohmichi,

Quoted 5 lines · Jay Lan

Thanks for your patch!

I am wondering if the discontigmem kernel has a legitimate bug, we probably should report it?

Quoted 9 lines
Quoted 4 lines
Quoted 2 lines

I tested your patch on a machine that used to fail in executing 'makedumpfile'. It now generated a dump file fine.

thanks for the patch, I can also report that with the patch and with vmlinux it works now.

Thank you for the report. It's a good news :-)

Quoted 1 line

However, shouldn't we add that vmem_map to VMCOREINFO of the kernel?

Hmm, it failed on a shub2 machine. (The previous on that worked was a shub1 machine, an A3700. An A4700 is a shub2.) I assumed the warning about kernel version 2.6.27 not supported was harmless?

a4700rac:~ # /bin/makedumpfile-1.2.7-0.2 -c -d31 -x /boot/vmlinux-2.6.27-rc4-vanilla /proc/vmcore /diskdump/dumpfile Can't distinguish the pgtable.
The kernel version is not supported.
The created dumpfile may be incomplete.
Excluding unnecessary pages : [ 0 %] readmem: Can't convert a
virtual address(a07ffff9df8f5800) to offset.
create_2nd_bitmap: Can't exclude unnecessary pages.

makedumpfile Failed.
a4700rac:~ #

I will try your kernel patch next.

Regards,
- jay

Quoted 58 lines

I think that we would rather fix the kernel bug than add vmem_map to VMCOREINFO of the kernel. If fixing it, makedumpfile does not need vmem_map.

The attached patch fixes the kernel bug, and makedumpfile can work without '-x' option. I tested it on my ia64 none-NUMA machine, and it works fine. Could you test the attached patch on your machine again ?

Thanks
Ken'ichi Ohmichi

---
[PATCH][ia64] Fix the difference between node_mem_map and node_start_pfn.

makedumpfile[1] cannot run on ia64 discontigmem kernel, because the member node_mem_map of struct pgdat_list has invalid value. This patch fixes it.

node_start_pfn shows the start pfn of each node, and node_mem_map should point 'struct page' of each node's node_start_pfn.
On my machine, node0's node_start_pfn shows 0x400 and its node_mem_map points 0xa0007fffbf000000. This address is the same as vmem_map, so the node_mem_map points 'struct page' of pfn 0, even if its node_start_pfn shows 0x400.

The cause is due to the round down of min_pfn in count_node_pages(). This patch fixes it.

makedumpfile[1]: dump filtering command
https://sourceforge.net/projects/makedumpfile/

---

arch/ia64/mm/discontig.c +0 -1
@@ -631,7 +631,6 @@ static __init int count_node_pages(unsig
 			(min(end, __pa(MAX_DMA_ADDRESS)) - start) >>PAGE_SHIFT;
 #endif
 	start = GRANULEROUNDDOWN(start);
-	start = ORDERROUNDDOWN(start);
 	end = GRANULEROUNDUP(end);
 	mem_data[node].max_pfn = max(mem_data[node].max_pfn,
 				     end >> PAGE_SHIFT);
include/asm-ia64/meminit.h +0 -1
@@ -47,7 +47,6 @@ extern int reserve_elfcorehdr(unsigned l
  */
 #define GRANULEROUNDDOWN(n)	((n) & ~(IA64_GRANULE_SIZE-1))
 #define GRANULEROUNDUP(n)	(((n)+IA64_GRANULE_SIZE-1) & ~(IA64_GRANULE_SIZE-1))
-#define ORDERROUNDDOWN(n)	((n) & ~((PAGE_SIZE<<MAX_ORDER)-1))
 
 #ifdef CONFIG_NUMA
   extern void call_pernode_memory (unsigned long start, unsigned long len, void *func);

_

Quoted 6 lines

------------------------------------------------------------------------

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#20 lore raw

Re: [PATCH][ia64] Fix the difference between node_mem_map and node_start_pfn. (Re: makedumpfile fails on SGI machine)

Quoted 34 lines · Jay Lan
Quoted 8 lines · Ken'ichi Ohmichi

Hi Bernhard, Jay,

Quoted 5 lines · Bernhard Walle

Hi Ken'ichi Ohmichi,

Quoted 2 lines · Jay Lan

Thanks for your patch!

Quoted 11 lines
Quoted 7 lines
Quoted 5 lines

I am wondering if the discontigmem kernel has a legitimate bug, we probably should report it?

I tested your patch on a machine that used to fail in executing 'makedumpfile'. It now generated a dump file fine.

thanks for the patch, I can also report that with the patch and with vmlinux it works now.

Thank you for the report. It's a good news :-)

Quoted 1 line

However, shouldn't we add that vmem_map to VMCOREINFO of the kernel?

Hmm, it failed on a shub2 machine. (The previous on that worked was a shub1 machine, an A3700. An A4700 is a shub2.) I assumed the warning about kernel version 2.6.27 not supported was harmless?

a4700rac:~ # /bin/makedumpfile-1.2.7-0.2 -c -d31 -x /boot/vmlinux-2.6.27-rc4-vanilla /proc/vmcore /diskdump/dumpfile Can't distinguish the pgtable.
The kernel version is not supported.
The created dumpfile may be incomplete.
Excluding unnecessary pages : [ 0 %] readmem: Can't convert a
virtual address(a07ffff9df8f5800) to offset.
create_2nd_bitmap: Can't exclude unnecessary pages.

Quoted 2 lines

makedumpfile Failed.
a4700rac:~ #

Sorry, it was from makedumpfile-1.2.7-0.2. I should have used 1.2.8.

Here is another test. I used 2.6.26 kernel with your kernel patch and 1.2.8 makedumpfile.

a4700rac:~ # /bin/makedumpfile-1.2.8 -c -d31 -D /proc/vmcore /diskdump/dumpfile

LOAD (0)
phys_start : 6044000000
phys_end : 60447bd920
virt_start : a000000100000000
virt_end : a0000001007bd920
[bunch of other LOAD messages]

Linux kdump

max_mapnr : 2069efeb

num of NODEs : 33

Memory type : DISCONTIGMEM

mem_map (0)

  mem_map    : 0
  pfn_start  : 0
  pfn_end    : 600300

[bunch of other mem_map messages]

Copying data : [ 0 %]

Oops, the kdump kernel MCA'ed at this point! The system was rebooted. But at least makedumpfile understood the /proc/vmcore.

I think MCA on copying data is a different issue. It MCA'ed even on 'cp /proc/vmcore /diskdump/vmcore' :(

- jay

Quoted 57 lines

I will try your kernel patch next.

Regards,
- jay

Quoted 51 lines

I think that we would rather fix the kernel bug than add vmem_map to VMCOREINFO of the kernel. If fixing it, makedumpfile does not need vmem_map.

The attached patch fixes the kernel bug, and makedumpfile can work without '-x' option. I tested it on my ia64 none-NUMA machine, and it works fine. Could you test the attached patch on your machine again ?

Thanks
Ken'ichi Ohmichi

---
[PATCH][ia64] Fix the difference between node_mem_map and node_start_pfn.

makedumpfile[1] cannot run on ia64 discontigmem kernel, because the member node_mem_map of struct pgdat_list has invalid value. This patch fixes it.

node_start_pfn shows the start pfn of each node, and node_mem_map should point 'struct page' of each node's node_start_pfn.
On my machine, node0's node_start_pfn shows 0x400 and its node_mem_map points 0xa0007fffbf000000. This address is the same as vmem_map, so the node_mem_map points 'struct page' of pfn 0, even if its node_start_pfn shows 0x400.

The cause is due to the round down of min_pfn in count_node_pages(). This patch fixes it.

makedumpfile[1]: dump filtering command
https://sourceforge.net/projects/makedumpfile/

---

arch/ia64/mm/discontig.c +0 -1
@@ -631,7 +631,6 @@ static __init int count_node_pages(unsig
 			(min(end, __pa(MAX_DMA_ADDRESS)) - start) >>PAGE_SHIFT;
 #endif
 	start = GRANULEROUNDDOWN(start);
-	start = ORDERROUNDDOWN(start);
 	end = GRANULEROUNDUP(end);
 	mem_data[node].max_pfn = max(mem_data[node].max_pfn,
 				     end >> PAGE_SHIFT);
include/asm-ia64/meminit.h +0 -1
@@ -47,7 +47,6 @@ extern int reserve_elfcorehdr(unsigned l
  */
 #define GRANULEROUNDDOWN(n)	((n) & ~(IA64_GRANULE_SIZE-1))
 #define GRANULEROUNDUP(n)	(((n)+IA64_GRANULE_SIZE-1) & ~(IA64_GRANULE_SIZE-1))
-#define ORDERROUNDDOWN(n)	((n) & ~((PAGE_SIZE<<MAX_ORDER)-1))
 
Quoted 3 lines
Quoted 3 lines
include/asm-ia64/meminit.h +0 -0
 #ifdef CONFIG_NUMA
   extern void call_pernode_memory (unsigned long start, unsigned long len, void *func);

_

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#21 lore raw

Re: [PATCH][ia64] Fix the difference between node_mem_map and node_start_pfn. (Re: makedumpfile fails on SGI machine)

Hi Jay,

Quoted 4 lines · Jay Lan

Copying data : [ 0 %]

Oops, the kdump kernel MCA'ed at this point! The system was rebooted. But at least makedumpfile understood the /proc/vmcore.

Thank you for the test.
It is a good news that makedumpfile understood /proc/vmcore.

Quoted 2 lines

I think MCA on copying data is a different issue. It MCA'ed even on 'cp /proc/vmcore /diskdump/vmcore' :(

I also think that is a different issue.

Thanks
Ken'ichi Ohmichi

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#18 lore raw

Re: [PATCH][ia64] Fix the difference between node_mem_map and node_start_pfn. (Re: makedumpfile fails on SGI machine)

In reply to Bernhard Walle

Hi Bernhard,

Quoted 10 lines · Bernhard Walle
Quoted 8 lines
Quoted 1 line

However, shouldn't we add that vmem_map to VMCOREINFO of the kernel?

I think that we would rather fix the kernel bug than add vmem_map to VMCOREINFO of the kernel. If fixing it, makedumpfile does not need vmem_map.

The attached patch fixes the kernel bug, and makedumpfile can work without '-x' option. I tested it on my ia64 none-NUMA machine, and it works fine. Could you test the attached patch on your machine again ?

Thanks for the patch! This works fine on my machine.

Thank you for the testing !
I'll send this patch to linux-mm.

Thanks
Ken'ichi Ohmichi

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec