[Samba] What circumstances migth favour frequently locked files
abartlet at samba.org
Sun Mar 14 23:10:02 GMT 2004
On Sun, Mar 14, 2004 at 03:36:43PM +0000, John H Terpstra wrote:
> On Sun, 14 Mar 2004, Vladuta Cristian wrote:
> > Gentlemen, I am running a RH9 - Samba PDC ( 3.0.1pre3) in a mixed
> > W9X/XP/NT production environment and encountered a problem related to
> > locked files. By tracing down the event I suspect it might have happened
> > when a certain user tried to copy a large number of files from an NT
> > server on to the Samba server. The process resulted in a list of locked
> > files that remained there until a smb restart. Below is my event log
> > related to that.
> > However I discovered other files staying locked as well , not in
> > relation with big transfers .
> > Can you please tell me what circumstances might favour such unwanted
> > locking situations? And what are the odds for file corruption in such
> > cases?
> The log below shows the smbd has segfaulted (or crashed). That is
> particularly bad as it will leave entries in the lock tables and of course
> may have corrupted files that were being written to at the time of the
> Segfaults can be caused by two factors:
> 1. Hardware problems
> 2. An executing application attempts an out-of-bounds operation
> By far the most common cause of segfaults is hardware related. Typical
> causes are:
> a. Bad memory
> b. Power instability
> c. Component overheating
> d. Defective components like network cards
> Since Samba-3 was released we have fixed at approx. 6 coding errors that
> could result in segfaults. Most were triggered by unusual conditions and
> are unlikely to affect code that drives main-stream operations.
I beg to differ. We have found a number of malloc heap-corruption
bugs, and they do really hit real users.
If this can be reproduced then running Samba under valgrind, or at the
very least when running Samba after setting 'MALLOC_CHECK_=2' into
your environment, then we can get some very useful debuging
infromation back. See previous mailing list posts for instructions on
how to set up both these debugging tools (which work best on an
installation that has been compiled with debug symbols).
Also make sure you try Samba 3.0.2, we have fixed a *lot* since
3.0.1pre3, including bugs that would produce this kind of error.
More information about the samba