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