Problems With WinWord mail merge, opening and closing files

Andrew Tridgell tridge at
Fri Jul 17 13:00:12 GMT 1998

> The customer was using mail merge, and when they tried to use it, Word
> complained that a file was locked by someone else.  The user was sure that
> no one else had that file open.
> We checked, and indeed, it as not open for anyone else, and there were no
> other locks on it, except for one owned by the user.

with locks and SMB it's always a good idea to day what sort of lock
you mean. I presume you mean a share mode not a record lock? Did
smbstatus show a share mode setting for the file?
> I then got a trace of the whole process, from staring up word and opening
> the file.

a tcpdump trace?
> It seems that mail merge opens the file for reading and then closes it and
> reopens it again quickly.  I have not looked carefully at the trace or the
> code yet, but is it possible that Samba is getting confused with the open
> happening quickly after the close?

It is unlikely that speed has anything to do with it as Samba
processes the SMBs sequentially within one process. 

Is the problem reproducible? 

Also, when you come to analyse the trace be careful not to assume that
just because Samba denies a 2nd open on a file (if that is what
happens) that that is where the problem is. Often these sorts of
problems are much more subtle than that. To really track them down you
need to reproduce the problem first with Samba then try exactly the
same actions with a Win95 server (not a NT server) and look for
differences in how the two servers handle the requests. You may even
find that a Win95 server exhibits the same problem.

	    - Tridge

More information about the samba-technical mailing list