Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Mar 2005 13:49:24 -0800
From:      <Vijay.Singh@nokia.com>
To:        <dnelson@allantgroup.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   RE: partial memory dump
Message-ID:  <E40595640FD457418D8F9005C2BEC84901BE6F3C@mvebe001.americas.nokia.com>

next in thread | raw e-mail | index | archive | help

Hi, thanks for the quick reply. I do indeed write the bitmap, which is a part of the sysdump_hdr structure to the disk. The disk routine does not currently report that it had to miss any block. Here is what I get from dadump().

dumpsys() in machdep.c
	dumping to dev 20401, offset 0

dadump()
	dodump: 1
	USRSTACK: 0xbfbfc000 to 0xe6fa5000
	Maxmem: 524288, secsize: 512
	dumplo: 0, num: 84872, size: 2097152
	next block to write: 90640 @ 8 blocks/req
	Dumping bitmap at addr e6fa5000 to sec 16210, 88 sectors
	next block to write: 90776 @ 8 blocks/req
	Dumping 0x2960 pages of memory to sec 0x16298, 0x14b00 sectors


This version of dadump() does not implement write combining yet. Do you think savecore is not able to find the data blocks correctly in the swap?

br
vijay

-----Original Message-----
From: ext Dan Nelson [mailto:dnelson@allantgroup.com]
Sent: Tuesday, March 08, 2005 1:40 PM
To: Singh Vijay (Nokia-NET/MtView)
Cc: freebsd-hackers@freebsd.org
Subject: Re: partial memory dump


In the last episode (Mar 08), Vijay.Singh@nokia.com said:
> Hello all. I am trying to allow a FreeBSD based kernel to crash dump
> even if configured swap is not enough to fill entire physical memory.
> This is because there could be 2G RAM on the system. I assume that
> most pages would not be mapped.
> 
> The algorithm to do this is to have a bitmask, with bits set for
> pages: from 0 to Maxmem, and then adding pages from USRSTACK to
> vm_map_max(kmem_map).  This is done in scsi_da.c, dadump() routine. I
> am able to get the dump, and after savecore collects it from swap I
> get the kernel and core files. However I am not able to get the stack
> trace.

I think you also need to write that bitmap to disk so that savecore can
read it and put the data blocks in the right place in the vmcore file. 
You want to end up a with a sparse file, with blank spots every place
dadump skipped a block.

-- 
	Dan Nelson
	dnelson@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E40595640FD457418D8F9005C2BEC84901BE6F3C>