Trying to update world on my Raspberry Pi 4 with 4 GiB RAM recently caused the machine to hang. On second try, with top running on another connection, the last thing I see is it was compiling the kernel and pahole eating the whole memory and ioswap getting above 90% then the machine stops responding completely (top screen no more refreshed, trying new ssh connection hangs indefinitely ...) After invoking OOM killer manually via sysrq, it returns to normal - however emerge finishes with error, without installing the new kernel obviously. Reproducible: Always Steps to Reproduce: 1. have Gentoo on Raspberry Pi with 4 GiB RAM 2. emerge -1 sys-kernel/gentoo-kernel Actual Results: system hangs emerge output ends in: + aarch64-unknown-linux-gnu-ld.bfd -EL -maarch64elf -z noexecstack --no-warn-rwx-segments --no-undefined -X -shared -Bsymbolic -z notext --no-apply-dynamic-relocs --fix-cortex-a53-843419 --build-id=sha1 -X --orphan-handling=warn --script=./arch/arm64/kernel/vmlinux.lds -o .tmp_vmlinux.btf --whole-archive vmlinux.a .vmlinux.export.o init/version-timestamp.o --no-whole-archive --start-group ./drivers/firmware/efi/libstub/lib.a --end-group + info BTF .btf.vmlinux.bin.o + printf ' %-7s %s\n' BTF .btf.vmlinux.bin.o BTF .btf.vmlinux.bin.o + LLVM_OBJCOPY=aarch64-unknown-linux-gnu-objcopy + pahole -J --btf_gen_floats -j --lang_exclude=rust --skip_encoding_btf_inconsistent_proto --btf_gen_optimized .tmp_vmlinux.btf Expected Results: emerge finishes cleanly
Maybe we should backport https://lore.kernel.org/linux-kbuild/20241102100452.793970-1-flo@geekplace.eu/.