Date: Sat, 3 Oct 1998 14:10:01 -0700 (PDT) From: James Egelhof <jegelhof@cloud9.net> To: freebsd-bugs@FreeBSD.ORG Subject: Re: kern/8137: quotaoff followed by quotaon can crash system. Message-ID: <199810032110.OAA27409@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/8137; it has been noted by GNATS. From: James Egelhof <jegelhof@cloud9.net> To: dswartz@druber.com Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: Re: kern/8137: quotaoff followed by quotaon can crash system. Date: Sat, 3 Oct 1998 17:03:01 -0400 (EDT) We have had this problem, except we get an instantaneous reboot instead of a panic. We have to execute quotaoff/quotaon several times to make it happen. The workaround is "don't do that." -james On Sat, 3 Oct 1998 dswartz@druber.com wrote: > > >Number: 8137 > >Category: kern > >Synopsis: quotaoff followed by quotaon can crash system. > >Confidential: no > >Severity: serious > >Priority: high > >Responsible: freebsd-bugs > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Sat Oct 3 10:40:01 PDT 1998 > >Last-Modified: > >Originator: Dan Swartzendruber > >Organization: > Swartzendruber Consulting, Inc. > >Release: 2.2.7-STABLE > >Environment: > reeBSD www.kersur.net 2.2.7-STABLE FreeBSD 2.2.7-STABLE #2: Tue Sep 29 20:07:10 EDT 1998 root@mail.kersur.net:/usr/src/sys/compile/WWW i386 > > >Description: > Turning quotas off and back on can crash system. > >How-To-Repeat: > Boot a system with quotas on. Set a few with setquota. Turn quotas > off with quotaoff. Turn them back on with quotaon. You may need to > do a few more setquota commands. The system will crash at or around > line 778 in ufs/ufs/ufs_quota.c with a kernel page fault. > >Fix: > I believe this is because when a dquot is released, it is threaded onto > the freelist, but left hashed. When a dquot is needed, one will be > taken from the freelist if possible. This code assumes that the dquot > is still hashed in. Unfortunately, quotaoff() calls dquot_flush() which will unhash the dquot (so it is now on the freelist but is not > hashed in). This causes a fault referencing the hash predecessor of > the dquot we just took from the freelist. Context diff follows: > > *** ufs_quota.c Tue Jul 9 12:51:17 1996 > --- /net/www/home/pammy/ufs_quota.c Sat Oct 3 13:25:05 1998 > *************** > *** 775,781 **** > dp = dq->dq_forw; > if (dp) > dp->dq_back = dq->dq_back; > ! *dq->dq_back = dp; > } > /* > * Initialize the contents of the dquot structure. > --- 775,783 ---- > dp = dq->dq_forw; > if (dp) > dp->dq_back = dq->dq_back; > ! dp = dq->dq_back; > ! if (dp) > ! dp->dq_forw = dq->dq_forw; > } > /* > * Initialize the contents of the dquot structure. > > >Audit-Trail: > >Unformatted: > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-bugs" in the body of the message > --- James Egelhof jegelhof@cloud9.net Cloud 9 Consulting, Inc. +1 (914) 696-4000 White Plains, New York http://www.cloud9.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810032110.OAA27409>