Development
Fully automated bisecting with "git bisect run"
It's a common developer practice to track down a bug by looking for the change that introduced it. This is most efficiently done by performing a binary search between the last known working commit and the first known broken commit in the commit history. git bisect is a feature of the Git version control system that helps developers do just that.
git bisect may also be well known by LWN readers for heated discussions on the Linux kernel mailing list about "asking" (or "forcing" depending on the point of view) users to find the bad commit when they report a regression. But a little-known addition, git bisect run, can allow a developer to completely automate the process. This can be very useful and may enable switching to interesting new debugging workflows.
At each step of the binary search, git bisect checks out the source code at the commit chosen by the search. The user then has to test to see if the software is working or not. If it is, the user performs a git bisect good, otherwise they do a git bisect bad, and the search proceeds accordingly. This is different than the idea behind git bisect run, as it uses a script or a shell command to determine if the source code—which git bisect automatically checked out—is "good" or "bad".
This idea was suggested by Bill Lear in March 2007, and I implemented it shortly thereafter. It was then released in Git 1.5.1.
Technically, the script or command passed to git bisect run is run at each step of the bisection process, and its exit code is interpreted as "good", if it's 0, or "bad", otherwise (except 125 and values greater than 127, see the git bisect documentation for more information.)
One simple and yet useful way to take advantage of that is to use git bisect run to find which commit broke the build. Some kernel developers like this very much. Ingo Molnar wrote:
For example, with a not too old Git (version 1.5.2 or greater), bisecting a build bug in the Linux kernel may be just a matter of launching:
git bisect start linux-next/master v2.6.26-rc8 git bisect run make kernel/fork.o
because the git bisect start command, when it is passed two (or more) revisions, here "linux-next/master" and "v2.6.26-rc8", interprets the first one as "bad" and the other ones as "good".
This works as follows: git bisect checks out the source code of a commit to be tested, then runs make kernel/fork.o. make will exit with code 0 if it builds, or with something else (usually 2) otherwise. This gets recorded as "good" or "bad" for the commit that was checked out, which will enable the binary search to continue by finding another commit to check out, then run make again, and so on, until the first "bad" commit in the history is found.
But to bisect regressions that manifest themselves on the running code, as opposed to build problems, it's usually more complicated. You probably have to write a test script that should be passed to git bisect run.
For example, a test script for an application built with make and printing on its standard output might look like this:
#!/bin/sh make || exit 125 # an exit code of 125 asks "git bisect" # to "skip" the current commit # run the application and check that it produces good output ./my_app arg1 arg2 | grep 'my good output'
See this message from Junio Hamano, the Git maintainer, for explanations and a real world example of git bisect run used to find a regression in Git. The git bisect documentation has some short examples too.
It's even trickier for kernel hackers, because you have to reboot
the computer each time you want to test a new kernel, but some kernel
hackers suggest
that it be used anyway if the problem is "reproducible, scriptable,
and you have a second box
". Ingo Molnar describes his bisection
environment this way:
So it's possible to use git bisect run on a wide array of
applications. This means that, for example, automatically in
your nightly builds, you can find the commit that broke the build or the test
suite, and then use information from it to send a flame
warning
email to the developer responsible for that.
But what may be more interesting is that fully automated bisection may enable new workflows. On the git mailing list, Andreas Ericsson, a Git developer, reported:
So it requires a little more work to make sure that every commit is small and easily bisectable. Then, to debug regressions, they follow these steps:
- write, in the test suite, a test script that exposes the regression
- use git bisect run to find the commit that introduced it
- fix the bug that is often made obvious by the previous step
- commit both the fix and the test script (and if needed more tests)
This may seem more complicated than a traditional workflow. But when asked about it, Andreas says:
So this kind of workflow is good to take advantage of test cases
you write. But what about global productivity? Four months after having
said that he uses git bisect run, Andreas
Ericsson wrote that git bisect "is well-nigh
single-handedly responsible for reducing our average bugreport-to-fix
time from 4 days to 6 hours
".
Now, after more than one year of using it, he gives the following details:
So quality costs, but, when using the right tools and workflows, it can bring in a rather nice return on investment!
System Applications
Clusters and Grids
rsplib 2.6.0 released
Version 2.6.0 of rsplib has been announced. "RSPLIB is the Open Source implementation (GPLv3) of the IETF's new standard for Reliable Server Pooling (RSerPool), which is described in RFC 5351 to RFC 5356. If you a looking for a Grid comput[at]ion solution which is simple, easy to setup and mostly self-configuring, you are probably looking for RSerPool".
Database Software
CrunchyFrog 0.3.2 released
Version 0.3.2 of CrunchyFrog has been announced, it adds some new functionality and bug fixes. "CrunchyFrog is a database navigator and SQL client. Currently PostgreSQL, MySQL, Oracle, SQLite3, MS-SQL databases and LDAP servers are supported for browsing and querying. More databases and features can be added using the plugin system. CrunchyFrog is licensed under the GPLv3 and is written in Python and uses PyGTK for it's user interface."
pgAdmin gets a change of licence
The pgAdmin project will undergo a change of license. "Effective from the 26th February 2009, the pgAdmin Development Team intend to change the licence of pgAdmin III from the Artistic Licence v1.0 to the Artistic Licence v2.0".
PostgreSQL Weekly News
The February 1, 2009 edition of the PostgreSQL Weekly News is online with the latest PostgreSQL DBMS articles and resources.
Interoperability
Samba 3.2.8 maintenance release is available
Maintenance Release 3.2.8 of Samba has been announced. "This is the latest bug fix release for Samba 3.2 and is the version recommended for all production Samba servers running this release series."
Security
dradis version 2.0 released
Version 2.0 of dradis has been released. "- dradis is an open source tool for sharing information during security assessments. - It provides a centralized repository of information to keep track of what has been done so far, and what is still ahead. - Client/server architecture with a web interface".
Web Site Development
Zope 3.4.0 Released
After two years of development, Zope 3.4, a Python-based web application server, has been released. In the future, releases are planned for every six months. "The focus of the Zope 3.4 development effort has been the conversion from a monolithic source tree, to a set of many small packages (eggs), that can be used independently of each other. The core has been further stabilized through numerous bug fixes, and many new add-on packages have been developed to provide a richer development experience." Click below for the full release announcement.
Desktop Applications
Accessibility
liblouis 1.5.2 has been released
Version 1.5.2 of liblouis has been announced, it is mainly a bug-fix release. "Liblouis is an open-source braille translator and back-translator. It features support for computer, literary and math braille, supports contracted and uncontracted translation for many, many languages. It plays an important role in an open source accessibility stack and is used by screenreaders such as NVDA and Orca. A companion project liblouisxml deals with formatting of braille."
Audio Applications
Audacity 1.3.7 released
Version 1.3.7 of the Audacity audio editor has been announced. "This is primarily a bug-fix release which significantly improves stability and usability, especially on Mac OS X. It incorporates some new features too, including DirectSound device support for Windows.".
jack_capture 0.9.32 released
Version 0.9.32 of jack_capture has been announced, it includes some new features and bug fixes. "jack_capture is a program for recording soundfiles with jack. Its default operation is to capture whatever sound is going out to your speakers into a file, but it can do a number of other operations as well."
CAD
Kicad 2008-08-25 released (Open Collector)
OpenCollector.org has announced the release of Kicad version 2008-08-25. "Kicad is an open source (GPL) software for the creation of electronic schematic diagrams and printed circuit board artwork. Kicad is an integrated set of four programs and a project manager".
Desktop Environments
The "Compiz Council" created
In response to ongoing concerns about the future of the Compiz compositing window manager, a group of developers has formed into the "Compiz Council," which will attempt to drive the project forward. Announced plans include merging the Compiz Fusion project, moving away from freedesktop.org, and putting out a stable release sometime in August or September.GNOME Software Announcements
The following new GNOME software has been announced this week:- Accerciser 1.5.9 (bug fixes and translation work)
- Anjuta 2.25.90 (new features and bug fixes)
- Anjuta 2.25.901 (bug fixes)
- Brasero 2.25.90 (bug fixes and translation work)
- Cheese 2.25.90 (bug fixes and translation work)
- Clutter 0.9.0 (new features and bug fixes)
- Deskbar-Applet 2.25.90 (bug fixes and translation work)
- Empathy 2.25.90 (new features, bug fixes and translation work)
- Eye of GNOME 2.25.90 (bug fixes and translation work)
- GCalctool 5.25.90 (bug fixes and translation work)
- GLib 2.19.6 (new features, bug fixes and translation work)
- gnome-applets 2.25.90 (new features, bug fixes and translation work)
- GNOME DVB Daemon 0.1.3 (new features, bug fixes and code cleanup)
- gnome-games 2.25.90 (new features, bug fixes and translation work)
- gnome-keyring 2.25.90 (new features, bug fixes and translation work)
- GNOME Power Manager 2.25.3 (new features, bug fixes, documentation and translation work)
- gnome-speech 0.4.23 (bug fixes)
- GNOME Utilities 2.25.90 (bug fixes and translation work)
- GOK 2.25.90 (bug fixes and translation work)
- gstreamermm 0.9.9 (new features and bug fixes)
- GTK+ 2.15.3 (bug fixes and translation work)
- Libgda 3.99.10 (bug fixes, documentation and translation work)
- metacity 2.25.144 (bug fixes and translation work)
- mousetweaks 2.25.90 (documentation and translation work)
- Orca 2.25.90 (bug fixes and translation work)
- osm-gps-map 0.2 (unspecified)
- PyGTK 2.14.0 (bug fixes)
- seahorse 2.25.90 (new features, bug fixes and translation work)
- seahorse-plugins 2.25.90 (bug fixes, documentation and translation work)
- slgtk 0.7.4 (new features and bug fixes)
- Tomboy 0.13.4 (bug fixes and translation work)
KDE Commit-Digest (KDEDot)
The January 18, 2009 edition of the KDE Commit-Digest has been announced. The content summary says: "A new "Crystal Desktop Search" Plasmoid, allowing searching through NEPOMUK indexes (and MediaWiki-based websites). Support for "grep-like behaviour" in the "FileWatcher" Plasma applet, and support for custom server addresses (aka. backend locations) for the "Pastebin" applet. Further developments in the "System Load Viewer" (which moves to kdereview for KDE 4.3) and "Video Player" applets..."
KDE Software Announcements
The following new KDE software has been announced this week:- Babiloo 2.0 (unspecified)
- digiKam 0.9.5-beta3 (new features and bug fixes)
- digiKam 0.10.0-rc1 (new features and bug fixes)
- eXaro 1.0.1 (new features and bug fixes)
- Frescobaldi 0.7.4 (new features, bug fixes and translation work)
- google lyrics 1.0
- Icelandic Radio Streams 2009.01.31 (unspecified)
- kdiff-ext 0.4.0 (KDE 4.1+ port)
- Kipi-Plugins 0.2.0-rc1 (new features and bug fixes)
- Kopete Upside-down Plugin 0.1 (initial release)
- KTorrent 3.2rc1 (new features and bug fixes)
- kx11grab 0.1.9 (unspecified)
- Strigi 0.6.4 (bug fixes and code cleanup)
- SubDownloader 2.0.9.3 (unspecified)
- uspc 0.5 (new feature and bug fixes)
- Wally 2.0.0 (unspecified)
Xorg Software Announcements
The following new Xorg software has been announced this week:- xf86-input-evdev 2.1.2 (bug fixes and documentation work)
- xf86-input-synaptics 1.0.0 (new features and bug fixes)
- xorg-server 1.5.99.902 (bug fixes and code cleanup)
- xrandr 1.2.99.4 (new features, bug fixes and documentation work)
GUI Packages
AVC 0.7.0 released
Version 0.7.0 of AVC has been announced, some new features have been added. "AVC is a multiplatform, fully automatic, live connection among graphical interface widgets and application variables for the python language. AVC supports in a uniform way the most popular widget toolkits: GTK+, Qt3, Qt4, Tk, wxWidgets."
Interoperability
Wine 1.1.14 announced
Version 1.1.14 of Wine has been announced. Changes include: "Various bug fixes for Internet Explorer 7. Many crypt32 improvements, including new export wizard. Better support for windowless Richedit. Improvements to the print dialog. Many fixes to the regression tests on Windows. Various bug fixes."
Music Applications
zynjacku 4 is out
Version 4 of zynjacku has been announced. "In this release: * lv2rack does no longer require PHAT (it was not really using it even in zynjacku-3 release) * Support for out of process plugin UIs (the upcomming nekobee release should use it) * Don't crash when trying to load non-existing plugin (specified by supplying plugin URI at commandline) * Don't crash with some plugins (NULL extension_data). zynjacku is JACK based, GTK (2.x) host for LV2 synths."
Office Suites
OpenOffice.org Newsletter
The January, 2009 edition of the OpenOffice.org Newsletter is out with the latest OO.o office suite articles and events.
Web Browsers
Firefox 3.0.6 released
The Firefox 3.0.6 update is out. This version fixes yet another pile of security issues and a number of other bugs as well; see the release notes for details.
Miscellaneous
SimPy 2.0 released
Version 2.0 (major new version) of SimPy has been announced. "SimPy is a process-based discrete-event simulation language based on standard Python and released under the GNU LGPL. It provides the modeller with components of a simulation model. These include processes, for active components like customers, messages, and vehicles, and resources, for passive components that form limited capacity congestion points like servers, checkout counters, and tunnels. It also provides monitor variables to aid in gathering statistics."
Languages and Tools
C
GCC 4.3.3 released
Version 4.3.3 of GCC, the GNU Compiler Collection, has been released. "GCC 4.3.3 is a bug-fix release containing fixes for regressions and serious bugs in GCC 4.3.2."
GCC 4.4.0 Status Report
The January 31, 2009 edition of the GCC 4.4.0 Status Report has been published. "The trunk remains Stage 4, so only fixes for regressions (and changes to documentation) are allowed. The number of P1, P2 and P3 regressions is already under 100 and the only remaining P1 has a patch approved. The old register allocator has been removed. The 4.4 branch will be created when all the P1 fixes are committed and the licensing changes (see the GCC Runtime Library Exception thread on gcc mailing list) land on the trunk."
Caml
Caml Weekly News
The February 3, 2009 edition of the Caml Weekly News is out with new articles about the Caml language.
Java
[fleXive]: 3.0.2 released (SourceForge)
Version 3.0.2 of [fleXive] has been announced. "[fleXive] is a Java EE 5 framework that provides an enterprise-level persistence engine with security and versioning, a SQL-like query language, a JSF-based web administration and reusable JSF components for integration into existing applications. [fleXive] 3.0.2, the second bugfix release for [fleXive] 3.0, has been released. It contains important bugfixes for our last release, and keeps binary compatibility with 3.0.0."
IcedTea6 1.4 released
Version 1.4 of IcedTea6 has been announced, it includes security and bug fixes. "The IcedTea6 project provides a harness to build the source code from OpenJDK6 using Free Software build tools."
MathJ: 0.7 Released (SourceForge)
Version 0.7 of Mathj has been announced. "Java library for simple managing and solving sophisticated mathematic expressions and equations, based on Reverse Polish Notation (RPN) First version of MathJ is available for download."
Inside Zero and Shark
Mark Wielaard has sent in this update on Gary Benson's latest work: "Gary Benson is writing a series of blog posts called about Zero and Shark. Zero is an interpreter-only port of OpenJDK that uses no assembler based on libffi. Shark is a just-in-time (JIT) compiler for Zero based on LLVM. They provide an universal architecture port of Java and are currently included in the IcedTea project. Inside Zero and Shark has published three installments this far: Java threads and state transitions, Handles and Oops, Traps and Checks and Calling Conventions and The Call Stub."
Perl
This Week on perl5-porters (use Perl)
The January 18-25, 2009 edition of This Week on perl5-porters is out with the latest Perl 5 news.
Python
gmpy 1.04 released
Version 1.04 of gmpy has been announced, some new capabilities have been added. "gmpy is a wrapper for the GMP multiple-precision arithmetic library. This version of gmpy also supports the MPIR multiple-precision arithmetic library."
Announcing Pyflakes 0.3.0
Version 0.3.0 of Pyflakes has been announced. "This release fixes several bugs, improves compatibility with recent versions of Python, and new flake checks. Pyflakes is a static analysis tool for Python source. It is focused on identifying common errors quickly without executing Python code. It is a handy supplement to your project's test suite."
PyMite release 06 announced
Release 06 of PyMite has been announced. "PyMite is a flyweight Python interpreter written from scratch to execute on 8-bit and larger microcontrollers with resources as limited as 64 KB of program memory (flash) and 4 KB of RAM. PyMite supports a subset of the Python 2.5 syntax and can execute a subset of the Python 2.5 bytecodes. PyMite can also be compiled, tested and executed on a desktop computer."
Python-URL! - weekly Python news and links
The January 27, 2009 edition of the Python-URL! is online with a new collection of Python article links.Python 3 primer, Part 1: What's new (IBM developerWorks)
IBM developerWorks introduces Python 3 in the first of a multi-part series. "Python 3 is the latest version of Guido van Rossum's powerful general-purpose programming language. It breaks backwards compatibility with the 2.x line but has cleaned up some syntax issues. This article is the first in a series that talks about the changes that affect the language and backwards compatibility, and it provides examples of new features."
Tcl/Tk
Tcl-URL! - weekly Tcl news and links
The February 3, 2009 edition of the Tcl-URL! is online with new Tcl/Tk articles and resources.
Editors
python-mode.el 5.1.0 announced
Version 5.1.0 of python-mode.el has been announced. "I've just released version 5.1.0 of python-mode.el, a Python editing mode for Emacs and XEmacs. Since 5.0.0, this contains a fix to the syntax highlighting for None and places the file under the GPLv3."
Libraries
RFIDIOt 0.1w released
Version 0.1w of RFIDIOt, the open source python RFID library, has been announced. "I've been working on adding Global Platform functionality to non-PC/SC devices so folks with LAHF and HF ACG devices can play with JCOP cards... It's not quite there yet, but jcoptool.py is a work in progress which currently supports printing manufacturer info and card contents. I'll be working on installing/deleting applets next. Other fixes are mostly to do with e-passports..."
Version Control
EasyGit (eg) 0.97 released
Version 0.97 of EasyGit (eg) is available. "Easy Git (eg) is an alternative frontend for git, specifically designed for former cvs and svn users in order to provide a lower learning curve and prevent common user errors. Since eg largely looks and feels like core git, eg can also serve as a training tool to teach users git (see below for similarities and how to display git commands that eg uses). There is a detailed side-by-side comparison of svn and eg to help svn users make the switch. eg is trivial to install and try out: simply download a single file and stick it in your PATH."
GIT 1.6.1.2 released
Version 1.6.1.2 of the GIT distributed version control system has been announced. "People with 1.6.1 or 1.6.1.1, who push into a repository that borrows objects from other repositories via "alternates" mechanism (most of the linux kernel subsystems hosted on k.org, and "forks" on various public hosting site such as repo.or.cz and github fall into this category), may want to upgrade to this version, as these two versions have a buggy "git push" that does not like such a repository served by git 1.6.1 or newer."
Page editor: Forrest Cook
Next page:
Linux in the news>>