The EINTR is not passed up, and leaves bad data in the cache as if ecryptfs thought the files were not encrypted. This is what causes the short writes. Getting an strace is quite difficult, but this time I succeeded:
lstat("include/asm-ia64/ia64_int.h", {st_mode=S_IFREG|0664, st_size=12288, ...}) = 0 lstat("include/asm-ia64/init.h", {st_mode=S_IFREG|0664, st_size=12288, ...}) = 0 lstat("include/asm-ia64/init.h", {st_mode=S_IFREG|0664, st_size=12288, ...}) = 0 lstat("include/asm-ia64/iocap.h", {st_mode=S_IFREG|0664, st_size=12288, ...}) = 0 lstat("include/asm-ia64/iocap.h", {st_mode=S_IFREG|0664, st_size=12288, ...}) = 0 lstat("include/asm-ia64/linux-null/README.origin", {st_mode=S_IFREG|0664, st_size=12288, ...}) = 0 lstat("include/asm-ia64/linux-null/README.origin", {st_mode=S_IFREG|0664, st_size=12288, ...}) = 0 lstat("include/asm-ia64/ia64_int.h", {st_mode=S_IFREG|0664, st_size=12288, ...}) = 0 open("include/asm-ia64/ia64_int.h", O_RDONLY) = 3 read(3, "#ifndef _ASM_IA64_INT_H\n#define "..., 12288) = 2139 read(3, "", 10149) = 0
$ uname -a Linux yakj.usersys.redhat.com 3.1.0-7.fc16.x86_64 #1 SMP Tue Nov 1 21:10:48 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
$ dmesg | tail -4 [162849.845909] ecryptfs_decrypt_page: Error attempting to read lower page; rc = [-4] [162849.845913] ecryptfs_readpage: Error decrypting page; rc = [-4] [162849.845923] ecryptfs_decrypt_page: Error attempting to read lower page; rc = [-4] [162849.845925] ecryptfs_readpage: Error decrypting page; rc = [-4]
-4 being EINTR.
The EINTR is not passed up, and leaves bad data in the cache as if ecryptfs thought the files were not encrypted. This is what causes the short writes. Getting an strace is quite difficult, but this time I succeeded:
lstat(" include/ asm-ia64/ ia64_int. h", {st_mode= S_IFREG| 0664, st_size=12288, ...}) = 0 include/ asm-ia64/ init.h" , {st_mode= S_IFREG| 0664, st_size=12288, ...}) = 0 include/ asm-ia64/ init.h" , {st_mode= S_IFREG| 0664, st_size=12288, ...}) = 0 include/ asm-ia64/ iocap.h" , {st_mode= S_IFREG| 0664, st_size=12288, ...}) = 0 include/ asm-ia64/ iocap.h" , {st_mode= S_IFREG| 0664, st_size=12288, ...}) = 0 include/ asm-ia64/ linux-null/ README. origin" , {st_mode= S_IFREG| 0664, st_size=12288, ...}) = 0 include/ asm-ia64/ linux-null/ README. origin" , {st_mode= S_IFREG| 0664, st_size=12288, ...}) = 0 include/ asm-ia64/ ia64_int. h", {st_mode= S_IFREG| 0664, st_size=12288, ...}) = 0 asm-ia64/ ia64_int. h", O_RDONLY) = 3 INT_H\n# define "..., 12288) = 2139
lstat("
lstat("
lstat("
lstat("
lstat("
lstat("
lstat("
open("include/
read(3, "#ifndef _ASM_IA64_
read(3, "", 10149) = 0
$ uname -a redhat. com 3.1.0-7.fc16.x86_64 #1 SMP Tue Nov 1 21:10:48 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
Linux yakj.usersys.
$ dmesg | tail -4 decrypt_ page: Error attempting to read lower page; rc = [-4] decrypt_ page: Error attempting to read lower page; rc = [-4]
[162849.845909] ecryptfs_
[162849.845913] ecryptfs_readpage: Error decrypting page; rc = [-4]
[162849.845923] ecryptfs_
[162849.845925] ecryptfs_readpage: Error decrypting page; rc = [-4]
-4 being EINTR.