Return-Path: <kris@obsecurity.org>
X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on imap.leidinger.net
X-Spam-Level: 
X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DK_POLICY_SIGNSOME,FORGED_RCVD_HELO autolearn=disabled version=3.1.7
X-Original-To: Alexander+FreeBSDCommitter@Leidinger.net
Delivered-To: alexander+freebsdcommitter@leidinger.net
Received: from redbullneu.bpaserver.net
	by imap.leidinger.net with POP3 (fetchmail-6.3.5)
	for <netchild@localhost> (single-drop); Thu, 11 Jan 2007 08:37:27 +0100 (CET)
Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53])
	by redbull.bpaserver.net (Postfix) with ESMTP id 4AF2B2E1A6
	for <Alexander+FreeBSDCommitter@Leidinger.net>; Thu, 11 Jan 2007 08:37:08 +0100 (CET)
Received: from hub.freebsd.org (hub.freebsd.org [69.147.83.54])
	by mx2.freebsd.org (Postfix) with ESMTP id A6AAE558DA
	for <Alexander+FreeBSDCommitter@Leidinger.net>; Thu, 11 Jan 2007 07:30:58 +0000 (GMT)
	(envelope-from kris@obsecurity.org)
Received: by hub.freebsd.org (Postfix)
	id A447E16A40F; Thu, 11 Jan 2007 07:30:58 +0000 (UTC)
Delivered-To: netchild@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id A2CE116A407
	for <netchild@FreeBSD.org>; Thu, 11 Jan 2007 07:30:58 +0000 (UTC)
	(envelope-from kris@obsecurity.org)
Received: from elvis.mu.org (elvis.mu.org [192.203.228.196])
	by mx1.freebsd.org (Postfix) with ESMTP id 931F013C468
	for <netchild@FreeBSD.org>; Thu, 11 Jan 2007 07:30:58 +0000 (UTC)
	(envelope-from kris@obsecurity.org)
Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196])
	by elvis.mu.org (Postfix) with ESMTP id 79A141A3C1A
	for <netchild@FreeBSD.org>; Wed, 10 Jan 2007 23:30:58 -0800 (PST)
Received: by obsecurity.dyndns.org (Postfix, from userid 1000)
	id D78395148C; Thu, 11 Jan 2007 02:30:57 -0500 (EST)
Date: Thu, 11 Jan 2007 02:30:57 -0500
From: Kris Kennaway <kris@obsecurity.org>
To: netchild@FreeBSD.org
Subject: [kris@obsecurity.org: Re: TMPFS I/O Performance Benchmarks]
Message-ID: <20070111073057.GE95053@xor.obsecurity.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.2.2i
X-BPAnet-MailScanner-Information: Please contact the ISP for more information
X-BPAnet-MailScanner: Found to be clean
X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached,
	score=-14.864, required 6, autolearn=not spam, BAYES_00 -15.00,
	DK_POLICY_SIGNSOME 0.00, FORGED_RCVD_HELO 0.14)
X-BPAnet-MailScanner-From: kris@obsecurity.org

----- Forwarded message from Kris Kennaway <kris@obsecurity.org> -----

Date: Sat, 25 Mar 2006 18:47:20 -0500
From: Kris Kennaway <kris@obsecurity.org>
To: Kris Kennaway <kris@obsecurity.org>
Cc: Rohit Jalan <rohitj@purpe.com>
Subject: Re: TMPFS I/O Performance Benchmarks
In-Reply-To: <20060325233009.GA66568@xor.obsecurity.org>
User-Agent: Mutt/1.4.2.1i

On Sat, Mar 25, 2006 at 06:30:09PM -0500, Kris Kennaway wrote:
> On Sat, Mar 25, 2006 at 10:05:27AM +0530, Rohit Jalan wrote:
> > I am yet trying to reproduce the panic. I shall send you a patch as
> > soon as I manage to do so.
> > 
> > I am pretty confident that this panic is not due to a programming
> > error in the TMPFS module.
> 
> I think it's because the module isn't picking up things like WITNESS,
> INVARIANTS, etc from my kernel config (since e.g. the struct mtx
> inside struct mount will have a different size, so the module is
> accessing mnt_optnew with the wrong offset).  I tried to use
> MODULES_OVERRIDE to compile it with my kernel (after moving the module
> to sys/modules/) - I think that will make it automatically pick up the
> kernel options - but 'make depend' failed.

I gave up and just moved it into sys/fs/tmpfs, and got it to compile
in statically to the kernel with the attached diff.  Now it works!

Kris

P.S. You'll need to remove the need for -fms-extensions before this
can be imported though.


Index: sys/conf/files
===================================================================
RCS file: /data/ncvs/src/sys/conf/files,v
retrieving revision 1.1104
diff -u -r1.1104 files
--- sys/conf/files	23 Mar 2006 23:06:14 -0000	1.1104
+++ sys/conf/files	25 Mar 2006 23:32:30 -0000
@@ -1088,6 +1088,12 @@
 fs/unionfs/union_subr.c		optional unionfs
 fs/unionfs/union_vfsops.c	optional unionfs
 fs/unionfs/union_vnops.c	optional unionfs
+fs/tmpfs/tmpfs_vnops.c		optional tmpfs
+fs/tmpfs/tmpfs_fifoops.c	optional tmpfs
+fs/tmpfs/tmpfs_vfsops.c		optional tmpfs
+fs/tmpfs/tmpfs_subr.c		optional tmpfs
+fs/tmpfs/tmpfs_uma.c		optional tmpfs
+fs/tmpfs/tmpfs_vacache.c	optional tmpfs
 gdb/gdb_cons.c			optional gdb
 gdb/gdb_main.c			optional gdb
 gdb/gdb_packet.c		optional gdb
Index: sys/conf/options
===================================================================
RCS file: /data/ncvs/src/sys/conf/options,v
retrieving revision 1.531
diff -u -r1.531 options
--- sys/conf/options	5 Mar 2006 22:52:16 -0000	1.531
+++ sys/conf/options	25 Mar 2006 23:31:23 -0000
@@ -180,6 +180,7 @@
 MSDOSFS		opt_dontuse.h
 NTFS		opt_dontuse.h
 NULLFS		opt_dontuse.h
+TMPFS		opt_dontuse.h
 NWFS		opt_dontuse.h
 PORTALFS	opt_dontuse.h
 PROCFS		opt_dontuse.h




----- End forwarded message -----

Return-Path: <kris@obsecurity.org>
X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on imap.leidinger.net
X-Spam-Level: 
X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DK_POLICY_SIGNSOME,FORGED_RCVD_HELO autolearn=disabled version=3.1.7
X-Original-To: Alexander+FreeBSDCommitter@Leidinger.net
Delivered-To: alexander+freebsdcommitter@leidinger.net
Received: from redbullneu.bpaserver.net
	by imap.leidinger.net with POP3 (fetchmail-6.3.5)
	for <netchild@localhost> (single-drop); Thu, 11 Jan 2007 08:37:24 +0100 (CET)
Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53])
	by redbull.bpaserver.net (Postfix) with ESMTP id 614372E204
	for <Alexander+FreeBSDCommitter@Leidinger.net>; Thu, 11 Jan 2007 08:36:32 +0100 (CET)
Received: from hub.freebsd.org (hub.freebsd.org [69.147.83.54])
	by mx2.freebsd.org (Postfix) with ESMTP id BCE2355F16
	for <Alexander+FreeBSDCommitter@Leidinger.net>; Thu, 11 Jan 2007 07:30:22 +0000 (GMT)
	(envelope-from kris@obsecurity.org)
Received: by hub.freebsd.org (Postfix)
	id BA3D616A407; Thu, 11 Jan 2007 07:30:22 +0000 (UTC)
Delivered-To: netchild@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id B8E0316A403
	for <netchild@FreeBSD.org>; Thu, 11 Jan 2007 07:30:22 +0000 (UTC)
	(envelope-from kris@obsecurity.org)
Received: from elvis.mu.org (elvis.mu.org [192.203.228.196])
	by mx1.freebsd.org (Postfix) with ESMTP id AA31013C459
	for <netchild@FreeBSD.org>; Thu, 11 Jan 2007 07:30:22 +0000 (UTC)
	(envelope-from kris@obsecurity.org)
Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196])
	by elvis.mu.org (Postfix) with ESMTP id 8FA051A3C1A
	for <netchild@FreeBSD.org>; Wed, 10 Jan 2007 23:30:22 -0800 (PST)
