Debian Bug report logs - #627960
[PATCH/RFC 0/3] debian-kernel-handbook: please describe how to bisect

version graph

Package: debian-kernel-handbook; Maintainer for debian-kernel-handbook is Debian kernel team <debian-kernel@lists.debian.org>; Source for debian-kernel-handbook is src:kernel-handbook.

Reported by: Jonathan Nieder <jrnieder@gmail.com>

Date: Wed, 25 May 2011 21:19:50 UTC

Severity: wishlist

Tags: patch

Found in version kernel-handbook/1.0.10

Fixed in version kernel-handbook/1.0.14

Done: Ben Hutchings <ben@decadent.org.uk>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 627960@bugs.debian.org (full text, mbox):

Received: (at 627960) by bugs.debian.org; 25 May 2011 21:39:10 +0000
From jrnieder@gmail.com Wed May 25 21:39:10 2011
X-Spam-Checker-Version: SpamAssassin 3.3.1-bugs.debian.org_2005_01_02
	(2010-03-16) on busoni.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.4 required=4.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,IMPRONONCABLE_2,MURPHY_DRUGS_REL8,
	RCVD_IN_DNSWL_LOW,SPF_PASS,URIBL_CNKR autolearn=no
	version=3.3.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 30; hammy, 151; neutral, 232; spammy,
	0. spammytokens: hammytokens:0.000-+--H*u:2010-09-15,
	0.000-+--H*UA:2010-09-15, 0.000-+--H*u:1.5.21, 0.000-+--H*UA:1.5.21,
	0.000-+--UD:kernel.org
Return-path: <jrnieder@gmail.com>
Received: from mail-yi0-f52.google.com ([209.85.218.52])
	by busoni.debian.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16)
	(Exim 4.72)
	(envelope-from <jrnieder@gmail.com>)
	id 1QPLnC-0008Ed-So
	for 627960@bugs.debian.org; Wed, 25 May 2011 21:39:04 +0000
Received: by yih10 with SMTP id 10so61167yih.11
        for <627960@bugs.debian.org>; Wed, 25 May 2011 14:38:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:date:from:to:subject:message-id:references
         :mime-version:content-type:content-disposition:in-reply-to
         :user-agent;
        bh=r5I+qmrgWfh92nPxRRZnah2IvaWKT9miRzLMQknls70=;
        b=Gdshj+g532ZWNEQRfSE7Qgl0QULLasZPWm5lpou0FvN6GtQpn2+O4aZLU1N0IFfFe/
         id79BdY0Io95S26UIabQ3zDomSNrzmH9tTnFCdfDzIn4/O7YTOKa1eeGJcG4A7wlAPNg
         zJjFJGCWvzmO68lF/dXhvbgsuktumjmFj6VMg=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=date:from:to:subject:message-id:references:mime-version
         :content-type:content-disposition:in-reply-to:user-agent;
        b=NmBGmkkxTV0LjezbnGZdZyp4yebhU/0XD1BiAvV7AgQQ/PhnwEPQ/LDC22fPpk8ZgI
         bfAKUpZ4dfEDh/+amGpy4lPkA92gSj/EyzN7ZZc8Sm9QBkCnlh3gcUWx6ecmEp+DAC1M
         J1C0hFGBRafAP8ZMkElL3HxOgYo2QtAsr0fAc=
Received: by 10.236.175.3 with SMTP id y3mr138617yhl.62.1306359535256;
        Wed, 25 May 2011 14:38:55 -0700 (PDT)
Received: from elie (adsl-69-209-78-180.dsl.chcgil.sbcglobal.net [69.209.78.180])
        by mx.google.com with ESMTPS id s46sm250043yhm.4.2011.05.25.14.38.53
        (version=SSLv3 cipher=OTHER);
        Wed, 25 May 2011 14:38:54 -0700 (PDT)
Date: Wed, 25 May 2011 16:38:51 -0500
From: Jonathan Nieder <jrnieder@gmail.com>
To: 627960@bugs.debian.org
Subject: [PATCH 3/3] Add a quick tutorial about bisecting
Message-ID: <20110525213851.GC6210@elie>
References: <20110525210950.GA5734@elie>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110525210950.GA5734@elie>
User-Agent: Mutt/1.5.21 (2010-09-15)
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
This doesn't address the "why do version numbers jump around while
bisecting?" question[1].  Not sure how to address it briefly;
hopefully this is a good enough start without it.

