Bug 37292 - kernel BUG at fs/ecryptfs/read_write.c:47!
Summary: kernel BUG at fs/ecryptfs/read_write.c:47!
Status: CLOSED CODE_FIX
Alias: None
Product: File System
Classification: Unclassified
Component: ecryptfs (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: fs_ecryptfs
URL:
Keywords:
Depends on:
Blocks: 32012
  Show dependency tree
 
Reported: 2011-06-12 10:25 UTC by rems14
Modified: 2011-09-06 08:05 UTC (History)
13 users (show)

See Also:
Kernel Version: 2.6.39-ARCH #1
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Bugtrace (6.21 KB, text/plain)
2011-06-12 10:25 UTC, rems14
Details
dmesg (4.45 KB, text/plain)
2011-07-01 05:57 UTC, Artur
Details
[PATCH] ecryptfs: Make inode bdi consistent with superblock bdi (924 bytes, patch)
2011-07-28 05:59 UTC, Tyler Hicks
Details | Diff

Description rems14 2011-06-12 10:25:22 UTC
Created attachment 61642 [details]
Bugtrace

Hello,

After opening Evolution in gnome, a screen console is display with the bugtrace error.
To shutdown the system, the system freeze and Magic keys doesn't work.

The problem is appear when I've upgraded to linux-2.6.39, but if I downgrade to linux-2.6.38 the problem is disappeared.

I use ecryptfs to encrypt my home directory.

Thanks
Comment 1 Tyler Hicks 2011-06-17 05:23:31 UTC
To reproduce this on my end, it would help me to know how you use evolution.

I set up an encrypted home directory, running kernel 3.0-rc3, and don't see any issues while starting up evolution. I then pointed evolution to a small mbox and deleted a few emails with no problem.

Are you using evolution to connect to an imap server? Do you think this is happening while imap is fetching new headers?

I appreciate any info that you can provide.
Comment 2 rems14 2011-06-18 23:59:17 UTC
If I set up a new user with no encrypted home directory, there are no errors.
I then encrypted the new home directory ("https://wiki.archlinux.org/index.php/System_Encryption_with_eCryptfs#PAM_Mount_.5BNew_Method.5D"). I open evolution (3.0.2-1), setup an imap account and read an email, 30 seconds later the bug appears.
With a pop account it's the same issue.
Comment 3 rems14 2011-06-30 12:07:12 UTC
I've installed two kernels to try to reproduce this bug. I haven't done no other change.
1) linux-2.6.38.8 : no error
2) linux-3.0-rc5 : bug

I use a 64 bits system : x86_64.

I don't know how help you more.

Thanks.
Comment 4 Tyler Hicks 2011-06-30 16:14:06 UTC
Thanks for trying 3.0.0-rc5. I've set up an Arch system with encrypted home and pointed it at 2 imap accounts and 1 pop3 account and still haven't seen this bug. I then created a python script to generate a 2 GB mailbox of varying types of emails and sizes, served it up over imap, pointed evolution to it and still couldn't trigger this.

Are there no other eCryptfs errors in the logs besides the BUG output you attached?

I don't think it will make a difference here, but what is the lower filesystem? I've been using ext4 to try to reproduce this so far.

I'm going to assume that I can't reproduce it and, if I can find something that looks suspicious, I'll ask you to test a patch for me.
Comment 5 Artur 2011-07-01 05:57:24 UTC
Created attachment 64202 [details]
dmesg

My dmesg from this bug.
Comment 6 Artur 2011-07-01 06:09:28 UTC
Hello,

I can confirm this bug. The same happen to me. I thought at the beginning that it happens randomly but after I read this report i verified that it appears when i start evolution. I am using exchange plugin to evolution.
My system is: 
- Linux 2.6.39-ARCH #1 SMP PREEMPT x86_64 Intel(R) Core(TM)2 Duo CPU P8700 @ 2.53GHz GenuineIntel GNU/Linux,
- Evolution 3.0.2
- ecryptfs-utils 87-1 (encrypted home folder)
And like before to shutdown the system, the system freeze and Magic keys doesn't work. Problem is on kernel 2.6.39 and on 2.6.38 disappeared.

Best regards!
Comment 7 Adam Monsen 2011-07-11 21:26:15 UTC
I just got a similar stack trace on an Ubuntu 11.04 system using a mainline kernel from https://launchpad.net/~kernel-ppa/+archive/ppa .

$ uname -a
Linux butter 2.6.39-0-generic-pae #5~20110427-Ubuntu SMP Wed Apr 27 18:53:48 UTC 2011 i686 i686 i386 GNU/Linux

Unfortunately, I have no idea what may have triggered the bug, and I have no repro. I'm happy to provide system hardware and/or software details if that would be helpful.
Comment 8 Tyler Hicks 2011-07-28 05:59:28 UTC
Created attachment 66942 [details]
[PATCH] ecryptfs: Make inode bdi consistent with superblock bdi

I still cannot successfully reproduce this bug. Hopefully someone who can reliably reproduce it is willing to test this simple patch.
Comment 9 Fabian Köster 2011-08-01 11:20:38 UTC
(In reply to comment #8)
> Created an attachment (id=66942) [details]
> [PATCH] ecryptfs: Make inode bdi consistent with superblock bdi
> 
> I still cannot successfully reproduce this bug. Hopefully someone who can
> reliably reproduce it is willing to test this simple patch.

I was suffering from this bug using kernel 2.6.39 and 3.0 using Gentoo's sources.

I applied your patch and I am currently testing it. So far no kernel panic (since ~1 hour).
Comment 10 Fabian Köster 2011-08-01 11:21:15 UTC
> I applied your patch and I am currently testing it. So far no kernel panic
> (since ~1 hour).

Just for the record: I patched kernel 3.0.
Comment 11 Fabian Köster 2011-08-01 12:09:55 UTC
> I was suffering from this bug using kernel 2.6.39 and 3.0 using Gentoo's
> sources.

One additional comment: I am not using Evolution and this problem did not occur when retrieving emails from IMAP using Claws-Mail but it occurred in various situations, especially when editing text files with VIM.
Comment 12 Fabian Köster 2011-08-01 13:41:02 UTC
Just got a kernel panic again with your patch applied so it unfortunately does not fix this bug :(
Comment 13 Florian Mickler 2011-08-04 19:49:14 UTC
digetx: please don't remove cc's unless they wish to be removed.
Comment 15 Florian Mickler 2011-08-11 08:01:29 UTC
Which will be in v3.1-rc2.
Comment 16 Fabian Köster 2011-09-06 08:05:30 UTC
I can verify that this Bug is fixed in 3.1.0-rc4-git1, running stably for a week now.

Note You need to log in before you can comment on or make changes to this bug.