Received: by obsecurity.dyndns.org (Postfix, from userid 1000)
	id EB647517C9; Thu, 11 Jan 2007 02:30:21 -0500 (EST)
Date: Thu, 11 Jan 2007 02:30:21 -0500
From: Kris Kennaway <kris@obsecurity.org>
To: netchild@FreeBSD.org
Subject: [kris@obsecurity.org: tmpfs bug?]
Message-ID: <20070111073021.GB95053@xor.obsecurity.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.2.2i
X-BPAnet-MailScanner-Information: Please contact the ISP for more information
X-BPAnet-MailScanner: Found to be clean
X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached,
	score=-14.864, required 6, autolearn=not spam, BAYES_00 -15.00,
	DK_POLICY_SIGNSOME 0.00, FORGED_RCVD_HELO 0.14)
X-BPAnet-MailScanner-From: kris@obsecurity.org

----- Forwarded message from Kris Kennaway <kris@obsecurity.org> -----

Date: Thu, 27 Apr 2006 14:58:49 -0400
From: Kris Kennaway <kris@obsecurity.org>
To: Rohit Jalan <rohitj@purpe.com>
Subject: tmpfs bug?
User-Agent: Mutt/1.4.2.1i

Hi Rohit,

Sorry I didn't get back to you for a while.  I have just started using
tmpfs on my UP package build machines, since the Giant locking should
not be a big deal there.  However I am seeing strange behaviour: what
should be essentially a rm -rf of large directory trees is not
removing all of the files, but leaving many behind.  When I do a
second rm -rf it indeed removes all files.

In this configuration, I have 32GB of swap configured on a system with
1GB of RAM.  Thus, at any given time a lot of the filesystem is
swapped out, and rm -rf will have to first page it back in.  I wonder
if something here is broken?

I'll keep looking at it to see if I can diagnose the problem further.

Kris




----- End forwarded message -----

Return-Path: <kris@obsecurity.org>
X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on imap.leidinger.net
X-Spam-Level: 
X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DK_POLICY_SIGNSOME,FORGED_RCVD_HELO,IMPRONONCABLE_2,TW_BF,TW_DV,TW_XB autolearn=disabled version=3.1.7
X-Original-To: Alexander+FreeBSDCommitter@Leidinger.net
Delivered-To: alexander+freebsdcommitter@leidinger.net
Received: from redbullneu.bpaserver.net
	by imap.leidinger.net with POP3 (fetchmail-6.3.5)
	for <netchild@localhost> (single-drop); Thu, 11 Jan 2007 08:37:25 +0100 (CET)
Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53])
	by redbull.bpaserver.net (Postfix) with ESMTP id 5F9F02E1A6
	for <Alexander+FreeBSDCommitter@Leidinger.net>; Thu, 11 Jan 2007 08:36:36 +0100 (CET)
Received: from hub.freebsd.org (hub.freebsd.org [69.147.83.54])
	by mx2.freebsd.org (Postfix) with ESMTP id BF5DB56436
	for <Alexander+FreeBSDCommitter@Leidinger.net>; Thu, 11 Jan 2007 07:30:26 +0000 (GMT)
	(envelope-from kris@obsecurity.org)
Received: by hub.freebsd.org (Postfix)
	id BCD0C16A415; Thu, 11 Jan 2007 07:30:26 +0000 (UTC)
Delivered-To: netchild@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id BBBEC16A40F
	for <netchild@FreeBSD.org>; Thu, 11 Jan 2007 07:30:26 +0000 (UTC)
	(envelope-from kris@obsecurity.org)
Received: from elvis.mu.org (elvis.mu.org [192.203.228.196])
	by mx1.freebsd.org (Postfix) with ESMTP id 9EE4D13C45D
	for <netchild@FreeBSD.org>; Thu, 11 Jan 2007 07:30:26 +0000 (UTC)
	(envelope-from kris@obsecurity.org)
Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196])
	by elvis.mu.org (Postfix) with ESMTP id 586511A3C1A
	for <netchild@FreeBSD.org>; Wed, 10 Jan 2007 23:30:26 -0800 (PST)
