Open thememika opened 3 hours ago
UPD: bch-rebalance
process has now just crashed in the same function (LZ4HC_compress_generic
).
I decided to find out about this function in source code
# scripts/faddr2line ./vmlinux LZ4HC_compress_generic+0x3b3/0x1b90
LZ4HC_compress_generic+0x3b3/0x1b90:
LZ4_copy8 at lib/lz4/lz4defs.h:158
(inlined by) LZ4_wildCopy at lib/lz4/lz4defs.h:180
(inlined by) LZ4HC_encodeSequence at lib/lz4/lz4hc_compress.c:296 (inlined by) LZ4HC_compress_generic at lib/lz4/lz4hc_compress.c:402
Also for attempt_compress:
attempt_compress+0x205/0x270:
attempt_compress at fs/bcachefs/compress.c:323 (discriminator 2)
I find you make call to the lz4 function here:
int ret = LZ4_compress_HC(
src, dst, src_len, dst_len,
compression.level,workspace
);
And that function crashes on this code:
static FORCE_INLINE void LZ4_copy8(void *dst, const void *src) {
#if LZ4_ARCH64 // this was True during kernel build
U64 a = get_unaligned((const U64 *)src);
/* THE CRASH IS HERE -> */ put_unaligned(a, (U64 *)dst);
#else
U32 a = get_unaligned((const U32 *)src);
U32 b = get_unaligned((const U32 *)src + 1);
...
Respectively this is put_unaligned
which is a macro in include/asm-generic/unaligned.h
:
#define put_unaligned(val, ptr) __put_unaligned_t(typeof(*(ptr)), (val), (ptr))
Respectively, macro "__put_unaligned_t" is finally defined in the same file:
#define __put_unaligned_t(type, val, ptr) do { \
struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \
__pptr->x = (val); \
} while (0)
🥝Kernel: 6.10.0 Hello, developers. Ive just decided to enable compression on a production filesystem because it was critically running out of space. I did it by:
The filesystem was under heavy use at that moment.
bch-rebalance
thread became 100% CPU ,I think it means that compression has started.But after less than a minute I got a crash of a kworker process in a workqueue.
I believe that last your function was
attempt_compress+0x205/0x270
. Then crash in the lz4 module/code.I don't know if it is your bug, or an issue with configuration. My configuration is this:
Thank you very much!
The filesystem is still up and it accepts reads writes.
bch-rebalance
is also still running at 100%. I don't know if a reboot is required anytime soon. Just the manualsync()
calls don't return.