Subject: Re: Savecore Complexity Questions
To: Devon H. O'Dell <devon.odell@coyotepoint.com>
From: Brian Buhrow <buhrow@lothlorien.nfbcal.org>
List: tech-kern
Date: 12/10/2007 09:31:23
	Hello.  I think the reason for all that complexity is because there is
no guarantee that a very stale core image won't be erased from the swap
partition during subsequent runs after the actual crash.  In other words,
it is an attempt to implement the policy that a savecore is only written
to /var/crash the first time a machine reboots after a panic and crash
dump.  Just opening the swap partition, looking for a core header, and
writing to /var/crash pretty much guarantees you'll be writing a /var/crash
image every time a machine reboots.
	One way to work around this problem, perhaps, without implementing the
complexity you're trying to deal with, is to introduce a swap scrubber into
the boot sequence.  The idea here is that the core header could be erased
from the dump partition after savecore is run, but before swapping is
enabled.  This mechanism is probably not full proof, because it doesn't
account for machines which don't make it to multiuser mode between reboots,
but it probably does cover 90% of the installations.
-Brian
On Dec 10, 12:05pm, "Devon H. O'Dell" wrote:
} Subject: Savecore Complexity Questions
} Hey guys,
} 
} After getting the initial minidump, I started working on modifying 
} savecore / libkvm to store it to disk. I'm kind of at a point where I 
} feel like this isn't the right solution and am questioning savecore's 
} current complexity. For instance, it seems like it will refuse to save a 
} core if the kernel that cored does not match the currently running 
} kernel, and it relies on libkvm for reading the core header, the core 
} itself, and writing it to the disk.
} 
} This seems to be needlessly complex. I don't understand why savecore 
} shouldn't just open the configured dump partition, poke around for the 
} core magic, and just write what it finds to disk. (So this is what I'm 
} planning on implementing and have actually begun work on).
} 
} Does anybody have other / better suggestions about this (or information 
} on why savecore has all this -- what seems to me to be needless -- 
} complexity)?
} 
} Thanks,
} 
} --dho
>-- End of excerpt from "Devon H. O'Dell"