wiki:ReportingBugs

Version 18 (modified by waddlesplash, 5 years ago) ( diff )

--

Reporting Bugs

Since our developers are unable to test every hardware combination, nor every different way of interacting with the operating system, we are relying on you to give us some input on how things work at your end. Since this is a very early product, it is very likely that you will encounter bugs. We thank you for taking the time to report these. Since our time is limited, we need accurate information. Follow these guidelines to create helpful bug reports:

  1. Attempt to reproduce your issue on the current revision of Haiku. Pre-built images for testing purposes are available.
  2. Include basic information such as how you are testing Haiku (on real hardware, on VMWare, on QEMU, etc.).
  3. Mention which revision from GIT you are running. You can find this out in the 'About Haiku' application, in the Deskbar menu. Also mention what kind of Haiku build you are testing (32 or 64bit, gcc2 or gcc7 only, ...). The downloadable images are named accordingly, for a self-built image you should know how you built it.
  4. After the bug has been reported, a developer will look at your bug. Remember, we are all volunteers, and as such, sometimes a bug report might go unanswered for a while. Adding new information when it becomes available usually helps getting a bug picked up quicker, but do not try to 'bump' the bug up by adding non-informative comments.
  5. Remember, reporting a bug is not something you spend a little time on and then you are done. If you reported a bug, then you are part of the Haiku development process. Developers might come up with questions while they are trying to fix your bug. Stay around to answer these. Consider your participation 'done' when the bug is marked as 'fixed'. Together we can improve Haiku, bit by bit.
  6. The remainder of guidelines depend on the type of bug:
    1. applications
    2. vital servers
    3. kernel and drivers

Application Bugs

Before reporting a bug please make sure that it does not yet exist. You can also use the search function for this.

  1. If you find an existing ticket that is open, only add information that is not already on the ticket.
  2. After you have established this is a unique bug, make your information as accurate as possible:
    1. Describe the problem you are experiencing. Try to be as accurate as you can: describe the actual behavior, and the behavior you expected.
    2. Describe what steps you need to perform in order to expose the bug. This will help developers reproduce the bug.
    3. Attach as much information as you have. If it is a GUI bug, or a bug in one of the applications, try to make a screen shot.
    4. If this is a crashing bug, i.e. the system popped up an alert notifying you that the application encountered a problem and can't continue, a crash alert offers you several options. You can either save a report or write a core file (both saved to the Desktop) that you can then attach to a ticket.

Server Bugs

When vital servers like the app server, the registrar or the input server crash, you won't see the usual crash alert. Instead the whole screen will be cleared white and the Debugger will be started in text-mode, its output appearing directly on screen. Likely you will still be able to move the mouse, which will overwrite the white and Debugger output on screen. Applications still running (like ProcessController or the clock in the Deskbar) might also draw over the debugger output on screen.
Besides everything being more ugly and inconvenient, basically the same applies as for application bugs. Most importantly procure a back trace (bt command). You may need to take a picture of the screen with a digital camera, since you won't be able to copy the text anywhere.
Depending on what exactly crashed, you can try to save a crash report on the Desktop with save-report or write-core for a core file, and then press the power button once to try shutting cleanly down.

Kernel Bugs

Kernel bugs are usual the ones with the most severe effects while at the same time being the hardest to debug. There are different kinds of symptoms, which most likely point to a kernel or driver issue:

  • The system enters kernel debugging land (KDL) on its own volition. The upper part of the screen is cleared white and several lines of text are printed on it. The second line says "Welcome to Kernel Debugging Land...", the one above it states the immediate reason for entering KDL.
  • The system reboots spontaneously.
  • The system freezes completely. You can't move the mouse and no application draws anything anymore. An important test in that situation is, whether you still can enter KDL via the shortcut Alt-Sysreq-D. Wait at least a minute to see, if anything happens.
  • The system doesn't boot up correctly. It may reboot spontaneously or stop at some point (e.g. at some icon of boot screen). In the latter case also try Alt-Sysreq-D.
  • The whole system or some piece of hardware doesn't behave correctly. E.g. it could be very slow, errors occur, or something doesn't work at all. If some hardware doesn't work at all, the first obvious check is whether Haiku supports it at all at the moment (e.g. ask on a mailing list or a forum).

