ac0fac371fe4fad3bfbc42a2d2186d780a0f6528
[tprouty/samba.git] / docs / htmldocs / bugreport.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >Reporting Bugs</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
9 REL="HOME"
10 TITLE="SAMBA Project Documentation"
11 HREF="samba-howto-collection.html"><LINK
12 REL="UP"
13 TITLE="Appendixes"
14 HREF="appendixes.html"><LINK
15 REL="PREVIOUS"
16 TITLE="Analysing and solving samba problems"
17 HREF="problems.html"></HEAD
18 ><BODY
19 CLASS="CHAPTER"
20 BGCOLOR="#FFFFFF"
21 TEXT="#000000"
22 LINK="#0000FF"
23 VLINK="#840084"
24 ALINK="#0000FF"
25 ><DIV
26 CLASS="NAVHEADER"
27 ><TABLE
28 SUMMARY="Header navigation table"
29 WIDTH="100%"
30 BORDER="0"
31 CELLPADDING="0"
32 CELLSPACING="0"
33 ><TR
34 ><TH
35 COLSPAN="3"
36 ALIGN="center"
37 >SAMBA Project Documentation</TH
38 ></TR
39 ><TR
40 ><TD
41 WIDTH="10%"
42 ALIGN="left"
43 VALIGN="bottom"
44 ><A
45 HREF="problems.html"
46 ACCESSKEY="P"
47 >Prev</A
48 ></TD
49 ><TD
50 WIDTH="80%"
51 ALIGN="center"
52 VALIGN="bottom"
53 ></TD
54 ><TD
55 WIDTH="10%"
56 ALIGN="right"
57 VALIGN="bottom"
58 >&nbsp;</TD
59 ></TR
60 ></TABLE
61 ><HR
62 ALIGN="LEFT"
63 WIDTH="100%"></DIV
64 ><DIV
65 CLASS="CHAPTER"
66 ><H1
67 ><A
68 NAME="BUGREPORT"
69 ></A
70 >Chapter 35. Reporting Bugs</H1
71 ><DIV
72 CLASS="TOC"
73 ><DL
74 ><DT
75 ><B
76 >Table of Contents</B
77 ></DT
78 ><DT
79 >35.1. <A
80 HREF="bugreport.html#AEN5125"
81 >Introduction</A
82 ></DT
83 ><DT
84 >35.2. <A
85 HREF="bugreport.html#AEN5135"
86 >General info</A
87 ></DT
88 ><DT
89 >35.3. <A
90 HREF="bugreport.html#AEN5141"
91 >Debug levels</A
92 ></DT
93 ><DT
94 >35.4. <A
95 HREF="bugreport.html#AEN5162"
96 >Internal errors</A
97 ></DT
98 ><DT
99 >35.5. <A
100 HREF="bugreport.html#AEN5176"
101 >Attaching to a running process</A
102 ></DT
103 ><DT
104 >35.6. <A
105 HREF="bugreport.html#AEN5184"
106 >Patches</A
107 ></DT
108 ></DL
109 ></DIV
110 ><DIV
111 CLASS="SECT1"
112 ><H1
113 CLASS="SECT1"
114 ><A
115 NAME="AEN5125"
116 >35.1. Introduction</A
117 ></H1
118 ><P
119 >The email address for bug reports for stable releases is <A
120 HREF="mailto:samba@samba.org"
121 TARGET="_top"
122 >samba@samba.org</A
123 >. 
124 Bug reports for alpha releases should go to <A
125 HREF="mailto:samba-technical@samba.org"
126 TARGET="_top"
127 >samba-technical@samba.org</A
128 >.</P
129 ><P
130 >Please take the time to read this file before you submit a bug
131 report. Also, please see if it has changed between releases, as we
132 may be changing the bug reporting mechanism at some time.</P
133 ><P
134 >Please also do as much as you can yourself to help track down the
135 bug. Samba is maintained by a dedicated group of people who volunteer
136 their time, skills and efforts. We receive far more mail about it than
137 we can possibly answer, so you have a much higher chance of an answer
138 and a fix if you send us a "developer friendly" bug report that lets
139 us fix it fast. </P
140 ><P
141 >Do not assume that if you post the bug to the comp.protocols.smb
142 newsgroup or the mailing list that we will read it. If you suspect that your 
143 problem is not a bug but a configuration problem then it is better to send 
144 it to the Samba mailing list, as there are (at last count) 5000 other users on
145 that list that may be able to help you.</P
146 ><P
147 >You may also like to look though the recent mailing list archives,
148 which are conveniently accessible on the Samba web pages
149 at <A
150 HREF="http://samba.org/samba/"
151 TARGET="_top"
152 >http://samba.org/samba/</A
153 >.</P
154 ></DIV
155 ><DIV
156 CLASS="SECT1"
157 ><H1
158 CLASS="SECT1"
159 ><A
160 NAME="AEN5135"
161 >35.2. General info</A
162 ></H1
163 ><P
164 >Before submitting a bug report check your config for silly
165 errors. Look in your log files for obvious messages that tell you that
166 you've misconfigured something and run testparm to test your config
167 file for correct syntax.</P
168 ><P
169 >Have you run through the <A
170 HREF="diagnosis.html"
171 >diagnosis</A
172 >? 
173 This is very important.</P
174 ><P
175 >If you include part of a log file with your bug report then be sure to
176 annotate it with exactly what you were doing on the client at the
177 time, and exactly what the results were.</P
178 ></DIV
179 ><DIV
180 CLASS="SECT1"
181 ><H1
182 CLASS="SECT1"
183 ><A
184 NAME="AEN5141"
185 >35.3. Debug levels</A
186 ></H1
187 ><P
188 >If the bug has anything to do with Samba behaving incorrectly as a
189 server (like refusing to open a file) then the log files will probably
190 be very useful. Depending on the problem a log level of between 3 and
191 10 showing the problem may be appropriate. A higher level givesmore
192 detail, but may use too much disk space.</P
193 ><P
194 >To set the debug level use <B
195 CLASS="COMMAND"
196 >log level =</B
197 > in your 
198 <TT
199 CLASS="FILENAME"
200 >smb.conf</TT
201 >. You may also find it useful to set the log 
202 level higher for just one machine and keep separate logs for each machine. 
203 To do this use:</P
204 ><P
205 ><PRE
206 CLASS="PROGRAMLISTING"
207 >log level = 10
208 log file = /usr/local/samba/lib/log.%m
209 include = /usr/local/samba/lib/smb.conf.%m</PRE
210 ></P
211 ><P
212 >then create a file 
213 <TT
214 CLASS="FILENAME"
215 >/usr/local/samba/lib/smb.conf.<VAR
216 CLASS="REPLACEABLE"
217 >machine</VAR
218 ></TT
219 > where
220 <VAR
221 CLASS="REPLACEABLE"
222 >machine</VAR
223 > is the name of the client you wish to debug. In that file
224 put any <TT
225 CLASS="FILENAME"
226 >smb.conf</TT
227 > commands you want, for example 
228 <B
229 CLASS="COMMAND"
230 >log level=</B
231 > may be useful. This also allows you to 
232 experiment with different security systems, protocol levels etc on just 
233 one machine.</P
234 ><P
235 >The <TT
236 CLASS="FILENAME"
237 >smb.conf</TT
238 > entry <B
239 CLASS="COMMAND"
240 >log level =</B
241
242 is synonymous with the entry <B
243 CLASS="COMMAND"
244 >debuglevel =</B
245 > that has been 
246 used in older versions of Samba and is being retained for backwards 
247 compatibility of <TT
248 CLASS="FILENAME"
249 >smb.conf</TT
250 > files.</P
251 ><P
252 >As the <B
253 CLASS="COMMAND"
254 >log level =</B
255 > value is increased you will record 
256 a significantly increasing level of debugging information. For most 
257 debugging operations you may not need a setting higher than 3. Nearly 
258 all bugs can be tracked at a setting of 10, but be prepared for a VERY 
259 large volume of log data.</P
260 ></DIV
261 ><DIV
262 CLASS="SECT1"
263 ><H1
264 CLASS="SECT1"
265 ><A
266 NAME="AEN5162"
267 >35.4. Internal errors</A
268 ></H1
269 ><P
270 >If you get a "INTERNAL ERROR" message in your log files it means that
271 Samba got an unexpected signal while running. It is probably a
272 segmentation fault and almost certainly means a bug in Samba (unless
273 you have faulty hardware or system software).</P
274 ><P
275 >If the message came from smbd then it will probably be accompanied by
276 a message which details the last SMB message received by smbd. This
277 info is often very useful in tracking down the problem so please
278 include it in your bug report.</P
279 ><P
280 >You should also detail how to reproduce the problem, if
281 possible. Please make this reasonably detailed.</P
282 ><P
283 >You may also find that a core file appeared in a <TT
284 CLASS="FILENAME"
285 >corefiles</TT
286 >
287 subdirectory of the directory where you keep your samba log
288 files. This file is the most useful tool for tracking down the bug. To
289 use it you do this:</P
290 ><P
291 ><B
292 CLASS="COMMAND"
293 >gdb smbd core</B
294 ></P
295 ><P
296 >adding appropriate paths to smbd and core so gdb can find them. If you
297 don't have gdb then try <KBD
298 CLASS="USERINPUT"
299 >dbx</KBD
300 >. Then within the debugger use the
301 command <KBD
302 CLASS="USERINPUT"
303 >where</KBD
304 > to give a stack trace of where the problem
305 occurred. Include this in your mail.</P
306 ><P
307 >If you known any assembly language then do a <KBD
308 CLASS="USERINPUT"
309 >disass</KBD
310 > of the routine
311 where the problem occurred (if its in a library routine then
312 disassemble the routine that called it) and try to work out exactly
313 where the problem is by looking at the surrounding code. Even if you
314 don't know assembly then incuding this info in the bug report can be
315 useful. </P
316 ></DIV
317 ><DIV
318 CLASS="SECT1"
319 ><H1
320 CLASS="SECT1"
321 ><A
322 NAME="AEN5176"
323 >35.5. Attaching to a running process</A
324 ></H1
325 ><P
326 >Unfortunately some unixes (in particular some recent linux kernels)
327 refuse to dump a core file if the task has changed uid (which smbd
328 does often). To debug with this sort of system you could try to attach
329 to the running process using <KBD
330 CLASS="USERINPUT"
331 >gdb smbd <VAR
332 CLASS="REPLACEABLE"
333 >PID</VAR
334 ></KBD
335 > where you get <VAR
336 CLASS="REPLACEABLE"
337 >PID</VAR
338 > from
339 <SPAN
340 CLASS="APPLICATION"
341 >smbstatus</SPAN
342 >. Then use <KBD
343 CLASS="USERINPUT"
344 >c</KBD
345 > to continue and try to cause the core dump
346 using the client. The debugger should catch the fault and tell you
347 where it occurred.</P
348 ></DIV
349 ><DIV
350 CLASS="SECT1"
351 ><H1
352 CLASS="SECT1"
353 ><A
354 NAME="AEN5184"
355 >35.6. Patches</A
356 ></H1
357 ><P
358 >The best sort of bug report is one that includes a fix! If you send us
359 patches please use <KBD
360 CLASS="USERINPUT"
361 >diff -u</KBD
362 > format if your version of 
363 diff supports it, otherwise use <KBD
364 CLASS="USERINPUT"
365 >diff -c4</KBD
366 >. Make sure 
367 your do the diff against a clean version of the source and let me know 
368 exactly what version you used. </P
369 ></DIV
370 ></DIV
371 ><DIV
372 CLASS="NAVFOOTER"
373 ><HR
374 ALIGN="LEFT"
375 WIDTH="100%"><TABLE
376 SUMMARY="Footer navigation table"
377 WIDTH="100%"
378 BORDER="0"
379 CELLPADDING="0"
380 CELLSPACING="0"
381 ><TR
382 ><TD
383 WIDTH="33%"
384 ALIGN="left"
385 VALIGN="top"
386 ><A
387 HREF="problems.html"
388 ACCESSKEY="P"
389 >Prev</A
390 ></TD
391 ><TD
392 WIDTH="34%"
393 ALIGN="center"
394 VALIGN="top"
395 ><A
396 HREF="samba-howto-collection.html"
397 ACCESSKEY="H"
398 >Home</A
399 ></TD
400 ><TD
401 WIDTH="33%"
402 ALIGN="right"
403 VALIGN="top"
404 >&nbsp;</TD
405 ></TR
406 ><TR
407 ><TD
408 WIDTH="33%"
409 ALIGN="left"
410 VALIGN="top"
411 >Analysing and solving samba problems</TD
412 ><TD
413 WIDTH="34%"
414 ALIGN="center"
415 VALIGN="top"
416 ><A
417 HREF="appendixes.html"
418 ACCESSKEY="U"
419 >Up</A
420 ></TD
421 ><TD
422 WIDTH="33%"
423 ALIGN="right"
424 VALIGN="top"
425 >&nbsp;</TD
426 ></TR
427 ></TABLE
428 ></DIV
429 ></BODY
430 ></HTML
431 >