delete on close problem

Jeremy Allison jra at
Tue Nov 13 10:51:20 GMT 2001

On Mon, Nov 12, 2001 at 06:23:00PM -0500, Scott Moomaw wrote:
> Several weeks ago, I noted a problem where applications were creating lots
> of tmp files and unable to save data files when oplocks were on.  I have
> captured more useful data on this problem using a new CVS.  Here's a
> synopsis of the sequence of events.
> open file (creating) new_page_2.htm
> close file
> set map_share_mode: FILE_SHARE_DELETE requested. open_mode = 8000
> open file new_page_2.htm
> close file
> attempt to create file new_page_2.htm [FAILS because file already exists]
> I have a huge level 10 log file that I can share; however, I'm going to
> include a portion of that log file for review.  How is FILE_SHARE_DELETE
> supposed to function?  Should the second close remove the file which would
> allow the succeding open to occur?  The log section that I'm including is
> the 2nd open/close pair which is where I think the problem is.

Ok, I've taken a look at the log, and it's not showing what
I'd expect if it was really a delete on close issue. Theoretically,
the file_attributes section of the SMBntcreate and include a flag
FILE_FLAG_DELETE_ON_CLOSE = 0x04000000L, OR'ed into the attributes.

If that were set, then the open should set the delete on close
and destroy the file on close. Now I tested this with a Win2k
server and they ignore it on the NTcreate, and need to have
it set explicitly with a trans2_setfsinfo call after the open.

So it isn't the bug I thought it was. Now, can you get a 
NetMon trace between W2K client -> W2K server doing exactly
the same thing ? Is so, can you send me the .cap file so I
can take a look and try and match it with the Samba log ?
(Or also do a Netmon cap of W2K to Samba and send both).

Of course, what I'd really like is a method of reproducing
this problem here ? Can you tell me how to do this ? As I
recall, you did try but it was not reproducible here. There
must be something missing in the instructions given, as I'm usually
able to reproduce problems like the 4gb write etc. once people
give *explicit* instructions (with the 4gb problem it was
to do a copy filea+fileb dest, not just a copy bigfile dest :-).


More information about the samba-technical mailing list