Received: by obsecurity.dyndns.org (Postfix, from userid 1000)
	id 99C205148C; Thu, 11 Jan 2007 02:30:25 -0500 (EST)
Date: Thu, 11 Jan 2007 02:30:25 -0500
From: Kris Kennaway <kris@obsecurity.org>
To: netchild@FreeBSD.org
Subject: [kris@obsecurity.org: Re: tmpfs bug?]
Message-ID: <20070111073025.GC95053@xor.obsecurity.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.2.2i
X-BPAnet-MailScanner-Information: Please contact the ISP for more information
X-BPAnet-MailScanner: Found to be clean
X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached,
	score=-13.133, required 6, BAYES_00 -15.00, DK_POLICY_SIGNSOME 0.00,
	FORGED_RCVD_HELO 0.14, IMPRONONCABLE_2 1.50, TW_BF 0.08, TW_DV 0.08,
	TW_XB 0.08)
X-BPAnet-MailScanner-From: kris@obsecurity.org

----- Forwarded message from Kris Kennaway <kris@obsecurity.org> -----

Date: Thu, 27 Apr 2006 23:05:58 -0400
From: Kris Kennaway <kris@obsecurity.org>
To: Kris Kennaway <kris@obsecurity.org>
Cc: Rohit Jalan <rohitj@purpe.com>
Subject: Re: tmpfs bug?
In-Reply-To: <20060427185849.GA68736@xor.obsecurity.org>
User-Agent: Mutt/1.4.2.1i

On Thu, Apr 27, 2006 at 02:58:49PM -0400, Kris Kennaway wrote:
> Hi Rohit,
> 
> Sorry I didn't get back to you for a while.  I have just started using
> tmpfs on my UP package build machines, since the Giant locking should
> not be a big deal there.  However I am seeing strange behaviour: what
> should be essentially a rm -rf of large directory trees is not
> removing all of the files, but leaving many behind.  When I do a
> second rm -rf it indeed removes all files.
> 
> In this configuration, I have 32GB of swap configured on a system with
> 1GB of RAM.  Thus, at any given time a lot of the filesystem is
> swapped out, and rm -rf will have to first page it back in.  I wonder
> if something here is broken?
> 
> I'll keep looking at it to see if I can diagnose the problem further.

Got this panic:

VNASSERT failed
0xc5553d20: tag none, type VBAD
    usecount 0, writecount 0, refcount 0 mountedhere 0
    flags (VI_DOOMED)
 VI_LOCKed    #0 0xc04b9fa8 at lockmgr+0x510
#1 0xc051617d at vop_stdlock+0x21
#2 0xc0630283 at VOP_LOCK_APV+0x87
#3 0xc051d0f4 at vtryrecycle+0x54
#4 0xc051cbdf at vnlru_free+0x193
#5 0xc051d21f at getnewvnode+0x33
#6 0xc048ed6a at tmpfs_alloc_vp+0x52
#7 0xc048cf52 at tmpfs_lookup+0x1da
#8 0xc062e417 at VOP_CACHEDLOOKUP_APV+0x9b
#9 0xc0513ebd at vfs_cache_lookup+0xb5
#10 0xc062e343 at VOP_LOOKUP_APV+0x87
#11 0xc051813e at lookup+0x42e
#12 0xc0517aae at namei+0x382
#13 0xc05254f3 at kern_lstat+0x47
#14 0xc052548f at lstat+0x1b
#15 0xc0622cc6 at syscall+0x27e
#16 0xc06109cf at Xint0x80_syscall+0x1f

