BTRFS error on SSD, system hard freeze

A couple of days ago, I was playing World of Warcraft and REPO simultaneously, and at one point my PC locked up and froze, but I could still hear my friends ingame, talking normally, and they could hear me. Suddenly, the audio gets stuck in a loop, and a minute later I experience my first kernel BSOD.

I hard reset the PC, turn on both games again, then everything seemed fine, until yesterday.

Yesterday I installed ARC Raiders on my PC and once it finished installing, I opened the game. Using CachyOS Proton with Steam Runtime, I loaded the game and I was on the initial configuration screen. Opened advanced settings, moved around, then suddenly, I got an error from the game saying an illegal game modification was detected, and right after my system froze completely, the game crashed and closed, but the system was non-responsive, so I did a hard reset.

Booted up the system again, play ARC Raiders, this time I opened dmesg on my second monitor. I could do the tutorial, but midway through it, I started seeing BTRFS errors on dmesg, something about the SSD controller being turned off and the BTRFS filesystem turning to read-only because it detected some errors. Because of this, the whole system became unresponsive and things didn’t work, and because one of my game storage partitions is on the same physical drive as the OS, the game was crashing as well.

Some errors were like "were like “btrfs run_delalloc_nocow failed” and “btrfs delalloc failed”. The dmesg suggestion was to turn off ASPM/PCIe power management, by adding a kernel cmdline parameter.

I tried the following parameters, with no success:

nvme_core.default_ps_max_latency_us=0 pcie_aspm=off pcie_port_pm=off

I currently have a Kingston KC3000 1TB SSD with a 256GB partition for the operating system, and I had the remaining size as another partition which I added to my game storage BTRFS filesystem.

My game storage consists of 3 different drives, and the data is distributed among them. With the errors happening and game crashes, I transferred the game storage from the faulty drive to a new one, and it seemed to be just fine.

I found out that there was a supposed read performance degradation for some NVME SSDs with Phison chips and that it was fixed with a firmware update from 2024, so I booted up Windows and updated the firmware on my SSD. I thought it was fixed, but today, I played ARC Raiders with my friend and after about 20-30 minutes playing, I got a black screen, then the terminal output appeared on the window with a lot of BTRFS rd/wr errors showing up on the screen, referring to the partition my OS is located in.

It seems like it could be a faulty drive (and it’s brand new, barely any use), but perhaps this is something else? I tried the power management kernel parameters but they didn’t help at all, I still get the same issues. The error log I see in dmesg is something like this

Failed to rotate /var/log/journal/*/system.journal: Read-only file system
nvme nvme0: Device not ready; aborting reset, CSTS=0x3
BTRFS error (device nvme0n1): bdev /dev/nvme0n1p* errs: wr 2, rd 0, flush 0, corrupt 0, gen 0

There are no reported errors on SMART, and an extended self-test revealed nothing. Even BTRFS shows no errors when I use the CLI. My next idea is to just copy the system partition to the other SSD and pray that it works and that it’s actually a faulty drive.

From that little Snippet , looks like one of your partitions is set to ready only, you can’t write to it. Check the permissions

Without further knowledge about your exact system specs, the NVMe controller reset failures (CSTS=0x3), BTRFS write errors, and automatic read-only filesystem, point to hardware failure > KC3000 drive itself.

Based on the error, it’s not likely this is a permissions error (filesystems typically get remounted read-only for IO errors > the journal shows BTRFS info: forced readonly immediately after NVMe controller failures and write errors as a symptom and not the cause. It’s therefore activated to prevent further data corruption, not the cause.

Like you mentioned, the Phison E18 controller ‘turbulence’ makes the Kingston KC3000 suspect, especially i.c.w. (specific) AMD CPU’s although same (less) reporting for Intel. However, other (hardware) issues can also apply like thermal throttling, power delivery issues (laptop), some chipsets have known NVMe power management issues, BIOS ACPI/APST, bad RAM, etc, etc.

Documented:

Confirmed Issues with Phison E18 (affects Kingston KC3000): Random read performance degradation over time - this was supposedly fixed with firmware EIFK31.7 (August 2024), which you already applied, AMD platform compatibility issues (especially Zen 2/Zen 3 on X570/B550) - but also reported on Intel systems, power state transition problems causing controller lockups (wiki Arch).

You may consider an RMA as well, based on the dmesg info:

BTRFS error (device nvme0n1p*): bdev /dev/nvme0n1p* errs: wr 2, rd 0, flush 0, corrupt 0, gen 0

BTRFS info (device nvme0n1p*): forced readonly - shows BTRFS protecting data due to I/O errors

Failed to rotate /var/log/journal/*/system.journal: Read-only file system 
- evidence of system instability from storage errors

I suggest to post your hardware/system specs, CachyOS kernel, bootloader, etc, to see if that can give a better insight.

I forgot to update this topic, but it turns out the NVME drive wasn’t plugged in properly. I took it off and plugged it back in, and the RO errors were gone!