Received: by 10.223.185.116 with SMTP id b49csp3511855wrg; Tue, 13 Feb 2018 03:34:59 -0800 (PST) X-Google-Smtp-Source: AH8x226LWS6wx+DIS4eYQgCC/WQG6IzcshUyqHpsWKlFUIEyWr03zGzlvX/X/HKC0vN4hX9Gj6eE X-Received: by 10.98.237.21 with SMTP id u21mr971052pfh.190.1518521699769; Tue, 13 Feb 2018 03:34:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518521699; cv=none; d=google.com; s=arc-20160816; b=prjZI7Y1hJ4NCrCRiOP6vbNUF9KHm0ilkX3PxLosOhvgdsdTaw4oFI5OhNO6dA3vjr Gh+jGsvgZrxNM8OmmVEYsqM1tn5cKUTB3nyBaiNXh2RExgW+5FvLvdDixi/2YZPsKG3A qpeGYDjUJl9yPkMrLkbsVq1sj6so3qUrJ+UjTZtVezbXeUgP+eixLmzifkUmtNokws1B 2fVRWXpA1FBqqfhQ8gbG1OdMoBEkszHLVEok4GSNPNLAY0Wkrqvg2wSv0mf+9FJCcqKf 52Iy1uucq59TSzsY7Rbq2TSlq84vPhtqe651PxnRCG/b197FhZo0Hyl1F/sgtd5+sRlK thxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=mG4A5kFoQ8bhJubxALVtF8PgfFIu7XOJF/4i4/jvoag=; b=wy/j0UTqeiyfoK4sS5207i4dXTqrCuU0uoHclugfup6rvYMW8/1Xzhb3eu19Ibqt+S 7erof3LwyvQBqOYtBeLR/+IcdPUqPkLALQ5v9QIdT4bzVEhYA8n4sdboo/DkxtFyxGRy BUWT2tAn7KAHnDDH942BSoxHKBaWnXhb7Rt9RlH8/HbmwGE4bciCAiHk6bAlz53j3dxZ e3VVHUTbZ/n/aGnIWbv7y/s1IfPjYln1+d/t4wrA6Ebl3ZvlHe0OHGyzqtNa4xNEwMCU kkejTDBEh2AU+OGLsE33k+kaRcCTf9BhJkdXvb8ydOi5JiwbQSz+y80/Iqml1L3dQ8Pw zRsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qbMQG4bd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n16-v6si6194773pll.360.2018.02.13.03.34.45; Tue, 13 Feb 2018 03:34:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qbMQG4bd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934806AbeBMLdq (ORCPT + 99 others); Tue, 13 Feb 2018 06:33:46 -0500 Received: from mail-lf0-f54.google.com ([209.85.215.54]:44247 "EHLO mail-lf0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934410AbeBMLdk (ORCPT ); Tue, 13 Feb 2018 06:33:40 -0500 Received: by mail-lf0-f54.google.com with SMTP id c188so8755279lfc.11 for ; Tue, 13 Feb 2018 03:33:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=mG4A5kFoQ8bhJubxALVtF8PgfFIu7XOJF/4i4/jvoag=; b=qbMQG4bdrSR9wj+Z4FRsz6cSwRm0pOXSP5f1nCo5lMCLgNxUef+YVXIGg6bXRZV3s2 aLq3X9SbYeRdrpPso9VDfIscH7iWIVXfM5FiDxUv8kZRrQzlwTHp9DV7YmKiwrsq8i0H aF7rJmAF2v3GNXuSOaf2n1W9dFpU1ufDh/sIyD+lO7toDYc0TMX+HKffKjAdPL3dsb7n HJH3DezJt5SRzON4ZigXBNpDOrlk3nEE97NfyuFQdG0+j4HixcAEfCM1kS5QH9HFeRkz FEMmm4GhtFnktL0TGESN/l4PX/ucapQ+k/uYVn2GW3yTkAT8OtnjPu/qUUJ34YURAjVr tFSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=mG4A5kFoQ8bhJubxALVtF8PgfFIu7XOJF/4i4/jvoag=; b=Jwu3AasLKFXgnRWsza+iok4DwOKlwvDonHpJcXxikCHCEvS/SCTzgvu9d++jqTwmfg Qsi3h5I4d8n1Cg55fXOiLnFjmiQLQRL4KRg0jNhDJ2mT4AhiPmgIJ5znTwbKOVfhAML8 MTgIPzBbZ1+AqXckI2ucD19k69Ep3HOG4RWQqKnPxmSCtrmb2xYweSN0MvRcfHB7KxG8 zhwPMKUyQKYEeugzTtTL04SQHgOWiXGkyf8tHoVIbxmAqVNWw9dd7yRv8mFr51Ng4tC1 CDtH86sbyKdEbd4YDHa7rvCfSO8Pz/JGNh4FOinTFHZMTj1dv+3zppJt9nFZtqlmXUFt fQng== X-Gm-Message-State: APf1xPCuA026yzyf4jxWZaaOClKL/W2AqIwvOJCH3R07LdUmEMfihQtY uoBrC5aPmNmKxkgTA/C1uUQ= X-Received: by 10.25.208.210 with SMTP id h201mr733201lfg.22.1518521618184; Tue, 13 Feb 2018 03:33:38 -0800 (PST) Received: from huvuddator (ua-213-113-106-221.cust.bredbandsbolaget.se. [213.113.106.221]) by smtp.gmail.com with ESMTPSA id n2sm385111lja.21.2018.02.13.03.33.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Feb 2018 03:33:37 -0800 (PST) Date: Tue, 13 Feb 2018 12:33:24 +0100 From: Ulf Magnusson To: Sander Eikelenboom Cc: Masahiro Yamada , Woody Suwalski , srivasta@debian.org, linux-kernel Subject: Re: Linux 4.16-rc1: regression bisected, Debian kernel package tool make-kpkg stalls indefinitely during kernel build due to commit "kconfig: remove check_stdin()" Message-ID: <20180213113324.gm6sv37g72gs3qrc@huvuddator> References: <9d122a3c-b1fe-a9f8-17db-c38f42fdc4b1@gmail.com> <27f3817b-0c92-5f92-e079-078a8b92eab4@eikelenboom.it> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <27f3817b-0c92-5f92-e079-078a8b92eab4@eikelenboom.it> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 13, 2018 at 11:00:49AM +0100, Sander Eikelenboom wrote: > On 13/02/18 05:09, Masahiro Yamada wrote: > > 2018-02-13 12:00 GMT+09:00 Woody Suwalski : > >> Sander Eikelenboom wrote: > >>> > >>> L.S., > >>> > >>> The Debian kernel-package tool make-kpkg for easy building of upstream > >>> kernels on Debian fails with linux 4.16-rc1. > >>> > >>> The tool (perl script) while invoked with: > >>> make-kpkg --initrd --append_to_version -20180212 kernel_image > >>> > >>> On a git tree with a .config from the previous kernel release, so new > >>> KConfig questions have to be asked on new or changed options. > >>> > >>> The script stalls indefinitely while it seems to be excuting: > >>> exec make kpkg_version=13.018+nmu1 -f > >>> /usr/share/kernel-package/ruleset/minimal.mk debian > >>> APPEND_TO_VERSION=-t440s-20180212 INITRD=YES > >>> > >>> After using ctrl-c to break out it, i get: > >>> ^CFailed to create a ./debian directory: No such file or directory at > >>> /usr/bin/make-kpkg line 970. > >>> > >>> Bisection turned up as culprit: > >>> commit d2a04648a5dbc3d1d043b35257364f0197d4d868 > >>> kconfig: remove check_stdin() > >>> Except silentoldconfig, valid_stdin is 1, so check_stdin() is > >>> no-op. > >>> oldconfig and silentoldconfig work almost in the same way except > >>> that > >>> the latter generates additional files under include/. Both ask users > >>> for input for new symbols. > >>> I do not know why only silentoldconfig requires stdio be tty. > >>> $ rm -f .config; touch .config > >>> $ yes "" | make oldconfig > stdout > >>> $ rm -f .config; touch .config > >>> $ yes "" | make silentoldconfig > stdout > >>> make[1]: *** [silentoldconfig] Error 1 > >>> make: *** [silentoldconfig] Error 2 > >>> $ tail -n 4 stdout > >>> Console input/output is redirected. Run 'make oldconfig' to update > >>> configuration. > >>> scripts/kconfig/Makefile:40: recipe for target > >>> 'silentoldconfig' failed > >>> Makefile:507: recipe for target 'silentoldconfig' failed > >>> Redirection is useful, for example, for testing where we want to > >>> give > >>> particular key inputs from a test file, then check the result. > >>> Signed-off-by: Masahiro Yamada > >>> Reviewed-by: Ulf Magnusson > >>> > >>> Reverting this specific commit makes make-kpkg work again as usual. > >>> > >>> Version of the kernel-package used: > >>> ii kernel-package > >>> 13.018+nmu1 > >>> > >>> > >>> I also cc'ed the Debian developer who maintains the kernel-package > >>> package: Manoj Srivastava > >>> > >>> -- > >>> Sander > >>> > >> I have noticed today the same - the kernel-build blockage was in (as I > >> recall) > >> srcipts/kconfig/conf -s --silentoldconfig Kbuild > >> > >> I have bypassed it by regenerating the .config "by hand"... > > > > > > silentoldconfig asks you values for new symbols. > > So, you must answer questions to proceed. > > I know, but it stalls before asking the questions. > > > > > How does 'make-kpkg' handle silentoldconfig? > > > > Re-direct stdio, then make it forcibly fail? > > I don't know, it is a bunch of perl and shell scripts that gets invoked, not the most easy to comprehend if you are not familiar with them. I'm just a user of the tool. > > So i would have to defer that question to the Debian package maintainer, hopefully he will chime in. > > -- > Sander > > > > > > > > Hello, What the commit does is to make silentoldconfig not immediately exit(1) when both of the following apply: 1. stdin is from something that's not a terminal 2. New symbols are prompted for All the outputs (.config and the include/generated/ and include/config/ trees) are generated after the point where silentoldconfig would previously exit(1), afaics, so the effects of the commit can be summarized as follows: * If no new symbols appear (that would be prompted for), the behavior is exactly the same as before. (check_stdin() never seems to get called unless a value would actually be prompted for, which makes sense.) * If new symbols appear and stdin is a tty, the behavior is also exactly the same as before. And finally, the only case where the behavior differs: * If new symbols appear and stdin is not a tty, the new behavior is to prompt (to expect e.g. "n"/"m"/"y" from wherever stdin is coming from). The old behavior was to exit(1) without generating any output files. Hopefully that clarifies it. The intent of the commit was just to clean up the code a bit, since there doesn't seem to be a good reason to bail just because stdin happens to not be a tty (plus it's inconsistent with the way oldconfig works, which never bailed). silentoldconfig is something of an internal implementation detail at this point by the way. It's basically oldconfig + generate the configuration stuff in include/generated/ and include/config/ that actually gets used during the build. Normally it's called automatically as needed when building the kernel. See https://www.spinics.net/lists/kernel/msg2720574.html for some more details re. silentoldconfig. Cheers, Ulf