source: vendor/current/docs-xml/Samba3-HOWTO/TOSHARG-Bugs.xml

Last change on this file was 988, checked in by Silvan Scherrer, 9 years ago

Samba Server: update vendor to version 4.4.3

File size: 10.2 KB
Line 
1<?xml version="1.0" encoding="iso-8859-1"?>
2<!DOCTYPE chapter PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3<chapter id="bugreport">
4
5<chapterinfo>
6 &author.jht;
7 &author.jelmer;
8 &author.tridge;
9 <pubdate> 27 June 1997 </pubdate>
10</chapterinfo>
11
12<title>Reporting Bugs</title>
13
14<sect1>
15<title>Introduction</title>
16
17<para>
18<indexterm><primary>Bugzilla</primary></indexterm>
19<indexterm><primary>bug reports</primary></indexterm>
20Please report bugs using Samba's <ulink url="https://bugzilla.samba.org/">Bugzilla</ulink> facilities and take
21the time to read this file before you submit a bug report. Also, check to see if it has changed between
22releases, as we may be changing the bug reporting mechanism at some point.
23</para>
24
25<para>
26Please do as much as you can yourself to help track down the
27bug. Samba is maintained by a dedicated group of people who volunteer
28their time, skills, and efforts. We receive far more mail than
29we can possibly answer, so you have a much higher chance of a response
30and a fix if you send us a <quote>developer-friendly</quote> bug report that lets
31us fix it fast.
32</para>
33
34<para>
35<indexterm><primary>configuration problem</primary></indexterm>
36If you suspect that your
37problem is not a bug but a configuration problem, it is best to send
38it to the Samba mailing list, as there are thousands of other users on
39that list who may be able to help you.
40</para>
41
42<para>
43You may also like to look though the recent mailing list archives,
44which are conveniently accessible on the Samba Web pages
45at <ulink noescape="1" url="http://samba.org/samba/">http://samba.org/samba/</ulink>.
46</para>
47
48</sect1>
49
50<sect1>
51<title>General Information</title>
52
53<para>
54Before submitting a bug report, check your config for silly
55errors. Look in your log files for obvious messages that tell
56you've misconfigured something. Run testparm to check your config
57file for correct syntax.
58</para>
59
60<para>
61Have you looked through <link linkend="diagnosis">The Samba Checklist</link>? This is extremely important.
62</para>
63
64<para>
65If you include part of a log file with your bug report, then be sure to
66annotate it with exactly what you were doing on the client at the
67time and exactly what the results were.
68</para>
69
70</sect1>
71
72<sect1 id="dbglvl">
73<title>Debug Levels</title>
74
75<para>
76If the bug has anything to do with Samba behaving incorrectly as a
77server (like refusing to open a file), then the log files will probably
78be quite useful. Depending on the problem, a log level of between 3 and
7910 showing the problem may be appropriate. A higher level gives more
80detail but may use too much disk space.
81</para>
82
83<para>
84<indexterm><primary>debug level</primary></indexterm>
85<indexterm><primary>log level</primary></indexterm>
86To set the debug level, use the <smbconfoption name="log level"/> in your
87&smb.conf;. You may also find it useful to set the log
88level higher for just one machine and keep separate logs for each machine.
89To do this, add the following lines to your main &smb.conf; file:
90</para>
91
92<smbconfblock>
93<smbconfoption name="log level">10</smbconfoption>
94<smbconfoption name="log file">/usr/local/samba/lib/log.%m</smbconfoption>
95<smbconfoption name="include">/usr/local/samba/lib/smb.conf.%m</smbconfoption>
96</smbconfblock>
97
98<para>
99and create a file <filename>/usr/local/samba/lib/smb.conf.<replaceable>machine</replaceable></filename> where
100<replaceable>machine</replaceable> is the name of the client you wish to debug. In that file put any
101&smb.conf; commands you want; for example, <smbconfoption name="log level"/> may be useful. This also allows
102you to experiment with different security systems, protocol levels, and so on, on just one machine.
103</para>
104
105<para>
106The &smb.conf; entry <smbconfoption name="log level"/> is synonymous with the parameter <smbconfoption
107name="debuglevel"/> that has been used in older versions of Samba and is being retained for backward
108compatibility of &smb.conf; files.
109</para>
110
111<para>
112As the <smbconfoption name="log level"/> value is increased, you will record a significantly greater level of
113debugging information. For most debugging operations, you may not need a setting higher than
114<constant>3</constant>. Nearly all bugs can be tracked at a setting of <constant>10</constant>, but be
115prepared for a large volume of log data.
116</para>
117
118 <sect2>
119 <title>Debugging-Specific Operations</title>
120
121 <para>
122<indexterm><primary>debugging</primary></indexterm>
123<indexterm><primary>logging</primary></indexterm>
124<indexterm><primary>functional components</primary></indexterm>
125<indexterm><primary>cluttering</primary></indexterm>
126 Samba-3.x permits debugging (logging) of specific functional components without unnecessarily
127 cluttering the log files with detailed logs for all operations. An example configuration to
128 achieve this is shown in:
129 </para>
130
131<para>
132<smbconfblock>
133<smbconfoption name="log level">0 tdb:3 passdb:5 auth:4 vfs:2</smbconfoption>
134<smbconfoption name="max log size">0</smbconfoption>
135<smbconfoption name="log file">/var/log/samba/%U.%m.log</smbconfoption>
136</smbconfblock>
137</para>
138
139 <para>
140 This will cause the level of detail to be expanded to the debug class (log level) passed to
141 each functional area per the value shown above. The first value passed to the <parameter>log level</parameter>
142 of <constant>0</constant> means turn off all unnecessary debugging except the debug classes set for
143 the functional areas as specified. The table shown in <link linkend="dbgclass">Debuggable Functions</link>
144 may be used to attain very precise analysis of each SMB operation Samba is conducting.
145 </para>
146
147 <table frame="all" id="dbgclass">
148 <title>Debuggable Functions</title>
149 <tgroup cols="2" align="center">
150 <thead>
151 <row><entry>Function Name</entry><entry>Function Name</entry></row>
152 </thead>
153 <tbody>
154 <row><entry>all</entry><entry>passdb</entry></row>
155 <row><entry>tdb</entry><entry>sam</entry></row>
156 <row><entry>printdrivers</entry><entry>auth</entry></row>
157 <row><entry>lanman</entry><entry>winbind</entry></row>
158 <row><entry>smb</entry><entry>vfs</entry></row>
159 <row><entry>rpc_parse</entry><entry>idmap</entry></row>
160 <row><entry>rpc_srv</entry><entry>quota</entry></row>
161 <row><entry>rpc_cli</entry><entry>acls</entry></row>
162 </tbody>
163 </tgroup>
164 </table>
165
166 </sect2>
167
168</sect1>
169
170<sect1>
171<title>Internal Errors</title>
172
173<para>
174If you get the message <quote><errorname>INTERNAL ERROR</errorname></quote> in your log files,
175it means that Samba got an unexpected signal while running. It is probably a
176segmentation fault and almost certainly means a bug in Samba (unless
177you have faulty hardware or system software).
178</para>
179
180<para>
181If the message came from smbd, it will probably be accompanied by
182a message that details the last SMB message received by smbd. This
183information is often useful in tracking down the problem, so please
184include it in your bug report.
185</para>
186
187<para>
188You should also detail how to reproduce the problem, if
189possible. Please make this reasonably detailed.
190</para>
191
192
193<para>
194<indexterm><primary>core files</primary></indexterm>
195You may also find that a core file appeared in a <filename>corefiles</filename>
196subdirectory of the directory where you keep your Samba log
197files. This file is the most useful tool for tracking down the bug. To
198use it, you do this:
199<indexterm><primary>gdb</primary></indexterm>
200<indexterm><primary>debug</primary></indexterm>
201<screen>
202&prompt;<userinput>gdb smbd core</userinput>
203</screen>
204</para>
205
206<para>
207<indexterm><primary>dbx</primary></indexterm>
208<indexterm><primary>stack trace</primary></indexterm>
209adding appropriate paths to smbd and core so gdb can find them. If you
210do not have gdb, try <userinput>dbx</userinput>. Then within the debugger,
211use the command <command>where</command> to give a stack trace of where the
212problem occurred. Include this in your report.
213</para>
214
215<para>
216<indexterm><primary>disass</primary></indexterm>
217If you know any assembly language, do a <command>disass</command> of the routine
218where the problem occurred (if it's in a library routine, then
219disassemble the routine that called it) and try to work out exactly
220where the problem is by looking at the surrounding code. Even if you
221do not know assembly, including this information in the bug report can be
222useful.
223</para>
224</sect1>
225
226<sect1>
227<title>Attaching to a Running Process</title>
228
229<para>
230<indexterm><primary>PID</primary></indexterm>
231<indexterm><primary>gdb</primary></indexterm>
232<indexterm><primary>smbstatus</primary></indexterm>
233Unfortunately, some UNIXes (in particular some recent Linux kernels)
234refuse to dump a core file if the task has changed UID (which smbd
235does often). To debug with this sort of system, you could try to attach
236to the running process using
237<userinput>gdb smbd <replaceable>PID</replaceable></userinput>, where you get
238<replaceable>PID</replaceable> from <application>smbstatus</application>.
239Then use <command>c</command> to continue and try to cause the core dump
240using the client. The debugger should catch the fault and tell you
241where it occurred.
242</para>
243
244<para>
245Sometimes it is necessary to build Samba binary files that have debugging
246symbols so as to make it possible to capture enough information from a crashed
247operation to permit the Samba Team to fix the problem.
248</para>
249
250<para>
251Compile with <constant>-g</constant> to ensure you have symbols in place.
252Add the following line to the &smb.conf; file global section:
253<screen>
254panic action = "/bin/sleep 90000"
255</screen>
256to catch any panics. If <command>smbd</command> seems to be frozen, look for any sleep
257processes. If it is not, and appears to be spinning, find the PID
258of the spinning process and type:
259<screen>
260&rootprompt; gdb -p PID
261</screen>
262<indexterm><primary>spinning process</primary></indexterm>
263then type <quote>bt full</quote> to
264get a backtrace to see where the smbd is in the call path.
265</para>
266
267</sect1>
268
269<sect1>
270<title>Patches</title>
271
272
273<para>
274<indexterm><primary>diff</primary></indexterm>
275<indexterm><primary>patch</primary></indexterm>
276The best sort of bug report is one that includes a fix! If you send us
277patches, please use <userinput>diff -u</userinput> format if your version of
278diff supports it; otherwise, use <userinput>diff -c4</userinput>. Make sure
279you do the diff against a clean version of the source and let me know
280exactly what version you used.
281</para>
282
283</sect1>
284</chapter>
Note: See TracBrowser for help on using the repository browser.