Kernel space: Bisection divides users and developers
- 22 April, 2008 12:29
- Comments
The last couple of years have seen a renewed push within the kernel community to avoid regressions. When a patch is found to have broken something that used to work, a fix must be merged or the offending patch will be removed from the kernel. It's a straightforward and logical idea, but there's one little problem: when a kernel series includes over 12,000 changesets (as 2.6.25 does), how does one find the patch which caused the problem? Sometimes it will be obvious, but, for other problems, there are literally thousands of patches which could be the source of the regression. Digging through all of those patches in search of a bug can be a needle-in-the-haystack sort of proposition.
One of the many nice tools offered by the git source code management system is called "bisect." The bisect feature helps the user perform a binary search through a range of patches until the one containing the bug is found. All that is needed is to specify the most recent kernel which is known to work (2.6.24, say), and the oldest kernel which is broken (2.6.25-rc9, perhaps), and the bisect feature will check out a version of the kernel at the midpoint between those two. Finding that midpoint is non-trivial, since, in git, the stream of patches is not a simple line. But that's the sort of task we keep computers around for. Once the midpoint kernel has been generated, the person chasing the bug can build and test it, then tell git whether it exhibits the bug or not. A kernel at the new midpoint will be produced, and the process continues. With bisect, the problematic patch can be found in a maximum of a dozen or so compile-boot-test cycles.
Bisect is not a perfect tool. If patch submitters are not careful, bisect can create a broken kernel when it splits a patch series. The patch which causes a bug to manifest itself may not be the one which introduced the bug. In the worst case, a developer may merge a long series of patches, finishing with one brief change which enables all the code added previously; in this case, bisect will find the final patch, which will only be marginally useful. If the person reporting the bug is running a distributor's kernel, it may be hard to get that kernel in a form which is amenable to the bisection process. Bisection might require unacceptable downtime on the only (production) system which is affected by the bug. And, of course, the process of checking out, building, booting, and testing a dozen kernels is not something which one fits into a coffee break. It requires a certain determination on the part of the tester and quite a bit of time.
- Bookmark this page
- Share this article
- Got more on this story? Email Computerworld
- Follow Computerworld on twitter
- HP Imaging and Printing Services
- Reconciling Datacenter consolidation and security: It starts with an integrated approach
- Customer Case Study: Yarra Valley Water Turns to Enterprise Software to Improve Information Flow
- Best Practices for Secure Enterprise Content Mobility
- Case Study: NZ Bus Develops Applications 60% Faster, Improves Database Performance by up to 35%
-
Alternatives to Raspberry Pi you can get right now
-
Wednesday Grok: Microsoft’s browser lockout is to be pitied more than despised
-
Change My Password logs 10 millionth account
-
Brain drain: Where Cobol systems go from here
-
The ABCs of camera phone technology
-
Professional Blazeds
-
My Sql/PHP Database Applications 2E with Active Server Bible Set
-
Information Systems
-
Foundations of Prog Verification 2E
-
Professional Adobe Flex 2
-
Being Virtual - Who You Really Are Online
-
Joomla! Start to Finish
-
Visual Basic .Net Programming
-
Vmware Infrastructure 3 for Dummies®









Comments
Post new comment