Added reference to DIAGNOSIS.txt. Deleted the claim that tridge reads all
[kai/samba.git] / docs / textdocs / BUGS.txt
1 This file describes how to report Samba bugs. 
2
3 >> The email address for bug reports is samba-bugs@anu.edu.au <<
4
5 Please take the time to read this file before you submit a bug
6 report. Also, please see if it has changed between releases, as I
7 may be changing the bug reporting mechanism sometime soon.
8
9 Please also do as much as you can yourself to help track down the
10 bug. I only develop Samba in my spare time and I receive far more mail
11 about it than I can possibly answer, so you have a much higher chance
12 of an answer and a fix if you send me a "developer friendly" bug
13 report that lets me fix it fast. 
14
15 Do not assume that if you post the bug to the comp.protocols.smb
16 newsgroup or the mailing list that I will read it. If you suspect that your 
17 problem is not a bug but a configuration problem then it is better to send 
18 it to the Samba mailing list, as there are (at last count) 1900 other users on
19 that list that may be able to help you.
20
21 You may also like to look though the recent mailing list archives,
22 which are conveniently accessible on the Samba web pages
23 at http://samba.canberra.edu.au/pub/samba/ 
24
25
26 GENERAL INFO
27 ------------
28
29 Before submitting a bug report check your config for silly
30 errors. Look in your log files for obvious messages that tell you that
31 you've misconfigured something and run testparm to test your config
32 file for correct syntax.
33
34 Have you run through DIAGNOSIS.txt? This is very important.
35
36 If you include part of a log file with your bug report then be sure to
37 annotate it with exactly what you were doing on the client at the
38 time, and exactly what the results were.
39
40
41 DEBUG LEVELS
42 ------------
43
44 If the bug has anything to do with Samba behaving incorrectly as a
45 server (like refusing to open a file) then the log files will probably
46 be very useful. Depending on the problem a log level of between 3 and
47 10 showing the problem may be appropriate. A higher level givesmore
48 detail, but may use too much disk space.
49
50 To set the debug level use "log level =" in your smb.conf. You may
51 also find it useful to set the log level higher for just one machine
52 and keep separate logs for each machine. To do this use:
53
54 log file = /usr/local/samba/lib/log.%m
55 include = /usr/local/samba/lib/smb.conf.%m
56
57 then create a file "/usr/local/samba/lib/smb.conf.machine" where
58 "machine" is the name of the client you wish to debug. In that file
59 put any smb.conf commands you want, for example "log level=" may be
60 useful. This also allows you to experiment with different security
61 systems, protocol levels etc on just one machine.
62
63
64 INTERNAL ERRORs
65 ---------------
66
67 If you get a "INTERNAL ERROR" message in your log files it means that
68 Samba got an unexpected signal while running. It is probably a
69 segmentation fault and almost certainly means a bug in Samba (unless
70 you have faulty hardware or system software)
71
72 If the message came from smbd then it will probably be accompanied by
73 a message which details the last SMB message received by smbd. This
74 info is often very useful in tracking down the problem so please
75 include it in your bug report.
76
77 You should also detail how to reproduce the problem, if
78 possible. Please make this reasonably detailed.
79
80 You may also find that a core file appeared in a "corefiles"
81 subdirectory of the directory where you keep your samba log
82 files. This file is the most useful tool for tracking down the bug. To
83 use it you do this:
84
85 gdb smbd core
86
87 adding appropriate paths to smbd and core so gdb can find them. If you
88 don't have gdb then try "dbx". Then within the debugger use the
89 command "where" to give a stack trace of where the problem
90 occurred. Include this in your mail.
91
92 If you known any assembly language then do a "disass" of the routine
93 where the problem occurred (if its in a library routine then
94 disassemble the routine that called it) and try to work out exactly
95 where the problem is by looking at the surrounding code. Even if you
96 don't know assembly then incuding this info in the bug report can be
97 useful. 
98
99
100 ATTACHING TO A RUNNING PROCESS
101 ------------------------------
102
103 Unfortunately some unixes (in particular some recent linux kernels)
104 refuse to dump a core file if the task has changed uid (which smbd
105 does often). To debug with this sort of system you could try to attach
106 to the running process using "gdb smbd PID" where you get PID from
107 smbstatus. Then use "c" to continue and try to cause the core dump
108 using the client. The debugger should catch the fault and tell you
109 where it occurred.
110
111
112 PATCHES
113 -------
114
115 The best sort of bug report is one that includes a fix! If you send me
116 patches please use "diff -u" format if your version of diff supports
117 it, otherwise use "diff -c4". Make sure your do the diff against a
118 clean version of the source and let me know exactly what version you
119 used. 
120