KDB: stack backtrace:
kdb_backtrace(edaac860,c0520de1,c0657fe1,c067127c,c5553d20) at kdb_backtrace+0x29
vfs_badlock(c0657fe1,c067127c,c5553d20) at vfs_badlock+0x11
assert_vi_unlocked(c5553d20,c067127c) at assert_vi_unlocked+0x31
VOP_PRINT_APV(c067c960,edaac888) at VOP_PRINT_APV+0x89
vn_printf(c5553d20,c0656861,c5553d20,edaac918,c051f5fe) at vn_printf+0x182
vdestroy(c5553d20,c5553d20,edaac938,c051f5b9,c5553d20) at vdestroy+0x71
vdropl(c5553d20,c5553de8,0,c06576b0,878) at vdropl+0x3e
vdrop(c5553d20,edaacb70,c6745630,c4ec9870,edaac968) at vdrop+0x25
vnlru_free(1) at vnlru_free+0x1ba
getnewvnode(c0647176,c4fd12d4,c067dc00,edaac980,0) at getnewvnode+0x33
tmpfs_alloc_vp(c4fd12d4,c6745630,edaacb5c,c4ec9870,c6725334) at tmpfs_alloc_vp+0x52
tmpfs_lookup(edaaca20,c4c82bd0,edaacb70,edaaca5c,c0513ebd) at tmpfs_lookup+0x1da
VOP_CACHEDLOOKUP_APV(c067dc00,edaaca20) at VOP_CACHEDLOOKUP_APV+0x9b
vfs_cache_lookup(edaacabc,c4c82bd0,edaacb70,edaacad8,c051813e) at vfs_cache_lookup+0xb5
VOP_LOOKUP_APV(c067dc00,edaacabc) at VOP_LOOKUP_APV+0x87
lookup(edaacb48,6b2,1,c4ec9870,c04eb136) at lookup+0x42e
namei(edaacb48,805cca8,0,0,c4c4e2a0) at namei+0x382
kern_lstat(c4ec9870,805cca8,0,edaacc1c) at kern_lstat+0x47
lstat(c4ec9870,edaacd04,114,c4ec9870,edaacd38) at lstat+0x1b
syscall(805003b,805003b,bfbf003b,805cc48,805cc00) at syscall+0x27e
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (190, FreeBSD ELF32, lstat), eip = 0x2813b83f, esp = 0xbfbf75fc, ebp = 0xbfbf7698 ---
VOP_PRINT: 0xc5553d20 interlock is locked but should not be
KDB: enter: lock violation

db> show lockedvnods
Locked vnodes

0xc4c82bd0: tag tmpfs, type VDIR
    usecount 3, writecount 0, refcount 4 mountedhere 0
    flags ()
     lock type tmpfs: EXCL (count 1) by thread 0xc4ec9870 (pid 10591)#0 0xc04b9fa8 at lockmgr+0x510
#1 0xc051617d at vop_stdlock+0x21
#2 0xc0630283 at VOP_LOCK_APV+0x87
#3 0xc052b160 at vn_lock+0xac
#4 0xc0517de2 at lookup+0xd2
#5 0xc0517aae at namei+0x382
#6 0xc05254f3 at kern_lstat+0x47
#7 0xc052548f at lstat+0x1b
#8 0xc0622cc6 at syscall+0x27e
#9 0xc06109cf at Xint0x80_syscall+0x1f

tag VT_TMPFS, tmpfs_node 0xc63be420, flags 0x0, links 2
        mode 0755, owner 0, group 0, size 11100, status 0x2
 lock type tmpfs: EXCL (count 1) by thread 0xc4ec9870 (pid 10591)#0 0xc04b9fa8 at lockmgr+0x510
#1 0xc051617d at vop_stdlock+0x21
#2 0xc0630283 at VOP_LOCK_APV+0x87
#3 0xc052b160 at vn_lock+0xac
#4 0xc0517de2 at lookup+0xd2
#5 0xc0517aae at namei+0x382
#6 0xc05254f3 at kern_lstat+0x47
#7 0xc052548f at lstat+0x1b
#8 0xc0622cc6 at syscall+0x27e
#9 0xc06109cf at Xint0x80_syscall+0x1f

Core available should you need it.

Kris



----- End forwarded message -----

Return-Path: <kris@obsecurity.org>
X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on imap.leidinger.net
X-Spam-Level: 
X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DK_POLICY_SIGNSOME,FORGED_RCVD_HELO,IMPRONONCABLE_2,TW_DV autolearn=disabled version=3.1.7
X-Original-To: Alexander+FreeBSDCommitter@Leidinger.net
Delivered-To: alexander+freebsdcommitter@leidinger.net
Received: from redbullneu.bpaserver.net
	by imap.leidinger.net with POP3 (fetchmail-6.3.5)
	for <netchild@localhost> (single-drop); Thu, 11 Jan 2007 08:37:26 +0100 (CET)
Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53])
	by redbull.bpaserver.net (Postfix) with ESMTP id 249C22E204
	for <Alexander+FreeBSDCommitter@Leidinger.net>; Thu, 11 Jan 2007 08:36:39 +0100 (CET)
