• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/samba-3.0.13/docs/htmldocs/Samba-HOWTO-Collection/
1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter�37.�Reporting Bugs</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.66.1"><link rel="start" href="index.html" title="The Official Samba-3 HOWTO and Reference Guide"><link rel="up" href="troubleshooting.html" title="Part�V.�Troubleshooting"><link rel="prev" href="problems.html" title="Chapter�36.�Analyzing and Solving Samba Problems"><link rel="next" href="Appendix.html" title="Part�VI.�Appendixes"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter�37.�Reporting Bugs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="problems.html">Prev</a>�</td><th width="60%" align="center">Part�V.�Troubleshooting</th><td width="20%" align="right">�<a accesskey="n" href="Appendix.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="bugreport"></a>Chapter�37.�Reporting Bugs</h2></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><tt class="email">&lt;<a href="mailto:jht@samba.org">jht@samba.org</a>&gt;</tt></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="surname">Vernooij</span></h3><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><tt class="email">&lt;<a href="mailto:jelmer@samba.org">jelmer@samba.org</a>&gt;</tt></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Andrew</span> <span class="surname">Tridgell</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><tt class="email">&lt;<a href="mailto:tridge@samba.org">tridge@samba.org</a>&gt;</tt></p></div></div></div></div><div><p class="pubdate"> 27 June 1997 </p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bugreport.html#id2617311">Introduction</a></span></dt><dt><span class="sect1"><a href="bugreport.html#id2617365">General Information</a></span></dt><dt><span class="sect1"><a href="bugreport.html#dbglvl">Debug Levels</a></span></dt><dd><dl><dt><span class="sect2"><a href="bugreport.html#id2617580">Debugging Specific Operations</a></span></dt></dl></dd><dt><span class="sect1"><a href="bugreport.html#id2617767">Internal Errors</a></span></dt><dt><span class="sect1"><a href="bugreport.html#id2617881">Attaching to a Running Process</a></span></dt><dt><span class="sect1"><a href="bugreport.html#id2617921">Patches</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2617311"></a>Introduction</h2></div></div></div><p>Please report bugs using Samba's
2<a href="https://bugzilla.samba.org/" target="_top">Bugzilla</a> facilities and
3take the time to read this file before you submit a bug
4report. Also, check to see if it has changed between releases, as we
5may be changing the bug reporting mechanism at some point.
6</p><p>
7Please do as much as you can yourself to help track down the
8bug. Samba is maintained by a dedicated group of people who volunteer
9their time, skills and efforts. We receive far more mail than
10we can possibly answer, so you have a much higher chance of a response
11and a fix if you send us a &#8220;<span class="quote"><span class="emphasis"><em>developer friendly</em></span></span>&#8221; bug report that lets
12us fix it fast. 
13</p><p>
14Do not assume that if you post the bug to the comp.protocols.smb
15newsgroup or the mailing list that we will read it. If you suspect that your 
16problem is not a bug but a configuration problem, it is better to send 
17it to the Samba mailing list, as there are thousands of other users on
18that list who may be able to help you.
19</p><p>
20You may also like to look though the recent mailing list archives,
21which are conveniently accessible on the Samba Web pages
22at <a href="http://samba.org/samba/" target="_top">http://samba.org/samba/</a>.
23</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2617365"></a>General Information</h2></div></div></div><p>
24Before submitting a bug report, check your config for silly
25errors. Look in your log files for obvious messages that tell
26you've mis-configured something. Run testparm to check your config
27file for correct syntax.
28</p><p>
29Have you looked through <a href="diagnosis.html" title="Chapter�35.�The Samba Checklist">The Samba Checklist</a>? This is extremely important.
30</p><p>
31If you include part of a log file with your bug report, then be sure to
32annotate it with exactly what you were doing on the client at the
33time and exactly what the results were.
34</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="dbglvl"></a>Debug Levels</h2></div></div></div><p>
35If the bug has anything to do with Samba behaving incorrectly as a
36server (like refusing to open a file), then the log files will probably
37be quite useful. Depending on the problem, a log level of between 3 and
3810 showing the problem may be appropriate. A higher level gives more
39detail, but may use too much disk space.
40</p><p>
41To set the debug level, use the <a class="indexterm" name="id2617418"></a>log level in your 
42<tt class="filename">smb.conf</tt>. You may also find it useful to set the log 
43level higher for just one machine and keep separate logs for each machine. 
44To do this, add the following lines to your main <tt class="filename">smb.conf</tt> file:
45</p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id2617447"></a><i class="parameter"><tt>
46					
47				log level = 10</tt></i></td></tr><tr><td><a class="indexterm" name="id2617462"></a><i class="parameter"><tt>
48					
49				log file = /usr/local/samba/lib/log.%m</tt></i></td></tr><tr><td><a class="indexterm" name="id2617478"></a><i class="parameter"><tt>
50					
51				include = /usr/local/samba/lib/smb.conf.%m</tt></i></td></tr></table><p>
52and create a file <tt class="filename">/usr/local/samba/lib/smb.conf.<i class="replaceable"><tt>machine</tt></i></tt> where
53<i class="replaceable"><tt>machine</tt></i> is the name of the client you wish to debug. In that file
54put any <tt class="filename">smb.conf</tt> commands you want, for example 
55<a class="indexterm" name="id2617516"></a>log level may be useful. This also allows you to 
56experiment with different security systems, protocol levels and so on, on just 
57one machine.
58</p><p>
59The <tt class="filename">smb.conf</tt> entry <a class="indexterm" name="id2617535"></a>log level 
60is synonymous with the parameter <a class="indexterm" name="id2617543"></a>debuglevel that has
61been used in older versions of Samba and is being retained for backward 
62compatibility of <tt class="filename">smb.conf</tt> files.
63</p><p>
64As the <a class="indexterm" name="id2617561"></a>log level value is increased, you will record 
65a significantly greater level of debugging information. For most 
66debugging operations, you may not need a setting higher than 
67<tt class="constant">3</tt>. Nearly 
68all bugs can be tracked at a setting of <tt class="constant">10</tt>, but be 
69prepared for a large volume of log data.
70</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2617580"></a>Debugging Specific Operations</h3></div></div></div><p>
71	Samba-3.x permits debugging (logging) of specific functional components without unnecessarily
72	cluttering the log files with detailed logs for all operations. An example configuration to 
73	achive this is shown in:
74	</p><p>
75</p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id2617601"></a><i class="parameter"><tt>
76					
77				log level = 0 tdb:3 passdb:5 auth:4 vfs:2</tt></i></td></tr><tr><td><a class="indexterm" name="id2617617"></a><i class="parameter"><tt>
78					
79				max log size = 0</tt></i></td></tr><tr><td><a class="indexterm" name="id2617632"></a><i class="parameter"><tt>
80					
81				log file = /var/log/samba/%U.%m.log</tt></i></td></tr></table><p>
82</p><p>
83	This will cause the level of detail to be expanded to the debug class (log level) passed to
84	each funtional area per the value shown above. The first value passed to the <i class="parameter"><tt>log level</tt></i>
85	of <tt class="constant">0</tt> means turn off all unnecessary debugging except the debug classes set for
86	the functional areas as specified. The table shown in <a href="bugreport.html#dbgclass" title="Table�37.1.�Debuggable Functions">Debugable Functions</a>
87	may be used to affect very precise analysis of each SMB operation Samba is conducting.
88	</p><div class="table"><a name="dbgclass"></a><p class="title"><b>Table�37.1.�Debuggable Functions</b></p><table summary="Debuggable Functions" border="1"><colgroup><col><col></colgroup><thead><tr><th align="center">Function Name</th><th align="center">Function Name</th></tr></thead><tbody><tr><td align="center">all</td><td align="center">passdb</td></tr><tr><td align="center">tdb</td><td align="center">sam</td></tr><tr><td align="center">printdrivers</td><td align="center">auth</td></tr><tr><td align="center">lanman</td><td align="center">winbind</td></tr><tr><td align="center">smb</td><td align="center">vfs</td></tr><tr><td align="center">rpc_parse</td><td align="center">idmap</td></tr><tr><td align="center">rpc_srv</td><td align="center">quota</td></tr><tr><td align="center">rpc_cli</td><td align="center">acls</td></tr></tbody></table></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2617767"></a>Internal Errors</h2></div></div></div><p>
89If you get the message &#8220;<span class="quote"><span class="emphasis"><em><span class="errorname">INTERNAL ERROR</span></em></span></span>&#8221; in your log files, 
90it means that Samba got an unexpected signal while running. It is probably a
91segmentation fault and almost certainly means a bug in Samba (unless
92you have faulty hardware or system software).
93</p><p>
94If the message came from smbd, it will probably be accompanied by
95a message that details the last SMB message received by smbd. This
96information is often useful in tracking down the problem so please
97include it in your bug report.
98</p><p>
99You should also detail how to reproduce the problem, if
100possible. Please make this reasonably detailed.
101</p><p>
102<a class="indexterm" name="id2617800"></a>
103You may also find that a core file appeared in a <tt class="filename">corefiles</tt>
104subdirectory of the directory where you keep your Samba log
105files. This file is the most useful tool for tracking down the bug. To
106use it, you do this:
107<a class="indexterm" name="id2617816"></a>
108<a class="indexterm" name="id2617823"></a>
109</p><pre class="screen">
110<tt class="prompt">$ </tt><b class="userinput"><tt>gdb smbd core</tt></b>
111</pre><p>
112adding appropriate paths to smbd and core so gdb can find them. If you
113do not have gdb, try <b class="userinput"><tt>dbx</tt></b>. Then within the debugger,
114use the command <span><b class="command">where</b></span> to give a stack trace of where the
115problem occurred. Include this in your report.
116</p><p>
117If you know any assembly language, do a <span><b class="command">disass</b></span> of the routine
118where the problem occurred (if its in a library routine, then
119disassemble the routine that called it) and try to work out exactly
120where the problem is by looking at the surrounding code. Even if you
121do not know assembly, including this information in the bug report can be
122useful. 
123</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2617881"></a>Attaching to a Running Process</h2></div></div></div><p>
124Unfortunately, some UNIXes (in particular some recent Linux kernels)
125refuse to dump a core file if the task has changed uid (which smbd
126does often). To debug with this sort of system, you could try to attach
127to the running process using
128<b class="userinput"><tt>gdb smbd <i class="replaceable"><tt>PID</tt></i></tt></b> where you get
129<i class="replaceable"><tt>PID</tt></i> from <span class="application">smbstatus</span>.
130Then use <span><b class="command">c</b></span> to continue and try to cause the core dump
131using the client. The debugger should catch the fault and tell you
132where it occurred.
133</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2617921"></a>Patches</h2></div></div></div><p>
134<a class="indexterm" name="id2617929"></a>
135<a class="indexterm" name="id2617936"></a>
136The best sort of bug report is one that includes a fix! If you send us
137patches, please use <b class="userinput"><tt>diff -u</tt></b> format if your version of 
138diff supports it, otherwise use <b class="userinput"><tt>diff -c4</tt></b>. Make sure 
139you do the diff against a clean version of the source and let me know 
140exactly what version you used. 
141</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="problems.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="troubleshooting.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="Appendix.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter�36.�Analyzing and Solving Samba Problems�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Part�VI.�Appendixes</td></tr></table></div></body></html>
142