"bad file descriptor" during target/linux/install

Hi there!

While building a new OpenWrt 22.03.0-rc1 image for my Xiaomi AX3200 with kernel tracing enabled, the make target target/linux/install keeps failing with the error bash: 8: Bad file descriptor during step

/home/thom/thesis/openwrt/scripts/mkits.sh -D xiaomi_redmi-router-ax6s -o /home/thom/thesis/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/xiaomi_redmi-router-ax6s-kernel.bin.its -k /home/thom/thesis/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/xiaomi_redmi-router-ax6s-kernel.bin -C lzma   -d /home/thom/thesis/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/image-mt7622-xiaomi-redmi-router-ax6s.dtb   -a 0x44000000 -e 0x44000000    -c "config-1" -A arm64 -v 5.10.111

(at least, that's the step I think it is failing at, the logs are a bit hard to read).

My previous build had no such issues and was based on the same .config, just without the requirements for kernel tracing:

CONFIG_KERNEL_DYNAMIC_FTRACE="y"
CONFIG_KERNEL_DEBUG_FS="y"
CONFIG_KERNEL_FTRACE="y"
CONFIG_KERNEL_FUNCTION_TRACER="y"
CONFIG_KERNEL_FUNCTION_GRAPH_TRACER="y"
CONFIG_KERNEL_IRQSOFF_TRACER="y"
CONFIG_KERNEL_PREEMPT_TRACER="y"
CONFIG_KERNEL_SCHED_TRACER="y"
CONFIG_KERNEL_STACK_TRACER="y"
CONFIG_KERNEL_BLK_DEV_IO_TRACE="y"
CONFIG_KERNEL_FUNCTION_PROFILER="y"
CONFIG_KERNEL_FTRACE_MCOUNT_RECORD="y"

(source)

Does anyone know how to fix this?

Log of build is here: https://pastebin.com/PT6LYGZZ
.config is here: https://pastebin.com/XLV7xN9q (note that building without V=s will not work, as the kernel wants to know whether to include a random codex)
Let me know if you need more info, this is my first post on this forum :slight_smile:

I managed to narrow the issue down to CONFIG_KERNEL_FUNCTION_TRACER being enabled, but this is exactly the tracer I need.
I have also tried rc4, but that doesn't change the outcome.
Does anyone know how to fix this problem?

Thanks to PaulFertser, who figured out that the problem is that the kernel is bigger than 4 MiB.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.