That's the end of the series.  Thanks for reading.

[1] https://git.wiki.kernel.org/index.php/GitFaq#Why_does_.22git_bisect.22_make_me_test_versions_outside_the_.22good-bad.22_range.3F

 chapter-common-tasks.sgml |   80 +++++++++++++++++++++++++++++++++++++++++++++
 debian/changelog          |    5 +++
 2 files changed, 85 insertions(+), 0 deletions(-)

diff --git a/chapter-common-tasks.sgml b/chapter-common-tasks.sgml
index dc482d7..a4ccc50 100644
--- a/chapter-common-tasks.sgml
+++ b/chapter-common-tasks.sgml
@@ -402,6 +402,86 @@ $ cp /boot/config-2.6.18-3-686 ./.config
           may be started using <tt>make deb-pkg</tt> target as described above.
       </sect>
 
+      <sect id="common-bisecting">
+        <heading>Bisecting (finding the upstream version that introduced a bug)</heading>
+        <p>
+          When a bug is easy to reproduce locally but hard to get developers
+          to reproduce (as is often true of workflow- or hardware-dependent
+          bugs), it can be useful to compile and test a few versions to narrow
+          down what changes introduced the regression.
+        </p>
+
+        <p>
+          To start, recreate the problem with a vanilla kernel:
+          <example>
+# apt-get install git build-essential
+$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
+$ cd linux-2.6
+$ make localmodconfig; # minimal configuration
+          </example>
+          The above commands acquire and configure a vanilla kernel.
+          Build and test a binary package as explained in
+          <ref id="common-building">:
+          <example>
+$ make deb-pkg
+$ cd ..
+# dpkg -i *.deb
+# reboot
+          </example>
+          If the bug doesn't show up, try again with the standard
+          configuration file from /boot.  (If it still doesn't show up
+          after that, declare victory and celebrate.)
+        </p>
+
+        <p>
+          Initialize the bisection process by declaring which versions worked
+          and did not work:
+          <example>
+$ cd linux-2.6
+$ git bisect start
+$ git bisect bad; # current version is bad
+$ git bisect good v2.6.12; # or whichever was known to be good
+          </example>
+          Now git checks out a version half-way in between to test.
+          Build it, reusing the prepared configuration.
+          <example>
+$ make silentoldconfig
+$ make deb-pkg
+          </example>
+        </p>
+
+        <p>
+          Install the package, reboot, and test.
+          <example>
+$ git bisect good; # if this version doesn't exhibit the bug
+$ git bisect bad; # if it does
+$ git bisect skip; # if some other bug makes it hard to test
+          </example>
+          And on to the next iteration:
+          <example>
+$ make silentoldconfig
+$ make deb-pkg
+          </example>
+        </p>
+
+        <p>
+          At the end of the process, the name of the "first bad commit" is
+          printed, which is very useful for tracking down the bug. Narrowing
+          down the regression range with a few rounds is useful even if you
+          don't get that far; in that case, run <tt>git bisect log</tt> to
+          produce a log. If you are the visual sort of person, <tt>git bisect
+          visualize</tt> with the <tt>gitk</tt> package installed can show
+          what is happening between steps.
+        </p>
+
+        <p>
+          See Christian Couder's article "Fighting regressions with git bisect"
+          from <url id="http://www.kernel.org/pub/software/scm/git/docs/git-bisect-lk2009.html"
+          name="kernel.org"> or <url id="file:///usr/share/doc/git/html/git-bisect-lk2009.html"
+          name="the git-doc package"> for details.
+        </p>
+      </sect>
+
       <sect id="common-out-of-tree">
         <heading>Building out-of-tree kernel modules</heading>
         <p>
diff --git a/debian/changelog b/debian/changelog
index 4470a15..0028bf6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,13 @@
 kernel-handbook (1.0.11) UNRELEASED; urgency=low
 
+  [ Ben Hutchings ]
   * Remove description of yaird and comparison with initramfs-tools
   * Mention dracut as an experimental initramfs generator
 
+  [ Jonathan Nieder ]
+  * Explain in the "common kernel-related tasks" chapter how to
+    pinpoint regressions with "git bisect" - closes: #627960
+
  -- Ben Hutchings <ben@decadent.org.uk>  Tue, 17 May 2011 03:58:04 +0100
 
 kernel-handbook (1.0.10) unstable; urgency=low
-- 
1.7.5.1





Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 05:29:25 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.