Comment 24 for bug 490005

Revision history for this message
Paolo Bonzini (bonzini) wrote :

I am seeing these messages whenever I have two processes reading the same file. Note that write access is not necessary.

The simplest way to reproduce it is

    git grep abczzz & git grep abczzz

but this is probably because git uses multiple threads, rather than because the bug is related to git. In fact, I reproduced it in places where I have not even moved the HEAD of this repository since I copied it from an unencrypted directory to an ecryptfs one.

Another way to reproduce it for me (but much less consistently) is:

    (find . -type f | xargs md5sum > /dev/null) & find . -type f | xargs md5sum > /dev/null

which gives occasional Input/Output errors. In some cases (and especially with git grep) instead the program sees an empty file (confirmed with strace) which shows as

    error: 'Documentation/HOWTO': short read Success
    error: 'Documentation/arm/tcm.txt': short read Success
    error: 'Documentation/braille-console.txt': short read Success

At the same time, the dreaded messages appear in /var/log/messages

    Dec 7 16:55:54 yakj kernel: [32510.145170] ecryptfs_readpage: Error decrypting page; rc = [-4]
    Dec 7 16:55:54 yakj kernel: [32510.145180] ecryptfs_read_and_validate_header_region: Error reading header region; rc = [-4]
    Dec 7 16:55:54 yakj kernel: [32510.145182] ecryptfs_decrypt_page: Error attempting to read lower page; rc = [-4]
    Dec 7 16:55:54 yakj kernel: [32510.145184] ecryptfs_readpage: Error decrypting page; rc = [-4]
    Dec 7 16:55:54 yakj kernel: [32510.145198] ecryptfs_read_and_validate_header_region: Error reading header region; rc = [-4]
    Dec 7 16:55:54 yakj kernel: [32510.145231] ecryptfs_read_and_validate_header_region: Error reading header region; rc = [-4]
    Dec 7 16:55:54 yakj kernel: [32510.145235] ecryptfs_read_and_validate_header_region: Error reading header region; rc = [-4]
    Dec 7 16:55:54 yakj kernel: [32510.145245] ecryptfs_read_and_validate_header_region: Error reading header region; rc = [-4]
    Dec 7 16:55:54 yakj kernel: [32510.145285] ecryptfs_read_and_validate_header_region: Error reading header region; rc = [-4]
    Dec 7 16:55:54 yakj kernel: [32510.145320] ecryptfs_read_and_validate_header_region: Error reading header region; rc = [-4]
    Dec 7 16:59:56 yakj kernel: [32752.032531] ecryptfs_read_and_validate_header_region: Error reading header region; rc = [-4]
    Dec 7 16:59:56 yakj kernel: [32752.032550] Either the lower file is not in a valid eCryptfs format, or the key could not be retrieved. Plaintext passthrough mode is not enabled; returning -EIO
    Dec 7 17:01:11 yakj kernel: [32827.829724] Either the lower file is not in a valid eCryptfs format, or the key could not be retrieved. Plaintext passthrough mode is not enabled; returning -EIO