Received: from hub.freebsd.org (hub.freebsd.org [69.147.83.54])
	by mx2.freebsd.org (Postfix) with ESMTP id 815ED564D4
	for <Alexander+FreeBSDCommitter@Leidinger.net>; Thu, 11 Jan 2007 07:30:29 +0000 (GMT)
	(envelope-from kris@obsecurity.org)
Received: by hub.freebsd.org (Postfix)
	id 7EA4516A412; Thu, 11 Jan 2007 07:30:29 +0000 (UTC)
Delivered-To: netchild@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 7D60116A40F
	for <netchild@FreeBSD.org>; Thu, 11 Jan 2007 07:30:29 +0000 (UTC)
	(envelope-from kris@obsecurity.org)
Received: from elvis.mu.org (elvis.mu.org [192.203.228.196])
	by mx1.freebsd.org (Postfix) with ESMTP id 6EBA913C448
	for <netchild@FreeBSD.org>; Thu, 11 Jan 2007 07:30:29 +0000 (UTC)
	(envelope-from kris@obsecurity.org)
Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196])
	by elvis.mu.org (Postfix) with ESMTP id 55F121A3C1A
	for <netchild@FreeBSD.org>; Wed, 10 Jan 2007 23:30:29 -0800 (PST)
Received: by obsecurity.dyndns.org (Postfix, from userid 1000)
	id B690C519EB; Thu, 11 Jan 2007 02:30:28 -0500 (EST)
Date: Thu, 11 Jan 2007 02:30:28 -0500
From: Kris Kennaway <kris@obsecurity.org>
To: netchild@FreeBSD.org
Subject: [kris@obsecurity.org: Re: tmpfs bug?]
Message-ID: <20070111073028.GD95053@xor.obsecurity.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.2.2i
X-BPAnet-MailScanner-Information: Please contact the ISP for more information
X-BPAnet-MailScanner: Found to be clean
X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached,
	score=-13.287, required 6, BAYES_00 -15.00, DK_POLICY_SIGNSOME 0.00,
	FORGED_RCVD_HELO 0.14, IMPRONONCABLE_2 1.50, TW_DV 0.08)
X-BPAnet-MailScanner-From: kris@obsecurity.org

----- Forwarded message from Kris Kennaway <kris@obsecurity.org> -----

Date: Fri, 28 Apr 2006 01:23:24 -0400
From: Kris Kennaway <kris@obsecurity.org>
To: Kris Kennaway <kris@obsecurity.org>
Cc: Rohit Jalan <rohitj@purpe.com>
Subject: Re: tmpfs bug?
In-Reply-To: <20060428030558.GA75954@xor.obsecurity.org>
User-Agent: Mutt/1.4.2.1i

On Thu, Apr 27, 2006 at 11:05:58PM -0400, Kris Kennaway wrote:
> On Thu, Apr 27, 2006 at 02:58:49PM -0400, Kris Kennaway wrote:
> > Hi Rohit,
> > 
> > Sorry I didn't get back to you for a while.  I have just started using
> > tmpfs on my UP package build machines, since the Giant locking should
> > not be a big deal there.  However I am seeing strange behaviour: what
> > should be essentially a rm -rf of large directory trees is not
> > removing all of the files, but leaving many behind.  When I do a
> > second rm -rf it indeed removes all files.
> > 
> > In this configuration, I have 32GB of swap configured on a system with
> > 1GB of RAM.  Thus, at any given time a lot of the filesystem is
> > swapped out, and rm -rf will have to first page it back in.  I wonder
> > if something here is broken?
> > 
> > I'll keep looking at it to see if I can diagnose the problem further.
> 
> Got this panic:

Another one:

VNASSERT failed
0xc5548bd0: tag none, type VBAD
    usecount 0, writecount 0, refcount 0 mountedhere 0
    flags (VI_DOOMED)
 VI_LOCKed    #0 0xc04b9fa8 at lockmgr+0x510
