Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 343083 - ext4 corrupts large files...
Summary: ext4 corrupts large files...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High critical
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-28 14:28 UTC by Alireza Torabi
Modified: 2010-11-02 17:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alireza Torabi 2010-10-28 14:28:05 UTC
just copied a 12GB _sparse_? file to a new created ext4 filesystem on a 2.6.35.4 kernel. md5sum -ed it and everytime it's a new hash! original file's md5sum is always calculated corretly.

Reproducible: Always

Steps to Reproduce:
1. copy a large enough _sparse_? file to an ext4 filesystem. (12GB was my file)
2. md5sum the file copied.
3. hash is different everytime you do it.

Actual Results:  
md5 hash changes everytime it's run for copied file.

Expected Results:  
md5 hash should calculate the same hash every time.
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-10-28 16:43:10 UTC
It is my understanding that sparse files are not ever copied sparsely unless you tell the app to do it. tar -S, cp --sparse, rsync --sparse, etc. What did you do?
Comment 2 Alireza Torabi 2010-10-28 16:47:14 UTC
I've tried both with and without --sparse. It shouldn't matter anyway as the content of a file should still remain the same no matter how they are stored on the filesystem. If ext4 wants to treat them differently, then fine but when I read my file back I well expect to get the same file.
Comment 3 Chí-Thanh Christopher Nguyễn gentoo-dev 2010-10-31 18:45:02 UTC
I think it could be a problem of md5sum rather than of ext4. Does the same happen if you run:

# cat filename | md5sum
Comment 4 Alireza Torabi 2010-10-31 19:35:34 UTC
md5sum and sha256sum both generate random messages every time run on the copied version. They both agree on the message computed when run on the original file (stored on an ext3).
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2010-11-01 20:59:41 UTC
Please copy the output of `tune2fs -l /dev/<your-ext4-disk>' into a comment.
Comment 6 Alireza Torabi 2010-11-02 10:58:22 UTC
I've updated the kernel to 2.6.35.7 and reformatted the file system ext3 now. I'll report back once I've added a new ext4 with the same problem, hopefully the problem will not be showing on the new kernel.
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2010-11-02 17:50:23 UTC
Then please reopen this bug report when you have more information.