Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#10502 - aufs with kernel 2.6.25.4 hangs system
Attached to Project:
Arch Linux
Opened by Michael Towers (gradgrind) - Monday, 26 May 2008, 07:45 GMT
Last edited by Paul Mattal (paul) - Friday, 30 May 2008, 14:24 GMT
Opened by Michael Towers (gradgrind) - Monday, 26 May 2008, 07:45 GMT
Last edited by Paul Mattal (paul) - Friday, 30 May 2008, 14:24 GMT
|
DetailsDescription:
There seems to be a big problem with aufs in conjunction with kernel26-2.6.25.4-1, it hangs the whole system, requiring a hard reset. There is no error message, nothing in the logs. I have tried this on two different computers. I can't test x86_64. This is with aufs-20080421-2, but a more recent aufs behaved in the same way. I've put it in the kernel category, because I guess that's where the problem is, but I'll report it on the aufs mailing list too. Steps to reproduce: Run this script as root: #!/bin/sh mkdir -p aufsu mkdir -p tfs/system mkdir -p tfs/mods mount -t aufs -o br:tfs/mods=rw:tfs/system=ro aufs aufsu |
This task depends upon
Closed by Paul Mattal (paul)
Friday, 30 May 2008, 14:24 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in aufs 20080527-1
Friday, 30 May 2008, 14:24 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in aufs 20080527-1
====================================================================
According to your config.gz, the recent unionfs patch is applied to your
kernel which adds a lock to fsstack_copy_inode_size() in
linux/fs/stack.c.
Aufs already acquire the same lock (since 2006) before calling the
function, so the deadlock happens.
You need to modify au_fsstack_copy_inode_size() in
AufsCVS/fs/aufs25/cpup.c, and make '#else' block available.
----------------------------------------------------------------------
static void au_fsstack_copy_inode_size(struct inode *inode,
struct inode *h_inode)
{
/* this spin_lock conflicts the new unionfs patch in -mm tree */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) || !defined(MmTree)
spin_lock(&inode->i_lock);
fsstack_copy_inode_size(inode, h_inode);
spin_unlock(&inode->i_lock);
#else
fsstack_copy_inode_size(inode, h_inode);
#endif
}
----------------------------------------------------------------------
Junjiro Okajima
====================================================================
I have tested this with the latest aufs and it seems to work. Here is the PKGBUILD I used
(note that the handling of the splice patch has changed too):
pkgname=aufs
pkgver=20080527
pkgrel=1
_kernver='2.6.25-ARCH'
pkgdesc="Another Unionfs Implementation that supports NFS branches"
arch=('i686' 'x86_64')
url="http://aufs.sourceforge.net/"
license=('GPL2')
depends=('kernel26>=2.6.25.4-1' 'kernel26<=2.6.26-0' 'glibc' 'aufs-utils')
install=$pkgname.install
options=(!libtool !makeflags)
_cvsr=":pserver:anonymous:@aufs.cvs.sourceforge.net:/cvsroot/aufs"
_cvsmod="aufs"
build() {
msg "Connecting to $_cvsmod.sourceforge.net CVS server...."
cvs -d$_cvsr checkout -D $pkgver $_cvsmod
msg "CVS checkout done or server timeout"
msg "Starting make..."
rm -rf $startdir/src/$_cvsmod-build
cp -r $startdir/src/$_cvsmod $startdir/src/$_cvsmod-build
cd $startdir/src/$_cvsmod-build
# use splice functions exported by unionfs kernel patch
# - important for loopback fs mounts
sed s'|#if.*KERNEL_VERSION(2, 6, 26).*|#if 0|' -i fs/aufs25/vfsub.h
sed -i 's|CONFIG_AUFS_SPLICE_PATCH =|CONFIG_AUFS_SPLICE_PATCH = y|' \
local.mk || return 1
# patch for spin_lock conflict with the new unionfs patch
sed s'|#if.*KERNEL_VERSION(2, 6, 26).*|#if 0|' -i fs/aufs25/cpup.c
sed -i 's|.*CONFIG_AUFS_SHWH =.*|CONFIG_AUFS_SHWH = y|' \
local.mk || return 1
# configure for NFS by:
# 1) configure local.mk to use FILP and LHASH
sed -i 's|CONFIG_AUFS_PUT_FILP_PATCH =|CONFIG_AUFS_PUT_FILP_PATCH = y|' \
local.mk || return 1
sed -i 's|CONFIG_AUFS_LHASH_PATCH =|CONFIG_AUFS_LHASH_PATCH = y|' \
local.mk || return 1
# 2) configure local.mk NOT to use FAKE_DM
sed -i 's|CONFIG_AUFS_FAKE_DM = y|CONFIG_AUFS_FAKE_DM = |' \
local.mk || return 1
# build
make KDIR=/usr/src/linux-$_kernver/ -f local.mk || return 1
# install
install -D -m644 fs/aufs25/aufs.ko \
$startdir/pkg/lib/modules/$_kernver/fs/aufs25/aufs.ko || return 1
# tweak the install script for the right kernel version
sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
$startdir/$pkgname.install || return 1
}
should be moved out today to extra
Thanks for all the input on this one. Please let me know if this fixes your problems. We'll be testing separately today.