Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Feb 2006 00:23:28 -0500
From:      Kris Kennaway <kris@obsecurity.org>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        stable@FreeBSD.org
Subject:   Re: Patch for quota deadlock
Message-ID:  <20060228052328.GA29811@xor.obsecurity.org>
In-Reply-To: <20060221195601.GA63134@xor.obsecurity.org>
References:  <20060221195601.GA63134@xor.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--vtzGhvizbBRQ85DL
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Feb 21, 2006 at 02:56:01PM -0500, Kris Kennaway wrote:
> Jeff has been too busy to send this patch himself, but it fixed the
> quota deadlock that I was able to provoke on my machine.  Does it also
> solve the issue for others?

I've seen 0 feedback about this so far.  Since a number of people have
reported that the quota deadlock is the only thing keeping them from
upgrading from 5.x to 6.x, I expected a more enthusiastic testing
response than this :-)

Please, those of you who have reported this problem, test the patch
and see if it works for you.  If there are further problems, we can't
fix them in time for 6.1 unless we hear about it in the next week or
so.

Kris

> ----- Forwarded message from Jeff Roberson <jroberson@chesapeake.net> ---=
--
>=20
> X-Original-To: kkenn@localhost
> Delivered-To: kkenn@localhost.obsecurity.org
> X-Original-To: kris@FreeBSD.org
> Delivered-To: kris@FreeBSD.org
> Date: Wed, 15 Feb 2006 17:46:31 -0800 (PST)
> From: Jeff Roberson <jroberson@chesapeake.net>
> X-X-Sender: jroberson@10.0.0.1
> To: Kris Kennaway <kris@obsecurity.org>
> cc: ssouhlal@FreeBSD.org, kan@FreeBSD.org
> Subject: Re: Quota deadlock
> In-Reply-To: <20060215081545.GA18583@xor.obsecurity.org>
> X-Scanned-By: MIMEDefang 2.52 on 216.240.101.25
> X-UIDL: L0D!!!H0!!'W+"!=3Dh9"!
> X-Bogosity: Ham, tests=3Dbogofilter, spamicity=3D0.000000, version=3D1.0.1
>=20
> Please try this patch.  LK_NOWAIT is causing qsync() to spin forever.
>=20
> Index: ufs_quota.c
> =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
> RCS file: /home/ncvs/src/sys/ufs/ufs/ufs_quota.c,v
> retrieving revision 1.79
> diff -u -r1.79 ufs_quota.c
> --- ufs_quota.c 12 Feb 2006 13:20:06 -0000      1.79
> +++ ufs_quota.c 16 Feb 2006 01:45:56 -0000
> @@ -750,7 +750,7 @@
>                         MNT_ILOCK(mp);
>                         continue;
>                 }
> -               error =3D vget(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOC=
K,=20
> td);
> +               error =3D vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, td);
>                 if (error) {
>                         MNT_ILOCK(mp);
>                         if (error =3D=3D ENOENT) {
>=20
>=20
> On Wed, 15 Feb 2006, Kris Kennaway wrote:
>=20
> >Quotas are enabled on this machine:
> >
> >db> show lockedvnods
> >Locked vnodes
> >
> >0xc6be4a80: tag ufs, type VREG
> >   usecount 0, writecount 0, refcount 3 mountedhere 0
> >   flags ()
> >   v_object 0xc6bf4d98 ref 0 pages 2
> >    lock type ufs: EXCL (count 1) by thread 0xcb814000 (pid 2031)#0=20
> >    0xc0504d12 at lockmgr+0x55a
> >#1 0xc056f19b at vop_stdlock+0x32
> >#2 0xc06cffde at VOP_LOCK_APV+0xa6
> >#3 0xc063d775 at ffs_lock+0x19
> >#4 0xc06cffde at VOP_LOCK_APV+0xa6
> >#5 0xc0587b58 at vn_lock+0xd3
> >#6 0xc0586d5e at vn_close+0x7c
> >#7 0xc0587cd1 at vn_closefile+0xf0
> >#8 0xc04efc78 at fdrop_locked+0xb9
> >#9 0xc04efbb9 at fdrop+0x3c
> >#10 0xc04ee0ac at closef+0x428
> >#11 0xc04eaf7c at close+0x245
> >#12 0xc06b7359 at syscall+0x2e9
> >#13 0xc06a140f at Xint0x80_syscall+0x1f
> >
> >       ino 23557, on dev da0s1a
> >
> >0xc7610540: tag ufs, type VDIR
> >   usecount 1, writecount 0, refcount 4 mountedhere 0
> >   flags ()
> >   v_object 0xc9fb6078 ref 0 pages 1
> >    lock type ufs: EXCL (count 1) by thread 0xcb8b2d00 (pid 2001)#0=20
> >    0xc0504d12 at lockmgr+0x55a
> >#1 0xc056f19b at vop_stdlock+0x32
> >#2 0xc06cffde at VOP_LOCK_APV+0xa6
> >#3 0xc063d775 at ffs_lock+0x19
> >#4 0xc06cffde at VOP_LOCK_APV+0xa6
> >#5 0xc0587b58 at vn_lock+0xd3
> >#6 0xc057981f at vget+0xf0
> >#7 0xc056c22f at cache_lookup+0x3d0
> >#8 0xc056c8f6 at vfs_cache_lookup+0xa4
> >#9 0xc06cd997 at VOP_LOOKUP_APV+0xa6
> >#10 0xc057163b at lookup+0x47a
> >#11 0xc0570efa at namei+0x431
> >#12 0xc057cf38 at kern_statfs+0x6d
> >#13 0xc057cea5 at statfs+0x35
> >#14 0xc06b7359 at syscall+0x2e9
> >#15 0xc06a140f at Xint0x80_syscall+0x1f
> >
> >       ino 1492256, on dev da0s1e
> >VNASSERT failed
> >0xcac88200: tag (null), type VMARKER
> >   usecount 0, writecount 0, refcount 0 mountedhere 0
> >   flags ()
> >
> >The only process running is umount:
> >
> >db> wh 2030
> >Tracing pid 2030 tid 100176 td 0xcbaa41a0
> >cpustop_handler(e8ef9a10,c06b648f,e8ef9998,e8ef9998,cbaa41a0) at=20
> >cpustop_handler+0x2c
> >ipi_nmi_handler(e8ef9998,e8ef9998,cbaa41a0,e8ef99a4,46) at=20
> >ipi_nmi_handler+0x29
> >trap(e8ef0008,e8ef0028,c06a0028,50,0) at trap+0x3f
> >calltrap() at calltrap+0x5
> >--- trap 0x13, eip =3D 0xc0504794, esp =3D 0xe8ef9a58, ebp =3D 0xe8ef9a7=
8 ---
> >acquire(e8ef9afc,50,1050000,b2,cbaa41a0) at acquire+0x124
> >lockmgr(cd6bd838,2012,cd6bd8a8,cbaa41a0,e8ef9b28) at lockmgr+0x4df
> >vop_stdlock(e8ef9b7c,c063c186,c057cc44,c0742080,e8ef9b7c) at=20
> >vop_stdlock+0x32
> >VOP_LOCK_APV(c07425c0,e8ef9b7c,e8ef9b54,c06cffde,e8ef9b7c) at=20
> >VOP_LOCK_APV+0xa6
> >ffs_lock(e8ef9b7c,ce51a758,87f,2012,cd6bd7e0) at ffs_lock+0x19
> >VOP_LOCK_APV(c0742080,e8ef9b7c,138,ce51a690,ce51a690) at VOP_LOCK_APV+0x=
a6
> >vn_lock(cd6bd7e0,2012,cbaa41a0,79d,2012) at vn_lock+0xd3
> >vget(cd6bd7e0,2012,cbaa41a0,2ea,c6823488) at vget+0xf0
> >qsync(c6823400,0,c070ad43,490,c6823488) at qsync+0x13e
> >ffs_sync(c6823400,2,cbaa41a0,cbaa41a0,c6823400) at ffs_sync+0x2e0
> >sync(cbaa41a0,e8ef9d04,cbaa41a0,cbaa41a0,c7a57108) at sync+0x100
> >syscall(3b,3b,3b,2,bfbfe958) at syscall+0x2e9
> >Xint0x80_syscall() at Xint0x80_syscall+0x1f
> >--- syscall (36, FreeBSD ELF32, sync), eip =3D 0x280c260f, esp =3D 0xbfb=
fe8ac,=20
> >ebp =3D 0xbfbfe918 ---
> >db>
>=20
>=20
> ----- End forwarded message -----



--vtzGhvizbBRQ85DL
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (FreeBSD)

iD8DBQFEA95QWry0BWjoQKURAo0DAKC0MGWviGsQpYfdI7hcaETVzKaNDQCg0b1R
EqS8wvOZanckIveNKz2d1rU=
=9/I1
-----END PGP SIGNATURE-----

--vtzGhvizbBRQ85DL--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060228052328.GA29811>