Open thememika opened 2 weeks ago
Sorry that was a mistype in the name. It's not about encryption
In fs/bcachefs/compress.c:407
:
workspace = mempool_alloc(&c->compress_workspace[compression_type], GFP_NOFS);
You never check for allocation failure afterwards. And attempt_compress
also doesn't when you pass workspace
to it. And so all the way until LZ4_compress_HC()
or LZ4_compress_destSize()
who also do not.
Can it be the source of the problem?
That would explain why this problem is more likely to be reproduced when host is under memory pressure. Ohh I hope everything was so simple. I'll try to add a check and rebuild. But I'm still unsure how to properly return error there after alloc
Updated to your latest commit, then also added printk() on mempool_alloc
failure. The printk wasn't hit — my theory was wrong.
After about 3 minutes since FS start, same crash occured ...
@koverstreet I have to use my FS with rebalance thread dead... is this a known problem, is it being worked on?
If anyone experiences this problem, you can try mount opts noquota,nogrpquota,noprjquota,fsck,fix_errors
, and after FSCK, the rebalance work will be done smoothly — wait until the task bch-rebalance/<blkdev>
drops to 0% CPU. Then you can unmount. Then mount as always, with quotas. It was the magic temporary fix for me.
Hello, this issue already existed in bcachefs and my original post was https://github.com/koverstreet/bcachefs/issues/753. It seemed to be absolutely fixed after I backported many commits which followed the issue. My current commit I use is 0f25eb4b60771f08fbcca878a8f7f88086d0c885 ("
Rework logged op handling
", branchbcachefs-for-upstream
, 2024-10-04 20:25:32 -0400). Recently I have decided to compress some files on my filesystem and I have chosenlz4:6
. I usedbackground_compression
attr for each of these files. It was done in the evening and I expected it to compress files overnight. But at 5:00 morning this happened:This is my configuration.
Thanks. UPD: I'm now using latest commit of
bcachefs-for-upstream
, nothing changed. And this crash happens ALWAYS, immediately after "done starting filesystem
"