Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp549694pxb; Thu, 12 Nov 2020 10:03:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJweJrumd/u77mUJolOJ3rPuKkIlcV48p9BaWrmz0miDOpPKFDPsQHFyiesB/eYqQBWGqcVS X-Received: by 2002:a05:6402:1119:: with SMTP id u25mr1097394edv.37.1605204195912; Thu, 12 Nov 2020 10:03:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605204195; cv=none; d=google.com; s=arc-20160816; b=j/xt72Uv3qtiDU+m4N3f6WJ4SZ/UJVFpP6Eg9VnDqP3Ak9O7Q/0Q7Ppq4fYK+lPc+G BA4cj5e3ML3DVlcIOKLLEERvLaL0GdvRRDR8JCedsAPe7Udb9KEVOaDV/dM9wrAXacth ugFyeq6vCWmEhJDsFGs8eBdPBMKd3e951TF0ihMVeqD0iTSUPdFofx0i4t1B8WiSX64m 1C3St/Dc8Tlk+5qTQ8oStcIuOxMaD0gsDfxETCJN+PP10nBImjYSEZYQti2qEN0mBhaJ +yWHVlNBNWCRnceWFL2xfqOIwOojz0gXTfpiyyfJ32+Zc48+96iDHOsmbjBPfmG4oPh2 gptw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=GN8RJ5i5PIo9ItRIl+clFUApqdl6X2gX+VQKYWImefU=; b=IbgqVa/cCs3jkTmeK1NN9ccwJoWPsLZs5Jd7x74O5lq6+BIGAWbUSt3mICXxEeHolT de3+6W+eRTFgiH8eGnyZ7yDIElzhxfg4a1uOUHiPnaErzQ8a9fz2YdkBLOA37fnwTG0z wdYqmrrFTzeMEOkHL5HVTRpmwjfejSeC7B4dmRr61p6huST3L90CrCjB+BXCAyb5EF0N evLyWPFV+y8+3uR2NBsjSxWUXfmUNJTi68oKfgc3jUiQnkOu7TzSjy6Q8FqpdnrqpSY/ +Gaa0U+hGGUQmX82xSanW3YKM+XclWGyRNaHCbRdNBL2eVYUII4FC0beNgPM2ow7o964 YEyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y23si4150272eju.563.2020.11.12.10.02.50; Thu, 12 Nov 2020 10:03:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726776AbgKLSAR (ORCPT + 99 others); Thu, 12 Nov 2020 13:00:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726667AbgKLR73 (ORCPT ); Thu, 12 Nov 2020 12:59:29 -0500 Received: from wp530.webpack.hosteurope.de (wp530.webpack.hosteurope.de [IPv6:2a01:488:42:1000:50ed:8234::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A17B0C0613D6; Thu, 12 Nov 2020 09:59:29 -0800 (PST) Received: from ip4d145e30.dynamic.kabel-deutschland.de ([77.20.94.48] helo=truhe.fritz.box); authenticated by wp530.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1kdGsa-00076N-DA; Thu, 12 Nov 2020 18:59:28 +0100 From: Thorsten Leemhuis To: Jonathan Corbet Cc: Randy Dunlap , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH v2 20/26] docs: reporting-bugs: instructions for handling regressions Date: Thu, 12 Nov 2020 18:58:57 +0100 Message-Id: <6963926b340eee6bb2f7ba4d72b9b535d49a12dd.1605203187.git.linux@leemhuis.info> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-bounce-key: webpack.hosteurope.de;linux@leemhuis.info;1605203969;0e5b1c25; X-HE-SMSGID: 1kdGsa-00076N-DA Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Describe what users will have to do if they deal with a regression. Point out that bisection is really important. While at it explicitly mention the .config files for the newer kernel needs to be similar to the old kernel, as that's an important detail quite a few people seem to miss sometimes. Signed-off-by: Thorsten Leemhuis --- Documentation/admin-guide/bug-bisect.rst | 2 + Documentation/admin-guide/reporting-bugs.rst | 54 ++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/Documentation/admin-guide/bug-bisect.rst b/Documentation/admin-guide/bug-bisect.rst index 59567da344e8..38d9dbe7177d 100644 --- a/Documentation/admin-guide/bug-bisect.rst +++ b/Documentation/admin-guide/bug-bisect.rst @@ -1,3 +1,5 @@ +.. _bugbisect: + Bisecting a bug +++++++++++++++ diff --git a/Documentation/admin-guide/reporting-bugs.rst b/Documentation/admin-guide/reporting-bugs.rst index be866dd1e6b6..6646d393f21a 100644 --- a/Documentation/admin-guide/reporting-bugs.rst +++ b/Documentation/admin-guide/reporting-bugs.rst @@ -851,6 +851,60 @@ sometimes needs to get decoded to be readable, which is explained in admin-guide/bug-hunting.rst. +Special care for regressions +---------------------------- + + *If your problem is a regression, try to narrow down when the issue was + introduced as much as possible.* + +Linux lead developer Linus Torvalds insists that the Linux kernel never +worsens, that's why he deems regressions as unacceptable and wants to see them +fixed quickly. That's why changes that introduced a regression are often +promptly reverted if the issue they cause can't get solved quickly any other +way. Reporting a regression is thus a bit like playing a kind of trump card to +get something quickly fixed. But for that to happen the change that's causing +the regression needs to be known. Normally it's up to the reporter to track +down the culprit, as maintainers often won't have the time or setup at hand to +reproduce it themselves. + +To find the change there is a process called 'bisection' which the document +:ref:`Documentation/admin-guide/bug-bisect.rst ` describes in +detail. That process will often require you to build about ten to twenty kernel +images, trying to reproduce the issue with each of them before building the +next. Yes, that takes some time, but don't worry, it works a lot quicker than +most people assume. Thanks to a 'binary search' this will lead you to the one +commit in the source code management system that's causing the regression. Once +you find it, search the net for the subject of the change, its commit id and +the shortened commit id (the first 12 characters of the commit id). This will +lead you to existing reports about it, if there are any. + +Note, a bisection needs a bit of know-how, which not everyone has, and quite a +bit of effort, which not everyone is willing to invest. Nevertheless, it's +highly recommended performing a bisection yourself. If you really can't or +don't want to go down that route at least find out which mainline kernel +introduced the regression. If something for example breaks when switching from +5.5.15 to 5.8.4, then try at least all the mainline releases in that area (5.6, +5.7 and 5.8) to check when it first showed up. Unless you're trying to find a +regression in a stable or longterm kernel, avoid testing versions which number +has three sections (5.6.12, 5.7.8), as that makes the outcome hard to +interpret, which might render your testing useless. Once you found the major +version which introduced the regression, feel free to move on in the reporting +process. But keep in mind: it depends on the issue at hand if the developers +will be able to help without knowing the culprit. Sometimes they might +recognize from the report want went wrong and can fix it; other times they will +be unable to help unless you perform a bisection. + +When dealing with regressions make sure the issue you face is really caused by +the kernel and not by something else, as outlined above already. + +In the whole process keep in mind: an issue only qualifies as regression if the +older and the newer kernel got built with a similar configuration. The best way +to archive this: copy the configuration file (``.config``) from the old working +kernel freshly to each newer kernel version you try. Afterwards run ``make +oldnoconfig`` to adjust it for the needs of the new version without enabling +any new feature, as those are allowed to cause regressions. + + .. ############################################################################ .. Temporary marker added while this document is rewritten. Sections above .. are new and dual-licensed under GPLv2+ and CC-BY 4.0, those below are old. -- 2.28.0