The SUSE SLES 9 "bigsmp" kernel configuration defines NR_CPUS == 128. That
causes DUMP_BUFFER_SIZE_MIN to be set to 112 KiB. That is greater than
the default for DUMP_BUFFER_SIZE (which is 64 KiB). Which has the effect
of causing the first page of memory to start 48 KiB farther into the dump
file than crash(1) expects. Which in turn causes crash(1) to croak with a
"conflicting page" error as it tries to handle a bunch of nulls as valid
page data.
The solution is to have crash(1) honor the dh_dump_buffer_size member
of struct __dump_header rather than using the hard-coded constant
LKCD_OFFSET_TO_FIRST_PAGE in lkcd_dump_init_v8(). Of course, that
structure member only exists in version 9 dumps but it didn't seem
worthwhile to create a lkcd_v9.c file just for this one difference.
On the other hand LKCD_OFFSET_TO_FIRST_PAGE is also used in
mclx_cache_page_headers_v8(). The following patch is the minimalist
approach to dealing with this.
--- lkcd_v8.c.old 2005-11-17 03:19:54.246463152 -0800
+++ lkcd_v8.c 2005-11-17 03:22:29.425872296 -0800
@@ -26,6 +26,7 @@ static dump_header_t dump_header_v8 = {
// static dump_header_asm_t dump_header_asm_v8 = { 0 };
static dump_page_t dump_page = { 0 };
static void mclx_cache_page_headers_v8(void);
+static off_t lkcd_offset_to_first_page = LKCD_OFFSET_TO_FIRST_PAGE;
/*
* Verify and initialize the LKCD environment, storing the common data
@@ -146,7 +147,8 @@ lkcd_dump_init_v8(FILE *fp, int fd, char
lkcd->compression = dh->dh_dump_compress;
lkcd->page_header_size = sizeof(dump_page_t);
- lseek(lkcd->fd, LKCD_OFFSET_TO_FIRST_PAGE, SEEK_SET);
+ lkcd_offset_to_first_page = dh_dump_buffer_size;
+ lseek(lkcd->fd, lkcd_offset_to_first_page, SEEK_SET);
/*
* Read all of the pages and save the page offsets for lkcd_lseek().
@@ -483,7 +485,7 @@ mclx_cache_page_headers_v8(void)
/*
* Determine the granularity between offsets.
*/
- if (lseek(lkcd->fd, page_headers[0] + LKCD_OFFSET_TO_FIRST_PAGE,
+ if (lseek(lkcd->fd, page_headers[0] + lkcd_offset_to_first_page,
SEEK_SET) == -1)
return;
if (read(lkcd->fd, dp, lkcd->page_header_size) !=
@@ -491,7 +493,7 @@ mclx_cache_page_headers_v8(void)
return;
physaddr1 = (dp->dp_address - lkcd->kvbase) << lkcd->page_shift;
- if (lseek(lkcd->fd, page_headers[1] + LKCD_OFFSET_TO_FIRST_PAGE,
+ if (lseek(lkcd->fd, page_headers[1] + lkcd_offset_to_first_page,
SEEK_SET) == -1)
return;
if (read(lkcd->fd, dp, lkcd->page_header_size)
@@ -508,7 +510,7 @@ mclx_cache_page_headers_v8(void)
for (i = 0; i < (MCLX_PAGE_HEADERS-1); i++) {
if (!page_headers[i])
break;
- lkcd->curhdroffs = page_headers[i] + LKCD_OFFSET_TO_FIRST_PAGE;
+ lkcd->curhdroffs = page_headers[i] + lkcd_offset_to_first_page;
set_mb_benchmark((granularity * (i+1))/lkcd->page_size);
}
}
--
Kurtis D. Rader, Level 3 Linux Support
ABC Service Center, Linux Change Team
T/L 775-3714, DID +1 503-578-3714