From: Yoann Congal <yoann.congal@smile.fr>
To: Masahiro Yamada <masahiroy@kernel.org>,
Nathan Chancellor <nathan@kernel.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
Randy Dunlap <rdunlap@infradead.org>,
Brandon Maier <brandon.maier@collins.com>,
Nick Desaulniers <ndesaulniers@google.com>,
llvm@lists.linux.dev
Subject: Re: [PATCH v5] kconfig: avoid an infinite loop in oldconfig/syncconfig
Date: Thu, 9 Nov 2023 23:56:48 +0100 [thread overview]
Message-ID: <eb9cb563-d480-4000-8feb-b63b856235c3@smile.fr> (raw)
In-Reply-To: <CAK7LNARpJ9huseh-Ro9v8W_tabMof9cuUZO43gi-hfEnXG4FYA@mail.gmail.com>
Hi,
Le 09/11/2023 à 05:26, Masahiro Yamada a écrit :
> On Tue, Nov 7, 2023 at 11:00 PM Nathan Chancellor <nathan@kernel.org> wrote:
>> For what it's worth, this change breaks our continuous integration [1>> because tuxmake explicitly uses /dev/null as stdin to make for
>> non-interactive commands (I think it does this as basically the
>> equivalent of "yes '' | make" in Python), so the error will always
>> occur.
>>
>> Before:
>>
>> [...]
>>
>> After:
>>
>> $ curl -LSso .config https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/raw/main/config
Calling 'make olddefconfig' at this point should avoid opening the prompt on /dev/null in the next make.
I got tuxmake to that with a hack:
$ .../tuxmake/run --kconfig /dev/null --kconfig-add https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/raw/main/config
# --kconfig /dev/null => Start from a blank config
# --kconfig-add https//... => ... add to it a partial config
=> tuxmake will "merge" the empty config and the URL one and then run 'make olddefconfig' and finally 'make < /dev/null' which does run
>> $ python3 -c "import subprocess; subprocess.run(['make', '-j128'], stdin=subprocess.DEVNULL)"
>> SYNC include/config/auto.conf
>> HOSTCC scripts/basic/fixdep
>> HOSTCC scripts/kconfig/conf.o
>> HOSTCC scripts/kconfig/confdata.o
>> HOSTCC scripts/kconfig/expr.o
>> LEX scripts/kconfig/lexer.lex.c
>> YACC scripts/kconfig/parser.tab.[ch]
>> HOSTCC scripts/kconfig/menu.o
>> HOSTCC scripts/kconfig/preprocess.o
>> HOSTCC scripts/kconfig/symbol.o
>> HOSTCC scripts/kconfig/util.o
>> HOSTCC scripts/kconfig/lexer.lex.o
>> HOSTCC scripts/kconfig/parser.tab.o
>> HOSTLD scripts/kconfig/conf
>> *
>> * Restart config...
>> *
>> ...
>> Error in reading or end of file.
>> make[3]: *** [scripts/kconfig/Makefile:77: syncconfig] Error 1
>> ...
>>
>> We have been doing this for some time and never run across an infinite
>> loop in syncconfig. Can this be improved?
>
> In Linux, most int/hex entries have a default,
> hence there is no practical issue.
I agree. I never met such case in Linux but only on downstream kbuild user (u-boot in this case).
> I will drop this for now.
Okay!
> I will send an alternative solution.
Please tell me how I can help!
For what it's worth the v2 of this patch[0] tried to exit *only* where the infinite loop would start.
I've just tested it, it allows tuxmake to run smoothly and avoids the infinite loop in case of a hex config without a valid default value.
[0]:https://lore.kernel.org/lkml/20230805095709.6717-1-yoann.congal@smile.fr/
Regards,
--
Yoann Congal
Smile ECS
prev parent reply other threads:[~2023-11-09 22:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-04 22:27 Yoann Congal
2023-11-05 7:55 ` Masahiro Yamada
2023-11-07 21:00 ` Nathan Chancellor
2023-11-09 4:26 ` Masahiro Yamada
2023-11-09 22:56 ` Yoann Congal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eb9cb563-d480-4000-8feb-b63b856235c3@smile.fr \
--to=yoann.congal@smile.fr \
--cc=brandon.maier@collins.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=masahiroy@kernel.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=rdunlap@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®