partial memory dump

Vijay.Singh at nokia.com Vijay.Singh at nokia.com
Tue Mar 8 13:50:38 PST 2005


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 at allantgroup.com]
Sent: Tuesday, March 08, 2005 1:40 PM
To: Singh Vijay (Nokia-NET/MtView)
Cc: freebsd-hackers at freebsd.org
Subject: Re: partial memory dump


In the last episode (Mar 08), Vijay.Singh at 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 at allantgroup.com


More information about the freebsd-hackers mailing list