Date: Thu, 19 Mar 2009 18:02:51 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: John Baldwin <jhb@freebsd.org> Cc: freebsd-stable@freebsd.org Subject: Re: in recent 7-STABLE: VOP_WRITE...is not exclusive locked but should be Message-ID: <20090319160251.GJ7716@deviant.kiev.zoral.com.ua> In-Reply-To: <200903191001.44491.jhb@freebsd.org> References: <alpine.LFD.2.00.0903190639450.9228@cardinal> <200903191001.44491.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--XigHxYirkHk2Kxsx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 19, 2009 at 10:01:44AM -0400, John Baldwin wrote: > On Thursday 19 March 2009 8:05:34 am Tim Chase wrote: > > Hello, > >=20 > > I have a system that had been running quite well with an oldish 7-STABLE > > (from around August 7, 2008) but has started deadlocking within the past > > week or so. > >=20 > > I updated the kernel to a newer 7-STABLE (Mar 15, 2009) and enabled > > INVARIANTS, INVARIANT_SUPPORT, WITNESS, DEBUG_LOCKS DEBUG_VFS_LOCKS and > > DIAGNOSTIC and the message indicated in the subject line has now appear= ed > > 3 times as shown below. Is this something to be terribly concerned abo= ut? > > Is there anything I can to to further track down the cause? Since the > > system is a production mail server, I have it set to not drop into DDB > > when this happens. > >=20 > > The machine is a 4-core Xeon X5450 with 8G of RAM running FreeBSD > > amd64 and in userland it's pretty much just cyrus imapd and apache/php. > > The file systems are all ZFS on a bunch of SAS drives connected to a > > LSI Logic 1068 controller. > >=20 > > As to the deadlock that started this exercise, if the machine follows i= ts > > recent pattern, that should happen within the next 2-4 hours. >=20 > Err, the vn_write() routine should be using an exclusive vnode lock: >=20 > vn_write() > { >=20 > ... > vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); > if ((flags & FOF_OFFSET) =3D=3D 0) > uio->uio_offset =3D fp->f_offset; > ioflag |=3D sequential_heuristic(uio, fp); > #ifdef MAC > error =3D mac_check_vnode_write(active_cred, fp->f_cred, vp); > if (error =3D=3D 0) > #endif > error =3D VOP_WRITE(vp, uio, ioflag, fp->f_cred); > ... > } >=20 > Can you check your /sys/kern/vfs_vnops.c and verify that LK_EXCLUSIVE is= =20 > present in your vn_write() routine? If so, then perhaps run memtest? Note that this happens on the ZFS. Might be, ZFS unlocks the vnode and then relocks it with some invalid flags ? --XigHxYirkHk2Kxsx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAknCbKoACgkQC3+MBN1Mb4hjlgCaAp+sXu+hS5igKIyZar0Gl0oi YOMAoNne2paSwO+3Yb2ul98wSxAbu6+q =0vTG -----END PGP SIGNATURE----- --XigHxYirkHk2Kxsx--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090319160251.GJ7716>