From: Ingo Molnar <mingo@kernel.org>
To: Masahiro Yamada <masahiroy@kernel.org>,
Michal Marek <michal.lkml@markovi.net>
Cc: linux-kernel@vger.kernel.org
Subject: kbuild: Ctrl-C of parallel kernel build sometimes corrupts .o.cmd files permanently
Date: Wed, 2 Jun 2021 17:50:15 +0200 [thread overview]
Message-ID: <YLeot94yAaM4xbMY@gmail.com> (raw)
There's a sporadic kbuild bug that's been happening for years, maybe you
guys can think of where it comes from.
Sometimes when I Ctrl-C a kernel build job, the .o.cmd file becomes
corrupted and this breaks the build:
kernel/.panic.o.cmd:5: *** unterminated call to function 'wildcard': missing ')'. Stop.
...
drivers/gpu/drm/.drm_blend.o.cmd:5: *** unterminated call to function 'wildcard': missing ')'. Stop.
The file was just partially created and didn't get cleaned up:
kepler:~/tip> ls -l drivers/gpu/drm/.drm_blend.o.cmd.corrupted drivers/gpu/drm/.drm_blend.o.cmd.good
-rw-rw-r-- 1 mingo mingo 28672 Jun 2 17:46 drivers/gpu/drm/.drm_blend.o.cmd.corrupted
-rw-rw-r-- 1 mingo mingo 51331 Jun 2 17:46 drivers/gpu/drm/.drm_blend.o.cmd.good
The file just got cut in half due to the Ctrl-C:
--- drivers/gpu/drm/.drm_blend.o.cmd.corrupted 2021-06-02 17:46:16.951428326 +0200
+++ drivers/gpu/drm/.drm_blend.o.cmd.good 2021-06-02 17:46:34.391111668 +0200
@@ -646,4 +646,578 @@ deps_drivers/gpu/drm/drm_blend.o := \
$(wildcard include/config/OF_OVERLAY) \
include/linux/kobject.h \
$(wildcard include/config/UEVENT_HELPER) \
- $(wildcard include
\ No newline at end of file
+ $(wildcard include/config/DEBUG_KOBJECT_RELEASE) \
+ include/linux/sysfs.h \
+ include/linux/kernfs.h \
+ $(wildcard include/config/KERNFS) \
... but once in this state it can only be fixed by 'make clean' (which
loses all build progress), or by removing the stale file manually.
It happens more frequently on systems with a lot of CPUs.
Thanks,
Ingo
next reply other threads:[~2021-06-02 15:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-02 15:50 Ingo Molnar [this message]
2021-06-02 18:20 ` kbuild: Ctrl-C of parallel kernel build sometimes corrupts .o.cmd files permanently Masahiro Yamada
2021-06-03 12:39 ` Ingo Molnar
2021-06-03 12:43 ` Ingo Molnar
2021-06-04 3:22 ` Masahiro Yamada
2021-06-09 13:59 ` Masahiro Yamada
2021-06-12 13:25 ` Ingo Molnar
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=YLeot94yAaM4xbMY@gmail.com \
--to=mingo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.