Not until recently I noticed that marble (http://edu.kde.org/marble/) and nautilus was randomly crashing (sigsegv). Initially i thought this was due to a glibc upgrade but even after downgrading the crashes occurred, with occasional kernel oops on both 2.6.32.x and 2.6.33 kernels. I discovered that both these applications have a high chance of crashing during mmap calls for example, marble will crash right after this call:
if ((src = (unsigned char*) mmap (0, filelength, PROT_READ, MAP_SHARED, fd, 0)) == (unsigned char*) (caddr_t) -1) qDebug() << "mmap error for input"; where fd is a file on an aufs filesystem. The crash characteristic is a segfault after using src without warning, despite the mmap call never fails. This is where i remembered that about the time when i noticed these crashes, there was a change in aufs regarding mmap. The offending commit happens to be: commit 4b70e6f04d4292d8b5ce6cd7ac7371e68eab9175 Author: J. R. Okajima <hooano...@yahoo.co.jp> Date: Sat Jan 2 12:21:03 2010 +0900 aufs: bugfix, unlock mmap_sem temporary using BKL The aufs rwsem should be acquired before mm->mmap_sem. But mm->mmap_sem is acquired before ->mmap(). aufs_mmap() has to release it temporary with using BKL. I don't think it is a good approach, but I don't know other way. Signed-off-by: J. R. Okajima <hooano...@yahoo.co.jp> Now, I am not good with kernel programming so i do not quite understand the purpose of this commit, however, if i revert this in the latest aufs (aufs 2-standalone.tree-20100222), no more crashes in marble or nautilus, everything very stable. I am using aufs as a live filesystem on tmpfs rw with squashfs. uname -a: Linux darkstar 2.6.33 #6 SMP PREEMPT Sun Feb 28 13:59:53 EST 2010 i686 AMD Phenom(tm) II X3 720 Processor AuthenticAMD GNU/Linu If anyone could look into this that would be great. Aufs is such a good project I use it religiously. Thank you for your attention. James. ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev