Bug#890817: kernel-package: make-kpkg stalls indefinitely on linux-4.16-rc* in silentoldconfig stage
Hi, I also found that these patches helped stop the compile getting blocked - but they only seem to treat the symptoms, not the cause. As with David, my configuration seems to get modified / overwritten during the build. I traced the problem down to - a dependency on the target: debian/stamp/conf/vars - Which executes: make -f ./debian/ruleset/kernel_version.mk debian_conf_var - kernel_version.mk includes the main Linux kernel Makefile - For some reason this causes the Linux Makefile to run `make syncconfig` At which point it starts asking questions and changes the kernel configuration. Linux source version: 4.19.20. Note that I also only have problems when compiling for x86, not amd64. nick.
Bug#890817: kernel-package: make-kpkg stalls indefinitely on linux-4.16-rc* in silentoldconfig stage
FWIW, I've tried the patches suggested so far. While they fix the lock up, my .config still gets written over at some point (see below), so make-kpkg is still broken for me (using 4.19 kernel source). == making target debian/stamp/conf/kernel-conf [new prereqs: ]== make CROSS_COMPILE=/usr/lib/x86_64-linux-gnu/gcc-linaro-6.4.1-2017.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- ARCH=arm \ oldconfig; make[2]: Entering directory '/home/david/work/ev3dev-dpkg/ev3dev-kpkg/ev3-kernel' scripts/kconfig/conf --oldconfig Kconfig # # configuration written to .config #
Bug#890817: kernel-package: make-kpkg stalls indefinitely on linux-4.16-rc* in silentoldconfig stage
Package: kernel-package Version: 13.018+nmu1 Followup-For: Bug #890817 Dear Maintainer, *** Reporter, please consider answering these questions, where appropriate *** * What led up to the situation? Commit appears to be: https://github.com/torvalds/linux/commit/01f0e5cdedea448ea48eaddc1366593126b0fe98 * What exactly did you do (or not do) that was effective (or ineffective)? * What was the outcome of this action? * What outcome did you expect instead? *** End of the template - remove these template lines *** -- System Information: Debian Release: buster/sid APT prefers oldstable APT policy: (500, 'oldstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 4.18.0+ (SMP w/2 CPU cores; PREEMPT) Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Init: sysvinit (via /sbin/init) Versions of packages kernel-package depends on: ii bc 1.07.1-2+b1 ii binutils 2.31.1-2 ii build-essential 12.5 ii bzip21.0.6-8.1 ii dpkg-dev 1.19.0.5 ii file 1:5.34-2 ii gettext 0.19.8.1-7 ii kmod 25-1 ii lzma 9.22-2.1 ii po-debconf 1.0.20 ii xmlto0.0.28-2 ii xz-utils [lzma] 5.2.2-1.3 Versions of packages kernel-package recommends: ii cpio 2.12+dfsg-6 ii docbook-utils 0.6.14-3.3 ii kernel-common 13.018+nmu1 ii uboot-mkimage 2012.04.01-2 Versions of packages kernel-package suggests: ii libncurses-dev 6.1+20180714-1 pn linux-source -- debconf-show failed
Bug#890817: kernel-package: make-kpkg stalls indefinitely on linux-4.16-rc* in silentoldconfig stage
Package: kernel-package Version: 13.018+nmu1 Followup-For: Bug #890817 Dear Maintainer, *** Reporter, please consider answering these questions, where appropriate *** * What led up to the situation? As of a commit that hit the Linus git head in the last 24 hours again I can't get an i386 build working with kernel-package. Any help welcome. * What exactly did you do (or not do) that was effective (or ineffective)? * What was the outcome of this action? * What outcome did you expect instead? *** End of the template - remove these template lines *** -- System Information: Debian Release: buster/sid APT prefers oldstable APT policy: (500, 'oldstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 4.18.0+ (SMP w/2 CPU cores; PREEMPT) Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Init: sysvinit (via /sbin/init) Versions of packages kernel-package depends on: ii bc 1.07.1-2+b1 ii binutils 2.31.1-2 ii build-essential 12.5 ii bzip21.0.6-8.1 ii dpkg-dev 1.19.0.5 ii file 1:5.34-2 ii gettext 0.19.8.1-7 ii kmod 25-1 ii lzma 9.22-2.1 ii po-debconf 1.0.20 ii xmlto0.0.28-2 ii xz-utils [lzma] 5.2.2-1.3 Versions of packages kernel-package recommends: ii cpio 2.12+dfsg-6 ii docbook-utils 0.6.14-3.3 ii kernel-common 13.018+nmu1 ii uboot-mkimage 2012.04.01-2 Versions of packages kernel-package suggests: ii libncurses-dev 6.1+20180714-1 pn linux-source -- debconf-show failed
Bug#890817: kernel-package: make-kpkg stalls indefinitely on linux-4.16-rc* in silentoldconfig stage
Package: kernel-package Followup-For: Bug #890817 Dear Maintainer, The attached patch redirects stdin from /dev/null when invoking kernel_version.mk to avoid hanging waiting for input on kernel version 4.16 and later (after commit d2a04648a5db) as described in my previous email. I think a better long-term solution would be to avoid including the kernel Makefile. Since that would be a major change which could have other effects I'm not aware of, I'll leave that for later, if ever, based on your feedback. Best, Kevin -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (101, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.16.1-kevinoid1 (SMP w/4 CPU cores) Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), LANGUAGE=en_US.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages kernel-package depends on: ii bc 1.07.1-2+b1 ii binutils 2.30-15 ii build-essential 12.4 ii bzip21.0.6-8.1 ii dpkg-dev 1.19.0.5 ii file 1:5.33-2 ii gettext 0.19.8.1-6+b1 ii kmod 25-1 ii lzma 9.22-2.1 ii po-debconf 1.0.20 ii xmlto0.0.28-2 ii xz-utils [lzma] 5.2.2-1.3 Versions of packages kernel-package recommends: ii cpio 2.12+dfsg-6 pn docbook-utils ii kernel-common 13.018+nmu1 pn uboot-mkimage Versions of packages kernel-package suggests: ii libncurses-dev 6.1+20180210-3 pn linux-source -- Configuration Files: /etc/kernel-pkg.conf changed [not included] -- no debconf information >From 53852c047cdb0d89bc60dfdfc5ea5dd984e350fb Mon Sep 17 00:00:00 2001 Message-Id: <53852c047cdb0d89bc60dfdfc5ea5dd984e350fb.1526533203.git.ke...@kevinlocke.name> From: Kevin LockeDate: Wed, 16 May 2018 22:30:04 -0600 Subject: [PATCH] Redirect stdin from /dev/null for kernel_version.mk kernel/ruleset/kernel_version.mk includes the kernel Makefile with dot-config := 1. This causes Makefile to invoke silentoldconfig. For kernel versions which include d2a04648a5db, scripts/kconfig/conf does not automatically exit when stderr is not a terminal and instead hangs while waiting for input. Since kernel_version.mk is included with stdout captured and stderr redirected to /dev/null, the user will never see the prompt and the build hangs. This commit provides the simple fix of redirecting /dev/null to stdin, which returns to the same behavior as before. I think a better solution would be for kernel_version.mk to parse the output from `make kernelversion` and `make kernelrelease`, but it would be a non-trivial behavior change which I will defer until input from the package maintainer. Closes: 890817 Signed-off-by: Kevin Locke --- kernel/ruleset/misc/version_vars.mk | 12 ++-- kernel/ruleset/targets/common.mk| 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/kernel/ruleset/misc/version_vars.mk b/kernel/ruleset/misc/version_vars.mk index 6f7ded0..9dc9cb2 100644 --- a/kernel/ruleset/misc/version_vars.mk +++ b/kernel/ruleset/misc/version_vars.mk @@ -69,22 +69,22 @@ ifeq ($(DEB_HOST_ARCH_OS), linux) # .config, and the informational message messes up the variable. TEST :=$(call doit,$(MAKE) $(CROSS_ARG) $(K_ARG) --no-print-directory \ -sf $(DEBDIR)/ruleset/kernel_version.mk debian_VERSION \ -2>/dev/null ) +/dev/null ) VERSION :=$(call doit,$(MAKE) $(CROSS_ARG) $(K_ARG) --no-print-directory \ -sf $(DEBDIR)/ruleset/kernel_version.mk debian_VERSION \ -2>/dev/null | tail -n 1) +/dev/null | tail -n 1) PATCHLEVEL :=$(call doit,$(MAKE) $(CROSS_ARG) $(K_ARG) --no-print-directory \ -sf $(DEBDIR)/ruleset/kernel_version.mk debian_PATCHLEVEL \ -2>/dev/null | tail -n 1) +/dev/null | tail -n 1) SUBLEVEL :=$(call doit,$(MAKE) $(CROSS_ARG) $(K_ARG) --no-print-directory \ -sf $(DEBDIR)/ruleset/kernel_version.mk debian_SUBLEVEL \ -2>/dev/null | tail -n 1) +/dev/null | tail -n 1) EXTRA_VERSION:=$(call doit,$(MAKE) $(CROSS_ARG) $(K_ARG) --no-print-directory \ -sf $(DEBDIR)/ruleset/kernel_version.mk debian_EXTRAVERSION \ -2>/dev/null | tail -n 1) +/dev/null | tail -n 1) LOCALVERSION :=$(call doit,$(MAKE) $(CROSS_ARG) $(K_ARG) --no-print-directory \ -sf $(DEBDIR)/ruleset/kernel_version.mk debian_LOCALVERSION \ -2>/dev/null | tail -n 1) +/dev/null | tail -n 1) # If the variable TEST did get a mesage about .config beng written, pass it on.
Bug#890817: kernel-package: make-kpkg stalls indefinitely on linux-4.16-rc* in silentoldconfig stage
Package: kernel-package Version: 13.018+nmu1 Followup-For: Bug #890817 Dear Maintainer, *** Reporter, please consider answering these questions, where appropriate *** * What led up to the situation? Correction to previous email - it appears that a change to Kconfig (re) triggered the hang. I created a patch to revert the commit that was listed above, then things proceeded fine until I reached the 4.16-rc5 kernel and it appeared as 4.16-rc5+. I reversed that patch, then re-ran make-kpkg and still produced a 4.16-rc5+ labelled kernel. I then did: git diff git pull neither of which gave any output. I then checked on github.com that the rc5 commit was still the most recent commit. Then, when I re-ran make-kpkg, it produced a kernel labelled 4.16-rc5 It looks like I will have to re-apply the patch that reverses the problem commit to avoid future hangs, then when a labelled commit appears (e.g. 4.16-rc6 or v4.16) reverse the patch mentioned above, and run git diff git pull to get the kernel produced by make-kpkg to not have a (+) at the end of the version. * What exactly did you do (or not do) that was effective (or ineffective)? * What was the outcome of this action? * What outcome did you expect instead? *** End of the template - remove these template lines *** -- System Information: Debian Release: buster/sid APT prefers experimental APT policy: (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.16.0-rc4+ (SMP w/4 CPU cores; PREEMPT) Locale: LANG=en_AU.UTF-8, LC_CTYPE= (charmap=UTF-8), LANGUAGE=en_GB (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Init: sysvinit (via /sbin/init) Versions of packages kernel-package depends on: ii bc 1.07.1-1 ii binutils 2.30-7 ii build-essential 12.4 ii bzip21.0.6-8.1 ii dpkg-dev 1.19.0.5 ii file 1:5.32-2 ii gettext 0.19.8.1-4 ii kmod 25-1 ii po-debconf 1.0.20 ii xmlto0.0.28-2 ii xz-utils [lzma] 5.2.2-1.3 Versions of packages kernel-package recommends: ii cpio 2.12+dfsg-6 ii docbook-utils 0.6.14-3.3 ii kernel-common 13.018+nmu1 pn uboot-mkimage Versions of packages kernel-package suggests: ii libncurses5-dev [libncurses-dev] 6.1-1 pn linux-source -- Configuration Files: /etc/kernel-pkg.conf changed: maintainer := Arthur Marsh email := arthur.ma...@internode.on.net priority := Low -- no debconf information
Bug#890817: kernel-package: make-kpkg stalls indefinitely on linux-4.16-rc* in silentoldconfig stage
Package: kernel-package Version: 13.018+nmu1 Followup-For: Bug #890817 Dear Maintainer, *** Reporter, please consider answering these questions, where appropriate *** * What led up to the situation? Upgrading gcc-7 (HOSTCC) to 7.2.0-9 * What exactly did you do (or not do) that was effective (or ineffective)? tried setting HOSTCC=gcc-8 and re-running the make-kpkg script but it still hung. * What was the outcome of this action? * What outcome did you expect instead? *** End of the template - remove these template lines *** -- System Information: Debian Release: buster/sid APT prefers experimental APT policy: (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.16.0-rc4+ (SMP w/4 CPU cores; PREEMPT) Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Init: sysvinit (via /sbin/init) Versions of packages kernel-package depends on: ii bc 1.07.1-1 ii binutils 2.30-7 ii build-essential 12.4 ii bzip21.0.6-8.1 ii dpkg-dev 1.19.0.5 ii file 1:5.32-2 ii gettext 0.19.8.1-4 ii kmod 25-1 ii po-debconf 1.0.20 ii xmlto0.0.28-2 ii xz-utils [lzma] 5.2.2-1.3 Versions of packages kernel-package recommends: ii cpio 2.12+dfsg-6 ii docbook-utils 0.6.14-3.3 ii kernel-common 13.018+nmu1 pn uboot-mkimage Versions of packages kernel-package suggests: ii libncurses5-dev [libncurses-dev] 6.1-1 pn linux-source -- Configuration Files: /etc/kernel-pkg.conf changed: maintainer := Arthur Marsh email := arthur.ma...@internode.on.net priority := Low -- no debconf information
Bug#890817: kernel-package: make-kpkg stalls indefinitely on linux-4.16-rc* in silentoldconfig stage
Package: kernel-package Version: 13.018+nmu1 Severity: important L.S., make-kpkg currently stalls indefinitely on linux-4.16-rc* in the silentoldconfig stage (somewhere before asking the kconfig questions which are new). I have bisected it and that leads to linux kernel commit d2a04648a5dbc3d1d043b35257364f0197d4d868 "kconfig: remove check_stdin()". I also reported this upstream on LKML, see thread: http://lkml.iu.edu/hypermail/linux/kernel/1802.1/03207.html but the package maintainers answers are awaited for by the kernel developers, so please chime in on LKML to work out a fix in either the kernel or make-kpkg. -- Sander -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (900, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.16.0-rc2-t440s-20180219 (SMP w/4 CPU cores) Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), LANGUAGE=en_US.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) Versions of packages kernel-package depends on: ii bc 1.07.1-1 ii binutils 2.30-4 ii build-essential 12.4 ii bzip21.0.6-8.1 ii dpkg-dev 1.19.0.5 ii file 1:5.32-1 ii gettext 0.19.8.1-4 ii kmod 25-1 ii po-debconf 1.0.20 ii xmlto0.0.28-2 ii xz-utils [lzma] 5.2.2-1.3 Versions of packages kernel-package recommends: ii cpio 2.12+dfsg-6 ii docbook-utils 0.6.14-3.3 ii kernel-common 13.018+nmu1 pn uboot-mkimage Versions of packages kernel-package suggests: ii libncurses5-dev [libncurses-dev] 6.0+20171125-1 pn linux-source -- Configuration Files: /etc/kernel-pkg.conf changed [not included] -- no debconf information