Package: aufs Version: 0+20080719-1 Severity: serious Tags: patch Hi jak,
as you probably already know, there is a quite inconvenient bug in sid+lenny's aufs, which is blocking renames, caused by deadlocks. That means that one can't update the apt cache through apt-get/aptitude, at the very least (it's not like rename() is something very rare anyway), which IMHO makes it unfit for a stable release. For more details, initial upstream bugreport: http://article.gmane.org/gmane.linux.file-systems.aufs.user/1270 The patch as provided by upstream: http://article.gmane.org/gmane.linux.file-systems.aufs.user/1291 The thread contains various confirmations that the patch does its job and fixes the deadlocks. I personally tested it against a custom snapshot I prepared: 20080714 (I didn't know 20080719 would follow some days later, and I was checking whether the bug got fixed in the meanwhile), but also with 0+20080719-1, against which I attach a debdiff, so that you can eventually merge the patch quickly. I kept the patch as is, only adapting the patch level. Feel free to drop/adapt attribution lines in the patch/the changelog, nothing fancy in preparing an upload. More precisely: I needed to do so to prepare some (better-working) LiveCD images. Cheers, -- Cyril Brulebois
diff -u aufs-0+20080719/debian/changelog aufs-0+20080719/debian/changelog --- aufs-0+20080719/debian/changelog +++ aufs-0+20080719/debian/changelog @@ -1,3 +1,11 @@ +aufs (0+20080719-2) unstable; urgency=low + + * debian/patches/10_fix_deadlocks_in_rename.dpatch: Backport a fix for + blocking rename calls, caused by deadlocks, which led to hanging + package managers when trying to update the APT cache (Closes: #N). + + -- Cyril Brulebois <[EMAIL PROTECTED]> Fri, 01 Aug 2008 04:07:49 +0000 + aufs (0+20080719-1) unstable; urgency=low * New upstream snapshot, fixing many bugs diff -u aufs-0+20080719/debian/patches/00list aufs-0+20080719/debian/patches/00list --- aufs-0+20080719/debian/patches/00list +++ aufs-0+20080719/debian/patches/00list @@ -8,0 +9 @@ +10_fix_deadlocks_in_rename.dpatch only in patch2: unchanged: --- aufs-0+20080719.orig/debian/patches/10_fix_deadlocks_in_rename.dpatch +++ aufs-0+20080719/debian/patches/10_fix_deadlocks_in_rename.dpatch @@ -0,0 +1,56 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 10_fix_deadlocks_in_rename.dpatch by Cyril Brulebois <[EMAIL PROTECTED]> +## +## DP: Fix deadlocks as detected by running aptitude update. + [EMAIL PROTECTED]@ +Index: fs/aufs/cpup.c +=================================================================== +RCS file: /cvsroot/aufs/aufs/fs/aufs/cpup.c,v +retrieving revision 1.67 +diff -u -p -r1.67 cpup.c +--- a/fs/aufs/cpup.c 21 Jul 2008 02:51:28 -0000 1.67 ++++ b/fs/aufs/cpup.c 24 Jul 2008 04:01:23 -0000 +@@ -1004,7 +1004,7 @@ int au_cp_dirs(struct dentry *dentry, au + h_parent = au_h_dptr(parent, bdst); + } while (!h_parent); + +- if (d != real_parent) ++ if (d != real_parent && d != locked) + di_write_lock_child3(d); + + /* somebody else might create while we were sleeping */ +@@ -1041,7 +1041,7 @@ int au_cp_dirs(struct dentry *dentry, au + di_read_unlock(parent, AuLock_IR); + } + +- if (d != real_parent) ++ if (d != real_parent && d != locked) + di_write_unlock(d); + if (unlikely(err)) + break; +Index: fs/aufs25/cpup.c +=================================================================== +RCS file: /cvsroot/aufs/aufs/fs/aufs25/cpup.c,v +retrieving revision 1.11 +diff -u -p -r1.11 cpup.c +--- a/fs/aufs25/cpup.c 21 Jul 2008 02:53:36 -0000 1.11 ++++ b/fs/aufs25/cpup.c 24 Jul 2008 04:01:23 -0000 +@@ -998,7 +998,7 @@ int au_cp_dirs(struct dentry *dentry, au + h_parent = au_h_dptr(parent, bdst); + } while (!h_parent); + +- if (d != real_parent) ++ if (d != real_parent && d != locked) + di_write_lock_child3(d); + + /* somebody else might create while we were sleeping */ +@@ -1036,7 +1036,7 @@ int au_cp_dirs(struct dentry *dentry, au + di_read_unlock(parent, AuLock_IR); + } + +- if (d != real_parent) ++ if (d != real_parent && d != locked) + di_write_unlock(d); + if (unlikely(err)) + break;