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