FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 01-30-2009, 01:59 PM
Dave Anderson
 
Default crash: execution machine pagesize differs

----- "Cliff Wickman" <cpw@sgi.com> wrote:

> This patch allows a machine to read a dump when that dump was taken on
> a machine with a larger page size.
> e.g. we had a dump of a 64k pagesize system, and ran crash on a
> machine with a 16k pagesize.
>
> Diffed against crash-4.0-7.6
>
> Signed-off-by: Cliff Wickman <cpw@sgi.com>

That issue was discussed and addressed earlier this month. Patches were
posted by Robin Holt and Bernhard Walle, and I've queued the latest set
for the next release.

FYI, these are the threads:

[Crash-utility] [Patch] ia64 block_size mismatch issue.
https://www.redhat.com/archives/crash-utility/2009-January/msg00001.html

https://www.redhat.com/archives/crash-utility/2009-January/msg00013.html
[Crash-utility] [PATCH] Add support for 'foreign' page sizes in kdump dumps

Thanks,
Dave


>
> ---
> diskdump.c | 25 +++++++++++++++++++------
> tools.c | 2 ++
> 2 files changed, 21 insertions(+), 6 deletions(-)
>
> Index: crash-4.0-7.6.ia64/diskdump.c
> ================================================== =================
> --- crash-4.0-7.6.ia64.orig/diskdump.c
> +++ crash-4.0-7.6.ia64/diskdump.c
> @@ -107,7 +107,7 @@ static int read_dump_header(char *file)
> struct disk_dump_sub_header *sub_header = NULL;
> struct kdump_sub_header *sub_header_kdump = NULL;
> int bitmap_len;
> - const int block_size = (int)sysconf(_SC_PAGESIZE);
> + int block_size = (int)sysconf(_SC_PAGESIZE);
> off_t offset;
> const off_t failed = (off_t)-1;
> ulong pfn;
> @@ -165,12 +165,25 @@ static int read_dump_header(char *file)
> machine_type_mismatch(file, "PPC64", NULL, 0))
> goto err;
>
> - if (header->block_size != block_size) {
> - error(INFO, "%s: block size in the dump header does not match"
> - " with system page size
",
> - DISKDUMP_VALID() ? "diskdump" : "compressed kdump");
> - goto err;
> + /*
> + * Up to here, the header was assumed to be one page in size.
> + * We checked utsname and signature, which are up front in the
> + * header. But all of the task array may not have been entirely
> + * read if the executing machines's page size is smaller than that
> + * of the dumped machine.
> + * Re-read the entire header if its block_size is bigger than the
> + * executing machine's page size.
> + */
> + if (header->block_size > block_size) {
> + block_size = header->block_size;
> + free(header);
> + if ((header = malloc(block_size)) == NULL)
> + error(FATAL,
> + "diskdump / compressed kdump: cannot malloc block_size
> buffer
");
> + lseek(dd->dfd, 0, SEEK_SET);
> + read(dd->dfd, header, block_size);
> }
> +
> dd->block_size = block_size;
> dd->block_shift = ffs(block_size) - 1;

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 01-30-2009, 02:17 PM
Cliff Wickman
 
Default crash: execution machine pagesize differs

Never mind!
As Hedi Berriche pointed out, Bernhard Walle fixed this 2 weeks ago.

> This patch allows a machine to read a dump when that dump was taken on
> a machine with a larger page size.
> e.g. we had a dump of a 64k pagesize system, and ran crash on a
> machine with a 16k pagesize.
>
> Diffed against crash-4.0-7.6
>

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 

Thread Tools




All times are GMT. The time now is 10:05 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org