From tuc@valhalla.house.tucs-beachin-obx-house.com  Wed Apr  2 19:26:31 2008
Return-Path: <tuc@valhalla.house.tucs-beachin-obx-house.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4870F106566C
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  2 Apr 2008 19:26:31 +0000 (UTC)
	(envelope-from tuc@valhalla.house.tucs-beachin-obx-house.com)
Received: from vjofn.tucs-beachin-obx-house.com (vjofn-pt.tunnel.tserv1.fmt.ipv6.he.net [IPv6:2001:470:1f00:ffff::5e5])
	by mx1.freebsd.org (Postfix) with ESMTP id 162988FC1A
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  2 Apr 2008 19:26:30 +0000 (UTC)
	(envelope-from tuc@valhalla.house.tucs-beachin-obx-house.com)
Received: from valhalla.house.tucs-beachin-obx-house.com ([208.45.246.58])
	by vjofn.tucs-beachin-obx-house.com (8.14.2/8.14.2) with ESMTP id m32JQK9P045588
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 2 Apr 2008 15:26:30 -0400 (EDT)
Received: from valhalla.house.tucs-beachin-obx-house.com (localhost [127.0.0.1])
	by valhalla.house.tucs-beachin-obx-house.com (8.14.2/8.14.2) with ESMTP id m32JQKH5002109
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 2 Apr 2008 15:26:20 -0400 (EDT)
	(envelope-from tuc@valhalla.house.tucs-beachin-obx-house.com)
Received: (from tuc@localhost)
	by valhalla.house.tucs-beachin-obx-house.com (8.14.2/8.14.2/Submit) id m32JQKUt002108;
	Wed, 2 Apr 2008 15:26:20 -0400 (EDT)
	(envelope-from tuc)
Message-Id: <200804021926.m32JQKUt002108@valhalla.house.tucs-beachin-obx-house.com>
Date: Wed, 2 Apr 2008 15:26:20 -0400 (EDT)
From: Tuc <freebsd-current-panic@t-b-o-h.net>
Reply-To: Tuc <freebsd-current-panic@t-b-o-h.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ffs_valloc:dup alloc (Soekris 4801/7.0/USB Flash mem)
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         122380
>Category:       kern
>Synopsis:       [ffs] ffs_valloc:dup alloc (Soekris 4801/7.0/USB Flash mem)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-fs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 02 19:30:02 UTC 2008
>Closed-Date:    
>Last-Modified:  Thu Aug 29 03:50:00 UTC 2013
>Originator:     Tuc
>Release:        FreeBSD 7.0-STABLE i386
>Organization:
TBOH
>Environment:
System: FreeBSD valhalla.house.tucs-beachin-obx-house.com 7.0-STABLE FreeBSD 7.0-STABLE #0: Wed Apr 2 08:01:18 EDT 2008 root@valhalla.house.tucs-beachin-obx-house.com:/usr/obj/usr/src/sys/VALHALLA i386


	
>Description:

	Using a :

Apr  2 14:53:23 valhalla kernel: da0 at umass-sim0 bus 0 target 0 lun 0
Apr  2 14:53:23 valhalla kernel: da0: <JetFlash TS4GJFV20 0.00> Removable Direct Access SCSI-2 device 
Apr  2 14:53:23 valhalla kernel: da0: 1.000MB/s transfers
Apr  2 14:53:23 valhalla kernel: da0: 3936MB (8060928 512 byte sectors: 255H 63S/T 501C)

	Have had alot of issues trying to get it to format and be usable on
this Soekris 4801. If I partition and then newfs, I get the 
"cg 0: bad magic number". I eventually brought up another 7.0 system on a
brand new hard drive, went back into sysinstall to partition and newfs
and it was fine.

	I did some tests over there to make directories, copy files, all
was fine.

	I brought it back to this system, mounted /dev/da0s1d under /data2,
and ran "squid -z". I then got :

2008/04/02 14:54:57| Creating Swap Directories
mode = 01, inum = 23648, fs = /data2
panic: ffs_valloc: dup alloc
cpuid = 0
KDB: stack backtrace:
db_trace_self_wrapper(c0afe01c,ccd0e91c,c075fd1f,c0b1f0c1,0,...) at db_trace_sel
f_wrapper+0x26
kdb_backtrace(c0b1f0c1,0,c0b11ea9,ccd0e928,0,...) at kdb_backtrace+0x29
panic(c0b11ea9,1,5c60,c22fe0d4,2,...) at panic+0x10f
ffs_valloc(c2308cc0,41e8,c22e9100,ccd0eb4c,c22762ec,...) at ffs_valloc+0x63a
ufs_mkdir(ccd0eb90,ccd0eb74,ccd0eb90,ccd0eba4,ccd0ec68,...) at ufs_mkdir+0x95
VOP_MKDIR_APV(c0bbe660,ccd0eb90,68,ccd0eb94,0,...) at VOP_MKDIR_APV+0x42
kern_mkdir(c224c660,8245120,0,1ed,ccd0ed2c,...) at kern_mkdir+0x329
mkdir(c224c660,ccd0ecfc,8,16,ccd0ed2c,...) at mkdir+0x29
syscall(ccd0ed38) at syscall+0x335
Xint0x80_syscall() at Xint0x80_syscall+0x20
--- syscall (136, FreeBSD ELF32, mkdir), eip = 0x2841f34b, esp = 0xbfbfeabc, ebp
 = 0xbfbfeb38 ---