#1 0xc051617d at vop_stdlock+0x21
#2 0xc0630283 at VOP_LOCK_APV+0x87
#3 0xc051d0f4 at vtryrecycle+0x54
#4 0xc051cbdf at vnlru_free+0x193
#5 0xc051ccb2 at vnlru_proc+0x82
#6 0xc04b0eb4 at fork_exit+0xa4
#7 0xc06109dc at fork_trampoline+0x8
KDB: stack backtrace:
kdb_backtrace(e32cbbfc,c0520de1,c0657fe1,c067127c,c5548bd0) at kdb_backtrace+0x29
vfs_badlock(c0657fe1,c067127c,c5548bd0) at vfs_badlock+0x11
assert_vi_unlocked(c5548bd0,c067127c) at assert_vi_unlocked+0x31
VOP_PRINT_APV(c067c960,e32cbc24) at VOP_PRINT_APV+0x89
vn_printf(c5548bd0,c0656861,c5548bd0,e32cbcb4,c051f5fe) at vn_printf+0x182
vdestroy(c5548bd0,c5548bd0,e32cbcd4,c051f5b9,c5548bd0) at vdestroy+0x71
vdropl(c5548bd0,c5548c98,0,c06576b0,878) at vdropl+0x3e
vdrop(c5548bd0,9a569,c051cc30,0,e32cbd0c) at vdrop+0x25
vnlru_free(2f) at vnlru_free+0x1ba
vnlru_proc(0,e32cbd38) at vnlru_proc+0x82
fork_exit(c051cc30,0,e32cbd38) at fork_exit+0xa4
fork_trampoline() at fork_trampoline+0x8
--- trap 0x1, eip = 0, esp = 0xe32cbd6c, ebp = 0 ---
VOP_PRINT: 0xc5548bd0 interlock is locked but should not be
KDB: enter: lock violation
db> show lockedvnods
Locked vnodes

> Core available should you need it.

Kris






----- End forwarded message -----

Return-Path: <kris@obsecurity.org>
X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on imap.leidinger.net
X-Spam-Level: 
X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DK_POLICY_SIGNSOME,FORGED_RCVD_HELO autolearn=disabled version=3.1.7
X-Original-To: Alexander+FreeBSDCommitter@Leidinger.net
Delivered-To: alexander+freebsdcommitter@leidinger.net
Received: from redbullneu.bpaserver.net
	by imap.leidinger.net with POP3 (fetchmail-6.3.5)
	for <netchild@localhost> (single-drop); Thu, 11 Jan 2007 08:37:27 +0100 (CET)
Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53])
	by redbull.bpaserver.net (Postfix) with ESMTP id 4AF2B2E1A6
	for <Alexander+FreeBSDCommitter@Leidinger.net>; Thu, 11 Jan 2007 08:37:08 +0100 (CET)
Received: from hub.freebsd.org (hub.freebsd.org [69.147.83.54])
	by mx2.freebsd.org (Postfix) with ESMTP id A6AAE558DA
	for <Alexander+FreeBSDCommitter@Leidinger.net>; Thu, 11 Jan 2007 07:30:58 +0000 (GMT)
	(envelope-from kris@obsecurity.org)
Received: by hub.freebsd.org (Postfix)
	id A447E16A40F; Thu, 11 Jan 2007 07:30:58 +0000 (UTC)
Delivered-To: netchild@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id A2CE116A407
	for <netchild@FreeBSD.org>; Thu, 11 Jan 2007 07:30:58 +0000 (UTC)
	(envelope-from kris@obsecurity.org)
Received: from elvis.mu.org (elvis.mu.org [192.203.228.196])
	by mx1.freebsd.org (Postfix) with ESMTP id 931F013C468
	for <netchild@FreeBSD.org>; Thu, 11 Jan 2007 07:30:58 +0000 (UTC)
	(envelope-from kris@obsecurity.org)
Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196])
	by elvis.mu.org (Postfix) with ESMTP id 79A141A3C1A
	for <netchild@FreeBSD.org>; Wed, 10 Jan 2007 23:30:58 -0800 (PST)
Received: by obsecurity.dyndns.org (Postfix, from userid 1000)
	id D78395148C; Thu, 11 Jan 2007 02:30:57 -0500 (EST)
