Date: Wed, 28 Aug 2013 18:52:16 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Gavin Atkinson <gavin@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r254992 - head/etc/rc.d Message-ID: <20130828155216.GC4972@kib.kiev.ua> In-Reply-To: <201308281512.r7SFCGMx088267@svn.freebsd.org> References: <201308281512.r7SFCGMx088267@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--/NYYpGNRSM/gwMtc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 >=20 > Log: > After writing a kernel core dump into /var/crash, call sync(8). > =20 > 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. > =20 > Discovered by: Trying to debug an IPSEC panic > MFC after: 1 week >=20 > Modified: > head/etc/rc.d/savecore >=20 > Modified: head/etc/rc.d/savecore > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- 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. --/NYYpGNRSM/gwMtc Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQIcBAEBAgAGBQJSHhyvAAoJEJDCuSvBvK1BwFYP/3CYBizsxhWyWmWKg4xIa9zZ CQsB+MTe90ouCfs2B9oAuf7aUo8SwIvEapgCtpSQF2FXf/b3VqZdxZqkppqQAK+7 5PzcyqiaaT/s5oUTaB4Gp6KqaYIo3lzWvr7myFSYHQQjZlfPPH9vFg7VPIjGszr3 mLYEC39D9r5yEicRiQBerKVfmtlmErec4XHhSyEl9wagwD4AfQ/f4vLaxSVnKU/c jV78fhktsxcaPtzATljdeWgMjoEbu9vLJiyZSWyHZBLiYES2iM5ErulQyUi2u98c TWjkb9hRNNSgMZuxVAOb1Z9te8z9dKWoU4QWkdkDiHMzlEGeSys19D/TJNhbeXIH yAUNMS9fzFnRayFkSccJLoHvTi0CG5Dopapcc8tP7O5S00VdANLXf3sUe87PTx5H IRpo8kqp1WgD8LeXVFAvhM5RB6H0V9vJh9Kwo0zpxSFKMgRdmqZRtvx/ddDLHSEe eaG+nxGoL3CJtSJGAIg0fqiLv6dz8rVkhNAbidxb5D3R5p6uUU1Jkqhk3CjKGSf/ 4K+r6dBhorDniKLv6xuw9YAW3dWJWwnNg5dgkZXBYkx+CIkXPjzll3dSSNUU9JcV rviTbDjOnf6buetYOKeEXtn0sjKicXhIfytyhMeswZnqBj5Ky18NAaiZHcTlbFpD J2NjKutFnVZZpdSu6MRE =dRWs -----END PGP SIGNATURE----- --/NYYpGNRSM/gwMtc--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130828155216.GC4972>