Note that while only the last point seems to indicate hardware relation, all the other symptoms could be caused by a bug in a hardware driver as well. If you have a suspicion what piece of hardware or corresponding driver might have to do with the problem, check whether removing/disabling the hardware or the driver makes a difference. E.g. if you suspect Wifi you may find that your BIOS has an option to disable it. Or if not, you could remove the responsible Wifi driver from your Haiku installation (in /system/add-ons/kernel/drivers/bin).

Kernel Debugging Land

Unless the system entered KDL by itself, you can normally do that by invoking the keyboard shortcut Alt-SysReq-D ("SysReq" being the Print key, normally). Note that in KDL your keyboard may not work. PS/2 keyboards always do, with USB keyboards it depends on the type of USB controller (UHCI/EHCI). Generally, the keyboard should be plugged into the port directly, not via any hubs. In some circumstances, the keyboard only works if one has entered KDL via the keyboard shortcut at least once. USB OHCI is not supported at the moment.

KDL itself is a kind of a shell. One can execute commands that print information about the system. The following commands might be of interest:

  • bt (aka sc): Prints a back trace. If the system entered KDL on its on volition, a back trace is normally printed automatically. If that didn't happen or part of it is obscured (e.g. when the stack trace is so long that it wrapped around) and your only way of providing the information to developers is by taking a picture of the screen, enter this command.
  • ints: This will show the handled and unhandled hardware interrupts.
  • co (aka continue): Leaves the kernel debugger and continues normal operation of the system, if that is possible.
  • reboot: Reboots the system immediately. You will lose all unsaved data and even those that have been saved, but have not yet been written back to disk.

For more information, see this article: Welcome to Kernel Debugging Land

The KDL output is written to the serial port (if you have one, a respective cable, and a second computer to connect with, you can capture the output there via a terminal program) and to the syslog. If you can't leave KDL it won't be written to the syslog file, though. There's a boot loader debug option that allows you to capture it nonetheless.

You can generate QR codes from KDL output that can then be converted to text using smartphones or similar devices. See this blog post on how to get data out of KDL using that feature:QR Encode your KDL Output.

Syslog

This is the preferred method for gaining information from a non-booting or crashing system.

The syslog (system log) contains valuable information about what has happened in your system, including the output of KDL sessions. It can be found at /var/log/syslog. Since writing to a file requires a working system, the most recent output might not have made it to the syslog when a kernel problem occurs (particularly on spontaneous reboots or uncontinuable KDLs.)

The option Enable debug syslog in the boot loader's Debug menu makes the syslog somewhat persistent in memory. (By default, the option is enabled.) This means that it will (usually) survive a reset. If you are lucky, it will be saved to /var/log/previous_syslog on reboot; if you are not, you will have to enter the boot loader menu, and choose Debug menu and then Display syslog from previous session or Save syslog from previous session. The former displays the syslog on screen, the latter allows you to save it as a file to disk. (Note that at the moment only FAT32 volumes are supported for writing the file to.) If you want to use a USB stick, but have plugged it in too late so that it isn't recognized, you can reset the machine and re-enter the boot loader menu.

When attaching the syslog to a ticket, just attach it directly, *don't* put it inside a zipfile or other archive.

On Screen Debug Output

The on-screen debug output is useful only for debugging very specific issues and is known to have (timing) issues. Don't use it, if you don't have to.
This is only relevant when Haiku fails to boot on your machine and the "Debug syslog option" doesn't work for some reason. Before the Haiku boot logo appears, press the Shift key to enter the boot loader menu. Select Select safe mode options. Near the bottom, [ ] Enable on screen debug output will be listed. (Note: The other options could be enabled in an attempt to boot Haiku. If Haiku will boot only when one or more options are activated, be sure to mention which ones.) Finally select Return to main menu and then continue booting. One or more pages of text will display on the screen, only the last few lines need to be included on your ticket. There's more information on the Boot Loader.

Hardware Issues

For hardware related issues, it is preferred to always create a new ticket. In the ticket, be sure to include the following, preferably as text attachments.

  • listdev (a detailed listing of your hardware, including vendor and pci id's, similar to lshw and lspci)
  • listusb -v (assuming its a usb related issue, similar to lsusb)
  • In case of USB input devices, add the /tmp/usb_hid_report_descriptor_*.bin file
  • open /var/log/syslog (the primary system log used by Haiku, akin to on screen debugging during boot)
  • listimage | grep drivers
  • ints (from within Kernel Debugging Land -- KDL)
  • On screen debug output (a safe mode boot time option).
Note: See TracWiki for help on using the wiki.