svn commit: r254992 - head/etc/rc.d

Konstantin Belousov kostikbel at gmail.com
Wed Aug 28 15:52:21 UTC 2013


On Wed, Aug 28, 2013 at 03:12:16PM +0000, Gavin Atkinson wrote:
> Author: gavin
> Date: Wed Aug 28 15:12:15 2013
> New Revision: 254992
> URL: http://svnweb.freebsd.org/changeset/base/254992
> 
> Log:
>   After writing a kernel core dump into /var/crash, call sync(8).
>   
>   If we panic again shortly after boot (say, within 30 seconds), any core
>   dump we wrote out may be lost on reboot.  In this situation, we really
>   want to keep that core file, as it may be the only way to have the issue
>   resolved.  Call sync(8) after writing out the core file and running
>   crashinfo(8), in the hope that these will not be lost if we panic
>   again.  sync(8) is only called in the case where there is a core dump
>   to be written out, so won't be called during normal boots.
>   
>   Discovered by:	Trying to debug an IPSEC panic
>   MFC after:	1 week
> 
> Modified:
>   head/etc/rc.d/savecore
> 
> Modified: head/etc/rc.d/savecore
> ==============================================================================
> --- head/etc/rc.d/savecore	Wed Aug 28 14:49:36 2013	(r254991)
> +++ head/etc/rc.d/savecore	Wed Aug 28 15:12:15 2013	(r254992)
> @@ -70,6 +70,7 @@ savecore_start()
>  		if checkyesno crashinfo_enable; then
>  			${crashinfo_program} -d ${dumpdir}
>  		fi
> +		sync
>  	else
>  		check_startmsgs && echo 'No core dumps found.'
>  	fi
The crashinfo(8) runs are usually quite long, and the program does not
add a new information comparing to the data already present in the
crash dump itself.  For your goal, it is more useful to sync before
crashinfo(8) invocation.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20130828/950049bd/attachment.sig>


More information about the svn-src-all mailing list