Saturday, March 27, 2010

Improving Ubuntu: A Beginners Guide to Filing Bug Reports

Improving Ubuntu: A Beginners Guide to Filing Bug Reports

OK stop! It looks like there is a lot of text here, but I promise you that submitting bug reports is not complicated. This post will attempt to walk you through filing good bug reports in Ubuntu's bug tracker, called Launchpad - specifically at https://bugs.launchpad.net/ubuntu/

Due to the large volume of bugs that get reported, it is important that you file bugs correctly and with as much information as possible. As a bug triager, I assure you that this will significantly improve the chances of getting your bug looked at and fixed in a timely manner!

A Brief Background on Bugs:

What a bug is:

A "bug" exists in software when a program does something unexpected, usually causing problems for the user. Some examples include:
  • a program crashing or closing unexpectedly
  • a (simple) missing feature
  • unexpected error messages, often preventing a program from continuing normal operation
  • other unexpected behavior

What a bug is not:
  • a support request (use the forums!)
  • a missing feature that requires more than minimal work to implement
  • a bad configuration on your machine (ask here on the forums for help tracking it down)

How do I know?

Those who are very new to Ubuntu and/or Linux in general should make posts here on the forums before filing bug reports. Many people run into problems that aren't really bugs, and many common problems that are bugs have already been filed (but please check for yourself!).
The forum community members can often help you work around bugs - please ask if they think you should file a bug report.

-> Before filing a bug report <-
  • Make sure you have an account on Launchpad - you can't file a report without one. If you don't have one yet, go to "Log in / Register" at the top right of a Launchpad page, then follow the directions.
  • Search Launchpad's Bugs in Ubuntu for duplicate reports - is there already a bug open for your problem? If so, respond to that bug report, and confirm it if possible (change the Status from New to Confirmed). If you find such a report, please be sure that it is for the exact same problem that you have. If it is a bug related to a specific piece of hardware, then you should also have that hardware (or one extremely similar). If it's not the same, file a new report and mention that other bug as a similar problem - a triager can help you determine if the problem is actually the same.

-> Steps for filing a bug report <-

In current versions of Ubuntu, the preferred method for filing bug reports is using Apport, which is an automated tool that ships with Ubuntu. This tool automatically attaches important data to the report, like version information and relevant logs. In some cases, it will automatically appear to help you file reports (like after program or system crashes).
  1. In many programs in Ubuntu you can go to Help -> Report a Problem or Help -> Report a Bug and Apport will collect information automatically for you and take you to the bug filing page on Launchpad where you can elaborate on your problem.
    • Alternatively, from the terminal you can run the following to have Apport collect information automatically for you:
      Code:
      ubuntu-bug packagename
      It is important that you try to file the report under the right package. This can often be confusing, so try your best.
  2. A browser window will open and navigate to Launchpad. If needed, login, then proceed.
  3. Describe the bug in one short statement (this is the bug's title - be descriptive!). Click Continue.
  4. A list of bugs that Launchpad thinks might be similar are listed - check them. If you don't find a match, click "No, I'd like to report a new bug".
  5. Now you can describe your bug in more detail. Include steps to reproduce the bug, and methods you've tried to solve the bug or work around it.
  6. If you need to attach any files (like screenshots) to the bug report, go to the "Include an attachment" section at the bottom and browse for the file. You can only upload one file at a time, so if you have multiple files to upload, you will need to add them in Comments after submitting the bug report.
  7. When you believe there is enough information provided, click "Submit Bug Report".

-> After filing a bug report <-
  • You can add extra comments and attachments by selecting "Add a comment/attachment" at the bottom of the bug report.
  • You should receive emails about changes and responses to the bug report - follow up! A bug can't be completed until you provide all information that has been requested. Bookmark the bug report and check back regularly for updates.
  • You may be asked to file a bug report upstream - this means doing something similar to what we did above, but at a website outside of Launchpad. This can get a little complicated, so feel free to ask how to proceed - more information is available here.
  • You may also be asked to check if the bug exists in the development version of Ubuntu by using a LiveCD.

Generic lifecycle of a bug report:
  • User experiences a problem and files a bug report
  • If lucky, somebody else will confirm the bug report (do not confirm your own bugs!)
  • A triager looks at the bug report. If more information is needed, the triager will request it. The bug reporter will provide the requested information. Repeat as necessary.
  • When the triager is satisfied that there is enough data, the bug will be marked as Confirmed (or even better, as Triaged). The triager should set an Importance on the bug in most cases, and possibly assign it to a developer or team.
  • A developer looks at the bug report - they will either ask for more info, fix the bug or reject it (either because it's not worth fixing, or it's not actually a bug).
  • The bug report is closed with a Status of Fix Released, Won't Fix, or Invalid.
When fixes are released for bugs, the fixed version of the program is usually not made available in stable versions of Ubuntu unless it is a security fix or meets the criteria for a Stable Release Update. The fixed version of the program is usually placed into Ubuntu's development release (unstable).

Filing bugs manually (no Apport)
  1. At https://bugs.launchpad.net/ubuntu click "Report a bug"
  2. Now continue from step 3 above under "Steps for filing a bug report." The only difference is that you need to do the following as well:
    • Step 4a: It is important that you (at least try to) file the report under the right package (since it wasn't done automatically via Apport). This can often be confusing, so try your best. Click on the package from the search box and it will be added.
    • Step 5a: Because we are doing this manually, no information is automatically attached. Please include the output of these terminal commands, which provide important information about your setup:
      • lsb_release -rd
      • uname -a
      • apt-cache policy packagename - substitute for packagename the name of the application that you are filing the bug report against.
  3. Bug triagers or developers may ask you for more information. If you want to try and get a head start on what they might ask for, check out the generic Bug Responses page on the Ubuntu wiki - there are links with information needed to complete some specific types of bug reports, like hardware and kernel problems. This information is typically added automatically when you use Apport.

Some relevant and useful links:

https://help.ubuntu.com/community/ReportingBugs
http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
https://bugs.launchpad.net/ubuntu
https://wiki.ubuntu.com/Bugs/Responses
http://ubuntuforums.org/showthread.php?t=734460 - This thread's predecessor (short and sweet)
Guia para reportar bugs - This guide translated in Spanish, thanks to sajnox.

-----------------------

If you have further questions or feedback about filing bug reports, please feel free to ask in this thread.

Cheers,
Rocket2DMn

No comments:

Post a Comment