get rid of CFLAGS from LDSHFLAGS and WINBIND_NSS_LDSHFLAGS and instead
[Samba.git] / docs / htmldocs / bugreport.html
blob9ae4797d31f0b2fb2bf537d34eca6a06053aefdb
1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 35. Reporting Bugs</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.60.1"><link rel="home" href="index.html" title="SAMBA Project Documentation"><link rel="up" href="troubleshooting.html" title="Part V. Troubleshooting"><link rel="previous" href="problems.html" title="Chapter 34. Analysing and solving samba problems"><link rel="next" href="Appendixes.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 35. 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="Appendixes.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 35. Reporting Bugs</h2></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="surname">Someone; Tridge or Karl Auer perhaps?</span></h3></div></div><div><p class="pubdate"> 27 June 1997 </p></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="bugreport.html#id3012269">Introduction</a></dt><dt><a href="bugreport.html#id3012491">General info</a></dt><dt><a href="bugreport.html#id3012528">Debug levels</a></dt><dt><a href="bugreport.html#id3012670">Internal errors</a></dt><dt><a href="bugreport.html#id3012778">Attaching to a running process</a></dt><dt><a href="bugreport.html#id3012825">Patches</a></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id3012269"></a>Introduction</h2></div></div><div></div></div><p>Please report bugs using
2 <a href="https://bugzilla.samba.org/" target="_top">bugzilla</a>.</p><p>
3 Please take the time to read this file before you submit a bug
4 report. Also, please see if it has changed between releases, as we
5 may be changing the bug reporting mechanism at some time.
6 </p><p>
7 Please also do as much as you can yourself to help track down the
8 bug. Samba is maintained by a dedicated group of people who volunteer
9 their time, skills and efforts. We receive far more mail about it than
10 we can possibly answer, so you have a much higher chance of an answer
11 and a fix if you send us a &quot;developer friendly&quot; bug report that lets
12 us fix it fast.
13 </p><p>
14 Do not assume that if you post the bug to the comp.protocols.smb
15 newsgroup or the mailing list that we will read it. If you suspect that your
16 problem is not a bug but a configuration problem then it is better to send
17 it to the Samba mailing list, as there are (at last count) 5000 other users on
18 that list that may be able to help you.
19 </p><p>
20 You may also like to look though the recent mailing list archives,
21 which are conveniently accessible on the Samba web pages
22 at <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="id3012491"></a>General info</h2></div></div><div></div></div><p>
24 Before submitting a bug report check your config for silly
25 errors. Look in your log files for obvious messages that tell you that
26 you've misconfigured something and run testparm to test your config
27 file for correct syntax.
28 </p><p>
29 Have you run through the <a href="diagnosis.html" title="Chapter 33. The Samba checklist">diagnosis</a>?
30 This is very important.
31 </p><p>
32 If you include part of a log file with your bug report then be sure to
33 annotate it with exactly what you were doing on the client at the
34 time, and exactly what the results were.
35 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id3012528"></a>Debug levels</h2></div></div><div></div></div><p>
36 If the bug has anything to do with Samba behaving incorrectly as a
37 server (like refusing to open a file) then the log files will probably
38 be very useful. Depending on the problem a log level of between 3 and
39 10 showing the problem may be appropriate. A higher level gives more
40 detail, but may use too much disk space.
41 </p><p>
42 To set the debug level use the <i class="parameter"><tt>log level</tt></i> in your
43 <tt class="filename">smb.conf</tt>. You may also find it useful to set the log
44 level higher for just one machine and keep separate logs for each machine.
45 To do this use:
46 </p><pre class="programlisting">
47 log level = 10
48 log file = /usr/local/samba/lib/log.%m
49 include = /usr/local/samba/lib/smb.conf.%m
50 </pre><p>
51 then create a file
52 <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
54 put any <tt class="filename">smb.conf</tt> commands you want, for example
55 <i class="parameter"><tt>log level</tt></i> may be useful. This also allows you to
56 experiment with different security systems, protocol levels etc on just
57 one machine.
58 </p><p>
59 The <tt class="filename">smb.conf</tt> entry <i class="parameter"><tt>log level</tt></i>
60 is synonymous with the parameter <i class="parameter"><tt>debuglevel</tt></i> that has
61 been used in older versions of Samba and is being retained for backwards
62 compatibility of <tt class="filename">smb.conf</tt> files.
63 </p><p>
64 As the <i class="parameter"><tt>log level</tt></i> value is increased you will record
65 a significantly increasing level of debugging information. For most
66 debugging operations you may not need a setting higher than
67 <tt class="constant">3</tt>. Nearly
68 all bugs can be tracked at a setting of <tt class="constant">10</tt>, but be
69 prepared for a VERY large volume of log data.
70 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id3012670"></a>Internal errors</h2></div></div><div></div></div><p>
71 If you get a <span class="errorname">INTERNAL ERROR</span> message in your log files
72 it means that Samba got an unexpected signal while running. It is probably a
73 segmentation fault and almost certainly means a bug in Samba (unless
74 you have faulty hardware or system software).
75 </p><p>
76 If the message came from smbd then it will probably be accompanied by
77 a message which details the last SMB message received by smbd. This
78 info is often very useful in tracking down the problem so please
79 include it in your bug report.
80 </p><p>
81 You should also detail how to reproduce the problem, if
82 possible. Please make this reasonably detailed.
83 </p><p>
84 You may also find that a core file appeared in a <tt class="filename">corefiles</tt>
85 subdirectory of the directory where you keep your samba log
86 files. This file is the most useful tool for tracking down the bug. To
87 use it you do this:
88 </p><pre class="screen">
89 <tt class="prompt">$ </tt><b class="userinput"><tt>gdb smbd core</tt></b>
90 </pre><p>
91 adding appropriate paths to smbd and core so gdb can find them. If you
92 don't have gdb then try <b class="userinput"><tt>dbx</tt></b>. Then within the debugger
93 use the command <b class="command">where</b> to give a stack trace of where the
94 problem occurred. Include this in your report.
95 </p><p>
96 If you know any assembly language then do a
97 <b class="command">disass</b> of the routine
98 where the problem occurred (if its in a library routine then
99 disassemble the routine that called it) and try to work out exactly
100 where the problem is by looking at the surrounding code. Even if you
101 don't know assembly, including this info in the bug report can be
102 useful.
103 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id3012778"></a>Attaching to a running process</h2></div></div><div></div></div><p>
104 Unfortunately some unixes (in particular some recent linux kernels)
105 refuse to dump a core file if the task has changed uid (which smbd
106 does often). To debug with this sort of system you could try to attach
107 to the running process using
108 <b class="userinput"><tt>gdb smbd <i class="replaceable"><tt>PID</tt></i></tt></b> where you get
109 <i class="replaceable"><tt>PID</tt></i> from <span class="application">smbstatus</span>.
110 Then use <b class="command">c</b> to continue and try to cause the core dump
111 using the client. The debugger should catch the fault and tell you
112 where it occurred.
113 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id3012825"></a>Patches</h2></div></div><div></div></div><p>
114 The best sort of bug report is one that includes a fix! If you send us
115 patches please use <b class="userinput"><tt>diff -u</tt></b> format if your version of
116 diff supports it, otherwise use <b class="userinput"><tt>diff -c4</tt></b>. Make sure
117 you do the diff against a clean version of the source and let me know
118 exactly what version you used.
119 </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="Appendixes.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 34. Analysing 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>