Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2853682imm; Wed, 16 May 2018 22:10:18 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqW8JcxkJkcOOeypeg5mRlw9AClA1QA724Y1bi5C9uJy2Xb1HozYtRetuqIVp5snw7WEwqu X-Received: by 2002:a17:902:778a:: with SMTP id o10-v6mr3827824pll.214.1526533818797; Wed, 16 May 2018 22:10:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526533818; cv=none; d=google.com; s=arc-20160816; b=Pe5nG0LpKMsQiEx9s4KMuVSZHOThGICm4jv5tr2QwnqK/hmEqIm1sFmjbaCPmSdj3K CaMsCIX90ssBIqA4OkPIfMn0ekNuSbtNL2Gb/6BWI5nhEN/jahafUMk9YO8xPAPvRbqM OxQXyYtS3BR4uNaFVmGYsf2okXG7NePOz95XXjMLypd/xN/GNs+7l1mmLVg5reKuNTTx R3xDVq53dAOaesEszdQXkxRsUUQ0aAvPKdDLUDTh5VwpgWKIWnAtG/wNaEmRiKFXRn30 p8ysMnHLoIrxsK7gn2RyHoCs877XuKPQxM2SMHHx5flJnOkz2jioGPiQ144WHZOW6KOY dmgA== 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:mail-followup-to:message-id :subject:cc:to:from:date:arc-authentication-results; bh=R8WtbLBhC5fCmL6Ro1nJRTcEaXQcHzMnvDzrmsvrG1A=; b=dXp/nkWls+fEOKu0wgTgebHYsS7oFhKWQE/Vu2BiX9/76kp6FmK7EqokEDSF3aT81c rp7l1OHCP2+NUfz+V6AVe7DfzuxBaaurLD35bKFPeR4RsSdsqLm3KncScyYI2eUM1FsI y+4/25EuUVbG0u8bFpPD1F8pG7A8n8NznaMfU5U89HimOZnnaX3cQ0xhtWXF/xQCQ2aN OGA7BwsdVGpvl9wYwrJbbY7Wkjczq1ky7YBH/nygMajpFkOlI9OJ+mOCOQ9GhNQnT165 o8r+CriCE8tS0T9hTJc3wo/NDEyg/jOvBMBsS+NT8wtSeWD0LlHYQPCfWse6L5GeJ57U fiQA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kevinlocke.name Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a90-v6si4192213plc.329.2018.05.16.22.10.04; Wed, 16 May 2018 22:10:18 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kevinlocke.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751395AbeEQFJx (ORCPT + 99 others); Thu, 17 May 2018 01:09:53 -0400 Received: from vulcan.kevinlocke.name ([107.191.43.88]:56826 "EHLO vulcan.kevinlocke.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750865AbeEQFJw (ORCPT ); Thu, 17 May 2018 01:09:52 -0400 X-Greylist: delayed 548 seconds by postgrey-1.27 at vger.kernel.org; Thu, 17 May 2018 01:09:52 EDT Received: from kevinolos (unknown [71.15.201.20]) (Authenticated sender: kevin@kevinlocke.name) by vulcan.kevinlocke.name (Postfix) with ESMTPSA id 5D1556A5D98; Thu, 17 May 2018 05:00:43 +0000 (UTC) Received: by kevinolos (Postfix, from userid 1000) id 143FE4A52BC; Wed, 16 May 2018 23:00:41 -0600 (MDT) Date: Wed, 16 May 2018 23:00:41 -0600 From: Kevin Locke To: linux-kernel@vger.kernel.org Cc: Ulf Magnusson , Sander Eikelenboom , 890817@bugs.debian.org 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: <20180517050041.GA10885@kevinolos> Mail-Followup-To: Kevin Locke , linux-kernel@vger.kernel.org, Ulf Magnusson , Sander Eikelenboom , 890817@bugs.debian.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) 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 2:07 PM, Ulf Magnusson wrote: >> On Tue, Feb 13, 2018 at 12:33:24PM +0100, Ulf Magnusson wrote: >>>>>> Sander Eikelenboom wrote: >>>>>>> The Debian kernel-package tool make-kpkg for easy building of upstream >>>>>>> kernels on Debian fails with linux 4.16-rc1. >>>>>>> >>>>>>> Bisection turned up as culprit: >>>>>>> commit d2a04648a5dbc3d1d043b35257364f0197d4d868 >>> >>> 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 > > 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. It appears that make-kpkg is trying to extract kernel version and configuration information by including the kernel Makefile then referencing the variables it exports. The offending make-kpkg Makefile is kernel_version.mk[1] which can be simplified to the following example: -8<- make-kpkg-regression.mk ----------------------------------------- include Makefile .PHONY: debian_VERSION debian_VERSION: -8<------------------------------------------------------------------- Invoking this script from the root of the kernel source tree, with stderr redirected (but not stdin) demonstrates the issue: make -f make-kpkg-regression.mk debian_VERSION >/dev/null 2>&1 Before d2a04648a5db this would exit, after it will hang waiting for input. This occurs because the debian_VERSION target name isn't in no-dot-config-targets defined in Makefile, so Makefile invokes silentoldconfig automatically as necessary.[2] I think the issue is best fixed by make-kpkg, and that d2a04648a5db doesn't need to be reverted. The simple fix would be for make-kpkg to redirect stdin when redirecting stdout/stderr so that scripts/kconfig/conf will fail as it did before. The better fix would be for make-kpkg to use a supported interface for getting the variables it needs, rather than including Makefile. Best, Kevin 1. https://salsa.debian.org/srivasta/kernel-package/blob/master/kernel/ruleset/kernel_version.mk 2. Interestingly, it's not just that the target isn't in no-dot-config-targets. make-kpkg actually sets `dot-config := 1` to force silentoldconfig (since 38399c1[3]). 3. https://salsa.debian.org/srivasta/kernel-package/commit/38399c1