reiser4 w. cryptcompress data-corruption (?!)
Hi Edward,
I just ran into an (seemingly) data corruption incident:
here the steps to (hopefully) reproduce:
1. boot up system with reiser4-formatted root-partition (cryptcompress lzo1, algorithm)
2. work with it, openoffice, gnome-desktop (I had compiz activated, but I'm sure that's only worth a side-note)
3. plug in an usbstick with a large enough capacity (e.g. 4 GB) or a large enough external usb-harddrive, now format it via
mkfs.ntfs
<-- here was the point where I made the "mistake" ;), since I was concerned of the usbstick' life (read- and write-cycles are limited so I wanted to forcefully quit mkfs.ntfs and re-execute it with mkfs.ntfs -f after that didn't help and the progress number stayed at around 81% I unplugged the usbstick ;)
4. this should lead to a similar error message like the following in dmesg:
[12423.120846] reiser4[mkfs.ntfs(22617)]: dc_check_checksum (fs/reiser4/plugin/file/cryptcompress.c:971)[edward-156]: [12423.120848] WARNING: Bad disk cluster checksum -1991768807, (should be 1988809339) Fsck? [12423.120850] [12423.121158] reiser4[mkfs.ntfs(22617)]: reiser4_inflate_cluster (fs/reiser4/plugin/file/cryptcompress.c:1138)[edward-1460]: [12423.121159] WARNING: Inode 75477: disk cluster 0 looks corrupted [12423.121307] reiser4[mkfs.ntfs(22617)]: dc_check_checksum (fs/reiser4/plugin/file/cryptcompress.c:971)[edward-156]: [12423.121308] WARNING: Bad disk cluster checksum -1991768807, (should be 1988809339) Fsck? [12423.121309] [12423.121472] reiser4[mkfs.ntfs(22617)]: reiser4_inflate_cluster (fs/reiser4/plugin/file/cryptcompress.c:1138)[edward-1460]: [12423.121473] WARNING: Inode 75477: disk cluster 0 looks corrupted
5. safe your data & reboot your system with magic sysrq key
6. I booted into a livecd & checked the reiser4-partition, there was one error (corrupted cluster or something, I'm apologize for not having noted it down ;( ) after that fsck.reiser4 --build-fs
showed thousands of errors
I'm sure it would have fixed the filesystem, however I'm dependent on this box right now & need to work, so I played back a tarball with the system & here I am
I have to give you guys involed in reiserfs creation a compliment: my /home partition suffered from no (0 == zero) data corruption from this incident, where other filesystem surely would have corrupted some files (I already had similar cases with other filesystems losing almost all data ;( )
I hope you're able to reproduce this error
comments:
this is the 2nd case of ntfs-related access/contact leading to data corruption, I think Microsoft has included a secret data corruption mechanism in ntfs to destroy other opensource filesystems when accessed outside of windows ;)
Thanks for your help & work
Mat
Quoted 21 lines · Mat
Hi Edward,
I just ran into an (seemingly) data corruption incident:
here the steps to (hopefully) reproduce:
1. boot up system with reiser4-formatted root-partition (cryptcompress lzo1, algorithm)
2. work with it, openoffice, gnome-desktop (I had compiz activated, but I'm sure that's only worth a side-note)
3. plug in an usbstick with a large enough capacity (e.g. 4 GB) or a large enough external usb-harddrive, now format it via
mkfs.ntfs<-- here was the point where I made the "mistake" ;), since I was concerned of the usbstick' life (read- and write-cycles are limited so I wanted to forcefully quit mkfs.ntfs and re-execute it with mkfs.ntfs -f after that didn't help and the progress number stayed at around 81% I unplugged the usbstick ;)
4. this should lead to a similar error message like the following in dmesg:
Quoted 16 lines
[12423.120846] reiser4[mkfs.ntfs(22617)]: dc_check_checksum (fs/reiser4/plugin/file/cryptcompress.c:971)[edward-156]: [12423.120848] WARNING: Bad disk cluster checksum -1991768807, (should be 1988809339) Fsck? [12423.120850] [12423.121158] reiser4[mkfs.ntfs(22617)]: reiser4_inflate_cluster (fs/reiser4/plugin/file/cryptcompress.c:1138)[edward-1460]: [12423.121159] WARNING: Inode 75477: disk cluster 0 looks corrupted [12423.121307] reiser4[mkfs.ntfs(22617)]: dc_check_checksum (fs/reiser4/plugin/file/cryptcompress.c:971)[edward-156]: [12423.121308] WARNING: Bad disk cluster checksum -1991768807, (should be 1988809339) Fsck? [12423.121309] [12423.121472] reiser4[mkfs.ntfs(22617)]: reiser4_inflate_cluster (fs/reiser4/plugin/file/cryptcompress.c:1138)[edward-1460]: [12423.121473] WARNING: Inode 75477: disk cluster 0 looks corrupted
Interesting, I'll try to reproduce it...
Btw, it would be nice to figure out (by find -inum 75477) what is that file (It may shed some light to this corruption).
Quoted 7 lines
5. safe your data & reboot your system with magic sysrq key
6. I booted into a livecd & checked the reiser4-partition, there was one error (corrupted cluster or something, I'm apologize for not having noted it down ;( ) after that fsck.reiser4 --build-fs
showed thousands of errors
Yes, the kernel doesn't support i_bytes and i_blocks of compressed files (because of performance reason), but fsck expects this to be set properly. The option -n suppresses the screams..
Quoted 4 lines
I'm sure it would have fixed the filesystem, however I'm dependent on this box right now & need to work, so I played back a tarball with the system & here I am
So eventually fsck.reiser4 --build-fs reported that fs is consistent?
Quoted 6 lines
I have to give you guys involed in reiserfs creation a compliment: my /home partition suffered from no (0 == zero) data corruption from this incident, where other filesystem surely would have corrupted some files (I already had similar cases with other filesystems losing almost all data ;( )
Thanks for your experience.
Edward.
Quoted 18 lines
I hope you're able to reproduce this error
comments:
this is the 2nd case of ntfs-related access/contact leading to data corruption, I think Microsoft has included a secret data corruption mechanism in ntfs to destroy other opensource filesystems when accessed outside of windows ;)Thanks for your help & work
Mat
-
To unsubscribe from this list: send the line "unsubscribe reiserfs-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 18 lines · Dushan Tcholich
Hi
I had a same scary experience of reiser4 repairing thousands of errors on
Quoted 4 lines · but it was false alarm as Edward
Me:
After fsck.reiser4 --check I had to do a fsck.reiser4 --build-fs, which lasted ~55min. It fixed 1 error on the start and for next 50 min fixed wrong bytes errors in every node, like in the second picture.Edward:
Ignore reports about wrong bytes.
This is because cryptcompress plugin doesn't keep a track about bytes, and fsck calculates and insert correct value. Keeping a track of bytes by kernel leads to performance drop (even worse then with atime), so we decided to not support it.
Quoted 3 lines
Were those thousands of errors in step 6. of your mail wrong byte errors?
Dushan
Hi, Dushan,
no, those actually were (real) data corruption errors,
as I wrote (I didn't made it that clear) I impatiently interrupted fsck.reiser4, reformatted the partition and extracted the tarball with the system
I just woke up & thinking over it now: the corruption behavior was pretty similar to the corruption with bitdefender-console,
Edward:
I hope you still have the mails were I described "corrupting"/triggering the error with ntfs-scanning before you fixed it?
1.) boot into system with reiser4 as root partition
2.) start up GUI (gnome, kde, whatever)
3.) work with with it a little
4.) mount ntfs-partition (it shouldn't matter if mounted with in-kernel ntfs-driver or ntfs3g) [the partition should ideally contain a windows-system with several gigabytes of data]
5.) scan the partition with bdc --arc --files /mnt/win
6.) filesystem corrupts,
7.) result: nothing can be launched anymore, even bash is broken - just everything
it was also the case this time:
whenever I tried to launch epiphany, nautilus, gnome-terminal it wouldn't launch them
--> the only thing still working was gnome-terminal
after that I exited to the CLI & when I recognised it was similar to the previous corruption case (bitdefender-console)
I immediately killed everything via magic sysrq key & rebooted without syncing to maintain my data intact (on /home)
the behavior is pretty interesting:
it seems to corrupt progressively in steps (such as with the bitdefender-console corruption)
first almost all still works, bit by bit more and more programs won't work anymore
Regards
Mat
Quoted 46 lines · Matthew
Quoted 22 lines · Dushan Tcholich
Hi
I had a same scary experience of reiser4 repairing thousands of errors on
Quoted 6 lines · but it was false alarm as Edward
Me:
After fsck.reiser4 --check I had to do a fsck.reiser4 --build-fs, which lasted ~55min. It fixed 1 error on the start and for next 50 min fixed wrong bytes errors in every node, like in the second picture.
Edward:
Ignore reports about wrong bytes.
This is because cryptcompress plugin doesn't keep a track about bytes, and fsck calculates and insert correct value. Keeping a track of bytes by kernel leads to performance drop (even worse then with atime), so we decided to not support it.Quoted 5 lines
Were those thousands of errors in step 6. of your mail wrong byte errors?
Dushan
Hi, Dushan,
no, those actually were (real) data corruption errors,
as I wrote (I didn't made it that clear) I impatiently interrupted fsck.reiser4, reformatted the partition and extracted the tarball with the systemI just woke up & thinking over it now: the corruption behavior was pretty similar to the corruption with bitdefender-console,
Edward:
I hope you still have the mails were I described "corrupting"/triggering the error with ntfs-scanning before you fixed it?
Quoted 9 lines
1.) boot into system with reiser4 as root partition
2.) start up GUI (gnome, kde, whatever)
3.) work with with it a little
4.) mount ntfs-partition (it shouldn't matter if mounted with in-kernel ntfs-driver or ntfs3g) [the partition should ideally contain a windows-system with several gigabytes of data]
5.) scan the partition with bdc --arc --files/mnt/win
what is the bdc?
Quoted 26 lines
6.) filesystem corrupts,
7.) result: nothing can be launched anymore, even bash is broken - just everythingit was also the case this time:
whenever I tried to launch epiphany, nautilus, gnome-terminal it wouldn't launch them
--> the only thing still working was gnome-terminal
after that I exited to the CLI & when I recognised it was similar to the previous corruption case (bitdefender-console)
I immediately killed everything via magic sysrq key & rebooted without syncing to maintain my data intact (on /home)the behavior is pretty interesting:
it seems to corrupt progressively in steps (such as with the bitdefender-console corruption)first almost all still works, bit by bit more and more programs won't work anymore
Regards
Mat
Quoted 59 lines · Edward Shishkin
Quoted 46 lines · Matthew
Quoted 22 lines · Dushan Tcholich
Hi
I had a same scary experience of reiser4 repairing thousands of errors on
Quoted 6 lines · but it was false alarm as Edward
Me:
After fsck.reiser4 --check I had to do a fsck.reiser4 --build-fs, which lasted ~55min. It fixed 1 error on the start and for next 50 min fixed wrong bytes errors in every node, like in the second picture.
Edward:
Ignore reports about wrong bytes.
This is because cryptcompress plugin doesn't keep a track about bytes, and fsck calculates and insert correct value. Keeping a track of bytes by kernel leads to performance drop (even worse then with atime), so we decided to not support it.Quoted 5 lines
Were those thousands of errors in step 6. of your mail wrong byte errors?
Dushan
Hi, Dushan,
no, those actually were (real) data corruption errors,
as I wrote (I didn't made it that clear) I impatiently interrupted fsck.reiser4, reformatted the partition and extracted the tarball with the systemI just woke up & thinking over it now: the corruption behavior was pretty similar to the corruption with bitdefender-console,
Edward:
I hope you still have the mails were I described "corrupting"/triggering the error with ntfs-scanning before you fixed it?Quoted 9 lines
1.) boot into system with reiser4 as root partition
2.) start up GUI (gnome, kde, whatever)
3.) work with with it a little
4.) mount ntfs-partition (it shouldn't matter if mounted with in-kernel ntfs-driver or ntfs3g) [the partition should ideally contain a windows-system with several gigabytes of data]
5.) scan the partition with bdc --arc --files/mnt/win
Quoted 32 lines
what is the bdc?
Quoted 26 lines
6.) filesystem corrupts,
7.) result: nothing can be launched anymore, even bash is broken - just everythingit was also the case this time:
whenever I tried to launch epiphany, nautilus, gnome-terminal it wouldn't launch them
--> the only thing still working was gnome-terminal
after that I exited to the CLI & when I recognised it was similar to the previous corruption case (bitdefender-console)
I immediately killed everything via magic sysrq key & rebooted without syncing to maintain my data intact (on /home)the behavior is pretty interesting:
it seems to corrupt progressively in steps (such as with the bitdefender-console corruption)first almost all still works, bit by bit more and more programs won't work anymore
Regards
Mat
sorry for not clearing that:
[I] app-antivirus/bitdefender-console
Available versions: -7.0.1-r1 -7.0.1-r1[1] (~)7.1 (~)7.1[1]
Installed versions: 7.1[1](22:37:31 06.01.2008)
Homepage: http://www.bitdefender.com/
Description: BitDefender console antivirus[1] "portage" /usr/local/portage
the name of the program's file is:
' BitDefender-Console-Antivirus-7.1-3.linux-gcc3x.i386.run '
Thanks
Mat
Hello Mat,
It looks like someone stomped your data, and that antivirus is the first candidate to this position ;)
For more careful diagnostics your root partition should be investigated with debugfs.reiser4 to check consistency of disk clusters. The next stage is to make surveillance under root drive to figure out who does issue write requests when scanning /mnt/win.
If you don't object, then I'll put it to longterm todo ;)
Thanks,
Edward.
Quoted 116 lines · Matthew
Quoted 58 lines · Edward Shishkin
Quoted 46 lines · Matthew
Quoted 22 lines · Dushan Tcholich
Hi
I had a same scary experience of reiser4 repairing thousands of errors on
Quoted 6 lines · but it was false alarm as Edward
Me:
After fsck.reiser4 --check I had to do a fsck.reiser4 --build-fs, which lasted ~55min. It fixed 1 error on the start and for next 50 min fixed wrong bytes errors in every node, like in the second picture.
Edward:
Ignore reports about wrong bytes.
This is because cryptcompress plugin doesn't keep a track about bytes, and fsck calculates and insert correct value. Keeping a track of bytes by kernel leads to performance drop (even worse then with atime), so we decided to not support it.Quoted 5 lines
Were those thousands of errors in step 6. of your mail wrong byte errors?
Dushan
Hi, Dushan,
no, those actually were (real) data corruption errors,
as I wrote (I didn't made it that clear) I impatiently interrupted fsck.reiser4, reformatted the partition and extracted the tarball with the systemI just woke up & thinking over it now: the corruption behavior was pretty similar to the corruption with bitdefender-console,
Edward:
I hope you still have the mails were I described "corrupting"/triggering the error with ntfs-scanning before you fixed it?Quoted 9 lines
1.) boot into system with reiser4 as root partition
2.) start up GUI (gnome, kde, whatever)
3.) work with with it a little
4.) mount ntfs-partition (it shouldn't matter if mounted with in-kernel ntfs-driver or ntfs3g) [the partition should ideally contain a windows-system with several gigabytes of data]
5.) scan the partition with bdc --arc --files/mnt/winQuoted 34 lines
what is the bdc?
Quoted 26 lines
6.) filesystem corrupts,
7.) result: nothing can be launched anymore, even bash is broken - just everythingit was also the case this time:
whenever I tried to launch epiphany, nautilus, gnome-terminal it wouldn't launch them
--> the only thing still working was gnome-terminal
after that I exited to the CLI & when I recognised it was similar to the previous corruption case (bitdefender-console)
I immediately killed everything via magic sysrq key & rebooted without syncing to maintain my data intact (on /home)the behavior is pretty interesting:
it seems to corrupt progressively in steps (such as with the bitdefender-console corruption)first almost all still works, bit by bit more and more programs won't work anymore
Regards
Mat
sorry for not clearing that:
[I] app-antivirus/bitdefender-console
Available versions: -7.0.1-r1 -7.0.1-r1[1] (~)7.1 (~)7.1[1] Installed versions: 7.1[1](22:37:31 06.01.2008) Homepage: http://www.bitdefender.com/ Description: BitDefender console antivirus[1] "portage"
/usr/local/portagethe name of the program's file is:
' BitDefender-Console-Antivirus-7.1-3.linux-gcc3x.i386.run 'Thanks
Mat
Quoted 11 lines · Edward Shishkin
Hello Mat,
It looks like someone stomped your data, and that antivirus is the first candidate to this position ;)
For more careful diagnostics your root partition should be investigated with debugfs.reiser4 to check consistency of disk clusters. The next stage is to make surveillance under root drive to figure out who does issue write requests when scanning
/mnt/win.
Quoted 127 lines
If you don't object, then I'll put it to longterm todo ;)
Thanks,
Edward.Quoted 116 lines · Matthew
Quoted 58 lines · Edward Shishkin
Quoted 46 lines · Matthew
Quoted 22 lines · Dushan Tcholich
Hi
I had a same scary experience of reiser4 repairing thousands of errors on
Quoted 6 lines · but it was false alarm as Edward
Me:
After fsck.reiser4 --check I had to do a fsck.reiser4 --build-fs, which lasted ~55min. It fixed 1 error on the start and for next 50 min fixed wrong bytes errors in every node, like in the second picture.
Edward:
Ignore reports about wrong bytes.
This is because cryptcompress plugin doesn't keep a track about bytes, and fsck calculates and insert correct value. Keeping a track of bytes by kernel leads to performance drop (even worse then with atime), so we decided to not support it.Quoted 5 lines
Were those thousands of errors in step 6. of your mail wrong byte errors?
Dushan
Hi, Dushan,
no, those actually were (real) data corruption errors,
as I wrote (I didn't made it that clear) I impatiently interrupted fsck.reiser4, reformatted the partition and extracted the tarball with the systemI just woke up & thinking over it now: the corruption behavior was pretty similar to the corruption with bitdefender-console,
Edward:
I hope you still have the mails were I described "corrupting"/triggering the error with ntfs-scanning before you fixed it?Quoted 9 lines
1.) boot into system with reiser4 as root partition
2.) start up GUI (gnome, kde, whatever)
3.) work with with it a little
4.) mount ntfs-partition (it shouldn't matter if mounted with in-kernel ntfs-driver or ntfs3g) [the partition should ideally contain a windows-system with several gigabytes of data]
5.) scan the partition with bdc --arc --files/mnt/winQuoted 34 lines
what is the bdc?
Quoted 26 lines
6.) filesystem corrupts,
7.) result: nothing can be launched anymore, even bash is broken - just everythingit was also the case this time:
whenever I tried to launch epiphany, nautilus, gnome-terminal it wouldn't launch them
--> the only thing still working was gnome-terminal
after that I exited to the CLI & when I recognised it was similar to the previous corruption case (bitdefender-console)
I immediately killed everything via magic sysrq key & rebooted without syncing to maintain my data intact (on /home)the behavior is pretty interesting:
it seems to corrupt progressively in steps (such as with the bitdefender-console corruption)first almost all still works, bit by bit more and more programs won't work anymore
Regards
Mat
sorry for not clearing that:
[I] app-antivirus/bitdefender-console
Available versions: -7.0.1-r1 -7.0.1-r1[1] (~)7.1 (~)7.1[1] Installed versions: 7.1[1](22:37:31 06.01.2008) Homepage: http://www.bitdefender.com/ Description: BitDefender console antivirus[1] "portage"
/usr/local/portagethe name of the program's file is:
' BitDefender-Console-Antivirus-7.1-3.linux-gcc3x.i386.run 'Thanks
Mat
Hi Edward,
sure, I'm happy with the current state of reiser4 (for now),
it's on the root-partition on 2 computers, and several data partitions, the only problems I had until now was with the root partition(s) involved, so no "real" data corruption/loss, as there's always a backup-tarball of my system
on an external hdd lying next to me ;)
I think I need to omit contact with those usage-cases as far as possible (ntfs & bitdefender-console) then it'll be fine
Quoted 1 line
If you don't object, then I'll put it to longterm todo ;)
no, of course not, just go ahead, there are more important "cases" than mine waiting to get taken care of :)
*crossing fingers* that reiser4' problems will be sorted out as fast as possible
Good luck &
thanks a lot again,
Mat