[2.6.38-3.x] [BUG] soft lockup - CPU#X stuck for 23s! (vfs, autofs, vserver)

From: PaweÅ Sikora
Date: Sun Sep 23 2012 - 02:19:48 EST


Hi,

a long time ago i reported an ugly soft lock of heavy loaded opteron system without usable backtraces :(
recently, i've logged on 3.4.6 via serial console backtraces from all 16 cores which show some kind
of vfs lock (http://pluto.agmk.net/kernel/oops.txt). this lock occurs on heavy loaded system with
frequent autofs unmount (timeout=1s) in action with vserver patch applied.

i've isolated the vserver function that exposes problem: mnt_is_reachable()
http://vserver.13thfloor.at/Experimental/patch-3.4.6-vs2.3.3.6.diff:

static int mnt_is_reachable(struct vfsmount *vfsmnt)
{
struct path root;
struct dentry *point;
struct mount *mnt = real_mount(vfsmnt);
struct mount *root_mnt;
int ret;

if (mnt == mnt->mnt_ns->root)
return 1;

br_read_lock(vfsmount_lock);
root = current->fs->root;
root_mnt = real_mount(root.mnt);
point = root.dentry;

while ((mnt != mnt->mnt_parent) && (mnt != root_mnt)) {
point = mnt->mnt_mountpoint;
mnt = mnt->mnt_parent;
}

ret = (mnt == root_mnt) && is_subdir(point, root.dentry);

br_read_unlock(vfsmount_lock);

return ret;
}

the vserver developer (Herbert Poetzl) said that locking scheme used in this function looks correct,
so it might be a hidden vfs bug accidentaly exposed by vserver patch. i'm not a kernel developer,
so i'd like to ask you for help in solving this problem. afaics the problem starts with 2.6.38
release which introduced some major vfs changes.

please CC me on reply.

BR,
PaweÅ.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/