On 2022-12-04 10:07, Luke Dashjr wrote:
Version: sys-apps/coreutils-9.1-r1 (Gentoo)

Context: Linux has a long-standing bug which leads to ext4 RAM dishs (zram
specifically) getting corrupted randomly. This manifests as various
newfstatat calls returning -1 errno=EUCLEAN (Structure needs cleaning).

The `du` tool, when it encounters them, prints an error as expected, but later
on aborts...

(I am not certain if the fstatat return value is related to the later abort,
because I couldn't find a way to get gdb to break only when fstatat returns
nonzero)

Thanks, your diagnosis looks like it's on the right track. I attempted to fix the bug that leads to the abort by installing the following patch into Gnulib:

https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=440b528b1d81dd31b2a2e4dde20d5c837c147811

and then propagating that into coreutils so that this should appear in the next coreutils release. Although this patch fixes two obvious bugs in the area, I can't easily test the patch in your situation, so please give it a try.



Reply via email to