File copy from linux to MAC box generates kernel oops at ecryptfs_flush().

Bug #1042232 reported by Manjunatha
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
eCryptfs
Incomplete
Medium
Unassigned

Bug Description

Copying 8MB size file on encrypted folder of linux box to MAC OS X box happens
 with below issue.
 At MAC OS X, shows below message "Sorry,the operation could not be completed
because an unexpected error occurred (Error code - 50)."
Linux kernel version - 2.6.35.13 on my custom ARM board.
Network protocol used for transfer - AFP over TCP/IP.
-------------------
[17655.600000] Unable to handle kernel NULL pointer dereference at virtual
address 00000000
[17655.610000] pgd = bf33c000
[17655.620000] [00000000] *pgd=31de0031, *pte=00000000, *ppte=00000000
[17655.640000] Internal error: Oops: 17 [#14]
[17655.640000] last sysfs file: /sys/devices/virtual/net/eth0/address
[17655.640000] Modules linked in: iscsi_trgt pkp_drv(P) sppe ufsd(P)
usb_storage xhci_hcd sata_sil24 sopp_cns3xxx_nas cns3xxx_pse_init
[17655.640000] CPU: 0 Tainted: P D
(2.6.35.13-cavm1.whitney-econa.whitney-econa #2)
[17655.640000] PC is at ecryptfs_flush+0x10/0x3c
[17655.640000] LR is at filp_close+0x48/0x80
[17655.640000] pc : [<a06433c8>] lr : [<a057115c>] psr: a0000013
[17655.640000] sp : b3db1f58 ip : b3db1f68 fp : b3db1f64
[17655.640000] r10: 00000000 r9 : b3db0000 r8 : a04f1168
[17655.640000] r7 : 00000006 r6 : bc127b20 r5 : 00000001 r4 : bc426260
[17655.640000] r3 : 00000000 r2 : 00000000 r1 : bc127b20 r0 : bc426260
[17655.640000] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment
user
[17655.640000] Control: 00c5787d Table: 3f33c00a DAC: 00000015
[17655.640000] Process afpd (pid: 22419, stack limit = 0xb3db0268)
[17655.640000] Stack: (0xb3db1f58 to 0xb3db2000)
[17655.640000] 1f40:
b3db1f84 b3db1f68
[17655.640000] 1f60: a057115c a06433c4 00000000 bc426260 bc127b20 00000014
b3db1fa4 b3db1f88
[17655.640000] 1f80: a0571248 a0571120 00000000 000e48f0 00000000 0000006c
00000000 b3db1fa8
[17655.640000] 1fa0: a04f0fc0 a05711a0 000e48f0 00000000 00000014 00000002
35594ab4 00000000
[17655.640000] 1fc0: 000e48f0 00000000 0000006c 00000006 0001b920 00000000
000d30a8 00000000
[17655.640000] 1fe0: 00000000 9e94f9a0 355ee9b8 355ef1c4 80000010 00000014
00000000 00000000
[17655.640000] [<a06433c8>] (ecryptfs_flush+0x10/0x3c) from [<a057115c>]
(filp_close+0x48/0x80)
[17655.640000] [<a057115c>] (filp_close+0x48/0x80) from [<a0571248>]
(sys_close+0xb4/0xec)
[17655.640000] [<a0571248>] (sys_close+0xb4/0xec) from [<a04f0fc0>]
(ret_fast_syscall+0x0/0x30)
[17655.640000] Code: e1a0c00d e92dd800 e24cb004 e5903068 (e5930000)
[17655.650000] ---[ end trace c0188f434fc13721 ]---

Message from syslogd@BA-FECD34 at Thu Aug 2 08:14:11 2012 ...
BA-FECD34 kernel: [17655.640000] Internal error: Oops: 17 [#14]

Message from syslogd@BA-FECD34 at Thu Aug 2 08:14:11 2012 ...
BA-FECD34 kernel: [17655.640000] last sysfs file:
/sys/devices/virtual/net/eth0/address

Message from syslogd@BA-FECD34 at Thu Aug 2 08:14:11 2012 ...
BA-FECD34 kernel: [17655.640000] Process afpd (pid: 22419, stack limit =
0xb3db0268)

Message from syslogd@BA-FECD34 at Thu Aug 2 08:14:11 2012 ...
BA-FECD34 kernel: [17655.640000] Stack: (0xb3db1f58 to 0xb3db2000)

Message from syslogd@BA-FECD34 at Thu Aug 2 08:14:11 2012 ...
BA-FECD34 kernel: [17655.640000] 1f40:
             b3db1f84 b3db1f68

Message from syslogd@BA-FECD34 at Thu Aug 2 08:14:11 2012 ...
BA-FECD34 kernel: [17655.640000] 1f60: a057115c a06433c4 00000000 bc426260
bc127b20 00000014 b3db1fa4 b3db1f88

Message from syslogd@BA-FECD34 at Thu Aug 2 08:14:11 2012 ...
BA-FECD34 kernel: [17655.640000] 1f80: a0571248 a0571120 00000000 000e48f0
00000000 0000006c 00000000 b3db1fa8

Message from syslogd@BA-FECD34 at Thu Aug 2 08:14:11 2012 ...
BA-FECD34 kernel: [17655.640000] 1fa0: a04f0fc0 a05711a0 000e48f0 00000000
00000014 00000002 35594ab4 00000000

Message from syslogd@BA-FECD34 at Thu Aug 2 08:14:11 2012 ...
BA-FECD34 kernel: [17655.640000] 1fc0: 000e48f0 00000000 0000006c 00000006
0001b920 00000000 000d30a8 00000000

Message from syslogd@BA-FECD34 at Thu Aug 2 08:14:11 2012 ...
BA-FECD34 kernel: [17655.640000] 1fe0: 00000000 9e94f9a0 355ee9b8 355ef1c4
80000010 00000014 00000000 00000000

Message from syslogd@BA-FECD34 at Thu Aug 2 08:14:11 2012 ...
BA-FECD34 kernel: [17655.640000] Code: e1a0c00d e92dd800 e24cb004 e5903068
(e5930000)
----------------------------------------------------------

Revision history for this message
Manjunatha (msrinivasan) wrote :

Hi All
Please let me know is fix is already avaliable. If so please provide patch for kernel 2.6.35.13.
Thanks

Revision history for this message
Manjunatha (msrinivasan) wrote :

The other observations is on file read during copy from linux to MAC box is much faster than file writing from MAC to linux box on encrypted folder.

Revision history for this message
Tyler Hicks (tyhicks) wrote :

Targeting this against the upstream eCryptfs project, rather than Ubuntu's ecryptfs-utils package, since the report is about a kernel bug in a vanilla kernel.

affects: ecryptfs-utils (Ubuntu) → ecryptfs
Revision history for this message
Tyler Hicks (tyhicks) wrote :

Hello, sorry to hear that you're hitting this bug.

I've not seen anything similar to this and newer kernels do not have this problem. From looking at the back trace, I think these patches may potentially fix the problem:

332ab16 eCryptfs: Add reference counting to lower files
3b06b3e eCryptfs: Fix new inode race condition [1]
b59db43 eCryptfs: Prevent file create race condition

Please let me know if any of them work. Thanks!

[1]: Note that you'll need c4f7907 and 5ccf920 to get this to apply cleanly

Changed in ecryptfs:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Manjunatha (msrinivasan) wrote :

Hi Tyler Hicks

Thanks for your valuable information. When I try to apply the patches as per comment #4 over my kernel 2.6.35.13, were failed. Since these patches seems beloing to kernel version 2.6.39. Is there are patches (as per comment #4)readily avaliable for kernel version 2.6.35.13? Otherwise I need to to backport all these metioned patches to 2.6.35.13. Please suggest.
Thanks

Revision history for this message
Tyler Hicks (tyhicks) wrote : Re: [Bug 1042232] Re: File copy from linux to MAC box generates kernel oops at ecryptfs_flush().

On 2012-09-10 19:00:59, Manjunatha wrote:
> Thanks for your valuable information. When I try to apply the patches
> as per comment #4 over my kernel 2.6.35.13, were failed. Since these
> patches seems beloing to kernel version 2.6.39. Is there are patches
> (as per comment #4)readily avaliable for kernel version 2.6.35.13?
> Otherwise I need to to backport all these metioned patches to
> 2.6.35.13. Please suggest. Thanks

Sorry, I don't believe that anyone has done the backport work to 2.6.35.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.