previous | next
 
home  |  search  |  contact  
 
 
 Introduction 
 BitKeeper Concepts  
 Getting Started  
 Advanced Operations 
 Advanced Topics 
 Reporting and Data Mining  
      - File Level 
        . File State Information  
        . File revision history 
        . File Contents 
      - Project Level 
        . Viewing Project History 
        . Viewing ChangeSet Contents 
        . Viewing Tagged ChangeSets 
        . Command History 
      - Debugging with BitKeeper 
        . Build Bugs 
        . Functionality Bugs 
      - Code Reviews 
        . Queue 
        . Process 
      - Reporting with Scripting 
      - BK/Web 
 Appendix A: Installation 
 Appendix B: Administration 
 Site Map 
    
Functionality Bugs
Functionality bugs are unwanted and unexpected behavioral problems with the software as its running. Most often the process of tracking down a bug is: first find what file and what revision the problem is in, second is finding the changeset containing that revision of the file, and then have the engineer who caused the bug fix it.

If a particular string is known, an error message for example, bk grep can help find the file and revision of the file that contains the particular string (and hopefully, the bug). The default output is annotated with file name and revision number. If you have a general idea in which directory to check, use:

bk grep string

if not, it is possible to do the search on all files in a repository by doing:

bk -r grep string

If the file has already been found (this can sometimes be accomplished by an assertion or core file) run revtool on the file.

bk revtool file

Using revtool on the file, information about what was introduced in various revisions of the file can be found. When the revision that caused the bug is found, click on the View Changesets button, to see all the files associated with the one that caused the bug. This will give a picture of what happened at a particular point in time to help illuminate the problem.

When All Else Fails - Binary Search

BitKeeper employs the concept of binary search when trying to track down elusive bugs. A range of time of when the bug was introduced is needed. This can be sometime between the first changeset and the last changeset, or it can be sometime between the last known good version and the first known bad version. The range can be anything as long as the lower bound does not have the bug and the upper bound does have the bug. The lower bound is the earlier cset (without the bug) and the upper bound is the later cset (with the bug).

Choose the changeset that occurs in the middle of the upper and lower bound. Clone the repository as of that changeset to a new repository and build the product.

bk clone -rmiddle_cset repository /tmp/repository
make product

Check if the resulting product has the bug. If so, the middle changeset is now the new upper bound. If not, the middle changeset is now the lower bound. Repeat.


Home    Company    Products    How to Buy    Downloads    Contact Us    Documentation    Support    Site Map

© 1997-2005, BitMover, Inc.