Lots of minor, mostly layout fixes.
[Samba/gebeck_regimport.git] / docs / docbook / projdoc / Bugs.xml
blob03a60b6ce5bb54399385a5a7330a57eb0c991666
1 <chapter id="bugreport">
3 <chapterinfo>
4         &author.jelmer;
5         <author>
6                 <affiliation>
7                         <orgname>Samba Team</orgname>
8                 </affiliation>
9         </author>
10         <pubdate> 27 June 1997 </pubdate>
11 </chapterinfo>
13 <title>Reporting Bugs</title>
15 <sect1>
16 <title>Introduction</title>
18 <para>Please report bugs using <ulink url="https://bugzilla.samba.org/">bugzilla</ulink>.</para>
20 <para>
21 Please take the time to read this file before you submit a bug
22 report. Also, please see if it has changed between releases, as we
23 may be changing the bug reporting mechanism at some time.
24 </para>
26 <para>
27 Please also do as much as you can yourself to help track down the
28 bug. Samba is maintained by a dedicated group of people who volunteer
29 their time, skills and efforts. We receive far more mail about it than
30 we can possibly answer, so you have a much higher chance of an answer
31 and a fix if you send us a "developer friendly" bug report that lets
32 us fix it fast. 
33 </para>
35 <para>
36 Do not assume that if you post the bug to the comp.protocols.smb
37 newsgroup or the mailing list that we will read it. If you suspect that your 
38 problem is not a bug but a configuration problem then it is better to send 
39 it to the Samba mailing list, as there are (at last count) 5000 other users on
40 that list that may be able to help you.
41 </para>
43 <para>
44 You may also like to look though the recent mailing list archives,
45 which are conveniently accessible on the Samba web pages
46 at <ulink url="http://samba.org/samba/">http://samba.org/samba/</ulink>.
47 </para>
49 </sect1>
51 <sect1>
52 <title>General info</title>
54 <para>
55 Before submitting a bug report check your config for silly
56 errors. Look in your log files for obvious messages that tell you that
57 you've misconfigured something and run testparm to test your config
58 file for correct syntax.
59 </para>
61 <para>
62 Have you run through the <link linkend="diagnosis">diagnosis</link>? 
63 This is very important.
64 </para>
66 <para>
67 If you include part of a log file with your bug report then be sure to
68 annotate it with exactly what you were doing on the client at the
69 time, and exactly what the results were.
70 </para>
72 </sect1>
74 <sect1>
75 <title>Debug levels</title>
77 <para>
78 If the bug has anything to do with Samba behaving incorrectly as a
79 server (like refusing to open a file) then the log files will probably
80 be very useful. Depending on the problem a log level of between 3 and
81 10 showing the problem may be appropriate. A higher level givesmore
82 detail, but may use too much disk space.
83 </para>
85 <para>
86 To set the debug level use the <parameter>log level</parameter> in your 
87 &smb.conf;. You may also find it useful to set the log 
88 level higher for just one machine and keep separate logs for each machine. 
89 To do this use:
90 </para>
92 <para><programlisting>
93 log level = 10
94 log file = /usr/local/samba/lib/log.%m
95 include = /usr/local/samba/lib/smb.conf.%m
96 </programlisting></para>
98 <para>
99 then create a file 
100 <filename>/usr/local/samba/lib/smb.conf.<replaceable>machine</replaceable></filename> where
101 <replaceable>machine</replaceable> is the name of the client you wish to debug. In that file
102 put any &smb.conf; commands you want, for example 
103 <parameter>log level</parameter> may be useful. This also allows you to 
104 experiment with different security systems, protocol levels etc on just 
105 one machine.
106 </para>
108 <para>
109 The &smb.conf; entry <parameter>log level</parameter> 
110 is synonymous with the parameter <parameter>debuglevel</parameter> that has
111 been used in older versions of Samba and is being retained for backwards 
112 compatibility of &smb.conf; files.
113 </para>
115 <para>
116 As the <parameter>log level</parameter> value is increased you will record 
117 a significantly increasing level of debugging information. For most 
118 debugging operations you may not need a setting higher than 
119 <constant>3</constant>. Nearly 
120 all bugs can be tracked at a setting of <constant>10</constant>, but be 
121 prepared for a VERY large volume of log data.
122 </para>
124 </sect1>
126 <sect1>
127 <title>Internal errors</title>
129 <para>
130 If you get a <errorname>INTERNAL ERROR</errorname> message in your log files 
131 it means that Samba got an unexpected signal while running. It is probably a
132 segmentation fault and almost certainly means a bug in Samba (unless
133 you have faulty hardware or system software).
134 </para>
136 <para>
137 If the message came from smbd then it will probably be accompanied by
138 a message which details the last SMB message received by smbd. This
139 info is often very useful in tracking down the problem so please
140 include it in your bug report.
141 </para>
143 <para>
144 You should also detail how to reproduce the problem, if
145 possible. Please make this reasonably detailed.
146 </para>
148 <para>
149 You may also find that a core file appeared in a <filename>corefiles</filename>
150 subdirectory of the directory where you keep your samba log
151 files. This file is the most useful tool for tracking down the bug. To
152 use it you do this:
153 </para>
155 <screen>
156         <prompt>$ </prompt><userinput>gdb smbd core</userinput>
157 </screen>
159 <para>
160 adding appropriate paths to smbd and core so gdb can find them. If you
161 don't have gdb then try <userinput>dbx</userinput>. Then within the debugger
162 use the command <command>where</command> to give a stack trace of where the
163 problem occurred. Include this in your report.
164 </para>
166 <para>
167 If you know any assembly language then do a 
168 <command>disass</command> of the routine
169 where the problem occurred (if its in a library routine then
170 disassemble the routine that called it) and try to work out exactly
171 where the problem is by looking at the surrounding code. Even if you
172 don't know assembly then incuding this info in the bug report can be
173 useful. 
174 </para>
175 </sect1>
177 <sect1>
178 <title>Attaching to a running process</title>
180 <para>
181 Unfortunately some unixes (in particular some recent linux kernels)
182 refuse to dump a core file if the task has changed uid (which smbd
183 does often). To debug with this sort of system you could try to attach
184 to the running process using
185 <userinput>gdb smbd <replaceable>PID</replaceable></userinput> where you get
186 <replaceable>PID</replaceable> from <application>smbstatus</application>.
187 Then use <command>c</command> to continue and try to cause the core dump
188 using the client. The debugger should catch the fault and tell you
189 where it occurred.
190 </para>
192 </sect1>
194 <sect1>
195 <title>Patches</title>
197 <para>
198 The best sort of bug report is one that includes a fix! If you send us
199 patches please use <userinput>diff -u</userinput> format if your version of 
200 diff supports it, otherwise use <userinput>diff -c4</userinput>. Make sure 
201 you do the diff against a clean version of the source and let me know 
202 exactly what version you used. 
203 </para>
205 </sect1>
206 </chapter>