Date: Thu, 11 Jan 2007 02:30:57 -0500
From: Kris Kennaway <kris@obsecurity.org>
To: netchild@FreeBSD.org
Subject: [kris@obsecurity.org: Re: TMPFS I/O Performance Benchmarks]
Message-ID: <20070111073057.GE95053@xor.obsecurity.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.2.2i
X-BPAnet-MailScanner-Information: Please contact the ISP for more information
X-BPAnet-MailScanner: Found to be clean
X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached,
	score=-14.864, required 6, autolearn=not spam, BAYES_00 -15.00,
	DK_POLICY_SIGNSOME 0.00, FORGED_RCVD_HELO 0.14)
X-BPAnet-MailScanner-From: kris@obsecurity.org

----- Forwarded message from Kris Kennaway <kris@obsecurity.org> -----

Date: Sat, 25 Mar 2006 18:47:20 -0500
From: Kris Kennaway <kris@obsecurity.org>
To: Kris Kennaway <kris@obsecurity.org>
Cc: Rohit Jalan <rohitj@purpe.com>
Subject: Re: TMPFS I/O Performance Benchmarks
In-Reply-To: <20060325233009.GA66568@xor.obsecurity.org>
User-Agent: Mutt/1.4.2.1i

On Sat, Mar 25, 2006 at 06:30:09PM -0500, Kris Kennaway wrote:
> On Sat, Mar 25, 2006 at 10:05:27AM +0530, Rohit Jalan wrote:
> > I am yet trying to reproduce the panic. I shall send you a patch as
> > soon as I manage to do so.
> > 
> > I am pretty confident that this panic is not due to a programming
> > error in the TMPFS module.
> 
> I think it's because the module isn't picking up things like WITNESS,
> INVARIANTS, etc from my kernel config (since e.g. the struct mtx
> inside struct mount will have a different size, so the module is
> accessing mnt_optnew with the wrong offset).  I tried to use
> MODULES_OVERRIDE to compile it with my kernel (after moving the module
> to sys/modules/) - I think that will make it automatically pick up the
> kernel options - but 'make depend' failed.

I gave up and just moved it into sys/fs/tmpfs, and got it to compile
in statically to the kernel with the attached diff.  Now it works!

Kris

P.S. You'll need to remove the need for -fms-extensions before this
can be imported though.


Index: sys/conf/files
===================================================================
RCS file: /data/ncvs/src/sys/conf/files,v
retrieving revision 1.1104
diff -u -r1.1104 files
--- sys/conf/files	23 Mar 2006 23:06:14 -0000	1.1104
+++ sys/conf/files	25 Mar 2006 23:32:30 -0000
@@ -1088,6 +1088,12 @@
 fs/unionfs/union_subr.c		optional unionfs
 fs/unionfs/union_vfsops.c	optional unionfs
 fs/unionfs/union_vnops.c	optional unionfs
+fs/tmpfs/tmpfs_vnops.c		optional tmpfs
+fs/tmpfs/tmpfs_fifoops.c	optional tmpfs
+fs/tmpfs/tmpfs_vfsops.c		optional tmpfs
+fs/tmpfs/tmpfs_subr.c		optional tmpfs
+fs/tmpfs/tmpfs_uma.c		optional tmpfs
+fs/tmpfs/tmpfs_vacache.c	optional tmpfs
 gdb/gdb_cons.c			optional gdb
 gdb/gdb_main.c			optional gdb
 gdb/gdb_packet.c		optional gdb
Index: sys/conf/options
===================================================================
RCS file: /data/ncvs/src/sys/conf/options,v
retrieving revision 1.531
diff -u -r1.531 options
--- sys/conf/options	5 Mar 2006 22:52:16 -0000	1.531
+++ sys/conf/options	25 Mar 2006 23:31:23 -0000
@@ -180,6 +180,7 @@
 MSDOSFS		opt_dontuse.h
 NTFS		opt_dontuse.h
 NULLFS		opt_dontuse.h
+TMPFS		opt_dontuse.h
 NWFS		opt_dontuse.h
 PORTALFS	opt_dontuse.h
 PROCFS		opt_dontuse.h




----- End forwarded message -----

