O'Reilly logo

Ubuntu Hacks by Bill Childers, Kyle Rankin, Jonathan Oxer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hack #12. Submit a Bug Report

All software has bugs, and Ubuntu is no exception. Here's how you can help improve Ubuntu by submitting a bug report.

It's an unfortunate rule of computing: all software has bugs. The Ubuntu developers and folks at Canonical have done their best to minimize the amount of bugs and their impact in the latest release of Ubuntu, but they can't catch everything. However, one of the major advantages of open source software is that you have an opportunity to help improve the software by filing a bug. The process of filing a bug is surprisingly easy and, despite the name, can be a rather fun and interactive process.

Getting Ready to File the Bug

Before you actually go ahead and file a bug, you should run through a little checklist to better assist you in the process. The key thing to remember is that every piece of information you can embed in the bug report will help the people fixing your bug. These people may not have the same hardware as you, and there may be other difficulties in reproducing your bug, so every clue you can provide will help them in solving the mystery.

First, figure out what your problem is, in plain language. Ask yourself what's broken and what the proper behavior should be. Also, is there anything the software is doing that it shouldn't be doing? If you can capture logs or output from a terminal, save that information—you can attach it to the bug. If you have knowledge on how to attach a debugger to your process, you may want to include output from that as well. Ensure you've got the package name of the piece of software you're having trouble with. Save all this information so you can have it handy when it's time to file the bug report.

Creating a Malone Account

Ubuntu's method of filing a bug report is via a web-enabled application called Malone (see Figure 1-11). Malone is part of Launchpad (https://launchpad.net/malone/), and the unique thing about Malone compared to other bugtrackers is that Malone tracks not only Ubuntu bugs, but upstream bugs as well as bugs in other distros. This helps to enable another benefit of open source software: the fact that "given enough eyes, all bugs are shallow." In a nutshell, this means that if one distro pinpoints and fixes a bug, all other distros that use Malone can see the fix, and everyone benefits.

Your first visit to Malone

Figure 1-11. Your first visit to Malone

On your first visit to Malone, you'll need to create an account for yourself so you can post to the bug database. Simply click on the Log In/Register link in the upper-righthand corner and follow the instructions to register an account.


You can search the Malone bug database without creating an account, but posting new information to the database requires an account.

Searching for Your Bug

You've collected your data and created your account: now it's almost time to file your bug. There's just one thing left to do: search for your bug. Yes, that's right: you should always search the bug database for your bug (or one just like it) before you go ahead and create a new one. If you search for a bug with similar symptoms and criteria as your bug, there's a good chance you'll find a bug report already there. You can check and see if the behavior of the bug is the same, if the developers are stalled waiting for a piece of information, or if the bug's already been fixed and a patch is available.

Additionally, if you do see a bug report that resembles your bug, you can add your comments and information to that bug. That will help consolidate things and let the developers know that multiple people are experiencing that issue. Nothing is more frustrating for developers than duplicate bug reports (well, not entirely; poor bug reports are even worse!).

In Figure 1-12, we've searched for a gnome-power-manager issue that we happened to run into. As it happened, there was a pre-existing bug already opened, and the developer was awaiting information. We were able to add our own comments to the bug and give the developer some of the information he was looking for. That's open source in action!

Searching for a bug

Figure 1-12. Searching for a bug

Filing Your Bug Report

If your bug isn't already in the bug database, then it's time to report it. Log in to Malone if you haven't already, and go to the "Report a bug about a package" page (https://launchpad.net/malone/bugs/+package). Select Ubuntu from the drop-down menu and enter the package name in the appropriate field. Next, enter the bug summary. You'll want to be as descriptive as you can in one sentence. Don't say, "gnome-power-manager is broken" or, worse, "battery icon doesn't work." Either of those two summary lines will ensure that your bug is rejected. A more appropriate summary line would say, "gnome-power-manager icon does not show AC power status."

Next, fill out the description of the problem. Be as objective and descriptive as you can, and include all the notes mentioned earlier. Take your time, and be sure to include every detail. We can't stress enough the importance of including not only what's wrong, but what the software is doing right. Include any debug information you may have gathered.

Once you've done that, you can submit your bug by clicking the Add button. There's a checkbox on the site to keep the contents of the bug confidential, so you'll want to check that box if there's a possible security risk exposed by this bug. However, 99.9 percent of the time the bug won't involve a security risk, and you can safely leave this box unchecked.

Now your bug's filed and in the system! Come back to your bug's page periodically to see if a developer has picked up the problem and made any progress on it.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required