userguide/welcome/zh_CN/bugreports.html
2023-07-24 19:01:02 +00:00

192 lines
19 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN" xml:lang="zh-CN">
<head>
<!--
*
* Copyright 2008-2020, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Niels Reedijk, Matt Madia and Ingo Weinhold who wrote
* http://dev.haiku-os.org/wiki/ and http://dev.haiku-os.org/wiki/ReportingBugs
* Humdinger <humdingerb@gmail.com>
* Translators:
* dgy18787
* Pengphei Han
* Máximo Castañeda
*
-->
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="all" />
<title>报告错误</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="../Haiku-doc.css" />
</head>
<body>
<div id="banner">
<div><span>用户指南</span></div>
</div>
<div class="nav">
<div class="inner">
<ul class="lang-menu">
<li class="now"> 中文 [中文]&nbsp;<span class="dropdown-caret">&#9660;</span></li>
<li><a href="../id/bugreports.html">Bahasa Indonesia</a></li>
<li><a href="../ca/bugreports.html">Català</a></li>
<li><a href="../de/bugreports.html">Deutsch</a></li>
<li><a href="../en/bugreports.html">English</a></li>
<li><a href="../es/bugreports.html">Español</a></li>
<li><a href="../eo/bugreports.html">Esperanto</a></li>
<li><a href="../fr/bugreports.html">Français</a></li>
<li><a href="../fur/bugreports.html">Furlan</a></li>
<li><a href="../it/bugreports.html">Italiano</a></li>
<li><a href="../hu/bugreports.html">Magyar</a></li>
<li><a href="../pl/bugreports.html">Polski</a></li>
<li><a href="../pt_PT/bugreports.html">Português</a></li>
<li><a href="../pt_BR/bugreports.html">Português (Brazil)</a></li>
<li><a href="../ro/bugreports.html">Română</a></li>
<li><a href="../sk/bugreports.html">Slovenčina</a></li>
<li><a href="../fi/bugreports.html">Suomi</a></li>
<li><a href="../sv_SE/bugreports.html">Svenska</a></li>
<li><a href="../tr/bugreports.html">Türkçe</a></li>
<li><a href="../ru/bugreports.html">Русский</a></li>
<li><a href="../uk/bugreports.html">Українська</a></li>
<li><a href="../jp/bugreports.html">日本語</a></li>
</ul>
<span>
<a href="../welcome_zh_CN.html" class="uplink">Welcome</a>
</span></div>
</div>
<div id="content">
<div>
<div class="box-info">本节的翻译还未完成。在未完成之前,所有的未完成部分都将使用英语原文。</div>
<table class="index" id="index" summary="index">
<tr class="heading"><td>索引</td></tr>
<tr class="index"><td><a href="#account">获取Trac账户</a><br />
<a href="#report">创建错误报告</a><br />
<a href="#app">软件错误</a><br />
<a href="#server">服务错误</a><br />
<a href="#kernel">内核错误</a><br />
<a href="#kdl">内核调试- KDL</a><br />
<a href="#syslog">系统日志</a><br />
<a href="#onscreen">屏幕调试</a><br />
<a href="#hardware">硬件错误</a><br />
<a href="#next">下一步?</a></td></tr>
</table>
<h1>报告错误</h1>
<p>由于我们的开发人员不可能测试每种硬件组合和每种不同的系统交互方式所以我们依赖于用户通过用户来给予我们Haiku的运行情况。由于Haiku还很年轻您在使用时很有可能会遇到错误。我们非常感谢您能够分出时间来提交这些错误报告。我们可以共同一步一步的提高Haiku的性能。</p>
<p>为了确保我们的错误跟踪系统的有效性,遵守共同的<a href="http://dev.haiku-os.org/wiki/BugTrackerEtiquette">错误报告规范</a>是很有必要的。</p>
<h2><a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
<a id="account" name="accout">获取Trac账户</a></h2>
<p>为了提交任务单,您需要在<a href="http://dev.haiku-os.org/register" title="Register at Haiku's Bugtracker">Haiku 的错误跟踪系统</a>中注册一个账户。
<br />
新建账户时,您需要<b>提供自己的电子邮箱</b> ,否则您将不具备基本的任务单修改权限。完成之后,您必须要保证<b>检查您的垃圾邮箱</b>,因为所有重要的验证邮件可能都会被发送到那里。</p>
<h2><a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
<a id="report" name="report">创建错误报告</a></h2>
<p>在报告一个错误之前,请您<a href="http://dev.haiku-os.org/query?status=new&amp;status=assigned&amp;status=reopened&amp;status=closed&amp;summary=%7Etext+you+want+to+search+for&amp;order=priority">确保</a>该错误报告之前不存在。你可以使用<a href="http://dev.haiku-os.org/search?q=&amp;noquickjump=1&amp;ticket=on">查找</a>功能来查找其是否存在。
<br />
在确定它是一个独特的错误之后,您需要尽可能的找出有关的详细信息:</p>
<ul>
<li><p>尝试在当前版本的Haiku系统中重现您的问题。  有许多用于测试的预编译镜像都是<a href="http://download.haiku-os.org">可用的</a></p></li>
<li><p>包括基本的信息,例如以何种方式测试 Haiku利用真实的硬件VMware还是 QEMU</p></li>
<li><p>Mention which revision you are running. You can find this information in <span class="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>描述您所遇到的问题。尽量把问题讲得精确和明白:详细的描述系统的行为反馈,和您期望的反馈。</p></li>
<li><p>描述出现该错误所需要的操作步骤。这将会有助于开发者重现该错误,并对其进行修复和完善。</p></li>
<li><p>附带你所掌握的尽可能多的信息。如果是一个GUI错误或者其中的程序错误尽量使用 <span class="key">PRINT</span> 键来截取当时的屏幕图像。</p></li>
</ul>
<h2><a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
<a id="app" name="app">程序错误</a></h2>
<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 <a href="../../userguide/zh_CN/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 <a href="../../userguide/zh_CN/applications/haikudepot.html#logs">HaikuDepot</a>.</p>
<h2><a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
<a id="server" name="server">服务错误</a></h2>
<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 (<span class="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 <span class="cli">save-report</span> or <span class="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 <span class="cli">shutdown</span> and <span class="cli">reboot</span>.</p>
<h2><a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
<a id="kernel" name="kernel">内核错误</a></h2>
<p>内核错误通常都是危害效果最大的错误,同时也是最难调试的错误。下面几种情形,通常都可能是内核或者驱动问题:</p>
<ul>
<li><p>系统自动进入了内核调试状态KDL屏幕上方显示为白色并且打印出几行文本。文本第二行显示为“<i>Welcome to Kernel Debugging Land...</i>”,而第一行则声明了进入内核调试状态的实时原因。</p></li>
<li><p>系统自动重新启动。</p></li>
<li><p>系统完全冻结。您无法移动鼠标,并且屏幕中无任何程序显示。在此情况下,重要的是测试能否使用快捷键 <span class="key">ALT</span> <span class="key">SysReq</span> <span class="key">D</span> 进入内核调试状态(在多数键盘上,<span class="key">SysReq</span><span class="key">PRINT</span> 键)。然后等待至少一分钟,查看系统反应状态。</p></li>
<li><p>系统无法实现正确引导。它可能自动重启,或停止在某个步骤(例如,某个启动图标)。对于后一种情况,可以尝试使用快捷键 <span class="key">ALT</span> <span class="key">SysReq</span> <span class="key">D</span></p></li>
<li><p>整个系统或者部分硬件无法正确运行。例如系统运行缓慢出现错误或者完全无法运行。如果某个硬件完全无法工作首要的是检查Haiku目前是否支持该硬件例如在邮件列表或论坛中进行询问</p></li>
</ul>
<p>需要注意的是,只有最后这种情况与硬件相关,而所有其他的问题也可能由硬件驱动中的错误引起。如果您对引起该问题的硬件或相关的驱动有所疑问,您可以检查删除/禁用该硬件或驱动是否会产生影响。例如,如果您怀疑无线网络有问题,您会发现 BIOS 中有可禁用它的选项。如果其中没有该选项,您可以从安装的 Haiku 中删除相关的无线网络驱动(参见 <a href="../../../userguide/zh_CN/bootloader.html">引导程序</a>)。</p>
<h3><a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
<a id="kdl" name="kdl">内核调试 - KDL</a></h3>
<p>If the system hasn't entered KDL by itself, you can do that intentionally by invoking the keyboard shortcut <span class="key">ALT</span> <span class="key">SysReq</span> <span class="key">D</span> (<span class="key">SysReq</span> being the <span class="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>
<p>KDL 本身是 shell 中的一类。它可以执行命令,打印系统信息。下面是一些感兴趣的命令:</p>
<table summary="layout" border="0" cellpadding="2" cellspacing="0">
<tr><td><span class="cli">bt</span> (等同 <span class="cli">sc</span>)</td><td> </td><td>打印回溯信息即堆栈抓取。如果系统自主进入内核KDL 状态,通常会自动打印回溯信息。如果没有显示,或者部分内容超出范围(如,堆栈跟踪太长,以至于超出屏幕),您可以输入该指令;并且您只能通过抓取屏幕截图为开发者提供相关信息。</td></tr>
<tr><td><span class="cli">ints</span></td><td> </td><td>显示已处理和未处理的硬件中断。</td></tr>
<tr><td class="onelinetop"><span class="cli">co</span> (aka continue)</td><td> </td><td>离开内核调试状态;如果可能的话,继续正常的系统操作。</td></tr>
<tr><td><span class="cli">reboot</span></td><td> </td><td>立即重启系统。您将会丢失所有未保存的数据,甚至包括那些已经保存,但是还未写入硬盘的数据。</td></tr>
</table>
<p>获取更多信息,请参阅 <a href="http://www.haiku-os.org/documents/dev/welcome_to_kernel_debugging_land">欢迎使用内核调试工具</a></p>
<p>KDL输出信息将会写入到串行端口如果您拥有另一台与之相连接的计算机您可以通过中断程序重定向输出信息和系统日志。如果您无法离开KDL它将无法写入系统日志文件。尽管如此还有一个系统引导调试选项允许您捕获系统信息参阅下文</p>
<p>您可以从KDL输出中生成 QR 代码,而它们可以通过智能手机或相似设备转换为文本内容。有关如何使用该功能从 KDL 获取数据,详情参考 <a href="http://www.haiku-os.org/blog/mmlr/2012-07-01_qr_encode_your_kdl_output">QR Encode your KDL Output</a></p>
<h3><a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
<a id="syslog" name="syslog">系统日志</a></h3>
<p><b>这是从无法引导的系统中获取信息的首选方法。</b>
<br />
系统日志syslogsystem log 的缩写)中包含了关于系统问题的有用信息,包括 KDL 会话的输出信息 。通常将它附带到有关内核问题的报告中是个不错的主意。系统日志将会写入文件 <span class="path">/boot/system/var/log/syslog</span>。由于写入文件需要系统处于运行状态,因此当内核出现问题时(尤其是,系统自动重启,或者无法持续 KDL 会话),最新的输出信息可能无法写入日志文件。</p>
<p>The option <span class="menu">Enable debug syslog</span> in the boot loader's <span class="menu">Debug menu</span> makes the syslog persistent. If the option <span class="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 <span class="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 <span class="key">SHIFT</span> (or <span class="key">SPACE</span> when booting via UEFI) while booting.<br />
In the boot loader's <span class="menu">Debug menu</span> you should find the entries <span class="menu">Display syslog from previous session</span> and <span class="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>
<h3><a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
<a id="onscreen" name="onscreen">屏幕调试</a></h3>
<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 <span class="menu">Debug syslog</span> option doesn't work for some reason. Before the Haiku boot logo appears, hold <span class="key">SHIFT</span> (or <span class="key">SPACE</span> when booting via UEFI) to enter the boot loader menu. Select <span class="menu">Select debug options</span>. Near the bottom, <span class="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 />
Finally select <span class="menu">Return to main menu</span> and then <span class="menu">Continue booting</span>.<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 <a href="../../userguide/zh_CN/bootloader.html">Boot Loader</a>.</p>
<h2><a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
<a id="hardware" name="hardware">硬件错误</a></h2>
<p>在处理有关硬件/驱动的问题时,您需要在报告中附带下面的信息:</p>
<table summary="layout" border="0" cellpadding="2" cellspacing="0">
<tr><td>- <span class="cli">listdev</span></td><td> </td><td> 给出所有硬件的详细列表,包括提供商和 PCI ID类似于Linux下的 <span class="cli">lshw</span><span class="cli">lspci</span></td></tr>
<tr><td>- <span class="cli">listusb -v</span></td><td> </td><td>假如是有关 USB 的问题它类似于Linux下的 <span class="cli">lsusb</span></td></tr>
<tr><td>- <span class="cli">open /var/log/syslog</span></td><td> </td><td>Haiku的主要系统日志查看上述 <a href="#syslog">Syslog</a>,类似于引导过程中的屏幕调试信息。您可以使用 <span class="cli">open</span> 命令在文本编辑器中获取到系统日志中相关的部分。</td></tr>
<tr><td class="onelinetop">- <span class="cli">listimage | grep drivers/</span></td><td> </td><td> 列出所有使用的驱动。</td></tr>
<tr><td>- <span class="cli">usb_hid_report</span></td><td> </td><td>In case of USB input devices, add the <span class="cli">/tmp/usb_hid_report_descriptor_*.bin</span> file.</td></tr>
<tr><td>- <span class="cli">ints</span></td><td> </td><td>只在 <i>内核调试状态</i> 可用(参阅下文)。它用显示中断使用情况。不可能有许多由不同硬件共享的中断。</td></tr>
<tr><td colspan="3">- On screen debug output (a debug boot time option, see <a href="#onscreen">above</a>).</td></tr>
</table>
<p>前四个命令需要在终端中进行输入。在命令后添加 <span class="cli"> &gt; output.txt</span> 然后输出的信息将会重定向到“output.txt”文本文件您可以将其附带到您的错误报告或者邮件。</p>
<h2><a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
<a id="next" name="next">下一步</a></h2>
<p>在您提交错误报告之后,开发人员将会检查您的错误,然后尝试进行修复。但是需要注意的是,我们所有的人员都是志愿者,有时候一个错误报告可能会很长时间没有人来进行回复。如果可以的话,添加新的信息将会有助于早点修复错误,但是请不要添加非描述性的评论来将“炒热”该错误。</p>
<p>切记提交错误报告不是花很少时间写个报告然后就结束了。如果您提交了一个错误然后您就是Haiku开发过程中的一员。开发人员在解决您的错误过程中可能会遇到问题因此请你一定要始终关注该错误然后回答相关的问题。如果该问题没有“fixed”你的任务就没有“done”。</p>
</div>
</div>
<div class="nav">
<div class="inner"><span>
<a href="../welcome_zh_CN.html" class="uplink">Welcome</a>
</span></div>
</div>
</body>
</html>