public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Maneesh Soni <maneesh@in.ibm.com>
To: Walt H <waltabbyh@comcast.net>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: 2.6.1-mm2: BUG in kswapd?
Date: Fri, 16 Jan 2004 15:10:37 +0530	[thread overview]
Message-ID: <20040116094037.GA1276@in.ibm.com> (raw)
In-Reply-To: <400762F9.5010908@comcast.net>

On Thu, Jan 15, 2004 at 08:05:13PM -0800, Walt H wrote:
> Hi Maneesh,
> 
> I've had a pretty repeatible case of the BUG in list.h from attempting
> backups via rsync. This has persisted thru 2.6.1-mm3. I reverted the
> race fix patch at:
> 
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.1/2.6.1-mm3/broken-out/sysfs_remove_dir-vs-dcache_readdir-race-fix.patch
> 
> Which allows my rsync to finish properly.

Hi Walt,

This patch is needed for a different race. We get hangs when we read and
remove a sysfs directory at the same time on an SMP box. It is easily
recreated by running following two loops. (Obviously without this fix)

while true; do insmod drivers/net/dummy.ko; rmmod dummy; done
while true; do find /sys/class/net > /dev/null; done

I am still not convinced that this fix will cause any problem. 

The kswapd problem what I have understood so far, is happening because of a 
bad d_child pointer in the dentry. As it is hitting the list_del BUG(), and the 
only list_del in prune_dcache() is for d_child list pointer. I suspect dentry
from d_child list is being deleted more than once. 

Can you elaborate on the recreation scenario a little bit more or if possible
run this debug patch on top of -mm3. This should print some info about the 
bad dentry.

Thanks
Maneesh

 fs/dcache.c |    7 +++++++
 1 files changed, 7 insertions(+)

diff -puN fs/dcache.c~prune_dcache-debug fs/dcache.c
--- linux-2.6.1-mm3/fs/dcache.c~prune_dcache-debug	2004-01-16 14:36:00.000000000 +0530
+++ linux-2.6.1-mm3-maneesh/fs/dcache.c	2004-01-16 15:03:25.000000000 +0530
@@ -344,6 +344,13 @@ static inline void prune_one_dentry(stru
 	struct dentry * parent;
 
 	__d_drop(dentry);
+	if (dentry->d_child.next->prev != &dentry->d_child) {
+		printk("Bad dentry for %s flags %lx, %d\n", dentry->d_name.name,
+			dentry->d_vfs_flags, atomic_read(&dentry->d_count));
+		if (dentry->d_sb)
+			printk("Super block magic %lx\n", dentry->d_sb->s_magic);
+		BUG();
+	}
 	list_del(&dentry->d_child);
 	dentry_stat.nr_dentry--;	/* For d_free, below */
 	dentry_iput(dentry);

_
-- 
Maneesh Soni
Linux Technology Center, 
IBM Software Lab, Bangalore, India
email: maneesh@in.ibm.com
Phone: 91-80-5044999 Fax: 91-80-5268553
T/L : 9243696

  reply	other threads:[~2004-01-16  9:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-26 16:03 Oops in kobject_put during rsync backup on 2.6.2-rc1-mm3 Walt H
2004-01-16  4:05 ` 2.6.1-mm2: BUG in kswapd? Walt H
2004-01-16  9:40   ` Maneesh Soni [this message]
2004-01-16 10:03     ` Maneesh Soni
2004-01-16 10:22     ` Maneesh Soni
2004-01-16 16:00       ` Walt H
     [not found]         ` <20040128111333.GA2990@in.ibm.com>
2004-01-28 15:53           ` 2.6.1-mm2: BUG in kswapd? / Oops in kobject_put during rsync Walt H
  -- strict thread matches above, loose matches on Subject: below --
2004-01-12  4:50 2.6.1-mm2: BUG in kswapd? Walt H
2004-01-11 17:33 Jan Ischebeck
2004-01-11 22:21 ` Max Valdez
2004-01-12 12:00 ` Maneesh Soni
2004-01-12 12:40   ` Jan Ischebeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040116094037.GA1276@in.ibm.com \
    --to=maneesh@in.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=waltabbyh@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox