Отчёт об ошибках (багах)
Так как наши разработчики не в состоянии проверить все комбинации компьютерных комплектующих и программных средств при их работе в Haiku, то мы полагаемся на пользователей, надеясь, что вы сообщите нам об обнаруженных ошибках, которых, ввиду молодости Haiku, может быть немало. Мы будем благодарны вам за потраченное на составление отчёта время, только вместе мы сможем сделать Haiku лучше.
Для продуктивной работы c системой отслеживания ошибок (багтрекером) важно соблюдать принятый в нём этикет.
Получение аккаунта в Trac
Чтобы создать новый багрепорт, у вас должен быть заведён аккаунт в багтрекере Haiku.
Создавая новый аккаунт обязательно введите адрес электронной почты, так как на него будут приходить все сведения, связанные с изменением багрепорта. Убедитесь, что приходящие с багтрекера письма не помечаются как спам, так как это вполне возможно.
Создание отчёта об ошибках
Прежде чем сообщать об ошибке, пожалуйста, убедитесь, что аналогичного багрепорта ещё не существует. Для этого также можно воспользоваться функцией поиска.
После того как вы установили, что подобных багрепортов не имеется, то оформите вашу информацию как можно точнее:
Attempt to reproduce your issue on the current revision of Haiku. Pre-built images for testing purposes are available.
Включите информацию о том как вы тестируете Haiku (на реальном компьютере, в эмуляторе VMWare, QEMU, и т. д.).
Mention which revision from SVN you are running. You can find this information in
from the Deskbar menu. Also mention what kind of Haiku build you are testing (gcc2, gcc4, gcc2hybrid, gcc4hybrid). The downloadable images are named accordingly, for a self-built image you should know how you built it.Опишите проблему, с которой вы столкнулись, попытайтесь описать её наиболее точно: как именно она проявилась, и как правильно должен бы был действовать проблемный объект при её отсутствии.
Расскажите какие шаги нужно выполнить для её возникновения, что поможет разработчикам воспроизвести эту ошибку.
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 PRINT key.
Application bugs
When an application crashed, you should invoke the debugger from the alert that pops up. This will open a Terminal window with gdb (the GNU debugger) running in it. Entering bt, you create a "backtrace" that you should copy in its entirety (including the part before you entered the bt command) and attach it to the 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 a gdb session will be started, its output appearing directly on screen. Likely you will still be able to move the mouse, which will overwrite the white and gdb 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.
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 (SysReq being PRINT on most keyboards). 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 the boot screen). In the latter case also try ALT SysReq D.
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).
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 remove the responsible Wifi driver from your Haiku installation (in /boot/system/add-ons/kernel/drivers/bin).
Kernel Debugging Land - KDL
If the system hasn't entered KDL by itself, you can do that intentionally by invoking the keyboard shortcut ALT SysReq D.
Note that in KDL your keyboard may not work. PS/2 keyboards always do, USB keyboards connected via UHCI controllers do only, 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, always enter that one. | |
ints | Shows 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 the 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 (see below).
Syslog
This is the preferred method for gaining information from a non-booting system.
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 /boot/common/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 KDL sessions).
The option SHIFT while booting.
In the boot loader's you should now find the entries and . 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. But again: Don't accidentally boot any operating system or the data will be lost.
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 doesn't work for some reason. Before the Haiku boot logo appears, hold SHIFT to enter the boot loader menu. Select . Near the bottom, 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 and then .
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.
Аппаратные ошибки
When dealing with a hardware/driver related bug, you should attach the following information as text files:
- listdev | A detailed listing of your hardware, including vendor and pci id's, similar to Linux' lshw and lspci. | |
- listusb -v | Assuming its a USB related issue, similar to lsusb. | |
- open /var/log/syslog | The primary system log used by Haiku, akin to on screen debugging during boot. With the open command you can crop down the relevant part of the syslog in a text editor. | |
- listimage | grep drivers/ | Lists all used drivers. | |
- ints | Only available within Kernel Debugging Land (see above). Shows interrupt usage. There shouldn't be too many that are shared by different devices. | |
- On screen debug output (a safe mode boot time option). |
The first four commands are entered into Terminal. Add a > output.txt after a command, and it's piped into a text file called "output.txt" that you can attach to your bug report or email.
Что дальше?
После того как багрепорт отправлен, разработчик рассмотрит вашу ошибку и попытаться классифицировать ее. Помните, что мы все добровольцы, и иногда багрепорт может оставаться без ответа некоторое время. Добавление новой информации к этой ошибке помогает исправить её быстрее, но не пытайтесь увеличить её значимость, добавляя не относящиеся к делу комментарии.
Помните, что отправка багрепорта, на который вы потратили некоторое время - это ещё полдела, и желательно чтобы вы следили за его состоянием. Только в этом случае вы внесёте ощутимую часть в процесс развития Haiku. У разработчиков могут возникнуть вопросы, относящиеся к багу во время его исправления, пожалуйста, не игнорируйте их, постаравшись как можно подробней ответить. Считайте свое участие законченным, только когда ошибка приобретёт статус "исправлено (fixed)".