Samba 1.9.17, Ultrix 4.3, old "slow" share modes

Ian Castle icastle at looksystems.co.uk
Wed Sep 3 15:00:44 GMT 1997


I have noticed a problem with 1.9.17 and the "old style" file based share modes.

Samba has been built with GCC 2.7.2 on Ultrix 4.3 (MIPS).

The problem is that the "share.<dev>.<inode>" share mode file is NOT being deleted and fcntl locks are being left on these files.

Looking at a level 5 trace reveals no problems - indeed all seems to be working well.

The following seems to be the key sequence of events:
	
	lock_share_entry
		fcntl_lock on the share.<dev>.<inode> file
	del_share_mode
		remove the final share entry
		unlink the file
	unlock_share_entry
		unlock the (now deleted) file

None of the system calls fail - the "fcntl" and "unlink" both return successful results, however, SOMETIMES the share file is NOT deleted (it is set to 0 length).

Running "smbstatus" shows that no files are locked, however, running smbstatus for a subsequent time causes it to "hang" - waiting for a lock (called from fcntl_lock) on the share file. This is the case even after the smbd process which created the share file has terminated!

The problem can be easily reproduced simply by opening and closing a file in MS Word. This results in a "share.<dev>.<inode>" file being left behind.

I cannot reproduce the problem by writing a small C program which does
	open
	lock
	delete
	unlock
	close

On a server sharing around 10 clients I am left with around 100 zero length "share" files every day.

Has anyone else any experience of this problem? Any comments?




More information about the samba mailing list