From nobody@FreeBSD.org  Sun Dec  2 18:20:57 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 70AA3DAD
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  2 Dec 2012 18:20:57 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 578048FC14
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  2 Dec 2012 18:20:57 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id qB2IKvPt052644
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 2 Dec 2012 18:20:57 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id qB2IKvRU052643;
	Sun, 2 Dec 2012 18:20:57 GMT
	(envelope-from nobody)
Message-Id: <201212021820.qB2IKvRU052643@red.freebsd.org>
Date: Sun, 2 Dec 2012 18:20:57 GMT
From: Tomasz CEDRO <cederom@tlen.pl>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Ext2FS system crashes (buffer overflow?)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         174060
>Category:       kern
>Synopsis:       [ext2fs] Ext2FS system crashes (buffer overflow?)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-fs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 02 18:30:00 UTC 2012
>Closed-Date:    Fri Jun 14 03:39:07 UTC 2013
>Last-Modified:  Fri Jun 14 03:39:07 UTC 2013
>Originator:     Tomasz CEDRO
>Release:        FreeBSD 9.1-RC3
>Organization:
CeDeROM
>Environment:
FreeBSD hexagon 9.1-RC3 FreeBSD 9.1-RC3 #0 r242324: Tue Oct 30 00:58:57 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
There is still something very wrong with the Ext2FS driver - my system
crashes very often with that, reproducibly with torrtn/transmission client
running that stores data on Ex2FS drive (multi system 1.2TB partition).
I had this problem previously very ofthen when using VirtualBox images
stored on ext2fs but it was gone so I thought the problem is gone...

The Ext2FS was created from the beginning with FreeBSD, has no journal
and use 128 byte inodes. The filesystem is 100% clean before mount I am
checking all ext2fs driver by hand with e2fsck -fyC0 <drive>.
>How-To-Repeat:
Use something that intensively use ext2fs drive, then note lots of console
messages like:

g_vfs_done(): ada0s5 write(offset=X, length=Y) error = 5 

and when you try to dmesg you get:

dmesg: sysctl kern.msgbuf: Cannot allocate memory

The messages does not stop even though application using the drive is
terminated.

This looks dangerous :-)
>Fix:
Fix in the Ext2FS kernel module?

Produce native UFS driver for windows/linux/mac and forget about ext2
support? :-)

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-fs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Dec 3 05:01:53 UTC 2012 
Responsible-Changed-Why:  
reclassify 

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

From: CeDeROM <cederom@tlen.pl>
To: FreeBSD-gnats-submit@freebsd.org, freebsd-bugs@freebsd.org
Cc:  
Subject: Re: misc/174060: Ext2FS system crashes (buffer overflow?)
Date: Tue, 4 Dec 2012 16:32:28 +0100

 It got worse, now the system crash on single file save :-(
 
 Maybe this is not the reason but the address/location number is
 printed as negative value...
 
 Is there any way to see why this happens? Maybe some backtrace from kernel dump?
 
 I noticed some time ago that the filesystem was too big to handle so
 many files, some sort of inodes exhaustion, so I have removed lots of
 unnecessary files and it was fine for some time. Should I increase
 bytes-per-inode and/or number of inodes?
 
 Any hints are welcome :-)
 Tomek
 
 -- 
 CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
State-Changed-From-To: open->closed 
State-Changed-By: pfg 
State-Changed-When: Fri Jun 14 03:34:15 UTC 2013 
State-Changed-Why:  
Testing with fsx revealed issues that have been worked around by 
disabling reallocation in r245817 (MFC'd). 

Without reallocation the filesystem appears to be stable. 

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