<p>Since our developers are unable to test every hardware combination, nor every different way of interacting with the operating system, we are relying on users to give us some input on how things work at their end. Since Haiku is still quite young, it's very likely that you will encounter bugs. We thank you for taking the time to report these. Together we can improve Haiku, bit by bit.</p>
<p>To keep our bugtracker effective, it's essential to abide by the <ahref="http://dev.haiku-os.org/wiki/BugTrackerEtiquette">Bug Tracker Etiquette</a>.</p>
<p>To file a ticket, you need to have an account at <ahref="http://dev.haiku-os.org/register"title="Register at Haiku's Bugtracker">Haiku's Bugtracker</a>.<br/>
When creating a new account, be certain to <b>provide your email address</b> as it is necessary to obtain basic ticket modification privileges. Be sure to <b>check your spam folder</b> shortly afterwards, as the all important verification mail often ends up there.</p>
<p>Before reporting a bug, please <ahref="http://dev.haiku-os.org/query?status=new&status=assigned&status=reopened&status=closed&summary=%7Etext+you+want+to+search+for&order=priority">make sure</a> that it does not yet exist. You can also use the <ahref="http://dev.haiku-os.org/search?q=&noquickjump=1&ticket=on">search</a> function for this.<br/>
After you have established that it's a unique bug, make your information as accurate as possible:</p>
<li><p>Attempt to reproduce your issue on the current revision of Haiku. Pre-built images for testing purposes are <ahref="http://download.haiku-os.org">available</a> online.</p></li>
<li><p>Mention which revision you are running. You can find this information in <spanclass="menu">About Haiku...</span> from the Deskbar menu. Also mention what kind of Haiku build you are testing (x86_gcc2, x86_64). The downloadable images are named accordingly, for a self-built image you should know how you built it.</p></li>
<li><p>Describe the problem you are experiencing. Try to be as accurate as you can: describe the actual behavior, and the behavior you expected.</p></li>
<li><p>Describe what steps you need to perform in order to expose the bug. This will help developers reproduce the bug.</p></li>
<li><p>Attach as much information as you have. If it is a GUI bug, or a bug in one of the applications, try to take a screenshot by pressing the <spanclass="key">PRINT</span> key.</p></li>
<p>When an application crashed, you can either save a report or write a core file (both saved to the Desktop) that you can attach to a bugreport, or you can evoke the <ahref="../../userguide/pt_PT/applications/debugger.html">Debugger</a>.</p>
<p>If it's not a crashing bug, you may get useful information when starting the application from Terminal. Some applications provide logging and other options when started with certain parameters; try <tt>-h</tt> or <tt>--help</tt> to see if that is the case. As example, see the different logging levels of <ahref="../../userguide/pt_PT/applications/haikudepot.html#logs">HaikuDepot</a>.</p>
<p>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.<br/>
Besides everything being more ugly and inconvenient, basically the same applies as for application bugs. Most importantly procure a back trace (<spanclass="cli">bt</span> 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.<br/>
Depending on what exactly crashed, you can try to save a crash report on the Desktop with <spanclass="cli">save-report</span> or <spanclass="cli">write-core</span> for a core file, and then press the power button once to try shutting cleanly down. If the power button doesn't work, there are also the commands <spanclass="cli">shutdown</span> and <spanclass="cli">reboot</span>.</p>
<p>Kernel bugs are usually 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:</p>
<li><p>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 "<i>Welcome to Kernel Debugging Land...</i>", the one above it states the immediate reason for entering KDL.</p></li>
<li><p>The system reboots spontaneously.</p></li>
<li><p>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 <spanclass="key">ALT</span><spanclass="key">SysReq</span><spanclass="key">D</span> (<spanclass="key">SysReq</span> being <spanclass="key">PRINT</span> on most keyboards). Wait at least a minute to see, if anything happens.</p></li>
<li><p>The system doesn't boot up correctly. It may reboot spontaneously or stop at some point (e.g. at some icon of the boot screen). In the latter case also try <spanclass="key">ALT</span><spanclass="key">SysReq</span><spanclass="key">D</span>.</p></li>
<li><p>The whole system or some piece of hardware doesn't behave correctly. For example, 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).</p></li>
<p>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. For example, if you suspect Wifi you may find that your BIOS has an option to disable it. Or if not, you could blacklist the responsible Wifi driver from your Haiku installation (see <ahref="../../userguide/pt_PT/bootloader.html">Boot Loader</a>).</p>
<p>If the system hasn't entered KDL by itself, you can do that intentionally by invoking the keyboard shortcut <spanclass="key">ALT</span><spanclass="key">SysReq</span><spanclass="key">D</span> (<spanclass="key">SysReq</span> being the <spanclass="key">Print</span> key, normally).<br/>
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.</p>
<tr><td><spanclass="cli">bt</span> (aka <spanclass="cli">sc</span>)</td><td></td><td>Prints a back trace (aka stack crawl). If the system entered KDL on its on volition, a back trace is normally printed automatically. Enter the command 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.</td></tr>
<tr><tdclass="onelinetop"><spanclass="cli">co</span> (aka <spanclass="cli">continue</span>)</td><td></td><td>Leaves the kernel debugger and continues normal operation of the system, if that is possible.</td></tr>
<tr><td><spanclass="cli">reboot</span></td><td></td><td>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.</td></tr>
</table>
<p>For more information, see the article <ahref="http://www.haiku-os.org/documents/dev/welcome_to_kernel_debugging_land">Welcome to Kernel Debugging Land</a>.</p>
<p>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 (see below).</p>
<p>You can generate QR codes from KDL output that can then be converted to text using smartphones or similar devices. See the blog post <ahref="http://www.haiku-os.org/blog/mmlr/2012-07-01_qr_encode_your_kdl_output">QR Encode your KDL Output</a> on how to get data out of KDL using that feature.</p>
The syslog (short for system log) contains valuable information about what has happened in your system, including the output of KDL sessions. It's usually a good idea to attach it to the kernel related Trac ticket. The syslog is written to the file <spanclass="path">/boot/system/var/log/syslog</span>. 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 KDL sessions).</p>
<p>The option <spanclass="menu">Enable debug syslog</span> in the boot loader's <spanclass="menu">Debug menu</span> makes the syslog persistent. If the option <spanclass="menu">Save syslog from previous session during boot</span> is activated in the boot loader options (as it is by default), you'll find the syslog of your last session as <spanclass="path">/boot/system/var/log/previous_syslog</span>.<br/>
If you're not able to boot to get to the previous_syslog, you have to enter the boot loader menu by holding down <spanclass="key">SHIFT</span> while booting.<br/>
In the boot loader's <spanclass="menu">Debug menu</span> you should find the entries <spanclass="menu">Display syslog from previous session</span> and <spanclass="menu">Save syslog from previous session</span>. 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 saving the file. If you want to use a USB stick, but have plugged it in too late so that it isn't recognized yet, you can reset the machine and re-enter the boot loader menu. Note: Don't accidentally boot any operating system or the data will be lost.</p>
<p><b>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.</b><br/>
This is only relevant when Haiku fails to boot on your machine and the <spanclass="menu">Debug syslog</span> option doesn't work for some reason. Before the Haiku boot logo appears, hold <spanclass="key">SHIFT</span> to enter the boot loader menu. Select <spanclass="menu">Select safe mode options</span>. Near the bottom, <spanclass="menu">[ ] Enable on screen debug output</span> 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.)<br/>
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 <ahref="../../userguide/pt_PT/bootloader.html">Boot Loader</a>.</p>
<tr><td>- <spanclass="cli">listdev</span></td><td></td><td>A detailed listing of your hardware, including vendor and pci id's, similar to Linux' <spanclass="cli">lshw</span> and <spanclass="cli">lspci</span>.</td></tr>
<tr><td>- <spanclass="cli">listusb -v</span></td><td></td><td>Assuming its a USB related issue, similar to <spanclass="cli">lsusb</span>.</td></tr>
<tr><td>- <spanclass="cli">open /var/log/syslog</span></td><td></td><td>The primary system log used by Haiku, see <ahref="#syslog">Syslog</a> above, akin to on screen debugging during boot. With the <spanclass="cli">open</span> command you can crop down the relevant part of the syslog in a text editor.</td></tr>
<tr><td>- <spanclass="cli">usb_hid_report</span></td><td></td><td>In case of USB input devices, add the <spanclass="cli">/tmp/usb_hid_report_descriptor_*.bin</span> file.</td></tr>
<tr><td>- <spanclass="cli">ints</span></td><td></td><td>Only available within <i>Kernel Debugging Land</i> (see above). Shows interrupt usage. There shouldn't be too many that are shared by different devices.</td></tr>
<p>The first four commands are entered into Terminal. Add a <spanclass="cli">> output.txt</span> after a command, and it's piped into a text file called "<tt>output.txt</tt>" that you can attach to your bug report or email.</p>
<p>After the bug has been reported, a developer will look at your bug and try to classify it. 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-descriptive comments.</p>
<p>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. Please stay around to answer these. Consider your participation 'done' when the bug is marked