Backtrace is :

bt
#0  doadump () at pcpu.h:195
#1  0xc075fa57 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:417
#2  0xc075fd53 in panic (fmt=Variable "fmt" is not available.
) at /usr/src/sys/kern/kern_shutdown.c:571
#3  0xc09494aa in ffs_valloc (pvp=0xc2308cc0, mode=16872, cred=0xc22e9100, 
    vpp=0xccd0eb4c) at /usr/src/sys/ufs/ffs/ffs_alloc.c:968
#4  0xc0979105 in ufs_mkdir (ap=0xccd0eb90)
    at /usr/src/sys/ufs/ufs/ufs_vnops.c:1401
#5  0xc0a80022 in VOP_MKDIR_APV (vop=0xc0bbe660, a=0xccd0eb90)
    at vnode_if.c:1234
#6  0xc07e42a9 in kern_mkdir (td=0xc224c660, 
    path=0x8245120 <Address 0x8245120 out of bounds>, segflg=UIO_USERSPACE, 
    mode=Variable "mode" is not available.
) at vnode_if.h:654
#7  0xc07e4379 in mkdir (td=0xc224c660, uap=0xccd0ecfc)
    at /usr/src/sys/kern/vfs_syscalls.c:3427
#8  0xc0a6a7d5 in syscall (frame=0xccd0ed38)
    at /usr/src/sys/i386/i386/trap.c:1035
#9  0xc0a50620 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:196
#10 0x00000033 in ?? ()
Previous frame inner to this frame (corrupt stack?)

>How-To-Repeat:

	See above
>Fix:

	No ideas. :-/
>Release-Note:
>Audit-Trail:

From: Tuc T-B-O-H <freebsd-current-panic@t-b-o-h.net>
To: bug-followup@FreeBSD.org
Cc: freebsd-current-panic@t-b-o-h.net
Subject: Re: kern/122380: [ffs] ffs_valloc:dup alloc (Soekris 4801/7.0/USB Flash mem)
Date: Thu, 1 May 2008 11:25:51 -0400 (EDT)

 BUMP....
Responsible-Changed-From-To: freebsd-bugs->freebsd-fs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon May 18 03:09:06 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer(s). 

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

From: Brent Welch <welch.brent@gmail.com>
To: bug-followup@FreeBSD.org, freebsd-current-panic@t-b-o-h.net
Cc:  
Subject: Re: kern/122380: [ffs] ffs_valloc:dup alloc (Soekris 4801/7.0/USB
 Flash mem)
Date: Wed, 28 Aug 2013 20:45:22 -0700

 --e89a8ff1ceb6858c3a04e50defdd
 Content-Type: text/plain; charset=ISO-8859-1
 
 I'm hitting this frequently on 9.1, freshly installed from the ISO image.
  I have many ffs partitions (40)
 and am running a simple load generation script against each mount point.
  The load generator just
 does a random collection of create, read, write, hardlink, trunc, delete
 from a script.
 
 There is only a single application thread running against each mount point,
 but there are 40 processes
 running against 40 different mount points.  This has happened both after a
 hard crash + FSCK, and
 fairly soon after a newfs.
 
 36 of the devices are SAS drives.  4 are SATA SSD.  I'm not sure which
 mount point is involved, yet.
 
 Brent Welch
 welch@acm.org
 
 --e89a8ff1ceb6858c3a04e50defdd
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 <div dir=3D"ltr">I&#39;m hitting this frequently on 9.1, freshly installed =
 from the ISO image. =A0I have many ffs partitions (40)<div>and am running a=
  simple load generation script against each mount point. =A0The load genera=
 tor just</div>
 <div>does a random collection of create, read, write, hardlink, trunc, dele=
 te from a script.</div><div><br></div><div>There is only a single applicati=
 on thread running against each mount point, but there are 40 processes</div=
 >
 <div>running against 40 different mount points. =A0This has happened both a=
 fter a hard crash + FSCK, and</div><div>fairly soon after a newfs.</div><di=
 v><br></div><div>36 of the devices are SAS drives. =A04 are SATA SSD. =A0I&=
 #39;m not sure which mount point is involved, yet.</div>
 <div><br></div><div>Brent Welch</div><div><a href=3D"mailto:welch@acm.org">=
 welch@acm.org</a></div></div>
 
 --e89a8ff1ceb6858c3a04e50defdd--
>Unformatted:
