Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Aug 2001 15:29:15 -0700 (PDT)
From:      Dan Hastings <scatter@thevortex.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/30207: writing more than 62Mb to an mfs causes all file writes to hang
Message-ID:  <200108292229.f7TMTFj14599@freefall.freebsd.org>

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

>Number:         30207
>Category:       kern
>Synopsis:       writing more than 62Mb to an mfs causes all file writes to hang
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 29 15:30:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Dan Hastings
>Release:        4.4-RC (4-STABLE cvsup'd 25th August)
>Organization:
>Environment:
FreeBSD stormbringer 4.4-RC FreeBSD 4.4-RC #0: Sat Aug 25 13:04:46 BST 2001
dan@stormbringer:/usr/obj/usr/src/sys/STORM2  i386

>Description:
I was testing whether the use of a large memory filesystem would speed
up the 'buildworld' process. I intended to link /usr/obj to the mfs.
However, when copying data to the mfs, the process hung when the mfs
reached around 62Mb full. Having experimented further, it seems that
any mfs greater than ~62Mb will "hang" when it reaches 62Mb of
capacity used. Writes to other filesystems also stop working.

Any other process that tries to access the mfs, including things
like ls, sync, etc. also hangs and becomes unkillable. The system
cannot be shutdown or rebooted, these commands also hang - presumably
because they try to sync and unmount the mfs.

At this point also, writes to other filesystems start to go astray.
Writes to msdos filesystems or ffs without softupdates hang after
creating a zero length file. Writes to ffs with softupdates appear 
to complete normally, but the data is never actually written to the 
disk. (This is why I've not been able to preserve output from
commands after this point.)

The only way to recover the system is to power-cycle - which loses
all data on the mfs, and all pending writes to other filesystems 
as well.

Whatever the size of the mfs, it seems to hang at the same point,
around 62Mb used.


>How-To-Repeat:
Here's a specific example.

The kernel is built with options:

options         MD_ROOT                 #MD is a potential root device
options         MD_NSECT=296960         #max mfs size

(full kernel config available on request).

As I understand it, this gives a maximum mfs size of 296960 x 512 byte
sectors, or 145Mb.

I create the filesystem as follows (as according to 'man md'):

(root)# disklabel -r -w md0 auto
(root)# newfs /dev/md0c
Warning: 2048 sector(s) in last cylinder unallocated
/dev/md0c:      296960 sectors in 73 cylinders of 1 tracks, 4096 sectors
        145.0MB in 5 cyl groups (16 c/g, 32.00MB/g, 7232 i/g)
super-block backups (for fsck -b #) at:
 32, 65568, 131104, 196640, 262176
(root)# mount /dev/md0c /ram
(root)# df /ram
Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
/dev/md0c      143863        1   132353     0%    /ram

Now I start filling the mfs by unpacking a tar file into it. The
tar file I was using contained the /usr/src/contrib directory and
contents - fully unpacks to around 128Mb. However, once the mfs
reaches 62Mb used, the tar process hangs. 'ps' shows the tar
process to be in state 'D+' - 'top' shows it in 'biowr'. The tar
process cannot be killed.

At this point, the symptoms described previously are apparent -
anything that tries to access the mfs, even to read it, hangs.
Writes to other filesystems stop working.

The only way out is to power-cycle.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:

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?200108292229.f7TMTFj14599>