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