Skip to contentSkip to conversation

Write time tree block corruption detected

DISCUSSION Spencer Collyer 2 participants 4 messages Aug 12, 2020 – Aug 13, 2020 Btrfs file system

lore
Share & tools
lore
#0 lore raw

I have just received a 'write time tree block corruption detected' message on a BTRFS fs I use. As per
https://btrfs.wiki.kernel.org/index.php/Tree-checker it mentions sending a mail to this mailing list for this case.

The dmesg output from the error onwards is as follows:

[17434.620469] BTRFS error (device dm-1): block=13642806624256 write time tree block corruption detected
[17435.048842] BTRFS: error (device dm-1) in btrfs_commit_transaction:2323: errno=-5 IO failure (Error while writing out transaction)
[17435.048848] BTRFS info (device dm-1): forced readonly
[17435.048851] BTRFS warning (device dm-1): Skipping commit of aborted transaction.
[17435.048853] BTRFS: error (device dm-1) in cleanup_transaction:1894: errno=-5 IO failure

As can be seen, the fs was forced into readonly mode. I restarted the box that the fs was mounted on and am able to write to the fs again (tried 'touch'ing a non-existent file and that worked), but I'm reluctant to do any more with it until I know it is safe to do so.

Is there anything I should do to ensure the fs is OK? The page I quoted earlier said not to run 'btrfs check --repair' unless told to by a developer.

Thanks for your attention.

Spencer

#1 lore raw
Quoted 6 lines · Spencer Collyer

I have just received a 'write time tree block corruption detected' message on a BTRFS fs I use. As per
https://btrfs.wiki.kernel.org/index.php/Tree-checker it mentions sending a mail to this mailing list for this case.

The dmesg output from the error onwards is as follows:

[17434.620469] BTRFS error (device dm-1): block=13642806624256 write time tree block corruption detected

What's the line before this line?

That's the most important line, and it's unfortunately not there...

Thanks,
Qu

Quoted 13 lines
[17435.048842] BTRFS: error (device dm-1) in btrfs_commit_transaction:2323: errno=-5 IO failure (Error while writing out transaction)
[17435.048848] BTRFS info (device dm-1): forced readonly
[17435.048851] BTRFS warning (device dm-1): Skipping commit of aborted transaction.
[17435.048853] BTRFS: error (device dm-1) in cleanup_transaction:1894: errno=-5 IO failure

As can be seen, the fs was forced into readonly mode. I restarted the box that the fs was mounted on and am able to write to the fs again (tried 'touch'ing a non-existent file and that worked), but I'm reluctant to do any more with it until I know it is safe to do so.

Is there anything I should do to ensure the fs is OK? The page I quoted earlier said not to run 'btrfs check --repair' unless told to by a developer.

Thanks for your attention.

Spencer

#2 lore raw
Quoted 11 lines · Qu Wenruo
Quoted 9 lines · Spencer Collyer

I have just received a 'write time tree block corruption detected' message on a BTRFS fs I use. As per
https://btrfs.wiki.kernel.org/index.php/Tree-checker it mentions sending a mail to this mailing list for this case.

The dmesg output from the error onwards is as follows:

[17434.620469] BTRFS error (device dm-1): block=13642806624256

write time tree block corruption detected

Quoted 6 lines

What's the line before this line?

That's the most important line, and it's unfortunately not there...

Thanks,
Qu

Oh, didn't realise that. Unfortunately it has gone from the dmesg ring buffer, so I can't go back to it. If it happens again I'll take a copy of the full dmesg output so I can go back to it.

The page I mentioned previously (https://btrfs.wiki.kernel.org/index.php/Tree-checker) just mentions to report the error to this mailing list. Might be an idea to expand that line to explain what needs reporting.

Rereading the linked page, I notice that it says that if it is a write error that is prevented then the fs should still be OK, and you can run 'btrfs check --readonly' to check that. It is 'btrfs check --repair' that it says to not run unless told to by a developer. So I'm going to run the '--readonly' check and if that looks good I'll try re-running the command that caused the failure - does that seem reasonable?

Thanks for your attention,

Spencer

#3 lore raw
Quoted 16 lines · Spencer Collyer
Quoted 15 lines · Qu Wenruo
Quoted 9 lines · Spencer Collyer

I have just received a 'write time tree block corruption detected' message on a BTRFS fs I use. As per
https://btrfs.wiki.kernel.org/index.php/Tree-checker it mentions sending a mail to this mailing list for this case.

The dmesg output from the error onwards is as follows:

[17434.620469] BTRFS error (device dm-1): block=13642806624256

write time tree block corruption detected

What's the line before this line?

That's the most important line, and it's unfortunately not there...

Quoted 8 lines
Quoted 2 lines

Thanks,
Qu

Oh, didn't realise that. Unfortunately it has gone from the dmesg ring buffer, so I can't go back to it. If it happens again I'll take a copy of the full dmesg output so I can go back to it.

The page I mentioned previously (https://btrfs.wiki.kernel.org/index.php/Tree-checker) just mentions to report the error to this mailing list. Might be an idea to expand that line to explain what needs reporting.

Rereading the linked page, I notice that it says that if it is a write error that is prevented then the fs should still be OK, and you can run 'btrfs check --readonly' to check that. It is 'btrfs check --repair' that it says to not run unless told to by a developer. So I'm going to run the '--readonly' check and if that looks good I'll try re-running the command that caused the failure - does that seem reasonable?

Running btrfs check is always a good idea to ensure nothing is wrong.

Write time tree checker mostly detects the following types of errors:
- Memory bit flip
Then you'd better to at least run a memtest to ensure your memory is fine.

- Btrfs internal bug
One example is the csum item overlap, which is a bug and soon get fixed.

Although you can definitely try the same command, I doubt if it can reproduce the problem.

But anyway, if you can reproduce the bug, it would definitely be helpful for us to look into.

Thanks,
Qu

Quoted 5 lines

Thanks for your attention,

Spencer