IO Failures with BTRFS (btrfs_commit_transaction)

Installed Endeavour on a new SeaGate SSD. Been under a week; I get an odd issue where the system crashes due to an IO Failure on “btrfs_commit_transaction”, giving an errno of 5. I don’t know the exact cause but it seems to occur when in sleep/hibernation [I have swap for hibernation enabled from the installer], but not every time? This is also on a new Thinkpad with a Ryzen 7. I can post more laptop details if asked (please give me the commands, the terminal is not scary but I am no master) though I think the issue is either the SSD or possibly a bug with BTRFS and sleep/hibernation?

I’ve searched around online and can’t seem to find anything regarding a bug, although I was searching specifically for this “btrfs_commit_transaction” piece.

I will search up how to use SMART/stress test the disk, and search up if there’s any issue with BTRFS and sleep/hibernation meanwhile, but I would like some help on this if possible.

You should run btrfs check and see if there are any errors.

Just to make sure, I boot into a Live CD and run the check from there correct?

Would be something like btrfs check /dev/nvmeXXXX/ to check root?

Yes. It should be unmounted so you will need to do it from a live ISO if it is part of your root filesystem.

Ran the command, no errors found by btrfs check.

I’ve also run some SMART tests as well and the disk reports its health as normal.

Is it an internal drive or USB?

Internal, being used for the root filesystem. Endeavour is installed onto it.

Thanks for your help by the way.

You might consider asking on the btrfs mailing list. That is where the real btrfs experts live.

All the references I can find to that issue point to it being a controller issue but that could be coincidence.

Went ahead and emailed them. Thanks. I’ll close this thread I guess? (Or looks like I can’t, but that’s cool).

Might have a reply with the fix/solution then whenever that happens.

1 Like

Does this happen while system is idle for some time? Can you see the disk and write to it after this error occurs?

I’m not sure exactly what you mean by system is idle; when it’s idle it goes to sleep/hibernation no?

As for seeing the disk/writing to it, I think the kernel hard crashes? There’s just a black screen with the IO Failure error written on it; it looks like a BIOS diagnostics screen output which is why I think it’s a hard crash. I’m not able to input anything (at least I think, unless you think there’s someway of getting to a tty), have to power the laptop off and reboot it.

I usually turn my laptop off anyway when I’m done using it, so I might not run into it that often, but sometimes it idles/sleeps/hibernates if I take a long break or something.

The computer is on but does nothing.

While not super likely to be the cause, you should check to make sure your SSD’s firmware is up to date.

1 Like

I have it set to sleep pretty quickly; this error doesn’t occur every time it sleeps either. I can try having it set to just never go to sleep and see if anything happens? But since this error doesn’t pop up every time, I’m not sure if anything will change. We’ll see I guess?

Also, it seems “btrfs_commit_transaction” is not the only place where it fails. With the same error number/string (IO Failure + 5), it has now also failed at
“btrfs_run_delayed_refs”.

I ran fwupdmgr but it didn’t seem to find any new updates for the SSD. I’ll see I can find any somewhere else.

1 Like

So, I set the option to have the screen on indefinitely with no suspend/hibernation since the last reply I had. Error does not occur so it definitely seems to me it has to do with btrfs not liking hibernation with swap or suspend or something?

I had reached out to the BTRFS mailing list about this issue but haven’t received any response as of yet.

Checked around as much as I thought reasonable and couldn’t find anything.

1 Like

So, unsure of the solution here, but I did change it to have it sleep again some days ago. No issues since.

Maybe a kernel update, on 6.0.12 now. Other potential fix is switching the sleep option in the BIOS to s0ix because S3 is not supported. I can’t recall when I did that switch though, I feel like I had done it around the time I reported this but I may remember incorrectly. Don’t have a date for that unfortunately.

I guess further information on that: laptop originally came with a BIOS that had that sleep option, and I set it to S3. The BIOS then updated, that option was taken out of the BIOS but it kept the S3 option set. This caused issues with waking, because the laptop firmware isn’t actually able to do S3 from what I’ve read. Later downgraded to switch it back.

Again, I forget the timeline for when I changed back to s0ix… so I’m not sure that’s the issue, but it would make sense.

1 Like