From nobody@FreeBSD.org  Tue Mar  2 08:06:05 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C41201065675
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  2 Mar 2010 08:06:05 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id B36768FC16
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  2 Mar 2010 08:06:05 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o22864LB074338
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 2 Mar 2010 08:06:04 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o22864Df074337;
	Tue, 2 Mar 2010 08:06:04 GMT
	(envelope-from nobody)
Message-Id: <201003020806.o22864Df074337@www.freebsd.org>
Date: Tue, 2 Mar 2010 08:06:04 GMT
From: sa <admin@nenergy.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Kernel panic on online filesystem optimization
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         144416
>Category:       kern
>Synopsis:       [panic] Kernel panic on online filesystem optimization
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-fs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 02 08:10:01 UTC 2010
>Closed-Date:    
>Last-Modified:  Thu Mar 04 04:12:07 UTC 2010
>Originator:     sa
>Release:        FreeBSD 7.1-RELEASE
>Organization:
New Energy
>Environment:
FreeBSD hq-bsd0.hq.stroyreserv.com 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan  1 14:37:25 UTC 2009     root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
During online filesystem optimization system can go to kernel panic on
certain circumstances.

Our case was raid 0+1, ar0: 953877MB <nVidia MediaShield RAID0+1 (stripe
64 KB)> status: READY

with /var mounted on /dev/ar0s1f (ufs, NFS exported, local, soft-updates,
fsid 382aad491192146c)

Server role is network gateway, firewall, squid-proxy, mail server and
some monitoring stuff.  /var is heavily used by squid cache and mail-store.

Apparently, we hit online fs optimization threshold, which is (minfree-2
percent) < 6.5 (current defrag level). In messages there are messages on
fs going from TIME to SPACE optimization and it went fine, but after message
fs going from SPACE to TIME there is kernel panic with following data:

dev = ar0s1f, block = 29238692, fs = /var
panic: ffs_blkfree: freeing free frag
cpuid = 0 
Uptime: 320d3h29m24s
Physical memory: 2035 MB
Dumping 270Mb

Maybe it-s already known issue, but better repost, than forget.

>How-To-Repeat:
Non tried as it-s production-use server.
>Fix:
Avoid using online filesystem optimization by good recipes given here
http://lists.freebsd.org/pipermail/freebsd-stable/2007-April/034711.html,
or better use of planning file system.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-fs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Mar 4 04:09:51 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s). 

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