From: Mia Kanashi <chad@redpilled.dev>
To: Jens Axboe <axboe@kernel.dk>
Cc: Kent Overstreet <kent.overstreet@linux.dev>,
linux-bcachefs@vger.kernel.org, linux-nvme@lists.infradead.org,
linux-block@vger.kernel.org, Keith Busch <kbusch@kernel.org>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [BUG] I/O timeouts and system freezes on Kingston A2000 NVME with BCACHEFS
Date: Fri, 19 Jan 2024 22:20:32 +0000 [thread overview]
Message-ID: <7d9c23450fb3fca7e3820c317c24b112@redpilled.dev> (raw)
In-Reply-To: <c8f441c2-d662-43fc-9e8e-fc847428dbaa@kernel.dk>
On 2024-01-19 21:22, Jens Axboe wrote:
> On 1/19/24 5:25 AM, Mia Kanashi wrote:
>> This issue was originally reported here:
>> https://github.com/koverstreet/bcachefs/issues/628
>>
>> Transferring large amounts of files to the bcachefs from the btrfs
>> causes I/O timeouts and freezes the whole system. This doesn't seem to
>> be related to the btrfs, but rather to the heavy I/O on the drive, as
>> it happens without btrfs being mounted. Transferring the files to the
>> HDD, and then from it to the bcachefs on the NVME sometimes doesn't
>> make the problem occur. The problem only happens on the bcachefs, not
>> on btrfs or ext4. It doesn't happen on the HDD, I can't test with
>> other NVME drives sadly. The behaviour when it is frozen is like this:
>> all drive accesses can't process, when not cached in ram, so every app
>> that is loaded in the ram, continues to function, but at the moment it
>> tries to access the drive it freezes, until the drive is reset and
>> those abort status messages appear in the dmesg, after that system is
>> unfrozen for a moment, if you keep copying the files then the problem
>> reoccurs once again.
>>
>> This drive is known to have problems with the power management in the
>> past:
>> https://wiki.archlinux.org/title/Solid_state_drive/NVMe#Troubleshooting
>> But those problems where since fixed with kernel workarounds /
>> firmware updates. This issue is may be related, perhaps bcachefs does
>> something different from the other filesystems, and workarounds don't
>> apply, which causes the bug to occur only on it. It may be a problem
>> in the nvme subsystem, or just some edge case in the bcachefs too, who
>> knows. I tried to disable ASPM and setting latency to 0 like was
>> suggested, it didn't fix the problem, so I don't know. If this is
>> indeed related to that specific drive it would be hard to reproduce.
>
> From a quick look, looks like a broken drive/firmware. It is suspicious
> that all failed IO is 256 blocks. You could try and limit the transfer
> size and see if that helps:
>
> # echo 64 > /sys/block/nvme0n1/queue/max_sectors_kb
>
> Or maybe the transfer size is just a red herring, who knows. The error
> code seems wonky:
>
>> [ 185.384762] nvme0n1: I/O Cmd(0x2) @ LBA 105272408, 256 blocks, I/O
>> Error (sct 0x3 / sc 0x71)
Changing max_sectors_kb to 64 does indeed seem to fix the issue at the
first glance, default value is 128.
Also tried changing bcachefs flags during the format
--btree_node_size=64k --bucket=64k
thought maybe that is related, but that didn't help.
It is really weird that this problem only occurs on bcachefs.
prev parent reply other threads:[~2024-01-19 22:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-19 12:25 [BUG] I/O timeouts and system freezes on Kingston A2000 NVME with BCACHEFS Mia Kanashi
2024-01-19 21:22 ` Jens Axboe
2024-01-19 21:34 ` Kent Overstreet
2024-01-19 21:38 ` Jens Axboe
2024-01-19 22:20 ` Mia Kanashi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7d9c23450fb3fca7e3820c317c24b112@redpilled.dev \
--to=chad@redpilled.dev \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=kent.overstreet@linux.dev \
--cc=linux-bcachefs@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox