From nobody@FreeBSD.org  Mon Oct  1 07:39:04 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id B393537B419
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  1 Oct 2001 07:39:03 -0700 (PDT)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.4/8.11.4) id f91Ed3W50014;
	Mon, 1 Oct 2001 07:39:03 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200110011439.f91Ed3W50014@freefall.freebsd.org>
Date: Mon, 1 Oct 2001 07:39:03 -0700 (PDT)
From: Minas <bigbrother@iapetos.ee.duth.gr>
To: freebsd-gnats-submit@FreeBSD.org
Subject: QUOTA with 0 bytes in quota.user hangs up the system in boot
X-Send-Pr-Version: www-1.0

>Number:         30958
>Category:       kern
>Synopsis:       QUOTA with 0 bytes in quota.user hangs up the system in boot
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    mpp
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 01 07:40:00 PDT 2001
>Closed-Date:    Thu Feb 01 07:52:28 GMT 2007
>Last-Modified:  Thu Feb 01 07:52:28 GMT 2007
>Originator:     Minas
>Release:        4.4-RELEASE FreeBSD 4.4-RELEASE #1:
>Organization:
DUTH
>Environment:
FreeBSD ikaros.ee.duth.gr 4.4-RELEASE FreeBSD 4.4-RELEASE #1: Thu Sep 27 17:11:36 EEST 2001     root@ikaros.ee.duth.gr:/usr/src/sys/compile/IKAROS_D  i386
>Description:

I disabled in boot time quotacheck. I compiled the kernel with quota support. I 'touch quota.user' on every filesystem. So quota.user had 0 bytes length. I edited fstab to include option with userquota in mount. When the system rebooted, all the initialization scripts where executed and the login prompt appear. When I logged in as root after a couple of seconds the system hang. It din't appear any message on the console or the syslog. The system responding at ping from the network, but the shell didn't respond to any command. I tried to login in ttyv? but the login process hang too. I had to hard reboot the machine. For 4-5 times this was happening, until bypass the quota-on command and I tried a quotacheck on the filesystem. Then the problem had been solved.
>How-To-Repeat:

Enable quotas on the kernel. Touch quota.user. DO NOT do quotacheck (thus quota.user is 0 bytes) and reboot. The machine will hung up after a couple of sec after the booting is complete and the logging prompt appear.
>Fix:

Maybe the quotaon command has to check the file quota.user if it has 0 bytes, and if this is valid it has to do a quotacheck on the filesystem.
>Release-Note:
>Audit-Trail:

From: Jarek Granat <jarek@adeon.lublin.pl>
To: freebsd-gnats-submit@FreeBSD.org, bigbrother@iapetos.ee.duth.gr
Cc:  
Subject: Re: kern/30958: QUOTA with 0 bytes in quota.user hangs up the system in boot
Date: Mon, 15 Sep 2003 22:21:05 +0200

 # uname -a
 FreeBSD bogus.nn 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #0: Sun Sep 14
 11:11:50 CEST 2003     root@bogus.nn:/usr/src/sys/compile/BOGUS  i386
 
 The same problem here.
 
 Jarek Granat
 
Responsible-Changed-From-To: freebsd-bugs->rwatson 
Responsible-Changed-By: rwatson 
Responsible-Changed-When: Mon Nov 17 12:55:41 PST 2003 
Responsible-Changed-Why:  
Grab ownership of this item since I've done some digging in the 
quota code before. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=30958 
Responsible-Changed-From-To: rwatson->kib 
Responsible-Changed-By: rwatson 
Responsible-Changed-When: Fri Nov 10 16:52:15 UTC 2006 
Responsible-Changed-Why:  
Assign to kib since he's been working with quotas lately. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=30958 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/30958: commit references a PR
Date: Sat, 20 Jan 2007 12:28:23 +0000 (UTC)

 mpp         2007-01-20 12:28:15 UTC
 
   FreeBSD src repository
 
   Modified files:
     sbin/quotacheck      quotacheck.c 
   Log:
   Quota system cleanup.
   
   1) Do not account for uids/gids that appear negative to prevent
      the creation of 131GB+ quota files.  This is the same as the kernel
      now determines which files to provide quota accounting for.
      Related to PR kern/38156.  This should also prevent boots from
      hanging if a negative uid appears in the file systems.
   2) Do not count system files in the usage counts.  These currently are
      file system snapshot and quota data files.  This is how the kernel
      now handles those files.
   3) Correctly generate new quota data files if the current files
      do not exist or are zero length in size.  PR kern/30958.
      It should now be possible to newfs / mount / touch quota.{user,group}
      and quotaon a file system and have everything work.
   4) Change some diagnostics to report the file system and type of
      id (uid or gid) that is being reported.
   5) Truncate the quota data files if possible, instead of letting
      them grow to a big enough size to hold the largest UID/GID on
      the system (typically "nobody").  The kernel should now be able to
      grow the files as needed without deadlocking the system.
   
   PR:  kern/30958, kern/38156
   
   Revision  Changes    Path
   1.27      +137 -29   src/sbin/quotacheck/quotacheck.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: mpp 
State-Changed-When: Thu Jan 25 11:49:36 UTC 2007 
State-Changed-Why:  
Fixed in -current. 

A -stable patch will be committed after more stress testing 
in -current. 


Responsible-Changed-From-To: kib->mpp 
Responsible-Changed-By: mpp 
Responsible-Changed-When: Thu Jan 25 11:49:36 UTC 2007 
Responsible-Changed-Why:  
Fixed in -current. 

A -stable patch will be committed after more stress testing 
in -current. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=30958 
State-Changed-From-To: patched->closed 
State-Changed-By: mpp 
State-Changed-When: Thu Feb 1 07:51:59 UTC 2007 
State-Changed-Why:  
This should now be fixed in 6.2-stable and 7.0-current. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=30958 
>Unformatted:
