Bug 2166863

Summary: btrfs: Transaction aborted (error -5)
Product: [Fedora] Fedora Reporter: Marián Konček <mkoncek>
Component: btrfs-progsAssignee: Josef Bacik <josef>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: bugzilla, esandeen, igor.raits, josef, ngompa13
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-02-03 19:03:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marián Konček 2023-02-03 09:19:04 UTC
As a user of Rawhide and btrfs FS, it started recently happening that after roughly few days up to about 2 two weeks of uptime, btrfs would report an error and become readonly.

Example of dmesg output:
```
[424211.839363] BTRFS error (device dm-0: state A): Transaction aborted (error -5)
[424211.839778] BTRFS: error (device dm-0: state A) in __btrfs_update_delayed_inode:1065: errno=-5 IO failure
[424211.840228] BTRFS info (device dm-0: state EA): forced readonly
```
Another example:
```
[399029.229255] BTRFS error (device dm-0: state A): Transaction aborted (error -5)
[399029.229317] BTRFS: error (device dm-0: state A) in btrfs_finish_ordered_io:3337: errno=-5 IO failure
[399029.229447] BTRFS info (device dm-0: state EA): forced readonly
[399066.194732] systemd-journald[3014]: /var/log/journal/4592ba22b74c4fe399931b0383e84dba/system.journal: Journal file corrupted, rotating.
[399066.194760] systemd-journald[3014]: Failed to write entry to /var/log/journal/4592ba22b74c4fe399931b0383e84dba/system.journal (23 items, 787 bytes), rotating before retrying: Bad message
[399066.194864] systemd-journald[3014]: Failed to rotate /var/log/journal/4592ba22b74c4fe399931b0383e84dba/system.journal: Read-only file system
[399066.194914] systemd-journald[3014]: Failed to rotate /var/log/journal/4592ba22b74c4fe399931b0383e84dba/user-1000.journal: Read-only file system
[399066.220548] systemd-journald[3014]: Failed to write entry to /var/log/journal/4592ba22b74c4fe399931b0383e84dba/system.journal (23 items, 787 bytes) despite vacuuming, ignoring: Bad message
[399067.171035] BTRFS error (device dm-0: state EA): parent transid verify failed on logical 2082258944 mirror 1 wanted 857661 found 835503
[399091.732268] BTRFS error (device dm-0: state EA): parent transid verify failed on logical 2079866880 mirror 1 wanted 857661 found 856401
[399091.732602] BTRFS error (device dm-0: state EA): parent transid verify failed on logical 2079866880 mirror 1 wanted 857661 found 856401
[399091.733988] BTRFS error (device dm-0: state EA): parent transid verify failed on logical 2079866880 mirror 1 wanted 857661 found 856401
```

This has been happening at least around December 2022 and January 2023.
I don't think I can provide any more info since I reinstalled my system with ext4 recently.

Comment 1 Josef Bacik 2023-02-03 19:03:48 UTC
This was a bug that was introduced in v6.2-rc1 that as fixed in v6.2-rc3.  I realize you've re-formatted, but if anybody else trips over this you can upgrade to a recent kernel.