Repeatable crash with 5.4-p1-RELEASE and SMP

Robert Watson rwatson at FreeBSD.org
Sat Jun 4 10:05:14 GMT 2005


On Sat, 4 Jun 2005, Palle Girgensohn wrote:

> Anyway, I have managed to get an automatic reboot and a core dump. Giant 
> leap for mankind :-) . It looks kind of partly overwritten, though. 
> According to the Developer's handbook, the core should be saved *before* 
> the swap partition is added to the system. I can easily verifying that 
> this is not the case, the swap is "mounted" first. I once again raise 
> the question if PR conf/73834 shouln't be addressed? Or perhaps my core 
> dump is quite normal? Doesn't look like it. In rc.conf, I have:

I can't speak to the crash itself, but regarding swap and cores: the 
problem is that fsck requires quite a lot of memory in order to operate on 
large file systems, so you have to configure swap before you fsck. 
However, you can't write the core dump to the file system until it has 
been fsck'd.  Normally, if fsck actually uses swap, it will overwrite the 
core dump header, and savecore will recognize that the entire dump is 
invalidated, so usually you don't see the corrupted core, just that the 
core is missing.  Whether this happens depends on how large your file 
systems are, how many you have (since fsck runs in parallel), and how much 
memory you have.  If you want to be sure this doesn't happen, boot to 
single user mode after the crash, manually fsck without swap enabled (fsck 
-p), mount -a, then "sh /etc/rc.d/savecore start" to save the core.

My suspicion is that the corruption you're seeing is not a property of 
swap being started, but it's easy to rule out if you have a reproduceable 
crash and can be there to boot single-user after the reboot.

Robert N M Watson


More information about the freebsd-stable mailing list