天天看點

request_module: runaway loop modprobe binfmt-464c問題解決

在裁剪核心時遇到了這個問題:request_module: runaway loop modprobe binfmt-464c.

在網上搜尋到了下面這篇文章:

Thanks for explaining this. I always thought my kernel supports ELF,
as I see this:

cat .config | grep ELF
CONFIG_ELF_CORE=y
CONFIG_BINFMT_ELF=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set

and in menuconfig

BINFMT_ELF [=y]
ELF_CORE [=y]
CORE_DUMP_DEFAULT_ELF_HEADERS [=n]
BINFMT_ELF_FDPIC [=n]
BINFMT_ELF [=y]
COMPAT_BINFMT_ELF [=n]

For everything expect the last "COMPAT_BINFMT_ELF" I have a
description in menuconfig.
Is this really the problem ?

Best regards

2011/1/10 Denys Vlasenko <vda.linux at googlemail.com>:
> On Monday 10 January 2011 08:08, Arno Steffen wrote:
>> In an embedded system it is recommended to set CONFIG_DESKTOP=n.
>> While busybox is working with CONFIG_DESKTOP=y, I get an error message
>> while booting
>> "request_module: runaway loop modprobe binfmt-464c"
>
> 464c is letters L and F. They come from this kernel code:
>
>                if (retval != -ENOEXEC || bprm->mm == NULL) {
>                        break;
> #ifdef CONFIG_MODULES
>                } else {
> #define printable(c) (((c)=='\t') || ((c)=='\n') || (0x20<=(c) && (c)<=0x7e))
>                        if (printable(bprm->buf[0]) &&
>                            printable(bprm->buf[1]) &&
>                            printable(bprm->buf[2]) &&
>                            printable(bprm->buf[3]))
>                                break; /* -ENOEXEC */
>                        request_module("binfmt-%04x", *(unsigned short *)(&bprm->buf[2]));
> #endif
>                }
>
> ELF executables start with 0x7f,'E','L','F' bytes - that's where L and F come from.
>
> You have ELF support compiled as a module.
>
> modprobe is started by kernel in order to load it.
> But modprobe is an ELF executable.
> Kernel needs to load ELF support module for it.
> modprobe is started by kernel in order to load it.
> But modprobe is an ELF executable.
> Kernel needs to load ELF support module for it.
> modprobe is started by kernel in order to load it.
> But modprobe is an ELF executable.
> Kernel needs to load ELF support module for it.
> modprobe is started by kernel in order to load it.
> But modprobe is an ELF executable.
> Kernel needs to load ELF support module for it.
> modprobe is started by kernel in order to load it.
> But modprobe is an ELF executable.
> Kernel needs to load ELF support module for it.
> At this point we trigger this:
>
>        max_modprobes = min(max_threads/2, MAX_KMOD_CONCURRENT);
>        atomic_inc(&kmod_concurrent);
>        if (atomic_read(&kmod_concurrent) > max_modprobes) {
>                /* We may be blaming an innocent here, but unlikely */
>                if (kmod_loop_msg++ < 5)
>                        printk(KERN_ERR
>                               "request_module: runaway loop modprobe %s\n",
>                               module_name);
>                atomic_dec(&kmod_concurrent);
>                return -ENOMEM;
>        }
>
>
>> I searched for solution in net, but found only something regarding 32
>> and 64bit OS.
>> Si I have no clue, what's the problem here.
>>
>> Used current busybox 1.18.1, compiled for arm.
>
> Recompile your kernel so that ELF support is built in.
>
> --
> vda
>
通過文章中的這句:       
464c is letters L and F.      
然後,結合錯誤提示大概可以知道是可能是核心對二進制elf格式檔案不支援, 通過這個提示想起去掉的核心選項: Userspace binary formats  ---> Kernel support for ELF binaries 重新選上該選項,編譯, 下載下傳, 運作, 問題得以解決!