From owner-freebsd-fs Sun Jul 28 23:34:47 2002 Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C17CF37B400 for ; Sun, 28 Jul 2002 23:34:45 -0700 (PDT) Received: from eagle.sharma-home.net (cpe-66-1-147-119.ca.sprintbbd.net [66.1.147.119]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DF5343E3B for ; Sun, 28 Jul 2002 23:34:45 -0700 (PDT) (envelope-from adsharma@eagle.sharma-home.net) Received: by eagle.sharma-home.net (Postfix, from userid 500) id 5DD185E92C; Sun, 28 Jul 2002 23:41:00 -0700 (PDT) Date: Sun, 28 Jul 2002 23:41:00 -0700 From: Arun Sharma To: fs@freebsd.org Subject: panic in ffs_blkfree Message-ID: <20020729064100.GA5392@sharma-home.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.27i Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The only activity going on on the system was a background fsck. Unfortunately, I couldn't capture the actual panic message. This was on a 2 cpu SMP -current kernel, cvsup'ed on Friday. -Arun db> trace Debugger(c03832fa) at Debugger+0x46 panic(c0396100,c03960e0,c204284c,570490,0) at panic+0xde ffs_blkfree(c209f800,c2076420,570490,0,2000) at ffs_blkfree+0x418 indir_trunc(c1f93500,ae3210,0,0,ad00c,0,cada4c44) at indir_trunc+0x290 indir_trunc(c1f93500,ae08d0,0,1,80c,0,cada4c44) at indir_trunc+0x26b handle_workitem_freeblocks(c1f93500,0) at handle_workitem_freeblocks+0x1d0 process_worklist_item(0,0) at process_worklist_item+0x170 softdep_process_worklist(0) at softdep_process_worklist+0xb4 sched_sync(0,cada4d48) at sched_sync+0x19a fork_exit(c024ba90,0,cada4d48) at fork_exit+0x91 fork_trampoline() at fork_trampoline+0x1a To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Mon Jul 29 10:14:35 2002 Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0667B37B400 for ; Mon, 29 Jul 2002 10:14:34 -0700 (PDT) Received: from cs.rpi.edu (mumble.cs.rpi.edu [128.213.8.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 586B543E65 for ; Mon, 29 Jul 2002 10:14:33 -0700 (PDT) (envelope-from crossd@cs.rpi.edu) Received: from jenolen.cs.rpi.edu (jenolen.cs.rpi.edu [128.213.12.42]) by cs.rpi.edu (8.9.3/8.9.3) with ESMTP id NAA77881; Mon, 29 Jul 2002 13:14:27 -0400 (EDT) Received: from jenolen.cs.rpi.edu (crossd@localhost) by jenolen.cs.rpi.edu (8.11.6+Sun/8.9.3) with ESMTP id g6THESc08188; Mon, 29 Jul 2002 13:14:28 -0400 (EDT) Message-Id: <200207291714.g6THESc08188@jenolen.cs.rpi.edu> X-Authentication-Warning: jenolen.cs.rpi.edu: crossd owned process doing -bs To: fs@freebsd.org Cc: guptar@cs.rpi.edu Subject: UFS Journaling Project Date: Mon, 29 Jul 2002 13:14:28 -0400 From: "David E. Cross" Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org As some of you know "we" (CS Dept lab) are working on a UFS journal. We've made decent progress so far (given we've never worked on this part of the code so far), but we've hit a block. We need to store state information in the kernel... current journal offset, journal vnode, etc. It seems the logical place to put this is in struct ufsmount (since each mount will have different state), but whenever we put a "struct ufsjournal *uj;" in we get corruptined inode messages; we have rebuilt kernel from nothing. It seems that there are 2 copies of struct ufsmount, or something is using raw offsets. Question: How do we modify struct ufsmount without causing corruption, or where should we store a pointer to our state information? -- David Cross | email: crossd@cs.rpi.edu Lab Director | Rm: 308 Lally Hall Rensselaer Polytechnic Institute, | Ph: 518.276.2860 Department of Computer Science | Fax: 518.276.4033 I speak only for myself. | WinNT:Linux::Linux:FreeBSD To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Mon Jul 29 14: 0:44 2002 Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6729E37B400 for ; Mon, 29 Jul 2002 14:00:42 -0700 (PDT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB82B43E67 for ; Mon, 29 Jul 2002 14:00:41 -0700 (PDT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 9BA0DAE27E; Mon, 29 Jul 2002 14:00:41 -0700 (PDT) Date: Mon, 29 Jul 2002 14:00:41 -0700 From: Alfred Perlstein To: "David E. Cross" Cc: fs@freebsd.org, guptar@cs.rpi.edu Subject: Re: UFS Journaling Project Message-ID: <20020729210041.GH76284@elvis.mu.org> References: <200207291714.g6THESc08188@jenolen.cs.rpi.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200207291714.g6THESc08188@jenolen.cs.rpi.edu> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org * David E. Cross [020729 10:14] wrote: > > Question: How do we modify struct ufsmount without causing corruption, or > where should we store a pointer to our state information? Several things: first, my apologies for this being kind of silly, my access to sources are very limited now. :) 1) have you just tried _only_ adding a spare field to the start or end of ufsmount struct? 2) newfs, mount_ufs, fsck and tunefs all include ufs/ufs/ufsmount.h possibly something is going wrong there because of kernel/userland mismatch? 3) as a temp workaround why not just use a hashtable based on the ufsmount's address? -- -Alfred Perlstein [alfred@freebsd.org] [#bsdcode/efnet/irc.prison.net] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Mon Jul 29 14: 8:56 2002 Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EBBE037B400 for ; Mon, 29 Jul 2002 14:08:53 -0700 (PDT) Received: from cs.rpi.edu (mumble.cs.rpi.edu [128.213.8.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DB0343E4A for ; Mon, 29 Jul 2002 14:08:53 -0700 (PDT) (envelope-from crossd@cs.rpi.edu) Received: from jenolen.cs.rpi.edu (jenolen.cs.rpi.edu [128.213.12.42]) by cs.rpi.edu (8.9.3/8.9.3) with ESMTP id RAA85668; Mon, 29 Jul 2002 17:08:50 -0400 (EDT) Received: from jenolen.cs.rpi.edu (crossd@localhost) by jenolen.cs.rpi.edu (8.11.6+Sun/8.9.3) with ESMTP id g6TL8ob08531; Mon, 29 Jul 2002 17:08:50 -0400 (EDT) Message-Id: <200207292108.g6TL8ob08531@jenolen.cs.rpi.edu> X-Authentication-Warning: jenolen.cs.rpi.edu: crossd owned process doing -bs To: Alfred Perlstein Cc: "David E. Cross" , fs@freebsd.org, guptar@cs.rpi.edu, crossd@cs.rpi.edu Subject: Re: UFS Journaling Project In-Reply-To: Message from Alfred Perlstein of "Mon, 29 Jul 2002 14:00:41 PDT." <20020729210041.GH76284@elvis.mu.org> References: <200207291714.g6THESc08188@jenolen.cs.rpi.edu> <20020729210041.GH76284@elvis.mu.org> Date: Mon, 29 Jul 2002 17:08:49 -0400 From: "David E. Cross" Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > * David E. Cross [020729 10:14] wrote: > > > > Question: How do we modify struct ufsmount without causing corruption, or > > where should we store a pointer to our state information? > > Several things: > > first, my apologies for this being kind of silly, my access to sources > are very limited now. :) > > 1) have you just tried _only_ adding a spare field to the start or end > of ufsmount struct? Not yet, we wanted to group this with some of the other UFS extensions. > > 2) newfs, mount_ufs, fsck and tunefs all include ufs/ufs/ufsmount.h > possibly something is going wrong there because of kernel/userland > mismatch? This isn't even to the point where userland is an issue, it is right ad the kernel tries to mount the rootfs with the modified UFS code. > > 3) as a temp workaround why not just use a hashtable based on the > ufsmount's address? That is evil beyond words. -- David Cross | email: crossd@cs.rpi.edu Lab Director | Rm: 308 Lally Hall Rensselaer Polytechnic Institute, | Ph: 518.276.2860 Department of Computer Science | Fax: 518.276.4033 I speak only for myself. | WinNT:Linux::Linux:FreeBSD To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Mon Jul 29 16:14: 2 2002 Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E35FA37B400 for ; Mon, 29 Jul 2002 16:13:59 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB7DF43E4A for ; Mon, 29 Jul 2002 16:13:58 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.12.4/8.12.4) with SMTP id g6TNDgOo046282; Mon, 29 Jul 2002 19:13:42 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Mon, 29 Jul 2002 19:13:42 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: "David E. Cross" Cc: fs@freebsd.org, guptar@cs.rpi.edu Subject: Re: UFS Journaling Project In-Reply-To: <200207291714.g6THESc08188@jenolen.cs.rpi.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Mon, 29 Jul 2002, David E. Cross wrote: > As some of you know "we" (CS Dept lab) are working on a UFS journal. > We've made decent progress so far (given we've never worked on this part > of the code so far), but we've hit a block. We need to store state > information in the kernel... current journal offset, journal vnode, etc. > It seems the logical place to put this is in struct ufsmount (since each > mount will have different state), but whenever we put a "struct > ufsjournal *uj;" in we get corruptined inode messages; we have rebuilt > kernel from nothing. It seems that there are 2 copies of struct > ufsmount, or something is using raw offsets. > > Question: How do we modify struct ufsmount without causing corruption, > or where should we store a pointer to our state information? That's fairly odd. When I added extended attribute support to UFS, I simply stuck the new structure (ufs_extattr_per_mount) in struct ufsmount and never looked back. I can't, offhand, imagine what you're running into -- ufsmount should only ever be in-memory, and never on disk. Not sure I really have any useful suggestions, other perhaps than to experiment a bit and see what exactly triggers the problem. Try adding long[] arrays at various points in the structure, and see what size and location cause the problem to kick in. Very strange... Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Mon Jul 29 19:25:20 2002 Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C44D737B400; Mon, 29 Jul 2002 19:25:18 -0700 (PDT) Received: from cs.rpi.edu (mumble.cs.rpi.edu [128.213.8.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC50C43E65; Mon, 29 Jul 2002 19:25:17 -0700 (PDT) (envelope-from crossd@cs.rpi.edu) Received: from monica.cs.rpi.edu (monica.cs.rpi.edu [128.213.7.3]) by cs.rpi.edu (8.9.3/8.9.3) with ESMTP id WAA92556; Mon, 29 Jul 2002 22:25:14 -0400 (EDT) Received: from monica.cs.rpi.edu (crossd@localhost) by monica.cs.rpi.edu (8.11.6/8.11.6) with ESMTP id g6U2PEO23038; Mon, 29 Jul 2002 22:25:14 -0400 (EDT) (envelope-from crossd@monica.cs.rpi.edu) Message-Id: <200207300225.g6U2PEO23038@monica.cs.rpi.edu> To: Robert Watson Cc: "David E. Cross" , fs@freebsd.org, guptar@cs.rpi.edu, crossd@cs.rpi.edu Subject: Re: UFS Journaling Project In-Reply-To: Message from Robert Watson of "Mon, 29 Jul 2002 19:13:42 EDT." References: Date: Mon, 29 Jul 2002 22:25:14 -0400 From: "David E. Cross" Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > That's fairly odd. When I added extended attribute support to UFS, I > simply stuck the new structure (ufs_extattr_per_mount) in struct ufsmount > and never looked back. I can't, offhand, imagine what you're running into > -- ufsmount should only ever be in-memory, and never on disk. > > Not sure I really have any useful suggestions, other perhaps than to > experiment a bit and see what exactly triggers the problem. Try adding > long[] arrays at various points in the structure, and see what size and > location cause the problem to kick in. > > Very strange... Its funny you should mention extattr, that is exactly the example we have been following for this so far, and precisely the "grouping" of UFS extensions we were after. For now placing our addition at the tail end of ufsmount is working. We can track down the crud later. -- David Cross | email: crossd@cs.rpi.edu Lab Director | Rm: 308 Lally Hall Rensselaer Polytechnic Institute, | Ph: 518.276.2860 Department of Computer Science | Fax: 518.276.4033 I speak only for myself. | WinNT:Linux::Linux:FreeBSD To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message