Received: by 10.213.65.68 with SMTP id h4csp888760imn; Sun, 18 Mar 2018 06:18:04 -0700 (PDT) X-Google-Smtp-Source: AG47ELsV+MoPKpzMXluqkB4eHMlD8vrNH8J8jhQ1HtrCTycDdDdb2dOJIbHdE08N927jhRNxLpav X-Received: by 10.99.123.86 with SMTP id k22mr6550692pgn.228.1521379084375; Sun, 18 Mar 2018 06:18:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521379084; cv=none; d=google.com; s=arc-20160816; b=W00S70BLovJP1bSK/6BhyZBU0NQAlzDAZ/U57lCF3lUlKbWljYQW4prW/rHVQtdPPK HJY3UlWUeMctGnerLLT+p1ryo2krVaVP/wZ5mGUo+kn3ATfAUP5PK9daudczZcIgAGlj DIKff9eaILC6XqwWQCHRwkTHVfiAdGptwAV2TVUeNi00E2JAGjNJuBwCSM3FFwnp/y4J 8xOEWxiQQA6g+Zng3bbak7/v9oOVLnNOxjmof/zy4kiZS4N3xfDwDbX73289FZ7WAZjc idIFgvid+cQnB2S24bvC3hRLRv39TYnxPd0xz8bc/aZiAHEPie/A5knAZkNTwEG2DU59 tU7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=39Qy7qjrZTzXDQP/Dphz7tCgBWFWkHiMUMprZBAXAN0=; b=KbuwKjiFSzLZfhkv/ay8prF+86uPLpb+CFB2rBb707L1PxBzm3t0wco1gw7J8tHgWQ IKy+ZkvYxKlzyITGHaVDOwSAUaDzD9o4BwtWitf2vwHZrojg3/n6yDfO4DqQaMo39XAe 1TVHoVH3w6Z94Cqa3KbYOdDy5O3bn0ObTK2I6+f63vhsWmx6rh/Iu/uP2ChNKjM3vb8I kNbAFahQh8Z/FZg6K0mBWfaY695eZKDUa6fhUOEj1TDNl7Xhv2G2lsU1MI/dJVZE+Ebf I6shdfQRLkBQsIiLZvaoHUrVhFVhAu2VXTl1am814PqI0DWE8m4XOcLKVejwGHw99z7C 9DWA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h67si8932647pfj.11.2018.03.18.06.17.50; Sun, 18 Mar 2018 06:18:04 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754137AbeCRNQl (ORCPT + 99 others); Sun, 18 Mar 2018 09:16:41 -0400 Received: from server.eikelenboom.it ([91.121.65.215]:54704 "EHLO server.eikelenboom.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753919AbeCRNQi (ORCPT ); Sun, 18 Mar 2018 09:16:38 -0400 Received: from 120-71-ftth.on.nl ([88.159.71.120]:45870 helo=[172.16.1.50]) by server.eikelenboom.it with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1exYAs-0003HT-Hx; Sun, 18 Mar 2018 14:16:34 +0100 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()" To: Ulf Magnusson Cc: Masahiro Yamada , Woody Suwalski , Manoj Srivastava , linux-kernel References: <9d122a3c-b1fe-a9f8-17db-c38f42fdc4b1@gmail.com> <27f3817b-0c92-5f92-e079-078a8b92eab4@eikelenboom.it> <20180213113324.gm6sv37g72gs3qrc@huvuddator> <20180213123510.hkbblka6xkosxi36@huvuddator> From: Sander Eikelenboom Message-ID: Date: Sun, 18 Mar 2018 14:16:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/02/18 14:07, Ulf Magnusson wrote: > On Tue, Feb 13, 2018 at 1:35 PM, Ulf Magnusson wrote: >> On Tue, Feb 13, 2018 at 12:33:24PM +0100, Ulf Magnusson wrote: >>> 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 >> >> By the way: If you can figure out a reason for why that stdin check was >> there before while looking into the Debian tool, then please tell us. >> >> The problem with uncommented mystery code like that is that it easily >> looks pointless and is at risk of getting changed or removed, even if >> there was a good reason for it (which I still suspect there wasn't >> though). >> >> >> >> Cheers, >> Ulf > > Shouldn't be a problem to back this one out either if it turns out to > cause massive amounts of pain in practice I guess, even if it's the > Debian tools doing something weird. > > Good to look into what it is they're doing in any case. > > Cheers, > Ulf > Hi Ulf / Masahiro, Unfortunately the Debian maintainer hasn't responded to this thread, nor on the Debian bugtracker (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890817) issue i made. -- Sander Linux-Regression-ID: lr#2fd778